measured-rails 2.5.0 → 2.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
  SHA256:
3
- metadata.gz: 6077a6cf4bf52eb20d9601faeb82f7d86ed17cdef9f8ba1790911976d947d9e2
4
- data.tar.gz: 39beec03cf41ae5ecfb31f3f5fc9c6910bd06741403871db080dcef7065347c5
3
+ metadata.gz: e5340f7b4030fd78e807b7ad45a0b5a9e5f58062b7cee3ca1e28170900e3eaba
4
+ data.tar.gz: 6f5613d8d80893a1a5fb1644f0f2b55cb25ddf1b8f20595170ec1b7ac78deee8
5
5
  SHA512:
6
- metadata.gz: 0dd1f19a73555bfdbc885ab5b0a0ac41dc5692bfa68cd573c28add607c12f94c397ed75f3e02245026db799d65b3ecdc538cf5033a49df3562375a6931a0563f
7
- data.tar.gz: 7c15e21fe5726761ebb6364285c2872f11818158f815601b7a772576c9f99ef11a6b9f7e9bb91d229a375f9fd0eba74b6a7cb03b5abbc3e5c8003e1b283eb391
6
+ metadata.gz: cb30cf468cc1fadcd546e8415a360226cbe4ca161c180e08c2e43461c684cb06f5a0e911f95d34f2704b36532ecb86a2272eb596af91b6c564ab8381e5318e7f
7
+ data.tar.gz: 3dad6cfd31a4adfbc72732a26697503b74ad9dfbff599d4b9ab8937dc4e57ee2a5a18e4410769bcdb4206ce98665a459f8a7db418f8f30b994f3d87bb33f0eed
@@ -0,0 +1,12 @@
1
+ 2.5.1
2
+ -----
3
+
4
+ * Bump `measured` to 2.5.1
5
+
6
+ 2.5.0
7
+ -----
8
+
9
+ * Add `CHANGELOG.md`.
10
+ * Fix some deprecations and warnings.
11
+ * Support Rails 6 and Ruby 2.6.
12
+ * Load `Measured::Volume` by default and add helper method.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "measured/rails/base"
2
3
 
3
4
  require "measured/rails/units/length"
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Measured::Rails::ActiveRecord
2
3
  extend ActiveSupport::Concern
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "measured/rails/version"
2
3
  require "measured"
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Measured::Rails
2
3
  class Railtie < ::Rails::Railtie
3
4
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Measured::Rails::ActiveRecord::Length
2
3
  extend ActiveSupport::Concern
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Measured::Rails::ActiveRecord::Volume
2
3
  extend ActiveSupport::Concern
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Measured::Rails::ActiveRecord::Weight
2
3
  extend ActiveSupport::Concern
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class MeasuredValidator < ActiveModel::EachValidator
2
3
  CHECKS = {
3
4
  greater_than: :>,
@@ -1,5 +1,6 @@
1
+ # frozen_string_literal: true
1
2
  module Measured
2
3
  module Rails
3
- VERSION = "2.5.0"
4
+ VERSION = "2.5.1"
4
5
  end
5
6
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "test_helper"
2
3
 
3
4
  class Measured::Rails::ActiveRecordTest < ActiveSupport::TestCase
@@ -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 ThingWithCustomUnitAccessor < ActiveRecord::Base
2
-
3
3
  measured_length :length, :width, unit_field_name: :size_unit
4
4
  validates :length, measured: true
5
5
  validates :width, measured: true
@@ -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
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "pry" unless ENV["CI"]
2
3
  require "measured"
3
4
  require "measured-rails"
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "test_helper"
2
3
 
3
4
  class Measured::Rails::ValidationTest < ActiveSupport::TestCase
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.0
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-05-21 00:00:00.000000000 Z
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.0
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.0
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
@@ -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
data/bin/setup DELETED
@@ -1,7 +0,0 @@
1
- #!/bin/bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
-
5
- bundle install
6
-
7
- # Do any other automated setup that you need to do here