dm_preferences 1.5 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 49d213a6e7ac0f8c5ba3a6f8e6e4632d6464e6be
4
- data.tar.gz: 59c090fd0fbbbcec663186af3b6f247bdcd659f9
3
+ metadata.gz: b9aa6bbd4e3efa52972364fd59b785f0dbb93be9
4
+ data.tar.gz: 03ec4bdc0aa0773e696a9258eff0b09e024d6995
5
5
  SHA512:
6
- metadata.gz: dc16349648397c51ce37ecfae41f4f58cd9fbf24b387e90f38b253b0810b754f31c20e62670ebc8aa51358b307c6a68fceca0c05fafc056ec31e81da135b84ab
7
- data.tar.gz: 34d8971768549155dc184c509f21eb24d06c8f013ece976a37f2a8ba1b7386b762420d73aaa7aa8ebaa394166711ce0afc2d1a941bfcd79e5a7e669d0614f72c
6
+ metadata.gz: 193a69208ec790f77ae4405212ad4cdf88b0d93948e8c6655075f13796c28ef29ba4122a2b7d604bdb9d0dc0b2f5e7f4a208abd19b7747917761fd091f080985
7
+ data.tar.gz: 1d75b2dc1642433a1e4fc3e40c308f77c1fb30013806ddc353a527eb436347607e0391e50ad31f3cf2b8ba4267a97cf67b8d906a60387a10213b89d64fc989a0
@@ -1,7 +1,9 @@
1
1
  env:
2
- - "RAILS_VERSION=4.2.0"
3
- - "RAILS_VERSION=5.0.0"
2
+ - "RAILS_VERSION=4.2.10"
3
+ - "RAILS_VERSION=5.0.6"
4
+ - "RAILS_VERSION=5.1.5"
4
5
 
5
6
  rvm:
6
- - 2.2.2
7
- - 2.3.1
7
+ - 2.2.7
8
+ - 2.3.6
9
+ - 2.4.1
@@ -8,8 +8,13 @@
8
8
  # +owner+ is the User record, the +name+ is "color", and the +group+ is the
9
9
  # Car record. This allows preferences to have a sort of context around them.
10
10
  class Preference < ActiveRecord::Base
11
- belongs_to :owner, :polymorphic => true
12
- belongs_to :group, :polymorphic => true
11
+ if ActiveRecord::VERSION::MAJOR >= 5
12
+ belongs_to :owner, :polymorphic => true, :optional => true
13
+ belongs_to :group, :polymorphic => true, :optional => true
14
+ else
15
+ belongs_to :owner, :polymorphic => true
16
+ belongs_to :group, :polymorphic => true
17
+ end
13
18
 
14
19
  validates_presence_of :name, :owner_id, :owner_type
15
20
  validates_presence_of :group_type, :if => :group_id?
@@ -1,3 +1,3 @@
1
1
  module Preferences
2
- VERSION = '1.5'
2
+ VERSION = '1.5.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm_preferences
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.5'
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Walker
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-04-09 00:00:00.000000000 Z
12
+ date: 2018-02-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -129,48 +129,48 @@ signing_key:
129
129
  specification_version: 4
130
130
  summary: Custom preferences for ActiveRecord models
131
131
  test_files:
132
- - spec/dummy/app/models/car.rb
133
- - spec/dummy/app/models/employee.rb
132
+ - spec/spec_helper.rb
133
+ - spec/unit/preference_spec.rb
134
+ - spec/unit/preference_definition_spec.rb
134
135
  - spec/dummy/app/models/manager.rb
136
+ - spec/dummy/app/models/employee.rb
137
+ - spec/dummy/app/models/car.rb
135
138
  - spec/dummy/app/models/user.rb
136
- - spec/dummy/bin/bundle
137
- - spec/dummy/bin/rails
138
139
  - spec/dummy/bin/rake
139
140
  - spec/dummy/bin/setup
140
- - spec/dummy/config/application.rb
141
- - spec/dummy/config/boot.rb
142
- - spec/dummy/config/database.yml
143
- - spec/dummy/config/environment.rb
144
- - spec/dummy/config/environments/development.rb
141
+ - spec/dummy/bin/bundle
142
+ - spec/dummy/bin/rails
143
+ - spec/dummy/config/secrets.yml
144
+ - spec/dummy/config/routes.rb
145
+ - spec/dummy/config/locales/en.yml
145
146
  - spec/dummy/config/environments/production.rb
147
+ - spec/dummy/config/environments/development.rb
146
148
  - spec/dummy/config/environments/test.rb
147
- - spec/dummy/config/initializers/assets.rb
149
+ - spec/dummy/config/environment.rb
150
+ - spec/dummy/config/application.rb
151
+ - spec/dummy/config/database.yml
152
+ - spec/dummy/config/boot.rb
148
153
  - spec/dummy/config/initializers/backtrace_silencers.rb
149
- - spec/dummy/config/initializers/cookies_serializer.rb
150
- - spec/dummy/config/initializers/filter_parameter_logging.rb
151
- - spec/dummy/config/initializers/inflections.rb
152
154
  - spec/dummy/config/initializers/mime_types.rb
155
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
153
156
  - spec/dummy/config/initializers/session_store.rb
154
157
  - spec/dummy/config/initializers/wrap_parameters.rb
155
- - spec/dummy/config/locales/en.yml
156
- - spec/dummy/config/routes.rb
157
- - spec/dummy/config/secrets.yml
158
+ - spec/dummy/config/initializers/assets.rb
159
+ - spec/dummy/config/initializers/cookies_serializer.rb
160
+ - spec/dummy/config/initializers/inflections.rb
158
161
  - spec/dummy/config.ru
159
- - spec/dummy/db/migrate/001_create_users.rb
160
- - spec/dummy/db/migrate/002_create_cars.rb
161
- - spec/dummy/db/migrate/003_create_employees.rb
162
- - spec/dummy/db/migrate/004_create_preferences.rb
162
+ - spec/dummy/Rakefile
163
163
  - spec/dummy/db/schema.rb
164
164
  - spec/dummy/db/test.sqlite3
165
- - spec/dummy/log/development.log
165
+ - spec/dummy/db/migrate/002_create_cars.rb
166
+ - spec/dummy/db/migrate/004_create_preferences.rb
167
+ - spec/dummy/db/migrate/003_create_employees.rb
168
+ - spec/dummy/db/migrate/001_create_users.rb
166
169
  - spec/dummy/log/test.log
167
- - spec/dummy/Rakefile
168
- - spec/factories/car_factory.rb
169
- - spec/factories/employee_factory.rb
170
+ - spec/dummy/log/development.log
171
+ - spec/support/assert_queries.rb
170
172
  - spec/factories/preference_factory.rb
173
+ - spec/factories/employee_factory.rb
174
+ - spec/factories/car_factory.rb
171
175
  - spec/factories/users_factory.rb
172
176
  - spec/functional/preferences_spec.rb
173
- - spec/spec_helper.rb
174
- - spec/support/assert_queries.rb
175
- - spec/unit/preference_definition_spec.rb
176
- - spec/unit/preference_spec.rb