measured-rails 2.5.1 → 2.8.0

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
  SHA256:
3
- metadata.gz: e5340f7b4030fd78e807b7ad45a0b5a9e5f58062b7cee3ca1e28170900e3eaba
4
- data.tar.gz: 6f5613d8d80893a1a5fb1644f0f2b55cb25ddf1b8f20595170ec1b7ac78deee8
3
+ metadata.gz: 0f53b4259959a215a55d423a3fb805982755d583a4d134ec2704df4017a58fc1
4
+ data.tar.gz: d28466e9df22e295aca2ed764411c8e55c0e7d2e63cda1d26d66a432ca789e5c
5
5
  SHA512:
6
- metadata.gz: cb30cf468cc1fadcd546e8415a360226cbe4ca161c180e08c2e43461c684cb06f5a0e911f95d34f2704b36532ecb86a2272eb596af91b6c564ab8381e5318e7f
7
- data.tar.gz: 3dad6cfd31a4adfbc72732a26697503b74ad9dfbff599d4b9ab8937dc4e57ee2a5a18e4410769bcdb4206ce98665a459f8a7db418f8f30b994f3d87bb33f0eed
6
+ metadata.gz: 17b097b9ed058aa86f20605b435bcb340a68a3fb9a7f40d5cb7fd4f17411634abf5d14f86057b735a84b4db20ac025bfb0809d7bec88e8636c9798e261dabba0
7
+ data.tar.gz: 2769862d7e7946e1a27f547fe7c0ef7ac4384a879619b63011376c57727337aa5ffbd790c99d3d20fe549885abb70edcfdd73cf5867ec1671c60a5c84255bdeb
@@ -0,0 +1,38 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ env:
9
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
10
+ strategy:
11
+ fail-fast: false
12
+ matrix:
13
+ ruby:
14
+ - '2.6'
15
+ - '2.7'
16
+ - '3.0'
17
+ gemfile:
18
+ - Gemfile
19
+ - gemfiles/rails-5.2.gemfile
20
+ - gemfiles/rails-6.0.gemfile
21
+ - gemfiles/rails-6.1.gemfile
22
+ - gemfiles/rails-edge.gemfile
23
+ exclude:
24
+ - ruby: '2.6'
25
+ gemfile: gemfiles/rails-edge.gemfile
26
+ - ruby: '3.0'
27
+ gemfile: gemfiles/rails-5.2.gemfile
28
+ name: Ruby ${{ matrix.ruby }} ${{ matrix.gemfile }}
29
+ steps:
30
+ - uses: actions/checkout@v1
31
+ - name: Set up Ruby ${{ matrix.ruby }}
32
+ uses: ruby/setup-ruby@v1
33
+ with:
34
+ ruby-version: ${{ matrix.ruby }}
35
+ bundler-cache: true
36
+ - name: Run tests
37
+ run: |
38
+ bundle exec rake
data/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ 2.8.0
2
+ -----
3
+
4
+ * Support setting a custom value field. (Thanks @Steffylicious)
5
+ * Drop support for Ruby 2.5
6
+ * Use Ruby 3.0.2 for development
7
+
8
+ 2.7.1
9
+ -----
10
+
11
+ * Bump measured to 2.7.1
12
+
13
+ 2.6.0
14
+ -----
15
+
16
+ * Only support Rails 5.2 and above.
17
+
18
+
19
+ 2.5.2
20
+ -----
21
+
22
+ * Fix some deprecations in tests and CI.
23
+
1
24
  2.5.1
2
25
  -----
3
26
 
data/README.md CHANGED
@@ -54,6 +54,16 @@ class ThingWithCustomUnitAccessor < ActiveRecord::Base
54
54
  end
