string_with_unit 0.2.0 → 0.2.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/README.md +4 -11
- data/lib/string_with_unit/value.rb +1 -1
- data/lib/string_with_unit/version.rb +1 -1
- data/string_with_unit.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55cfdf6d1f71bcd53e986e5b4548a1f419e81631
|
4
|
+
data.tar.gz: 15d640d157f82f038edaa2f4957cab68390c6325
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9c010e5458836151730b96222621258926cc4cf2f6e59a9028463ff630723091568feeb80b56c43a5c3fe5e790d52bd8022029a3fe31b5d424a18762a347c4c
|
7
|
+
data.tar.gz: a2882a80dc2d5651ee537384efece8b8a2ccb2364b40652928f384e08bce24fe85afb934ac6bf6e7369d3dbacae64744f3dfc0652d1ca83c8ddff359bfcc6218
|
data/README.md
CHANGED
@@ -1,21 +1,12 @@
|
|
1
1
|
# StringWithUnit
|
2
|
+
[](https://badge.fury.io/rb/string_with_unit) [](https://travis-ci.org/meganemura/string_with_unit)
|
2
3
|
|
3
4
|
## Installation
|
4
5
|
|
5
|
-
Add this line to your application's Gemfile:
|
6
|
-
|
7
6
|
```ruby
|
8
7
|
gem 'string_with_unit'
|
9
8
|
```
|
10
9
|
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
14
|
-
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install string_with_unit
|
18
|
-
|
19
10
|
## Usage
|
20
11
|
|
21
12
|
```ruby
|
@@ -36,8 +27,10 @@ puts 101.to_s_with_unit('dalmatian', 'dalmatians') # => "101 dalmatians"
|
|
36
27
|
|
37
28
|
### With ActiveSupport::Inflector
|
38
29
|
|
39
|
-
```
|
30
|
+
```ruby
|
31
|
+
require 'string_with_unit'
|
40
32
|
require 'active_support/inflector'
|
33
|
+
|
41
34
|
(-2..2).each do |i|
|
42
35
|
puts i.to_string_with_unit('gem') # Specify singular unit only
|
43
36
|
end
|
data/string_with_unit.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["meganemura"]
|
10
10
|
spec.email = ["meganemura@users.noreply.github.com"]
|
11
11
|
|
12
|
-
spec.summary = "Add Integer#to_string_with_unit to express a number with singular/plural unit"
|
12
|
+
spec.summary = "Add Integer#to_string_with_unit to easily express a number with singular/plural unit"
|
13
13
|
spec.description = spec.summary
|
14
14
|
spec.homepage = "https://github.com/meganemura/string_with_unit"
|
15
15
|
spec.license = "MIT"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: string_with_unit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- meganemura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description: Add Integer#to_string_with_unit to express a number with singular/plural
|
69
|
+
description: Add Integer#to_string_with_unit to easily express a number with singular/plural
|
70
70
|
unit
|
71
71
|
email:
|
72
72
|
- meganemura@users.noreply.github.com
|
@@ -111,6 +111,6 @@ rubyforge_project:
|
|
111
111
|
rubygems_version: 2.5.1
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
|
-
summary: Add Integer#to_string_with_unit to express a number with singular/plural
|
114
|
+
summary: Add Integer#to_string_with_unit to easily express a number with singular/plural
|
115
115
|
unit
|
116
116
|
test_files: []
|