has_defaults 0.4.2 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/.ruby-version +1 -0
  2. data/.travis.yml +56 -0
  3. data/{MIT-LICENSE → LICENSE} +1 -1
  4. data/README.md +23 -4
  5. data/Rakefile +5 -29
  6. data/gemfiles/Gemfile.2.3.mysql2 +13 -0
  7. data/gemfiles/Gemfile.2.3.mysql2.lock +32 -0
  8. data/gemfiles/Gemfile.3.2.mysql2 +12 -0
  9. data/gemfiles/Gemfile.3.2.mysql2.lock +57 -0
  10. data/gemfiles/Gemfile.4.2.mysql2 +10 -0
  11. data/gemfiles/Gemfile.4.2.mysql2.lock +61 -0
  12. data/gemfiles/Gemfile.4.2.pg +10 -0
  13. data/gemfiles/Gemfile.4.2.pg.lock +61 -0
  14. data/gemfiles/Gemfile.5.0.mysql2 +10 -0
  15. data/gemfiles/Gemfile.5.0.mysql2.lock +58 -0
  16. data/gemfiles/Gemfile.5.0.pg +10 -0
  17. data/gemfiles/Gemfile.5.0.pg.lock +58 -0
  18. data/lib/has_defaults.rb +1 -3
  19. data/lib/has_defaults/active_record_ext.rb +9 -2
  20. data/lib/has_defaults/version.rb +1 -1
  21. data/spec/{shared/has_defaults → has_defaults}/active_record_ext_spec.rb +3 -3
  22. data/spec/spec_helper.rb +18 -0
  23. data/spec/support/database.rb +16 -0
  24. data/spec/support/database.sample.yml +10 -0
  25. data/spec/support/database.travis.yml +9 -0
  26. data/spec/support/database.yml +10 -0
  27. data/spec/{shared/app_root/app/models/donut.rb → support/models.rb} +11 -0
  28. metadata +28 -76
  29. data/spec/rails-2.3/Gemfile +0 -8
  30. data/spec/rails-2.3/Gemfile.lock +0 -51
  31. data/spec/rails-2.3/Rakefile +0 -11
  32. data/spec/rails-2.3/app_root/config/boot.rb +0 -129
  33. data/spec/rails-2.3/app_root/config/database.yml +0 -4
  34. data/spec/rails-2.3/app_root/config/environment.rb +0 -14
  35. data/spec/rails-2.3/app_root/config/environments/test.rb +0 -28
  36. data/spec/rails-2.3/app_root/config/preinitializer.rb +0 -20
  37. data/spec/rails-2.3/app_root/config/routes.rb +0 -4
  38. data/spec/rails-2.3/app_root/lib/console_with_fixtures.rb +0 -4
  39. data/spec/rails-2.3/app_root/log/.gitignore +0 -1
  40. data/spec/rails-2.3/app_root/script/console +0 -7
  41. data/spec/rails-2.3/rcov.opts +0 -2
  42. data/spec/rails-2.3/spec.opts +0 -4
  43. data/spec/rails-2.3/spec_helper.rb +0 -24
  44. data/spec/rails-3.0/.rspec +0 -2
  45. data/spec/rails-3.0/Gemfile +0 -9
  46. data/spec/rails-3.0/Gemfile.lock +0 -101
  47. data/spec/rails-3.0/Rakefile +0 -10
  48. data/spec/rails-3.0/app_root/.gitignore +0 -4
  49. data/spec/rails-3.0/app_root/config/application.rb +0 -32
  50. data/spec/rails-3.0/app_root/config/boot.rb +0 -13
  51. data/spec/rails-3.0/app_root/config/database.yml +0 -4
  52. data/spec/rails-3.0/app_root/config/environment.rb +0 -5
  53. data/spec/rails-3.0/app_root/config/environments/test.rb +0 -35
  54. data/spec/rails-3.0/app_root/config/initializers/backtrace_silencers.rb +0 -7
  55. data/spec/rails-3.0/app_root/config/initializers/inflections.rb +0 -10
  56. data/spec/rails-3.0/app_root/config/initializers/mime_types.rb +0 -5
  57. data/spec/rails-3.0/app_root/config/initializers/secret_token.rb +0 -7
  58. data/spec/rails-3.0/app_root/config/initializers/session_store.rb +0 -8
  59. data/spec/rails-3.0/app_root/config/locales/en.yml +0 -5
  60. data/spec/rails-3.0/app_root/config/routes.rb +0 -58
  61. data/spec/rails-3.0/app_root/lib/tasks/.gitkeep +0 -0
  62. data/spec/rails-3.0/app_root/log/.gitkeep +0 -0
  63. data/spec/rails-3.0/app_root/script/rails +0 -6
  64. data/spec/rails-3.0/log/in_memory.log +0 -33
  65. data/spec/rails-3.0/rcov.opts +0 -2
  66. data/spec/rails-3.0/spec_helper.rb +0 -25
  67. data/spec/rails-3.2/.rspec +0 -2
  68. data/spec/rails-3.2/Gemfile +0 -9
  69. data/spec/rails-3.2/Gemfile.lock +0 -120
  70. data/spec/rails-3.2/Rakefile +0 -10
  71. data/spec/rails-3.2/app_root/.gitignore +0 -4
  72. data/spec/rails-3.2/app_root/config/application.rb +0 -32
  73. data/spec/rails-3.2/app_root/config/boot.rb +0 -13
  74. data/spec/rails-3.2/app_root/config/database.yml +0 -4
  75. data/spec/rails-3.2/app_root/config/environment.rb +0 -5
  76. data/spec/rails-3.2/app_root/config/environments/test.rb +0 -35
  77. data/spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb +0 -7
  78. data/spec/rails-3.2/app_root/config/initializers/inflections.rb +0 -10
  79. data/spec/rails-3.2/app_root/config/initializers/mime_types.rb +0 -5
  80. data/spec/rails-3.2/app_root/config/initializers/secret_token.rb +0 -7
  81. data/spec/rails-3.2/app_root/config/initializers/session_store.rb +0 -8
  82. data/spec/rails-3.2/app_root/config/locales/en.yml +0 -5
  83. data/spec/rails-3.2/app_root/config/routes.rb +0 -58
  84. data/spec/rails-3.2/app_root/lib/tasks/.gitkeep +0 -0
  85. data/spec/rails-3.2/app_root/log/.gitkeep +0 -0
  86. data/spec/rails-3.2/app_root/script/rails +0 -6
  87. data/spec/rails-3.2/log/in_memory.log +0 -33
  88. data/spec/rails-3.2/rcov.opts +0 -2
  89. data/spec/rails-3.2/spec_helper.rb +0 -25
  90. data/spec/shared/app_root/app/controllers/application_controller.rb +0 -2
  91. data/spec/shared/app_root/app/models/model_without_defaults.rb +0 -2
  92. data/spec/shared/app_root/app/models/pastry.rb +0 -6
  93. data/spec/shared/app_root/db/migrate/001_create_pastries.rb +0 -19
  94. data/spec/shared/app_root/db/migrate/002_create_model_without_defaults.rb +0 -12
