unitwise 2.1.0 → 2.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fb8605b862b95bff79423e03fabf502e89a39440
4
- data.tar.gz: 83bf9041753023411557a9f9b22d84d6d61cecfc
2
+ SHA256:
3
+ metadata.gz: 0b30819c084e209df80a01852db2ab40a8e915af15321de9cd8e7181a4a7f622
4
+ data.tar.gz: 259f79ef2e7578d279f1c82adf861bc33166668fa39d20c2b5f906bd1b6fbfcc
5
5
  SHA512:
6
- metadata.gz: c202998427bdbd04aef777b310afbca4bbfd1866bc2d5405054864f28b17d9e723ea0885eba6bed4ee981b9078ed99c3ab10c6f0f98ebc6ef73fe5eac94713d6
7
- data.tar.gz: 806a06c5c4fcd80cd2ec3be0c6e723b2e7ce1b9b621340d9db194a782f08356594ea7816b8dec3d024245283404555559c5635b4c8fe05633a71aa0d043fd4e3
6
+ metadata.gz: 58310aa10271d1f864418bfb50641b102fa3227be68016ee97321c5f12054a48b4e8c76af02447b3dbe49f60aa5013d87c61b8fb7d17c67330d4c319b58fb1e7
7
+ data.tar.gz: 5422e3694fa60e13004221a3c5e75fdc633cc29b47142959e11712c0813f0112c86b6b59c6cf9828baaefc6bcafded450099d5929fa9b02f3da6a1df18768f58
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: 'bundler'
4
+ directory: '/'
5
+ schedule:
6
+ interval: 'weekly'
@@ -0,0 +1,42 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on: [push, pull_request]
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ test:
17
+ strategy:
18
+ fail-fast: false
19
+ matrix:
20
+ ruby-version:
21
+ - '2.6'
22
+ - '2.7'
23
+ - '3.0'
24
+ - '3.1'
25
+ - 'jruby'
26
+ - 'truffleruby'
27
+
28
+ name: ${{ format('Tests (Ruby {0})', matrix.ruby-version) }}
29
+ runs-on: ubuntu-latest
30
+ env:
31
+ BUNDLE_WITHOUT: 'yard pry'
32
+ steps:
33
+ - uses: actions/checkout@v3
34
+
35
+ - name: Set up Ruby
36
+ uses: ruby/setup-ruby@v1
37
+ with:
38
+ ruby-version: ${{ matrix.ruby-version }}
39
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
40
+
41
+ - name: Run tests
42
+ run: bundle exec rake
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.4.0
1
+ 3.1.1
data/CHANGELOG.md CHANGED
@@ -7,6 +7,33 @@ Unitwise uses semantic versioning.
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 2.3.0 - 2022-10-19
11
+
12
+ ### Added
13
+
14
+ - Support for newer Rubies (2.6+) & drops support for older ones (2.6 is EOL but will continue to support for now)
15
+ - Support for Psych 4. Note: unit data YAML files in the gem are loaded using `unsafe_load`
16
+
17
+ ## 2.2.0 - 2017-07-14
18
+
19
+ ### Fixed
20
+
21
+ - Default units now stored as BigDecimal or Integer to reduce floating point
22
+ accuracy loss.
23
+ - Added missing conversion for Degree Réaumur.
24
+
25
+ ### Changed
26
+
27
+ - Performing mathematical operations or converting units will now use Rational
28
+ math to prevent accuracy loss. In most cases, this means converted/operated
29
+ on `Measurement`s will have a `Rational` `#value`. If you have an explicit
30
+ dependency on the exact `Numeric` type that `Measurement#value` returns,
31
+ consider using `#to_f` or `#to_i` instead.
32
+
33
+ ### Removed
34
+
35
+ - Support for MRI 2.1
36
+
10
37
  ## 2.1.0 - 2017-04-28
11
38
 
12
39
  ### Removed
data/Gemfile CHANGED
@@ -1,10 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'coveralls', '~> 0.7'
4
- if RUBY_VERSION >= '2.2.0'
5
- gem 'bigdecimal', '>= 1.2.6', :platform => :mri
6
- else
7
- gem 'bigdecimal', '<= 1.2.5', :platform => :mri
8
- end
3
+ gem 'covered'
4
+ gem 'bigdecimal', '>= 2', :platform => :mri
9
5
 
10
6
  gemspec
data/README.md CHANGED
@@ -1,11 +1,9 @@
1
1
  # [Unitwise](//github.com/joshwlewis/unitwise)
2
2
 
3
3
  [![Gem Version](http://img.shields.io/gem/v/unitwise.svg?style=flat)](https://rubygems.org/gems/unitwise)
4
- [![Build Status](http://img.shields.io/travis/joshwlewis/unitwise.svg?style=flat)](https://travis-ci.org/joshwlewis/unitwise)
5
- [![Dependency Status](http://img.shields.io/gemnasium/joshwlewis/unitwise.svg?style=flat)](https://gemnasium.com/joshwlewis/unitwise)
4
+ [![Build Status](https://github.com/joshwlewis/unitwise/actions/workflows/ruby.yml/badge.svg)](https://github.com/joshwlewis/unitwise/actions/workflows/ruby.yml)
6
5
  [![Coverage Status](http://img.shields.io/coveralls/joshwlewis/unitwise.svg?style=flat)](https://coveralls.io/r/joshwlewis/unitwise)
7
6
  [![Code Climate](http://img.shields.io/codeclimate/github/joshwlewis/unitwise.svg?style=flat)](https://codeclimate.com/github/joshwlewis/unitwise)
8
- ![Analytics](https://ga-beacon.appspot.com/UA-49481499-1/joshwlewis/unitwise?pixel)
9
7
 
10
8
  Unitwise is a Ruby library for unit measurement conversion and math.
11
9
 
@@ -273,11 +271,9 @@ Unitwise(1, "🥃").to_cup
273
271
  This library aims to support and is tested against the following Ruby
274
272
  implementations:
275
273
 
276
- * Ruby 2.1
277
- * Ruby 2.2
278
- * Ruby 2.3
279
- * Ruby 2.4
274
+ * Ruby 2.6 - 3.1
280
275
  * [JRuby](http://jruby.org/)
276
+ * [TruffleRuby](https://github.com/oracle/truffleruby)
281
277
 
282
278
  If something doesn't work on one of these versions, it's a bug.
283
279