55
55
  ```
56
56
 
57
+ Similarly, you can optionally customize the model's value column by specifying it in the `value_field_name` option, as follows:
58
+
59
+ ```ruby
60
+ class ThingWithCustomValueAccessor < ActiveRecord::Base
61
+ measured_length :length, value_field_name: :custom_length
62
+ measured_weight :total_weight, value_field_name: :custom_weight
63
+ measured_volume :volume, value_field_name: :custom_volume
64
+ end
65
+ ```
66
+
57
67
  There are some simpler methods for predefined types:
58
68
 
59
69
  ```ruby
data/dev.yml CHANGED
@@ -2,7 +2,7 @@ name: measured-rails
2
2
 
3
3
  up:
4
4
  - ruby:
5
- version: 2.6.3
5
+ version: 3.0.2
6
6
  - bundler
7
7
 
8
8
  commands:
@@ -2,4 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec path: '..'
4
4
 
5
- gem 'rails', '~> 5.0'
5
+ gem 'rails', '~> 5.2'
@@ -2,4 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec path: '..'
4
4
 
5
- gem 'rails', '~> 6.0.0.rc1'
5
+ gem 'rails', '~> 6.0'
@@ -2,4 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec path: '..'
4
4
 
5
- gem 'rails', '~> 5.1'
5
+ gem 'rails', '~> 6.1'
@@ -2,4 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec path: '..'
4
4
 
5
- gem 'rails', github: 'rails/rails'
5
+ gem 'rails', github: 'rails/rails', branch: 'main'
@@ -25,7 +25,11 @@ module Measured::Rails::ActiveRecord
25
25
  "#{ field }_unit"
26
26
  end
27
27
 
28
- value_field_name = "#{ field }_value"
28
+ value_field_name = if options[:value_field_name]
29
+ measured_fields[field][:value_field_name] = options[:value_field_name].to_s
30
+ else
31
+ "#{ field }_value"
32
+ end
29
33
 
30
34
  # Reader to retrieve measured object
31
35
  define_method(field) do
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Measured
3
3
  module Rails
4
- VERSION = "2.5.1"
4
+ VERSION = "2.8.0"
5
5
  end
6
6
  end
@@ -13,6 +13,14 @@ Gem::Specification.new do |spec|
13
13
  spec.homepage = "https://github.com/Shopify/measured-rails"
14
14
  spec.license = "MIT"
15
15
 
16
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
17
+ # delete this section to allow pushing this gem to any host.
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
20
+ else
21
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
22
+ end
23
+
16
24
  spec.files = `git ls-files -z`.split("\x0")
17
25
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
26
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
@@ -20,14 +28,14 @@ Gem::Specification.new do |spec|
20
28
 
21
29
  spec.add_runtime_dependency "measured", Measured::Rails::VERSION
22
30
 
23
- spec.add_runtime_dependency "railties", ">= 4.2"
24
- spec.add_runtime_dependency "activemodel", ">= 4.2"
25
- spec.add_runtime_dependency "activerecord", ">= 4.2"
31
+ spec.add_runtime_dependency "railties", ">= 5.2"
32
+ spec.add_runtime_dependency "activemodel", ">= 5.2"
33
+ spec.add_runtime_dependency "activerecord", ">= 5.2"
26
34
 
27
35
  spec.add_development_dependency "rake", "> 10.0"
28
36
  spec.add_development_dependency "minitest", "> 5.5.1"
29
37
  spec.add_development_dependency "minitest-reporters"
30
- spec.add_development_dependency "mocha", "> 1.1.0"
38
+ spec.add_development_dependency "mocha", ">= 1.4.0"
31
39
  spec.add_development_dependency "pry"
32
40
  spec.add_development_dependency "sqlite3"
33
41
  end
@@ -196,109 +196,87 @@ class Measured::Rails::ActiveRecordTest < ActiveSupport::TestCase
196
196
  assert_nil thing.length
197
197
  end
198
198
 
199
- test "update_attribute sets only the _value column" do
199
+ test "update sets one then the other" do
200
200
  thing = Thing.create!
201
- thing.update_attribute(:width_value, 11)
201
+ assert thing.update(width_value: 11.1)
202
202
  assert_nil thing.width
203
- end
204
-
205
- test "update_attribute sets only the _unit column" do
206
- thing = Thing.create!
207
- thing.update_attribute(:width_unit, "cm")
208
- assert_nil thing.width
209
- end
210
-
211
- test "update_attribute modifies the _value column" do
212
- assert thing.update_attribute(:width_value, 99)
213
- assert_equal Measured::Length.new(99, :in), thing.width
214
- end
215
-
216
- test "update_attribute modifies only the _unit column" do
217
- assert thing.update_attribute(:width_unit, :cm)
218
- assert_equal Measured::Length.new(6, :cm), thing.width
219
- end
220
-
221
- test "update_attribute sets one then the other" do
222
- thing = Thing.create!
223
- assert thing.update_attribute(:width_value, 11.1)
224
- assert_nil thing.width
225
- assert thing.update_attribute(:width_unit, "cm")
203
+ assert thing.update(width_unit: "cm")
226
204
  assert_equal Measured::Length.new(11.1, :cm), thing.width
227
205
  end
228
206
 
229
- test "update_attributes sets only the _value column" do
207
+ test "update sets only the _value column" do
230
208
  thing = Thing.create!
231
- assert thing.update_attributes(width_value: "314")
209
+ assert thing.update(width_value: "314")
232
210
  assert_equal 314, thing.width_value
233
211
  thing.reload
234
212
  assert_equal 314, thing.width_value
235
213
  assert_nil thing.width
236
214
  end
237
215
 
238
- test "update_attributes sets only the _unit column" do
216
+ test "update sets only the _unit column" do
239
217
  thing = Thing.create!
240
- assert thing.update_attributes(width_unit: :cm)
218
+ assert thing.update(width_unit: :cm)
241
219
  assert_equal "cm", thing.width_unit
242
220
  thing.reload
243
221
  assert_equal "cm", thing.width_unit
244
222
  assert_nil thing.width
245
223
  end
246
224
 
247
- test "update_attributes sets only the _unit column and converts it" do
225
+ test "update sets only the _unit column and converts it" do
248
226
  thing = Thing.create!
249
- assert thing.update_attributes(width_unit: "inch")
227
+ assert thing.update(width_unit: "inch")
250
228
  assert_equal "in", thing.width_unit
251
229
  thing.reload
252
230
  assert_equal "in", thing.width_unit
253
231
  end
254
232
 
255
- test "update_attributes sets the _unit column to something invalid" do
233
+ test "update sets the _unit column to something invalid" do
256
234
  thing = Thing.create!
257
- assert thing.update_attributes(width_unit: :invalid)
235
+ assert thing.update(width_unit: :invalid)
258
236
  assert_equal "invalid", thing.width_unit
259
237
  thing.reload
260
238
  assert_equal "invalid", thing.width_unit
261
239
  assert_nil thing.width
262
240
  end
263
241
 
264
- test "update_attributes does not set the _unit column to something invalid if there is validation" do
242
+ test "update does not set the _unit column to something invalid if there is validation" do
265
243
  thing = validated_thing
266
244
  thing.save!
267
- refute thing.update_attributes(length_unit: :invalid)
245
+ refute thing.update(length_unit: :invalid)
268
246
  end
269
247
 
270
- test "update_attributes sets one column then the other" do
248
+ test "update sets one column then the other" do
271
249
  thing = Thing.create!
272
- assert thing.update_attributes(width_unit: "inch")
250
+ assert thing.update(width_unit: "inch")
273
251
  assert_nil thing.width
274
- assert thing.update_attributes(width_value: "314")
252
+ assert thing.update(width_value: "314")
275
253
  assert_equal Measured::Length.new(314, :in), thing.width
276
254
  end
277
255
 
278
- test "update_attributes sets both columns" do
256
+ test "update sets both columns" do
279
257
  thing = Thing.create!
