ruby-units 4.0.0 → 4.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 572cf98377411ff41dd490f784564f3b50401a7342552a7999688ea0763eec5b
4
- data.tar.gz: 735696cb4410be7d1d7a1d03fabaa4fa734a2dc6f5c4a8a37648dcd88a461168
3
+ metadata.gz: ab979845681df4808b65ce563da009fb7f85a959d5aaab8d34da777e4e8023cf
4
+ data.tar.gz: 6505e1967cd97df4a80dc708e69f22031b6be1fc7b776568a9c65c7c276f798a
5
5
  SHA512:
6
- metadata.gz: d0d994f5f9a10375fad35fa00905dc23ae5227e08157f10f27c85955e1d0df98500bb6d1174298b9f95f02a4f568a6d363af21204f6564e1c28f8b19c44a229f
7
- data.tar.gz: 491e25dbb90dc0e7f5829b46c4973b178a49119ed3343fc6fe9931131d08525b0e8655079a6321bbbfef4f3624c0746dbbfde5b9dc866828fbe1a97d691b9569
6
+ metadata.gz: 579256ed6966a612661b3a677dcb5c991a39498b1b9789a48e501c68ad0d39b8937bb9c57ed4c47bc9ec5028c32752645d52b269a38cf6cf12a1062a4d52b27f
7
+ data.tar.gz: 708818f3a5311a0322c3b8afffdfb72dba0a9ba64892f403579abb16a76c0f7257a5602a66d02123a2a01afa02fdf4baf38ab94af0d0503d4c5923f489965f09
data/Gemfile.lock CHANGED
@@ -1,14 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-units (4.0.0)
4
+ ruby-units (4.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  ast (2.4.2)
10
10
  backport (1.2.0)
11
- base64 (0.1.1)
12
11
  benchmark (0.2.1)
13
12
  coderay (1.1.3)
14
13
  debug (1.8.0)
@@ -17,8 +16,8 @@ GEM
17
16
  diff-lcs (1.5.0)
18
17
  docile (1.4.0)
19
18
  e2mmap (0.1.0)
20
- ffi (1.16.1)
21
- ffi (1.16.1-java)
19
+ ffi (1.16.3)
20
+ ffi (1.16.3-java)
22
21
  formatador (1.1.0)
23
22
  guard (2.18.1)
24
23
  formatador (>= 0.2.4)
@@ -36,7 +35,7 @@ GEM
36
35
  rspec (>= 2.99.0, < 4.0)
37
36
  io-console (0.6.0)
38
37
  io-console (0.6.0-java)
39
- irb (1.8.1)
38
+ irb (1.8.3)
40
39
  rdoc
41
40
  reline (>= 0.3.8)
42
41
  jar-dependencies (0.4.1)
@@ -67,7 +66,7 @@ GEM
67
66
  nenv (~> 0.1)
68
67
  shellany (~> 0.0)
69
68
  parallel (1.23.0)
70
- parser (3.2.2.3)
69
+ parser (3.2.2.4)
71
70
  ast (~> 2.4.1)
72
71
  racc
73
72
  pry (0.14.2)
@@ -77,14 +76,14 @@ GEM
77
76
  coderay (~> 1.1)
78
77
  method_source (~> 1.0)
79
78
  spoon (~> 0.0)
80
- psych (5.1.0)
79
+ psych (5.1.1.1)
81
80
  stringio
82
- psych (5.1.0-java)
81
+ psych (5.1.1.1-java)
83
82
  jar-dependencies (>= 0.1.7)
84
- racc (1.7.1)
85
- racc (1.7.1-java)
83
+ racc (1.7.2)
84
+ racc (1.7.2-java)
86
85
  rainbow (3.1.1)
87
- rake (13.0.6)
86
+ rake (13.1.0)
88
87
  rb-fsevent (0.11.2)
89
88
  rb-inotify (0.10.1)
90
89
  ffi (~> 1.0)
@@ -92,8 +91,8 @@ GEM
92
91
  rdoc (6.5.0)
93
92
  psych (>= 4.0.0)
94
93
  redcarpet (3.6.0)
95
- regexp_parser (2.8.1)
96
- reline (0.3.8)
94
+ regexp_parser (2.8.2)
95
+ reline (0.3.9)
97
96
  io-console (~> 0.5)
98
97
  reverse_markdown (2.1.1)
99
98
  nokogiri
@@ -111,19 +110,18 @@ GEM
111
110
  diff-lcs (>= 1.2.0, < 2.0)
112
111
  rspec-support (~> 3.12.0)
113
112
  rspec-support (3.12.1)
114
- rubocop (1.56.4)
115
- base64 (~> 0.1.1)
113
+ rubocop (1.57.2)
116
114
  json (~> 2.3)
117
115
  language_server-protocol (>= 3.17.0)
118
116
  parallel (~> 1.10)
119
- parser (>= 3.2.2.3)
117
+ parser (>= 3.2.2.4)
120
118
  rainbow (>= 2.2.2, < 4.0)
121
119
  regexp_parser (>= 1.8, < 3.0)
122
120
  rexml (>= 3.2.5, < 4.0)
123
121
  rubocop-ast (>= 1.28.1, < 2.0)
124
122
  ruby-progressbar (~> 1.7)
125
123
  unicode-display_width (>= 2.4.0, < 3.0)
126
- rubocop-ast (1.29.0)
124
+ rubocop-ast (1.30.0)
127
125
  parser (>= 3.2.1.0)
128
126
  rubocop-capybara (2.19.0)
129
127
  rubocop (~> 1.41)
@@ -131,8 +129,8 @@ GEM
131
129
  rubocop (~> 1.33)
132
130
  rubocop-rake (0.6.0)
133
131
  rubocop (~> 1.0)
134
- rubocop-rspec (2.24.1)
135
- rubocop (~> 1.33)
132
+ rubocop-rspec (2.25.0)
133
+ rubocop (~> 1.40)
136
134
  rubocop-capybara (~> 2.17)
137
135
  rubocop-factory_bot (~> 2.22)
138
136
  ruby-maven (3.3.13)
@@ -168,7 +166,7 @@ GEM
168
166
  stringio (3.0.8)
169
167
  terminal-notifier (2.0.0)
170
168
  terminal-notifier-guard (1.7.0)
171
- thor (1.2.2)
169
+ thor (1.3.0)
172
170
  tilt (2.3.0)
173
171
  unicode-display_width (2.5.0)
174
172
  webrick (1.8.1)
@@ -1581,7 +1581,9 @@ module RubyUnits
1581
1581
  unit_string = "#{Regexp.last_match(1)} USD" if unit_string =~ /\$\s*(#{NUMBER_REGEX})/
1582
1582
  unit_string.gsub!("\u00b0".force_encoding('utf-8'), 'deg') if unit_string.encoding == Encoding::UTF_8
1583
1583
 
1584
- unit_string.gsub!(/[%'"#_,]/, '%' => 'percent', "'" => 'feet', '"' => 'inch', '#' => 'pound', '_' => '', ',' => '')
1584
+ unit_string.gsub!(/(\d)[_,](\d)/, '\1\2') # remove underscores and commas in numbers
1585
+
1586
+ unit_string.gsub!(/[%'"#]/, '%' => 'percent', "'" => 'feet', '"' => 'inch', '#' => 'pound')
1585
1587
  if unit_string.start_with?(COMPLEX_NUMBER)
1586
1588
  match = unit_string.match(COMPLEX_REGEX)
1587
1589
  real = Float(match[:real]) if match[:real]
@@ -1,5 +1,5 @@
1
1
  module RubyUnits
2
2
  class Unit < Numeric
3
- VERSION = '4.0.0'.freeze
3
+ VERSION = '4.0.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-units
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Olbrich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-04 00:00:00.000000000 Z
11
+ date: 2023-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake