assignable_values 0.11.3 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. data/.gitignore +1 -0
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +41 -9
  4. data/Gemfile +16 -0
  5. data/Gemfile.lock +70 -0
  6. data/README.md +16 -5
  7. data/Rakefile +5 -69
  8. data/assignable_values.gemspec +2 -7
  9. data/gemfiles/Gemfile.2.3 +16 -0
  10. data/gemfiles/Gemfile.2.3.lock +40 -0
  11. data/gemfiles/Gemfile.3.2 +16 -0
  12. data/gemfiles/Gemfile.3.2.lock +65 -0
  13. data/gemfiles/Gemfile.4.2 +16 -0
  14. data/gemfiles/Gemfile.4.2.lock +70 -0
  15. data/gemfiles/Gemfile.5.0 +16 -0
  16. data/gemfiles/Gemfile.5.0.lock +67 -0
  17. data/lib/assignable_values/active_record/restriction/base.rb +5 -5
  18. data/lib/assignable_values/active_record/restriction/belongs_to_association.rb +1 -1
  19. data/lib/assignable_values/active_record/restriction/scalar_attribute.rb +4 -4
  20. data/lib/assignable_values/version.rb +1 -1
  21. data/spec/{shared/assignable_values → assignable_values}/active_record_spec.rb +3 -1
  22. data/spec/{shared/assignable_values → assignable_values}/humanized_value_spec.rb +0 -0
  23. data/spec/spec_helper.rb +19 -0
  24. data/spec/support/database.rb +16 -0
  25. data/spec/support/database.sample.yml +5 -0
  26. data/spec/support/database.travis.yml +4 -0
  27. data/spec/{shared/app_root/config/locales/en.yml → support/i18n.yml} +0 -0
  28. data/spec/support/models.rb +20 -0
  29. metadata +36 -226
  30. data/spec/rails-2.3/.bundle/config +0 -2
  31. data/spec/rails-2.3/Gemfile +0 -14
  32. data/spec/rails-2.3/Gemfile.lock +0 -68
  33. data/spec/rails-2.3/Rakefile +0 -11
  34. data/spec/rails-2.3/app_root/config/boot.rb +0 -129
  35. data/spec/rails-2.3/app_root/config/database.yml +0 -4
  36. data/spec/rails-2.3/app_root/config/environment.rb +0 -14
  37. data/spec/rails-2.3/app_root/config/environments/test.rb +0 -28
  38. data/spec/rails-2.3/app_root/config/preinitializer.rb +0 -20
  39. data/spec/rails-2.3/app_root/config/routes.rb +0 -4
  40. data/spec/rails-2.3/app_root/lib/console_with_fixtures.rb +0 -4
  41. data/spec/rails-2.3/app_root/log/.gitignore +0 -1
  42. data/spec/rails-2.3/app_root/script/console +0 -7
  43. data/spec/rails-2.3/rcov.opts +0 -2
  44. data/spec/rails-2.3/spec.opts +0 -4
  45. data/spec/rails-2.3/spec/spec_helper.rb +0 -25
  46. data/spec/rails-3.2/.bundle/config +0 -2
  47. data/spec/rails-3.2/.rspec +0 -2
  48. data/spec/rails-3.2/Gemfile +0 -10
  49. data/spec/rails-3.2/Gemfile.lock +0 -132
  50. data/spec/rails-3.2/Rakefile +0 -10
  51. data/spec/rails-3.2/app_root/.gitignore +0 -4
  52. data/spec/rails-3.2/app_root/config/application.rb +0 -32
  53. data/spec/rails-3.2/app_root/config/boot.rb +0 -13
  54. data/spec/rails-3.2/app_root/config/database.yml +0 -4
  55. data/spec/rails-3.2/app_root/config/environment.rb +0 -5
  56. data/spec/rails-3.2/app_root/config/environments/test.rb +0 -35
  57. data/spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb +0 -7
  58. data/spec/rails-3.2/app_root/config/initializers/inflections.rb +0 -10
  59. data/spec/rails-3.2/app_root/config/initializers/mime_types.rb +0 -5
  60. data/spec/rails-3.2/app_root/config/initializers/secret_token.rb +0 -7
  61. data/spec/rails-3.2/app_root/config/initializers/session_store.rb +0 -8
  62. data/spec/rails-3.2/app_root/config/routes.rb +0 -58
  63. data/spec/rails-3.2/app_root/lib/tasks/.gitkeep +0 -0
  64. data/spec/rails-3.2/app_root/log/.gitkeep +0 -0
  65. data/spec/rails-3.2/app_root/script/rails +0 -6
  66. data/spec/rails-3.2/rcov.opts +0 -2
  67. data/spec/rails-3.2/spec/spec_helper.rb +0 -25
  68. data/spec/rails-4.1/.bundle/config +0 -2
  69. data/spec/rails-4.1/.rspec +0 -2
  70. data/spec/rails-4.1/.ruby-version +0 -1
  71. data/spec/rails-4.1/Gemfile +0 -16
  72. data/spec/rails-4.1/Gemfile.lock +0 -146
  73. data/spec/rails-4.1/Rakefile +0 -12
  74. data/spec/rails-4.1/app_root/.gitignore +0 -16
  75. data/spec/rails-4.1/app_root/bin/bundle +0 -3
  76. data/spec/rails-4.1/app_root/bin/rails +0 -8
  77. data/spec/rails-4.1/app_root/bin/rake +0 -8
  78. data/spec/rails-4.1/app_root/bin/spring +0 -18
  79. data/spec/rails-4.1/app_root/config/application.rb +0 -28
  80. data/spec/rails-4.1/app_root/config/boot.rb +0 -4
  81. data/spec/rails-4.1/app_root/config/database.yml +0 -4
  82. data/spec/rails-4.1/app_root/config/environment.rb +0 -5
  83. data/spec/rails-4.1/app_root/config/environments/development.rb +0 -37
  84. data/spec/rails-4.1/app_root/config/environments/production.rb +0 -83
  85. data/spec/rails-4.1/app_root/config/environments/test.rb +0 -39
  86. data/spec/rails-4.1/app_root/config/initializers/backtrace_silencers.rb +0 -7
  87. data/spec/rails-4.1/app_root/config/initializers/cookies_serializer.rb +0 -3
  88. data/spec/rails-4.1/app_root/config/initializers/filter_parameter_logging.rb +0 -4
  89. data/spec/rails-4.1/app_root/config/initializers/inflections.rb +0 -16
  90. data/spec/rails-4.1/app_root/config/initializers/mime_types.rb +0 -4
  91. data/spec/rails-4.1/app_root/config/initializers/session_store.rb +0 -3
  92. data/spec/rails-4.1/app_root/config/initializers/wrap_parameters.rb +0 -14
  93. data/spec/rails-4.1/app_root/config/routes.rb +0 -3
  94. data/spec/rails-4.1/app_root/config/secrets.yml +0 -22
  95. data/spec/rails-4.1/rcov.opts +0 -2
  96. data/spec/rails-4.1/spec/spec_helper.rb +0 -25
  97. data/spec/shared/app_root/app/controllers/application_controller.rb +0 -2
  98. data/spec/shared/app_root/app/helpers/application_helper.rb +0 -3
  99. data/spec/shared/app_root/app/models/artist.rb +0 -5
  100. data/spec/shared/app_root/app/models/recording/vinyl.rb +0 -5
  101. data/spec/shared/app_root/app/models/song.rb +0 -7
  102. data/spec/shared/app_root/config/database.yml +0 -4
  103. data/spec/shared/app_root/db/migrate/001_create_artists.rb +0 -11
  104. data/spec/shared/app_root/db/migrate/002_create_songs.rb +0 -16
  105. data/spec/shared/app_root/db/migrate/003_create_recordings.rb +0 -13