280
- assert thing.update_attributes(width_unit: :cm, width_value: 2)
258
+ assert thing.update(width_unit: :cm, width_value: 2)
281
259
  assert_equal Measured::Length.new(2, :cm), thing.width
282
260
  thing.reload
283
261
  assert_equal Measured::Length.new(2, :cm), thing.width
284
262
  end
285
263
 
286
- test "update_attributes modifies the _value column" do
287
- assert thing.update_attributes(height_value: 2)
264
+ test "update modifies the _value column" do
265
+ assert thing.update(height_value: 2)
288
266
  assert_equal Measured::Length.new(2, :m), thing.height
289
267
  thing.reload
290
268
  assert_equal Measured::Length.new(2, :m), thing.height
291
269
  end
292
270
 
293
- test "update_attributes modifies only the _unit column" do
294
- assert thing.update_attributes(height_unit: "foot")
271
+ test "update modifies only the _unit column" do
272
+ assert thing.update(height_unit: "foot")
295
273
  assert_equal Measured::Length.new(1, :ft), thing.height
296
274
  thing.reload
297
275
  assert_equal Measured::Length.new(1, :ft), thing.height
298
276
  end
299
277
 
300
- test "update_attributes modifies the _unit column to be something invalid" do
301
- assert thing.update_attributes(height_unit: :invalid)
278
+ test "update modifies the _unit column to be something invalid" do
279
+ assert thing.update(height_unit: :invalid)
302
280
  assert_nil thing.height
303
281
  assert_equal "invalid", thing.height_unit
304
282
  thing.reload
@@ -306,8 +284,8 @@ class Measured::Rails::ActiveRecordTest < ActiveSupport::TestCase
306
284
  assert_equal "invalid", thing.height_unit
307
285
  end
308
286
 
309
- test "update_attributes modifies both columns" do
310
- assert thing.update_attributes(height_unit: "mm", height_value: 1.23)
287
+ test "update modifies both columns" do
288
+ assert thing.update(height_unit: "mm", height_value: 1.23)
311
289
  assert_equal Measured::Length.new(1.23, :mm), thing.height
312
290
  thing.reload
313
291
  assert_equal Measured::Length.new(1.23, :mm), thing.height
@@ -386,6 +364,15 @@ class Measured::Rails::ActiveRecordTest < ActiveSupport::TestCase
386
364
  assert_equal custom_unit_thing.extra_weight, Measured::Weight.new(12, :kg)
387
365
  end
388
366
 
367
+ test "using custom value fields works correctly" do
368
+ assert_equal custom_value_thing.length, Measured::Length.new(4, :m)
369
+ assert_equal custom_value_thing.width, Measured::Length.new(5, :m)
370
+ assert_equal custom_value_thing.height, Measured::Length.new(6, :m)
371
+ assert_equal custom_value_thing.volume, Measured::Volume.new(13, :l)
372
+ assert_equal custom_value_thing.total_weight, Measured::Weight.new(14, :g)
373
+ assert_equal custom_value_thing.extra_weight, Measured::Weight.new(15, :g)
374
+ end
375
+
389
376
  private
390
377
 
391
378
  def length
@@ -432,4 +419,15 @@ class Measured::Rails::ActiveRecordTest < ActiveSupport::TestCase
432
419
  extra_weight: Measured::Weight.new(12, :g),
433
420
  )
434
421
  end