@@ -0,0 +1,10 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'activerecord', '~>5.0.0'
4
+ gem 'rspec', '~>3.5'
5
+ gem 'pg', '~>0.18.4'
6
+
7
+ gem 'rake'
8
+
9
+ gem 'gemika', '>= 0.2.0'
10
+ gem 'has_defaults', path: '..'
@@ -0,0 +1,58 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ has_defaults (0.4.3)
5
+ activerecord
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (5.0.0.1)
11
+ activesupport (= 5.0.0.1)
12
+ activerecord (5.0.0.1)
13
+ activemodel (= 5.0.0.1)
14
+ activesupport (= 5.0.0.1)
15
+ arel (~> 7.0)
16
+ activesupport (5.0.0.1)
17
+ concurrent-ruby (~> 1.0, >= 1.0.2)
18
+ i18n (~> 0.7)
19
+ minitest (~> 5.1)
20
+ tzinfo (~> 1.1)
21
+ arel (7.1.2)
22
+ concurrent-ruby (1.0.2)
23
+ diff-lcs (1.2.5)
24
+ gemika (0.2.0)
25
+ i18n (0.7.0)
26
+ minitest (5.9.0)
27
+ pg (0.18.4)
28
+ rake (11.3.0)
29
+ rspec (3.5.0)
30
+ rspec-core (~> 3.5.0)
31
+ rspec-expectations (~> 3.5.0)
32
+ rspec-mocks (~> 3.5.0)
33
+ rspec-core (3.5.3)
34
+ rspec-support (~> 3.5.0)
35
+ rspec-expectations (3.5.0)
36
+ diff-lcs (>= 1.2.0, < 2.0)
37
+ rspec-support (~> 3.5.0)
38
+ rspec-mocks (3.5.0)
39
+ diff-lcs (>= 1.2.0, < 2.0)
40
+ rspec-support (~> 3.5.0)
41
+ rspec-support (3.5.0)
42
+ thread_safe (0.3.5)
43
+ tzinfo (1.2.2)
44
+ thread_safe (~> 0.1)
45
+
46
+ PLATFORMS
47
+ ruby
48
+
49
+ DEPENDENCIES
50
+ activerecord (~> 5.0.0)
51
+ gemika (>= 0.2.0)
52
+ has_defaults!
53
+ pg (~> 0.18.4)
54
+ rake
55
+ rspec (~> 3.5)
56
+
57
+ BUNDLED WITH
58
+ 1.12.5
@@ -1,4 +1,2 @@
1
+ require 'active_record'
1
2
  require 'has_defaults/active_record_ext'