@@ -0,0 +1,70 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ assignable_values (0.11.3)
5
+ activerecord (>= 2.3)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (4.2.7.1)
11
+ activesupport (= 4.2.7.1)
12
+ builder (~> 3.1)
13
+ activerecord (4.2.7.1)
14
+ activemodel (= 4.2.7.1)
15
+ activesupport (= 4.2.7.1)
16
+ arel (~> 6.0)
17
+ activesupport (4.2.7.1)
18
+ i18n (~> 0.7)
19
+ json (~> 1.7, >= 1.7.7)
20
+ minitest (~> 5.1)
21
+ thread_safe (~> 0.3, >= 0.3.4)
22
+ tzinfo (~> 1.1)
23
+ arel (6.0.3)
24
+ builder (3.2.2)
25
+ database_cleaner (1.5.3)
26
+ diff-lcs (1.2.5)
27
+ gemika (0.3.2)
28
+ i18n (0.7.0)
29
+ json (1.8.3)
30
+ minitest (5.9.1)
31
+ mysql2 (0.3.20)
32
+ rake (10.3.2)
33
+ rspec (3.5.0)
34
+ rspec-core (~> 3.5.0)
35
+ rspec-expectations (~> 3.5.0)
36
+ rspec-mocks (~> 3.5.0)
37
+ rspec-core (3.5.4)
38
+ rspec-support (~> 3.5.0)
39
+ rspec-expectations (3.5.0)
40
+ diff-lcs (>= 1.2.0, < 2.0)
41
+ rspec-support (~> 3.5.0)
42
+ rspec-mocks (3.5.0)
43
+ diff-lcs (>= 1.2.0, < 2.0)
44
+ rspec-support (~> 3.5.0)
45
+ rspec-support (3.5.0)
46
+ rspec_candy (0.3.1)
47
+ rspec
48
+ sneaky-save
49
+ sneaky-save (0.0.5)
50
+ activerecord (>= 3.2.0)
51
+ thread_safe (0.3.5)
52
+ tzinfo (1.2.2)
53
+ thread_safe (~> 0.1)
54
+
55
+ PLATFORMS
56
+ ruby
57
+
58
+ DEPENDENCIES
59
+ activerecord (~> 4.2.0)
60
+ assignable_values!
61
+ database_cleaner
62
+ gemika
63
+ i18n (~> 0.7.0)
64
+ mysql2 (~> 0.3.17)
65
+ rake
66
+ rspec (~> 3.4)
67
+ rspec_candy
68
+
69
+ BUNDLED WITH
70
+ 1.12.5
@@ -0,0 +1,16 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Runtime dependencies
4
+ gem 'activerecord', '~>5.0.0'
5
+ gem 'i18n'
6
+ gem 'mysql2'
7
+
8
+ # Development dependencies
9
+ gem 'rake'
10
+ gem 'database_cleaner'
11
+ gem 'rspec'
12
+ gem 'rspec_candy'
13
+ gem 'gemika'
14
+
15
+ # Gem under test
16
+ gem 'assignable_values', :path => '..'
@@ -0,0 +1,67 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ assignable_values (0.11.3)
5
+ activerecord (>= 2.3)
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.4)
22
+ concurrent-ruby (1.0.2)
23
+ database_cleaner (1.5.3)
24
+ diff-lcs (1.2.5)
25
+ gemika (0.3.2)
26
+ i18n (0.7.0)
27
+ minitest (5.9.1)
28
+ mysql2 (0.4.5)
29
+ rake (11.3.0)
30
+ rspec (3.5.0)
31
+ rspec-core (~> 3.5.0)
32
+ rspec-expectations (~> 3.5.0)
33
+ rspec-mocks (~> 3.5.0)
34
+ rspec-core (3.5.4)
35
+ rspec-support (~> 3.5.0)
36
+ rspec-expectations (3.5.0)
37
+ diff-lcs (>= 1.2.0, < 2.0)
38
+ rspec-support (~> 3.5.0)
39
+ rspec-mocks (3.5.0)
40
+ diff-lcs (>= 1.2.0, < 2.0)
41
+ rspec-support (~> 3.5.0)
42
+ rspec-support (3.5.0)
43
+ rspec_candy (0.4.1)
44
+ rspec
45
+ sneaky-save
46
+ sneaky-save (0.1.2)
47
+ activerecord (>= 3.2.0)
48
+ thread_safe (0.3.5)
49
+ tzinfo (1.2.2)
50
+ thread_safe (~> 0.1)
51
+
52
+ PLATFORMS
53
+ ruby
54
+
55
+ DEPENDENCIES
56
+ activerecord (~> 5.0.0)
57
+ assignable_values!
58
+ database_cleaner
59
+ gemika
60
+ i18n
61
+ mysql2
62
+ rake
63
+ rspec
64
+ rspec_candy
65
+
66
+ BUNDLED WITH
67
+ 1.12.5
@@ -152,7 +152,7 @@ module AssignableValues
152
152
  ensure_after_initialize_callback_enabled
