From 60b67d76dc1d98e4269aac7705e9d8323eb42942 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sat, 6 Aug 2016 19:40:54 +0200 Subject: modernizes hash syntax in the rest of the project --- Rakefile | 12 ++++++------ ci/travis.rb | 2 +- tasks/release.rb | 18 +++++++++--------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Rakefile b/Rakefile index 02e9e5997c..3bc4cd19fb 100644 --- a/Rakefile +++ b/Rakefile @@ -5,16 +5,16 @@ require "tasks/release" require "railties/lib/rails/api/task" desc "Build gem files for all projects" -task :build => "all:build" +task build: "all:build" desc "Prepare the release" -task :prep_release => "all:prep_release" +task prep_release: "all:prep_release" desc "Release all gems to rubygems and create a tag" -task :release => "all:release" +task release: "all:release" desc "Run all tests by default" -task :default => %w(test test:isolated) +task default: %w(test test:isolated) %w(test test:isolated package gem).each do |task_name| desc "Run #{task_name} task for all projects" @@ -40,7 +40,7 @@ task :smoke do end desc "Install gems for all projects." -task :install => "all:install" +task install: "all:install" desc "Generate documentation for the Rails framework" if ENV["EDGE"] @@ -50,7 +50,7 @@ else end desc "Bump all versions to match RAILS_VERSION" -task :update_versions => "all:update_versions" +task update_versions: "all:update_versions" # We have a webhook configured in GitHub that gets invoked after pushes. # This hook triggers the following tasks: diff --git a/ci/travis.rb b/ci/travis.rb index 3f9913ac82..ddbc8520e6 100755 --- a/ci/travis.rb +++ b/ci/travis.rb @@ -152,7 +152,7 @@ ENV["GEM"].split(",").each do |gem| next if gem == "aj:integration" && isolated next if gem == "guides" && isolated - build = Build.new(gem, :isolated => isolated) + build = Build.new(gem, isolated: isolated) results[build.key] = build.run! end diff --git a/tasks/release.rb b/tasks/release.rb index eeb7212ed8..d1717cec52 100644 --- a/tasks/release.rb +++ b/tasks/release.rb @@ -53,12 +53,12 @@ directory "pkg" sh cmd end - task :build => [:clean, gem] - task :install => :build do + task build: [:clean, gem] + task install: :build do sh "gem install --pre #{gem}" end - task :push => :build do + task push: :build do sh "gem push #{gem}" # When running the release task we usually run build first to check that the gem works properly. @@ -137,10 +137,10 @@ namespace :changelog do end namespace :all do - task :build => FRAMEWORKS.map { |f| "#{f}:build" } + ["rails:build"] - task :update_versions => FRAMEWORKS.map { |f| "#{f}:update_versions" } + ["rails:update_versions"] - task :install => FRAMEWORKS.map { |f| "#{f}:install" } + ["rails:install"] - task :push => FRAMEWORKS.map { |f| "#{f}:push" } + ["rails:push"] + task build: FRAMEWORKS.map { |f| "#{f}:build" } + ["rails:build"] + task update_versions: FRAMEWORKS.map { |f| "#{f}:update_versions" } + ["rails:update_versions"] + task install: FRAMEWORKS.map { |f| "#{f}:install" } + ["rails:install"] + task push: FRAMEWORKS.map { |f| "#{f}:push" } + ["rails:push"] task :ensure_clean_state do unless `git status -s | grep -v 'RAILS_VERSION\\|CHANGELOG\\|Gemfile.lock'`.strip.empty? @@ -173,7 +173,7 @@ namespace :all do sh "git push --tags" end - task :prep_release => %w(ensure_clean_state build) + task prep_release: %w(ensure_clean_state build) - task :release => %w(ensure_clean_state build bundle commit tag push) + task release: %w(ensure_clean_state build bundle commit tag push) end -- cgit v1.2.3