2
-
3
- ActiveRecord::Base.__send__(:extend, HasDefaults::ActiveRecordExt::ClassMethods)
4
-
@@ -1,10 +1,13 @@
1
1
  module HasDefaults
2
+
3
+ class Error < StandardError; end
4
+
2
5
  module ActiveRecordExt
3
6
 
4
7
  module ClassMethods
5
8
 
6
9
  def has_defaults(attrs)
7
- raise "Hash expected; #{attrs.class} given." unless attrs.is_a?(Hash)
10
+ raise Error, "Hash expected; #{attrs.class} given." unless attrs.is_a?(Hash)
8
11
 
9
12
  include InstanceMethods
10
13
 
@@ -27,7 +30,7 @@ module HasDefaults
27
30
  self.has_defaults_options ||= {}
28
31
  self.has_defaults_options.merge!(attrs)
29
32
 
30
- if Rails.version < '3'
33
+ if ActiveRecord::VERSION::MAJOR < 3
31
34
  # ActiveRecord only calls after_initialize callbacks only if is
32
35
  # explicit defined in a class. We should however only define that
33
36
  # callback if a default has been set, as it really slow downs Rails.
@@ -72,3 +75,7 @@ module HasDefaults
72
75
 
73
76
  end
74
77
  end
78
+
79
+ ActiveRecord::Base.extend(HasDefaults::ActiveRecordExt::ClassMethods)
80
+
81
+
@@ -1,5 +1,5 @@
1
1
  module HasDefaults
2
2
 
3
- VERSION = '0.4.2'
3
+ VERSION = '0.4.4'
4
4
 
5
5
  end
@@ -14,7 +14,7 @@ describe HasDefaults::ActiveRecordExt do
14
14
 
15
15
  it "should use setters methods to set the defaults" do
16
16
  new_donut = Donut.new
17
- new_donut.instance_variable_get('@flavor_setter_called').should be_true
17
+ new_donut.instance_variable_get('@flavor_setter_called').should == true
18
18
  end
19
19
 
20
20
  it "should call procs in the model context when given as defaults" do
@@ -45,7 +45,7 @@ describe HasDefaults::ActiveRecordExt do
45
45
 
46
46
  it "should use getters methods to check if an attribute is nil" do
47
47
  new_donut = Donut.new
48
- new_donut.instance_variable_get('@flavor_getter_called').should be_true
48
+ new_donut.instance_variable_get('@flavor_getter_called').should == true
49
49
  end
50
50
 
51
51
  it "should return default value for an attribute" do
@@ -59,7 +59,7 @@ describe HasDefaults::ActiveRecordExt do
59
59
 