153
153
  restriction = self
154
154
  enhance_model do
155
- set_default_method = "set_default_#{restriction.property}"
155
+ set_default_method = :"set_default_#{restriction.property}"
156
156
  define_method set_default_method do
157
157
  restriction.set_default(self)
158
158
  end
@@ -164,7 +164,7 @@ module AssignableValues
164
164
  end
165
165
 
166
166
  def ensure_after_initialize_callback_enabled
167
- if Rails.version < '3'
167
+ if Gemika::Env.gem?('activerecord', '<3')
168
168
  enhance_model do
169
169
  # Old ActiveRecord version only call after_initialize callbacks only if this method is defined in a class.
170
170
  unless method_defined?(:after_initialize)
@@ -177,7 +177,7 @@ module AssignableValues
177
177
  def setup_validation
178
178
  restriction = self
179
179
  enhance_model do
180
- validate_method = "validate_#{restriction.property}_assignable"
180
+ validate_method = :"validate_#{restriction.property}_assignable"
181
181
  define_method validate_method do
182
182
  restriction.validate_record(self)
183
183
  end
@@ -188,7 +188,7 @@ module AssignableValues
188
188
  def define_assignable_values_method
189
189
  restriction = self
190
190
  enhance_model do
191
- assignable_values_method = "assignable_#{restriction.property.to_s.pluralize}"
191
+ assignable_values_method = :"assignable_#{restriction.property.to_s.pluralize}"
192
192
  define_method assignable_values_method do |*args|