422
+
423
+ def custom_value_thing
424
+ @custom_value_thing ||= ThingWithCustomValueAccessor.new(
425
+ length: Measured::Length.new(4, :m),
426
+ width: Measured::Length.new(5, :m),
427
+ height: Measured::Length.new(6, :m),
428
+ volume: Measured::Volume.new(13, :l),
429
+ total_weight: Measured::Weight.new(14, :g),
430
+ extra_weight: Measured::Weight.new(15, :g),
431
+ )
432
+ end
435
433
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+ class ThingWithCustomValueAccessor < ActiveRecord::Base
3
+ measured_length :length, value_field_name: :custom_length
4
+ validates :length, measured: true
5
+ measured_length :width, value_field_name: :custom_width
6
+ validates :width, measured: true
7
+
8
+ measured_volume :volume, value_field_name: :custom_volume
9
+ validates :volume, measured: true
10
+
11
+ measured_length :height, value_field_name: :custom_height
12
+ validates :height, measured: true
13
+
14
+ measured_weight :total_weight, value_field_name: :custom_weight
15
+ validates :total_weight, measured: true
16
+
17
+ measured_weight :extra_weight, value_field_name: :custom_extra_weight
18
+ validates :extra_weight, measured: true
19
+ end
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 20161118203701) do
13
+ ActiveRecord::Schema.define(version: 20211105120355) do
14
14
 
15
15
  create_table "thing_with_custom_unit_accessors", force: :cascade do |t|
16
16
  t.decimal "length_value", precision: 10, scale: 2
@@ -80,4 +80,21 @@ ActiveRecord::Schema.define(version: 20161118203701) do
80
80
  t.string "length_numericality_less_than_than_scalar_unit", limit: 12
81
81
  end
82
82
 
83
+ create_table "thing_with_custom_value_accessors", force: :cascade do |t|
84
+ t.decimal "custom_length", precision: 10, scale: 2
85
+ t.string "length_unit", limit: 12
86
+ t.decimal "custom_width", precision: 10, scale: 2
87
+ t.string "width_unit", limit: 12
88
+ t.decimal "custom_height", precision: 10, scale: 2
89
+ t.string "height_unit", limit: 12
90
+ t.decimal "custom_volume", precision: 10, scale: 2
91
+ t.string "volume_unit", limit: 12
92
+ t.decimal "custom_weight", precision: 10, scale: 2, default: "10.0"
93
+ t.string "total_weight_unit", limit: 12
94
+ t.decimal "custom_extra_weight", precision: 10, scale: 2
95
+ t.string "extra_weight_unit", limit: 12
96
+ t.datetime "created_at", null: false
97
+ t.datetime "updated_at", null: false
98
+ end
99
+
83
100
  end
data/test/test_helper.rb CHANGED
@@ -4,7 +4,7 @@ require "measured"
4
4
  require "measured-rails"
5
5
  require "minitest/autorun"
6
6
  require "minitest/reporters"
7
- require "mocha/setup"
7
+ require "mocha/minitest"
8
8
 
9
9
  ActiveSupport.test_order = :random
10
10
 
@@ -17,7 +17,7 @@ class Measured::Rails::ValidationTest < ActiveSupport::TestCase
17
17
  test "validation fails when unit is nil" do
18
18
  thing.length_unit = ''
19
19
  refute thing.valid?
20
- assert_equal({ length: "is not a valid unit" }, thing.errors.to_h)
20
+ assert_equal({ length: ["is not a valid unit"] }, thing.errors.to_hash)
21
21
  end
22
22
 
23
23
  test "validation fails on model with custom unit with nil value" do
@@ -25,11 +25,11 @@ class Measured::Rails::ValidationTest < ActiveSupport::TestCase
25
25
  refute custom_unit_thing.valid?
26
26
  assert_equal(
27
27
  {
28
- length: "is not a valid unit",
29
- width: "is not a valid unit",
30
- height: "is not a valid unit",
28
+ length: ["is not a valid unit"],
29
+ width: ["is not a valid unit"],
30
+ height: ["is not a valid unit"],
31
31
  },
32
- custom_unit_thing.errors.to_h
32
+ custom_unit_thing.errors.to_hash
33
33
  )
34
34
  end