60
60
  it "should define #after_initialize in Rails 2, but not Rails 3 (this method must be defined so after_initialize callbacks run)" do
61
61
  donut = Donut.new
62
- if Rails.version.to_i < 3
62
+ if ActiveRecord::VERSION::MAJOR < 3
63
63
  donut.should respond_to(:after_initialize)
64
64
  else
65
65
  donut.should_not respond_to(:after_initialize)
@@ -0,0 +1,18 @@
1
+ $: << File.join(File.dirname(__FILE__), "/../../lib" )
2
+
3
+ require 'has_defaults'
4
+ require 'gemika'
5
+
6
+ ActiveRecord::Base.default_timezone = :local
7
+
8
+ Dir["#{File.dirname(__FILE__)}/support/*.rb"].sort.each {|f| require f}
9
+ Dir["#{File.dirname(__FILE__)}/shared_examples/*.rb"].sort.each {|f| require f}
10
+
11
+ Gemika::RSpec.configure_transactional_examples
12
+
13
+ if Gemika::Env.rspec_2_plus?
14
+ RSpec.configure do |config|
15
+ config.expect_with(:rspec) { |c| c.syntax = [:should, :expect] }
16
+ config.mock_with(:rspec) { |c| c.syntax = [:should, :expect] }
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ Gemika::Database.new.rewrite_schema! do
2
+
3
+ create_table :pastries do |t|
4
+ t.string :type
5
+ t.string :flavor
6
+ t.string :name
7
+ t.string :maker
8
+ t.string :weight
9
+ t.string :main_ingredient
10
+ t.string :health_benefits
11
+ end
12
+
13
+ create_table :model_without_defaults do |t|
14
+ end
15
+
16
+ end
@@ -0,0 +1,10 @@
1
+ mysql:
2
+ database: has_defaults_test
3
+ host: localhost
4
+ username: root
5
+ password: secret
6
+
7
+ postgresql:
8
+ database: has_defaults_test
9
+ user:
10
+ password:
@@ -0,0 +1,9 @@
1
+ mysql:
2
+ database: has_defaults_test
3
+ username: travis
4
+ password:
5
+
6
+ postgresql:
7
+ database: has_defaults_test
8
+ user: postgres
9
+ password:
@@ -0,0 +1,10 @@
1
+ mysql:
2
+ database: has_defaults_test
3
+ host: localhost
4
+ username: root
5
+ password: junior
6
+
7
+ postgresql:
8
+ database: has_defaults_test
9
+ user:
10
+ password:
@@ -1,3 +1,10 @@
1
+ class Pastry < ActiveRecord::Base
2
+
3
+ has_defaults :main_ingredient => "flour", :maker => "Mom"
4
+
5
+ end
6
+
7
+
1
8
  class Donut < Pastry
2
9
 
3
10
  has_defaults :flavor => "cream", :name => "Cream"
@@ -24,3 +31,7 @@ class Donut < Pastry
24
31
  end
25
32
 
26
33
  end
34
+
35
+
36
+ class ModelWithoutDefaults < ActiveRecord::Base
37
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_defaults
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 2
10
- version: 0.4.2
9
+ - 4
10
+ version: 0.4.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Henning Koch
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2015-05-08 00:00:00 +02:00
19
- default_executable:
18
+ date: 2016-09-27 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: activerecord
@@ -42,82 +41,34 @@ extra_rdoc_files: []
42
41
 
43
42
  files:
44
43
  - .gitignore
45
- - MIT-LICENSE
44
+ - .ruby-version
45
+ - .travis.yml
46
+ - LICENSE
46
47
  - README.md
47
48
  - Rakefile
49
+ - gemfiles/Gemfile.2.3.mysql2
50
+ - gemfiles/Gemfile.2.3.mysql2.lock
51
+ - gemfiles/Gemfile.3.2.mysql2
52
+ - gemfiles/Gemfile.3.2.mysql2.lock
53
+ - gemfiles/Gemfile.4.2.mysql2
54
+ - gemfiles/Gemfile.4.2.mysql2.lock
55
+ - gemfiles/Gemfile.4.2.pg
56
+ - gemfiles/Gemfile.4.2.pg.lock
57
+ - gemfiles/Gemfile.5.0.mysql2
58
+ - gemfiles/Gemfile.5.0.mysql2.lock
59
+ - gemfiles/Gemfile.5.0.pg
60
+ - gemfiles/Gemfile.5.0.pg.lock
48
61
  - has_defaults.gemspec
