measured-rails 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/measured-rails.rb +1 -0
- data/lib/measured/rails/active_record.rb +1 -0
- data/lib/measured/rails/base.rb +1 -0
- data/lib/measured/rails/railtie.rb +1 -0
- data/lib/measured/rails/units/length.rb +1 -0
- data/lib/measured/rails/units/volume.rb +1 -0
- data/lib/measured/rails/units/weight.rb +1 -0
- data/lib/measured/rails/validations.rb +1 -0
- data/lib/measured/rails/version.rb +2 -1
- data/test/active_record_test.rb +1 -0
- data/test/support/models/thing.rb +1 -1
- data/test/support/models/thing_with_custom_unit_accessor.rb +1 -1
- data/test/support/models/validated_thing.rb +1 -2
- data/test/test_helper.rb +1 -0
- data/test/validation_test.rb +1 -0
- metadata +6 -9
- data/bin/console +0 -14
- data/bin/setup +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5340f7b4030fd78e807b7ad45a0b5a9e5f58062b7cee3ca1e28170900e3eaba
|
4
|
+
data.tar.gz: 6f5613d8d80893a1a5fb1644f0f2b55cb25ddf1b8f20595170ec1b7ac78deee8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb30cf468cc1fadcd546e8415a360226cbe4ca161c180e08c2e43461c684cb06f5a0e911f95d34f2704b36532ecb86a2272eb596af91b6c564ab8381e5318e7f
|
7
|
+
data.tar.gz: 3dad6cfd31a4adfbc72732a26697503b74ad9dfbff599d4b9ab8937dc4e57ee2a5a18e4410769bcdb4206ce98665a459f8a7db418f8f30b994f3d87bb33f0eed
|
data/CHANGELOG.md
ADDED
data/lib/measured-rails.rb
CHANGED
data/lib/measured/rails/base.rb
CHANGED
data/test/active_record_test.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
class Thing < ActiveRecord::Base
|
2
3
|
|
3
4
|
measured_length :length, :width
|
@@ -10,5 +11,4 @@ class Thing < ActiveRecord::Base
|
|
10
11
|
measured "Measured::Weight", :extra_weight
|
11
12
|
|
12
13
|
measured_length :length_with_max_on_assignment, {max_on_assignment: 500}
|
13
|
-
|
14
14
|
end
|
@@ -1,5 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
class ValidatedThing < ActiveRecord::Base
|
2
|
-
|
3
3
|
measured_length :length
|
4
4
|
validates :length, measured: true
|
5
5
|
|
@@ -42,5 +42,4 @@ class ValidatedThing < ActiveRecord::Base
|
|
42
42
|
def high_bound
|
43
43
|
Measured::Length.new(20, :in)
|
44
44
|
end
|
45
|
-
|
46
45
|
end
|
data/test/test_helper.rb
CHANGED
data/test/validation_test.rb
CHANGED
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.
|
4
|
+
version: 2.5.1
|
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-
|
11
|
+
date: 2019-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: measured
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.5.
|
19
|
+
version: 2.5.1
|
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.
|
26
|
+
version: 2.5.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: railties
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,20 +154,17 @@ description: Rails adapter for assigning and managing measurements with their un
|
|
154
154
|
provided by the measured gem.
|
155
155
|
email:
|
156
156
|
- gems@shopify.com
|
157
|
-
executables:
|
158
|
-
- console
|
159
|
-
- setup
|
157
|
+
executables: []
|
160
158
|
extensions: []
|
161
159
|
extra_rdoc_files: []
|
162
160
|
files:
|
163
161
|
- ".gitignore"
|
164
162
|
- ".travis.yml"
|
163
|
+
- CHANGELOG.md
|
165
164
|
- Gemfile
|
166
165
|
- LICENSE
|
167
166
|
- README.md
|
168
167
|
- Rakefile
|
169
|
-
- bin/console
|
170
|
-
- bin/setup
|
171
168
|
- dev.yml
|
172
169
|
- gemfiles/rails-5.0.gemfile
|
173
170
|
- gemfiles/rails-5.1.gemfile
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "measured/rails"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|