35
35
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: measured-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin McPhillips
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-12 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: measured
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.5.1
19
+ version: 2.8.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.5.1
26
+ version: 2.8.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: railties
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '4.2'
33
+ version: '5.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '4.2'
40
+ version: '5.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activemodel
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '4.2'
47
+ version: '5.2'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '4.2'
54
+ version: '5.2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: activerecord
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '4.2'
61
+ version: '5.2'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '4.2'
68
+ version: '5.2'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: mocha
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">"
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 1.1.0
117
+ version: 1.4.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">"
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 1.1.0
124
+ version: 1.4.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: pry
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -158,18 +158,18 @@ executables: []
158
158
  extensions: []
159
159
  extra_rdoc_files: []
160
160
  files:
161
+ - ".github/workflows/ci.yml"
161
162
  - ".gitignore"
162
- - ".travis.yml"
163
163
  - CHANGELOG.md
164
164
  - Gemfile
165
165
  - LICENSE
166
166
  - README.md
167
167
  - Rakefile
168
168
  - dev.yml
169
- - gemfiles/rails-5.0.gemfile
170
- - gemfiles/rails-5.1.gemfile
169
+ - gemfiles/rails-5.2.gemfile
171
170
  - gemfiles/rails-6.0.gemfile
172
- - gemfiles/rails-master.gemfile
171
+ - gemfiles/rails-6.1.gemfile
172
+ - gemfiles/rails-edge.gemfile
173
173
  - lib/measured-rails.rb
174
174
  - lib/measured/rails/active_record.rb
175
175
  - lib/measured/rails/base.rb
@@ -184,6 +184,7 @@ files:
184
184
  - test/active_record_test.rb
185
185
  - test/support/models/thing.rb
186
186
  - test/support/models/thing_with_custom_unit_accessor.rb
187
+ - test/support/models/thing_with_custom_value_accessor.rb
187
188
  - test/support/models/validated_thing.rb
188
189
  - test/support/schema.rb
189
190
  - test/test_helper.rb
@@ -191,7 +192,8 @@ files:
191
192
  homepage: https://github.com/Shopify/measured-rails
192
193
  licenses:
193
194
  - MIT
194
- metadata: {}
195
+ metadata:
196
+ allowed_push_host: https://rubygems.org
195
197
  post_install_message:
196
198
  rdoc_options: []
197
199
  require_paths:
@@ -207,8 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
209
  - !ruby/object:Gem::Version
208
210
  version: '0'
209
211
  requirements: []
210
- rubyforge_project:
211
- rubygems_version: 2.7.6
212
+ rubygems_version: 3.2.20
212
213
  signing_key:
213
214
  specification_version: 4
214
215
  summary: Rails adaptor for measured
@@ -216,6 +217,7 @@ test_files:
216
217
  - test/active_record_test.rb
217
218
  - test/support/models/thing.rb
218
219
  - test/support/models/thing_with_custom_unit_accessor.rb
220
+ - test/support/models/thing_with_custom_value_accessor.rb
219
221
  - test/support/models/validated_thing.rb
220
222
  - test/support/schema.rb
221
223
  - test/test_helper.rb
data/.travis.yml DELETED
@@ -1,28 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- cache: bundler
4
- rvm:
5
- - 2.3.8
6
- - 2.4.5
7
- - 2.5.5
8
- - 2.6.3
9
- gemfile:
10
- - Gemfile
11
- - gemfiles/rails-5.0.gemfile
12
- - gemfiles/rails-5.1.gemfile
13
- - gemfiles/rails-6.0.gemfile
14
- - gemfiles/rails-master.gemfile
15
- before_script:
16
- - gem update --system
17
- matrix:
18
- exclude:
19
- - gemfile: gemfiles/rails-master.gemfile
20
- rvm: 2.3.8
21
- - gemfile: gemfiles/rails-master.gemfile
22
- rvm: 2.4.5
23
- - gemfile: gemfiles/rails-6.0.gemfile
24
- rvm: 2.3.8
25
- - gemfile: gemfiles/rails-6.0.gemfile
26
- rvm: 2.4.5
27
- allow_failures:
28
- - gemfile: gemfiles/rails-master.gemfile