weighable 1.4.0 → 1.5.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
- SHA1:
3
- metadata.gz: c8771f8bc5700d552175e0e692dad7a1279abdee
4
- data.tar.gz: 6d39188a5ef3d7a1748378e43db3faa734534927
2
+ SHA256:
3
+ metadata.gz: 31c05d666a97b448105e5a074c65a5f3f55a174f9e594f04567d36abf07ec3b2
4
+ data.tar.gz: eecfc7259d196bc8480bec0a8a65960359ccbfd2a5a1bec6491f421890f46706
5
5
  SHA512:
6
- metadata.gz: 2af1a29ab674a088bf01e3e571e1154e7cc11ef6e6b604722b4a8d5cd0f5fab04602108c03ba1a731465f122e92d0db5b86a4376daff0e0e267215fa8e5b6e61
7
- data.tar.gz: cecefe233f6b0eec510d0c371dde2f55ae2e2dcd768926427eea919295727db8d3d464e262d2355a38d36d667966c02c52fffa2d27d6a1c9eea0e6a091c1be55
6
+ metadata.gz: 47017d565bce95f6b597459155d83d7d4b5ba372e3e94c1aa89a3581706ec1a98cd0f746b04154bd97d23a369453d25c7de51278562948ebee7f6d2bb61d5a79
7
+ data.tar.gz: 0a9238a5c9ca54d15a4cd3d766dc27285faea5d8d1a42e1584e33a239326086ba03a8e613a464526bf007b004ddacac12aa0a036c47f2e5def83d77709c01198
@@ -0,0 +1,19 @@
1
+ on: push
2
+
3
+ jobs:
4
+ build:
5
+ runs-on: ubuntu-16.04
6
+ strategy:
7
+ matrix:
8
+ ruby: [ '2.5', '2.6', '2.7' ]
9
+ rails: [ 4, 5, 6 ]
10
+ name: weighable ruby:${{matrix.ruby}} rails:${{matrix.rails}}
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - uses: actions/setup-ruby@v1
14
+ with:
15
+ ruby-version: ${{ matrix.ruby }}
16
+ - run: |
17
+ gem install bundler
18
+ bundle install --jobs 4 --retry 3 --gemfile=Gemfile-rails${{ matrix.rails }}
19
+ bundle exec rspec
data/.gitignore CHANGED
@@ -1,6 +1,6 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
3
+ /Gemfile*.lock
4
4
  /_yardoc/
5
5
  /coverage/
6
6
  /doc/
@@ -1 +1 @@
1
- 2.2.8
1
+ 2.7.0
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'activesupport', '> 4.2.4', '< 5'
4
+
5
+ # Specify your gem's dependencies in weighable.gemspec
6
+ gemspec
@@ -1,4 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ gem 'activesupport', '> 5', '< 6'
4
+
3
5
  # Specify your gem's dependencies in weighable.gemspec
4
6
  gemspec
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'activesupport', '> 6', '< 7'
4
+
5
+ # Specify your gem's dependencies in weighable.gemspec
6
+ gemspec
data/README.md CHANGED
@@ -83,7 +83,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
83
83
 
84
84
  ## Contributing
85
85
 
86
- Bug reports and pull requests are welcome on GitHub at https://github.com/greenbits/weighable.
86
+ Bug reports and pull requests are welcome on GitHub at https://github.com/trobrock/weighable.
87
87
 
88
88
  ## License
89
89
 
@@ -1,3 +1,3 @@
1
1
  module Weighable
2
- VERSION = '1.4.0'.freeze
2
+ VERSION = '1.5.0'.freeze
3
3
  end
@@ -38,12 +38,12 @@ module Weighable
38
38
  nil => :unit
39
39
  }.freeze
40
40
 
41
- GRAMS_PER_OUNCE = BigDecimal.new('28.34952')
42
- GRAMS_PER_POUND = BigDecimal.new('453.59237')
43
- OUNCES_PER_POUND = BigDecimal.new('16')
44
- MILLIGRAMS_PER_GRAM = BigDecimal.new('1000')
45
- KILOGRAMS_PER_GRAM = BigDecimal.new('0.001')
46
- IDENTITY = BigDecimal.new('1')
41
+ GRAMS_PER_OUNCE = BigDecimal('28.34952')
42
+ GRAMS_PER_POUND = BigDecimal('453.59237')
43
+ OUNCES_PER_POUND = BigDecimal('16')
44
+ MILLIGRAMS_PER_GRAM = BigDecimal('1000')
45
+ KILOGRAMS_PER_GRAM = BigDecimal('0.001')
46
+ IDENTITY = BigDecimal('1')
47
47
 
48
48
  MILLIGRAMS_PER_OUNCE = GRAMS_PER_OUNCE * MILLIGRAMS_PER_GRAM
49
49
  KILOGRAMS_PER_OUNCE = GRAMS_PER_OUNCE * KILOGRAMS_PER_GRAM
@@ -184,7 +184,7 @@ module Weighable
184
184
  Weight.new(@value / to_math_value(other), unit_name)
185
185
  else
186
186
  other = other.to(unit_name)
187
- BigDecimal.new(@value / other.value)
187
+ BigDecimal(@value / other.value)
188
188
  end
189
189
  end
190
190
 
@@ -20,9 +20,9 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ['lib']
22
22
 
23
- spec.add_dependency 'activesupport', '> 4.2.4'
23
+ spec.add_dependency 'activesupport'
24
24
 
25
- spec.add_development_dependency 'bundler', '~> 1.11'
25
+ spec.add_development_dependency 'bundler', '~> 2.1'
26
26
  spec.add_development_dependency 'rake', '~> 10.0'
27
27
  spec.add_development_dependency 'rubocop', '~> 0.49.0'
28
28
  spec.add_development_dependency 'rspec', '~> 3.4.0'
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weighable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trae Robrock
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-17 00:00:00.000000000 Z
11
+ date: 2020-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.4
19
+ version: '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: 4.2.4
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.11'
33
+ version: '2.1'
34
34
  type: :development
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: '1.11'
40
+ version: '2.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -144,13 +144,16 @@ extensions: []
144
144
  extra_rdoc_files: []
145
145
  files:
146
146
  - ".circleci/config.yml"
147
+ - ".github/workflows/ci.yml"
147
148
  - ".gitignore"
148
149
  - ".hound.yml"
149
150
  - ".rspec"
150
151
  - ".rubocop.yml"
151
152
  - ".ruby-style.yml"
152
153
  - ".ruby-version"
153
- - Gemfile
154
+ - Gemfile-rails4
155
+ - Gemfile-rails5
156
+ - Gemfile-rails6
154
157
  - Guardfile
155
158
  - LICENSE.txt
156
159
  - README.md
@@ -173,7 +176,7 @@ homepage: https://github.com/greenbits/weighable
173
176
  licenses:
174
177
  - MIT
175
178
  metadata: {}
176
- post_install_message:
179
+ post_install_message:
177
180
  rdoc_options: []
178
181
  require_paths:
179
182
  - lib
@@ -188,9 +191,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
191
  - !ruby/object:Gem::Version
189
192
  version: '0'
190
193
  requirements: []
191
- rubyforge_project:
192
- rubygems_version: 2.4.5.3
193
- signing_key:
194
+ rubygems_version: 3.1.2
195
+ signing_key:
194
196
  specification_version: 4
195
197
  summary: Like BigDecimal, but for weight. Includes Rails integration.
196
198
  test_files: []