193
193
  # Ruby 1.8.7 does not support optional block arguments :(
194
194
  options = args.first || {}
@@ -223,7 +223,7 @@ module AssignableValues
223
223
  def assignable_values_from_delegate(record)
224
224
  delegate = delegate(record)
225
225
  delegate.present? or raise DelegateUnavailable, "Cannot query a nil delegate for assignable values"
226
- delegate_query_method = "assignable_#{model.name.underscore.gsub('/', '_')}_#{property.to_s.pluralize}"
226
+ delegate_query_method = :"assignable_#{model.name.underscore.gsub('/', '_')}_#{property.to_s.pluralize}"
227
227
  args = delegate.method(delegate_query_method).arity == 1 ? [record] : []
228
228
  delegate.send(delegate_query_method, *args)
229
229
  end
@@ -49,7 +49,7 @@ module AssignableValues
49
49
  private
50
50
 
51
51
  def association_id_was_method
52
- "#{association_id_method}_was"
52
+ :"#{association_id_method}_was"
53
53
  end
54
54
 
55
55
  end
@@ -50,7 +50,7 @@ module AssignableValues
50
50
  def define_humanized_value_class_method
51
51
  restriction = self
52
52
  enhance_model_singleton do
53
- define_method "humanized_#{restriction.property}" do |given_value|
53
+ define_method :"humanized_#{restriction.property}" do |given_value|
54
54
  restriction.humanized_value(nil, given_value)
55
55
  end
56
56
  end
@@ -59,7 +59,7 @@ module AssignableValues
59
59
  def define_humanized_value_instance_method
60
60
  restriction = self
61
61
  enhance_model do
62
- define_method "humanized_#{restriction.property}" do |*args|
62
+ define_method :"humanized_#{restriction.property}" do |*args|
63
63
  values = restriction.assignable_values(self)
64
64
  given_value = args[0]
65
65
  value = given_value || send(restriction.property)
@@ -71,7 +71,7 @@ module AssignableValues
71
71
  def define_humanized_values_instance_method
72
72
  restriction = self
73
73
  enhance_model do
74
- define_method "humanized_#{restriction.property.to_s.pluralize}" do
74
+ define_method :"humanized_#{restriction.property.to_s.pluralize}" do
75
75
  restriction.humanized_values(self)
76
76
  end
77
77
  end
@@ -99,7 +99,7 @@ module AssignableValues
99
99
  private
100
100
 
101
101
  def value_was_method
102
- "#{property}_was"
102
+ :"#{property}_was"
103
103
  end
104
104
 
105
105
  end
@@ -1,3 +1,3 @@
1
1
  module AssignableValues
2
- VERSION = '0.11.3'
2
+ VERSION = '0.12.0'
3
3
  end
