Skip to content

Commit

Permalink
Replace hash rockets with new syntax (#802)
Browse files Browse the repository at this point in the history
* update rocket hash syntax in Guardfile

* update rocket hash syntax in spec/dummy/lib/tasks/test.rake

* update rocket hash syntax in lib/draper/tasks/test.rake

* update rocket hash syntax in lib/generators/mini_test/decorator_generator.rb

* update rocket hash syntax in schema from dummy app
  • Loading branch information
DmytroStepaniuk authored and codebycliff committed May 8, 2017
1 parent 387878f commit f441d11
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
def rspec_guard(options = {}, &block)
options = {
:version => 2,
:notification => false
version: 2,
notification: false
}.merge(options)

guard 'rspec', options, &block
end

rspec_guard :spec_paths => %w{spec/draper spec/generators} do
rspec_guard spec_paths: %w{spec/draper spec/generators} do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
end

rspec_guard :spec_paths => 'spec/integration', :env => {'RAILS_ENV' => 'development'} do
rspec_guard spec_paths: 'spec/integration', env: {'RAILS_ENV' => 'development'} do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
end

rspec_guard :spec_paths => 'spec/integration', :env => {'RAILS_ENV' => 'production'} do
rspec_guard spec_paths: 'spec/integration', env: {'RAILS_ENV' => 'production'} do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
Expand Down
2 changes: 1 addition & 1 deletion lib/draper/tasks/test.rake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require 'rake/testtask'
require 'rails/test_unit/railtie'

namespace :test do
Rake::TestTask.new(:decorators => "test:prepare") do |t|
Rake::TestTask.new(decorators: "test:prepare") do |t|
t.libs << "test"
t.pattern = "test/decorators/**/*_test.rb"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/mini_test/decorator_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def self.source_root
File.expand_path('../templates', __FILE__)
end

class_option :spec, :type => :boolean, :default => false, :desc => "Use MiniTest::Spec DSL"
class_option :spec, type: :boolean, default: false, desc: "Use MiniTest::Spec DSL"

check_class_collision suffix: "DecoratorTest"

Expand Down
8 changes: 4 additions & 4 deletions spec/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20121019115657) do
ActiveRecord::Schema.define(version: 20121019115657) do

create_table "posts", :force => true do |t|
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
create_table "posts", force: true do |t|
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

end
2 changes: 1 addition & 1 deletion spec/dummy/lib/tasks/test.rake
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ RSpec::Core::RakeTask.new :fast_spec do |t|
t.pattern = "fast_spec/**/*_spec.rb"
end

task :default => [:test, :spec, :fast_spec]
task default: [:test, :spec, :fast_spec]

0 comments on commit f441d11

Please sign in to comment.