49
62
  - lib/has_defaults.rb
50
63
  - lib/has_defaults/active_record_ext.rb
51
64
  - lib/has_defaults/version.rb
52
- - spec/rails-2.3/Gemfile
53
- - spec/rails-2.3/Gemfile.lock
54
- - spec/rails-2.3/Rakefile
55
- - spec/rails-2.3/app_root/config/boot.rb
56
- - spec/rails-2.3/app_root/config/database.yml
57
- - spec/rails-2.3/app_root/config/environment.rb
58
- - spec/rails-2.3/app_root/config/environments/test.rb
59
- - spec/rails-2.3/app_root/config/preinitializer.rb
60
- - spec/rails-2.3/app_root/config/routes.rb
61
- - spec/rails-2.3/app_root/lib/console_with_fixtures.rb
62
- - spec/rails-2.3/app_root/log/.gitignore
63
- - spec/rails-2.3/app_root/script/console
64
- - spec/rails-2.3/rcov.opts
65
- - spec/rails-2.3/spec.opts
66
- - spec/rails-2.3/spec_helper.rb
67
- - spec/rails-3.0/.rspec
68
- - spec/rails-3.0/Gemfile
69
- - spec/rails-3.0/Gemfile.lock
70
- - spec/rails-3.0/Rakefile
71
- - spec/rails-3.0/app_root/.gitignore
72
- - spec/rails-3.0/app_root/config/application.rb
73
- - spec/rails-3.0/app_root/config/boot.rb
74
- - spec/rails-3.0/app_root/config/database.yml
75
- - spec/rails-3.0/app_root/config/environment.rb
76
- - spec/rails-3.0/app_root/config/environments/test.rb
77
- - spec/rails-3.0/app_root/config/initializers/backtrace_silencers.rb
78
- - spec/rails-3.0/app_root/config/initializers/inflections.rb
79
- - spec/rails-3.0/app_root/config/initializers/mime_types.rb
80
- - spec/rails-3.0/app_root/config/initializers/secret_token.rb
81
- - spec/rails-3.0/app_root/config/initializers/session_store.rb
82
- - spec/rails-3.0/app_root/config/locales/en.yml
83
- - spec/rails-3.0/app_root/config/routes.rb
84
- - spec/rails-3.0/app_root/lib/tasks/.gitkeep
85
- - spec/rails-3.0/app_root/log/.gitkeep
86
- - spec/rails-3.0/app_root/script/rails
87
- - spec/rails-3.0/log/in_memory.log
88
- - spec/rails-3.0/rcov.opts
89
- - spec/rails-3.0/spec_helper.rb
90
- - spec/rails-3.2/.rspec
91
- - spec/rails-3.2/Gemfile
92
- - spec/rails-3.2/Gemfile.lock
93
- - spec/rails-3.2/Rakefile
94
- - spec/rails-3.2/app_root/.gitignore
95
- - spec/rails-3.2/app_root/config/application.rb
96
- - spec/rails-3.2/app_root/config/boot.rb
97
- - spec/rails-3.2/app_root/config/database.yml
98
- - spec/rails-3.2/app_root/config/environment.rb
99
- - spec/rails-3.2/app_root/config/environments/test.rb
100
- - spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb
101
- - spec/rails-3.2/app_root/config/initializers/inflections.rb
102
- - spec/rails-3.2/app_root/config/initializers/mime_types.rb
103
- - spec/rails-3.2/app_root/config/initializers/secret_token.rb
104
- - spec/rails-3.2/app_root/config/initializers/session_store.rb
105
- - spec/rails-3.2/app_root/config/locales/en.yml
106
- - spec/rails-3.2/app_root/config/routes.rb
107
- - spec/rails-3.2/app_root/lib/tasks/.gitkeep
108
- - spec/rails-3.2/app_root/log/.gitkeep
109
- - spec/rails-3.2/app_root/script/rails
110
- - spec/rails-3.2/log/in_memory.log
111
- - spec/rails-3.2/rcov.opts
112
- - spec/rails-3.2/spec_helper.rb
113
- - spec/shared/app_root/app/controllers/application_controller.rb
114
- - spec/shared/app_root/app/models/donut.rb
115
- - spec/shared/app_root/app/models/model_without_defaults.rb
116
- - spec/shared/app_root/app/models/pastry.rb
117
- - spec/shared/app_root/db/migrate/001_create_pastries.rb
118
- - spec/shared/app_root/db/migrate/002_create_model_without_defaults.rb
119
- - spec/shared/has_defaults/active_record_ext_spec.rb
120
- has_rdoc: true
65
+ - spec/has_defaults/active_record_ext_spec.rb
66
+ - spec/spec_helper.rb
67
+ - spec/support/database.rb
68
+ - spec/support/database.sample.yml
69
+ - spec/support/database.travis.yml
70
+ - spec/support/database.yml
71
+ - spec/support/models.rb
121
72
  homepage: https://github.com/makandra/has_defaults