@@ -233,7 +233,9 @@ describe AssignableValues::ActiveRecord do
233
233
  end
234
234
  end
235
235
 
236
- klass.new(:creator => Artist.new).should have(1).error_on(:artist_id)
236
+ song = klass.new(:creator => Artist.new)
237
+ song.valid?
238
+ song.errors[:artist_id].should be_present
237
239
  end
238
240
 
239
241
  it 'should allow a nil association if the :allow_blank option is set' do
@@ -0,0 +1,19 @@
1
+ $: << File.join(File.dirname(__FILE__), "/../../lib" )
2
+
3
+ require 'i18n'
4
+ require 'mysql2'
5
+ require 'active_record'
6
+ require 'assignable_values'
7
+ require 'rspec_candy/all'
8
+ require 'gemika'
9
+
10
+ I18n.enforce_available_locales = true
11
+ I18n.load_path = [File.join(File.dirname(__FILE__), 'support/i18n.yml')]
12
+ I18n.default_locale = :en
13
+
14
+ ActiveRecord::Base.default_timezone = :local
15
+
16
+ Dir["#{File.dirname(__FILE__)}/support/*.rb"].sort.each {|f| require f}
17
+
18
+ Gemika::RSpec.configure_clean_database_before_example
19
+ Gemika::RSpec.configure_should_syntax
@@ -0,0 +1,16 @@
1
+ Gemika::Database.new.rewrite_schema! do
2
+
3
+ create_table :artists
4
+
5
+ create_table :songs do |t|
6
+ t.integer :artist_id
7
+ t.string :genre
8
+ t.integer :year
9
+ t.integer :duration
10
+ end
11
+
12
+ create_table :vinyl_recordings do |t|
13
+ t.integer :year
14
+ end
15
+
16
+ end
@@ -0,0 +1,5 @@
1
+ mysql:
2
+ database: assignable_values_test
3
+ host: localhost
4
+ username: root
5
+ password: secret
@@ -0,0 +1,4 @@
1
+ mysql:
2
+ database: assignable_values_test
3
+ username: travis
4
+ password:
@@ -0,0 +1,20 @@
1
+ class Artist < ActiveRecord::Base
2
+
3
+ has_many :songs
4
+
5
+ end
6
+
7
+
8
+ class Song < ActiveRecord::Base
9
+
10
+ belongs_to :artist
11
+
12
+ attr_accessor :sub_genre
13
+
14
+ end
15
+
16
+ module Recording
17
+ class Vinyl < ActiveRecord::Base
18
+ self.table_name = 'vinyl_recordings'
19
+ end
20
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assignable_values
3
3
  version: !ruby/object:Gem::Version
4
- hash: 53
4
+ hash: 47
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 11
9
- - 3
10
- version: 0.11.3
8
+ - 12
9
+ - 0
10
+ version: 0.12.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Henning Koch
@@ -24,73 +24,15 @@ dependencies:
24
24
  none: false
25
25
  requirements:
26
26
  - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
32
- type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: rails
36
- prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- none: false
39
- requirements:
40
- - - ~>
41
27
  - !ruby/object:Gem::Version
42
28
  hash: 5
43
29
  segments:
44
- - 3
45
- - 1
46
- version: "3.1"
47
- type: :development
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: rspec
51
- prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ~>
56
- - !ruby/object:Gem::Version
57
- hash: 19
58
- segments:
59
30
  - 2
60
- - 8
61
- version: "2.8"
62
- type: :development
63
- version_requirements: *id003
64
- - !ruby/object:Gem::Dependency
65
- name: rspec-rails
66
- prerelease: false
67
- requirement: &id004 !ruby/object:Gem::Requirement
68
- none: false
69
- requirements:
70
- - - ~>
71
- - !ruby/object:Gem::Version
72
- hash: 19
73
- segments:
74
- - 2
75
- - 8
76
- version: "2.8"
77
- type: :development
78
- version_requirements: *id004
79
- - !ruby/object:Gem::Dependency
80
- name: sqlite3
81
- prerelease: false
82
- requirement: &id005 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- hash: 3
88
- segments:
89
- - 0
90
- version: "0"
91
- type: :development
92
- version_requirements: *id005
93
- description: Restrict the values assignable to ActiveRecord attributes or associations. Or enums on steroids.
31
+ - 3
32
+ version: "2.3"
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ description: Restrict the values assignable to ActiveRecord attributes or associations
94
36
  email: henning.koch@makandra.de
95
37
  executables: []
96
38
 
@@ -103,10 +45,20 @@ files:
103
45
  - .rspec
104
46
  - .ruby-version
105
47
  - .travis.yml
48
+ - Gemfile
49
+ - Gemfile.lock
106
50
  - LICENSE
107
51
  - README.md
108
52
  - Rakefile
109
53
  - assignable_values.gemspec
54
+ - gemfiles/Gemfile.2.3
55
+ - gemfiles/Gemfile.2.3.lock
56
+ - gemfiles/Gemfile.3.2
57
+ - gemfiles/Gemfile.3.2.lock
58
+ - gemfiles/Gemfile.4.2
59
+ - gemfiles/Gemfile.4.2.lock
60
+ - gemfiles/Gemfile.5.0
61
+ - gemfiles/Gemfile.5.0.lock
110
62
  - lib/assignable_values.rb
111
63
  - lib/assignable_values/active_record.rb
112
64
  - lib/assignable_values/active_record/restriction/base.rb
@@ -116,85 +68,14 @@ files:
116
68
  - lib/assignable_values/humanizable_string.rb
117
69
  - lib/assignable_values/humanized_value.rb
118
70
  - lib/assignable_values/version.rb
119
- - spec/rails-2.3/.bundle/config
120
- - spec/rails-2.3/Gemfile
121
- - spec/rails-2.3/Gemfile.lock
122
- - spec/rails-2.3/Rakefile
123
- - spec/rails-2.3/app_root/config/boot.rb
124
- - spec/rails-2.3/app_root/config/database.yml
125
- - spec/rails-2.3/app_root/config/environment.rb
126
- - spec/rails-2.3/app_root/config/environments/test.rb
127
- - spec/rails-2.3/app_root/config/preinitializer.rb
128
- - spec/rails-2.3/app_root/config/routes.rb
129
- - spec/rails-2.3/app_root/lib/console_with_fixtures.rb
130
- - spec/rails-2.3/app_root/log/.gitignore
131
- - spec/rails-2.3/app_root/script/console
132
- - spec/rails-2.3/rcov.opts
133
- - spec/rails-2.3/spec.opts
134
- - spec/rails-2.3/spec/spec_helper.rb
135
- - spec/rails-3.2/.bundle/config
136
- - spec/rails-3.2/.rspec
137
- - spec/rails-3.2/Gemfile
138
- - spec/rails-3.2/Gemfile.lock
139
- - spec/rails-3.2/Rakefile
140
- - spec/rails-3.2/app_root/.gitignore
141
- - spec/rails-3.2/app_root/config/application.rb
142
- - spec/rails-3.2/app_root/config/boot.rb
143
- - spec/rails-3.2/app_root/config/database.yml
144
- - spec/rails-3.2/app_root/config/environment.rb
145
- - spec/rails-3.2/app_root/config/environments/test.rb
146
- - spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb
147
- - spec/rails-3.2/app_root/config/initializers/inflections.rb
148
- - spec/rails-3.2/app_root/config/initializers/mime_types.rb
149
- - spec/rails-3.2/app_root/config/initializers/secret_token.rb
150
- - spec/rails-3.2/app_root/config/initializers/session_store.rb
151
- - spec/rails-3.2/app_root/config/routes.rb
152
- - spec/rails-3.2/app_root/lib/tasks/.gitkeep
153
- - spec/rails-3.2/app_root/log/.gitkeep
154
- - spec/rails-3.2/app_root/script/rails
155
- - spec/rails-3.2/rcov.opts
156
- - spec/rails-3.2/spec/spec_helper.rb
157
- - spec/rails-4.1/.bundle/config
158
- - spec/rails-4.1/.rspec
159
- - spec/rails-4.1/.ruby-version
160
- - spec/rails-4.1/Gemfile
161
- - spec/rails-4.1/Gemfile.lock
162
- - spec/rails-4.1/Rakefile
163
- - spec/rails-4.1/app_root/.gitignore
164
- - spec/rails-4.1/app_root/bin/bundle
165
- - spec/rails-4.1/app_root/bin/rails
166
- - spec/rails-4.1/app_root/bin/rake
167
- - spec/rails-4.1/app_root/bin/spring
168
- - spec/rails-4.1/app_root/config/application.rb
169
- - spec/rails-4.1/app_root/config/boot.rb
170
- - spec/rails-4.1/app_root/config/database.yml
171
- - spec/rails-4.1/app_root/config/environment.rb
172
- - spec/rails-4.1/app_root/config/environments/development.rb
173
- - spec/rails-4.1/app_root/config/environments/production.rb
174
- - spec/rails-4.1/app_root/config/environments/test.rb
175
- - spec/rails-4.1/app_root/config/initializers/backtrace_silencers.rb
176
- - spec/rails-4.1/app_root/config/initializers/cookies_serializer.rb
177
- - spec/rails-4.1/app_root/config/initializers/filter_parameter_logging.rb
178
- - spec/rails-4.1/app_root/config/initializers/inflections.rb
179
- - spec/rails-4.1/app_root/config/initializers/mime_types.rb
180
- - spec/rails-4.1/app_root/config/initializers/session_store.rb
181
- - spec/rails-4.1/app_root/config/initializers/wrap_parameters.rb
182
- - spec/rails-4.1/app_root/config/routes.rb
183
- - spec/rails-4.1/app_root/config/secrets.yml
184
- - spec/rails-4.1/rcov.opts
185
- - spec/rails-4.1/spec/spec_helper.rb
186
- - spec/shared/app_root/app/controllers/application_controller.rb
187
- - spec/shared/app_root/app/helpers/application_helper.rb
188
- - spec/shared/app_root/app/models/artist.rb
189
- - spec/shared/app_root/app/models/recording/vinyl.rb
190
- - spec/shared/app_root/app/models/song.rb
191
- - spec/shared/app_root/config/database.yml
192
- - spec/shared/app_root/config/locales/en.yml
193
- - spec/shared/app_root/db/migrate/001_create_artists.rb
194
- - spec/shared/app_root/db/migrate/002_create_songs.rb
195
- - spec/shared/app_root/db/migrate/003_create_recordings.rb
196
- - spec/shared/assignable_values/active_record_spec.rb
197
- - spec/shared/assignable_values/humanized_value_spec.rb
71
+ - spec/assignable_values/active_record_spec.rb
72
+ - spec/assignable_values/humanized_value_spec.rb
73
+ - spec/spec_helper.rb
74
+ - spec/support/database.rb
75
+ - spec/support/database.sample.yml
76
+ - spec/support/database.travis.yml
77
+ - spec/support/i18n.yml
78
+ - spec/support/models.rb
198
79
  homepage: https://github.com/makandra/assignable_values