122
73
  licenses:
123
74
  - MIT
@@ -147,9 +98,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
98
  requirements: []
148
99
 
149
100
  rubyforge_project:
150
- rubygems_version: 1.3.9.5
101
+ rubygems_version: 1.8.29
151
102
  signing_key:
152
103
  specification_version: 3
153
104
  summary: Default values for ActiveRecord models.
154
105
  test_files: []
155
106
 
107
+ has_rdoc:
@@ -1,8 +0,0 @@
1
- source 'http://rubygems.org'
2
-
3
- gem 'sqlite3'
4
- gem 'rails', '=2.3.10'
5
- gem 'rspec', '<2'
6
- gem 'rspec-rails', '<2'
7
- gem 'ruby-debug'
8
- gem 'has_defaults', :path => '../..'
@@ -1,51 +0,0 @@
1
- PATH
2
- remote: ../..
3
- specs:
4
- has_defaults (0.4.1)
5
- activerecord
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- actionmailer (2.3.10)
11
- actionpack (= 2.3.10)
12
- actionpack (2.3.10)
13
- activesupport (= 2.3.10)
14
- rack (~> 1.1.0)
15
- activerecord (2.3.10)
16
- activesupport (= 2.3.10)
17
- activeresource (2.3.10)
18
- activesupport (= 2.3.10)
19
- activesupport (2.3.10)
20
- columnize (0.3.2)
21
- linecache (0.43)
22
- rack (1.1.0)
23
- rails (2.3.10)
24
- actionmailer (= 2.3.10)
25
- actionpack (= 2.3.10)
26
- activerecord (= 2.3.10)
27
- activeresource (= 2.3.10)
28
- activesupport (= 2.3.10)
29
- rake (>= 0.8.3)
30
- rake (0.8.7)
31
- rspec (1.3.1)
32
- rspec-rails (1.3.3)
33
- rack (>= 1.0.0)
34
- rspec (= 1.3.1)
35
- ruby-debug (0.10.4)
36
- columnize (>= 0.1)
37
- ruby-debug-base (~> 0.10.4.0)
38
- ruby-debug-base (0.10.4)
39
- linecache (>= 0.3)
40
- sqlite3 (1.3.6)
41
-
42
- PLATFORMS
43
- ruby
44
-
45
- DEPENDENCIES
46
- has_defaults!
47
- rails (= 2.3.10)
48
- rspec (< 2)
49
- rspec-rails (< 2)
50
- ruby-debug
51
- sqlite3
@@ -1,11 +0,0 @@
1
- require 'rake'
2
- require 'spec/rake/spectask'
3
-
4
- desc 'Default: Run all specs for a specific rails version.'
5
- task :default => :spec
6
-
7
- desc "Run all specs for a specific rails version"
8
- Spec::Rake::SpecTask.new() do |t|
9
- t.spec_opts = ['--options', "\"spec.opts\""]
10
- t.spec_files = defined?(SPEC) ? SPEC : FileList['**/*_spec.rb', '../shared/**/*_spec.rb']
11
- end