199
80
  licenses:
200
81
  - MIT
@@ -227,85 +108,14 @@ rubyforge_project:
227
108
  rubygems_version: 1.8.29
228
109
  signing_key:
229
110
  specification_version: 3
230
- summary: Restrict the values assignable to ActiveRecord attributes or associations. Or enums on steroids.
111
+ summary: Restrict the values assignable to ActiveRecord attributes or associations
231
112
  test_files:
232
- - spec/rails-2.3/.bundle/config
233
- - spec/rails-2.3/Gemfile
234
- - spec/rails-2.3/Gemfile.lock
235
- - spec/rails-2.3/Rakefile
236
- - spec/rails-2.3/app_root/config/boot.rb
237
- - spec/rails-2.3/app_root/config/database.yml
238
- - spec/rails-2.3/app_root/config/environment.rb
239
- - spec/rails-2.3/app_root/config/environments/test.rb
240
- - spec/rails-2.3/app_root/config/preinitializer.rb
241
- - spec/rails-2.3/app_root/config/routes.rb
242
- - spec/rails-2.3/app_root/lib/console_with_fixtures.rb
243
- - spec/rails-2.3/app_root/log/.gitignore
244
- - spec/rails-2.3/app_root/script/console
245
- - spec/rails-2.3/rcov.opts
246
- - spec/rails-2.3/spec.opts
247
- - spec/rails-2.3/spec/spec_helper.rb
248
- - spec/rails-3.2/.bundle/config
249
- - spec/rails-3.2/.rspec
250
- - spec/rails-3.2/Gemfile
251
- - spec/rails-3.2/Gemfile.lock
252
- - spec/rails-3.2/Rakefile
253
- - spec/rails-3.2/app_root/.gitignore
254
- - spec/rails-3.2/app_root/config/application.rb
255
- - spec/rails-3.2/app_root/config/boot.rb
256
- - spec/rails-3.2/app_root/config/database.yml
257
- - spec/rails-3.2/app_root/config/environment.rb
258
- - spec/rails-3.2/app_root/config/environments/test.rb
259
- - spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb
260
- - spec/rails-3.2/app_root/config/initializers/inflections.rb
261
- - spec/rails-3.2/app_root/config/initializers/mime_types.rb
262
- - spec/rails-3.2/app_root/config/initializers/secret_token.rb
263
- - spec/rails-3.2/app_root/config/initializers/session_store.rb
264
- - spec/rails-3.2/app_root/config/routes.rb
265
- - spec/rails-3.2/app_root/lib/tasks/.gitkeep
266
- - spec/rails-3.2/app_root/log/.gitkeep
267
- - spec/rails-3.2/app_root/script/rails
268
- - spec/rails-3.2/rcov.opts
269
- - spec/rails-3.2/spec/spec_helper.rb
270
- - spec/rails-4.1/.bundle/config
271
- - spec/rails-4.1/.rspec
272
- - spec/rails-4.1/.ruby-version
273
- - spec/rails-4.1/Gemfile
274
- - spec/rails-4.1/Gemfile.lock
275
- - spec/rails-4.1/Rakefile
276
- - spec/rails-4.1/app_root/.gitignore
277
- - spec/rails-4.1/app_root/bin/bundle
278
- - spec/rails-4.1/app_root/bin/rails
279
- - spec/rails-4.1/app_root/bin/rake
280
- - spec/rails-4.1/app_root/bin/spring
281
- - spec/rails-4.1/app_root/config/application.rb
282
- - spec/rails-4.1/app_root/config/boot.rb
283
- - spec/rails-4.1/app_root/config/database.yml
284
- - spec/rails-4.1/app_root/config/environment.rb
285
- - spec/rails-4.1/app_root/config/environments/development.rb
286
- - spec/rails-4.1/app_root/config/environments/production.rb
287
- - spec/rails-4.1/app_root/config/environments/test.rb
288
- - spec/rails-4.1/app_root/config/initializers/backtrace_silencers.rb
289
- - spec/rails-4.1/app_root/config/initializers/cookies_serializer.rb
290
- - spec/rails-4.1/app_root/config/initializers/filter_parameter_logging.rb
291
- - spec/rails-4.1/app_root/config/initializers/inflections.rb
292
- - spec/rails-4.1/app_root/config/initializers/mime_types.rb
293
- - spec/rails-4.1/app_root/config/initializers/session_store.rb
294
- - spec/rails-4.1/app_root/config/initializers/wrap_parameters.rb
295
- - spec/rails-4.1/app_root/config/routes.rb
296
- - spec/rails-4.1/app_root/config/secrets.yml
297
- - spec/rails-4.1/rcov.opts
298
- - spec/rails-4.1/spec/spec_helper.rb
299
- - spec/shared/app_root/app/controllers/application_controller.rb
300
- - spec/shared/app_root/app/helpers/application_helper.rb
301
- - spec/shared/app_root/app/models/artist.rb
302
- - spec/shared/app_root/app/models/recording/vinyl.rb
303
- - spec/shared/app_root/app/models/song.rb
304
- - spec/shared/app_root/config/database.yml
305
- - spec/shared/app_root/config/locales/en.yml
306
- - spec/shared/app_root/db/migrate/001_create_artists.rb
307
- - spec/shared/app_root/db/migrate/002_create_songs.rb
308
- - spec/shared/app_root/db/migrate/003_create_recordings.rb
309
- - spec/shared/assignable_values/active_record_spec.rb
310
- - spec/shared/assignable_values/humanized_value_spec.rb
113
+ - spec/assignable_values/active_record_spec.rb
114
+ - spec/assignable_values/humanized_value_spec.rb
115
+ - spec/spec_helper.rb
116
+ - spec/support/database.rb
117
+ - spec/support/database.sample.yml
118
+ - spec/support/database.travis.yml
119
+ - spec/support/i18n.yml
120
+ - spec/support/models.rb
311
121
  has_rdoc: