plata 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/locales/en.plata.yml +1 -3
- data/lib/locales/es.plata.yml +1 -2
- data/lib/locales/pt.plata.yml +1 -3
- data/lib/plata.rb +2 -2
- data/lib/plata/version.rb +1 -1
- data/plata.gemspec +2 -2
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20ebb986f737630d2254971e2a3bf7a9bbf204c8675889770c288c5f557f6b0c
|
4
|
+
data.tar.gz: 1ed6604dda43e22034e510ecbff4c10680f0046b7c876bfd18695e3ee1f91b36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01a8864c0cf6e75967fb6c328bfa56ce4f0be735ab4ec72f7a063a831ea76a283523295ed7e398376dc4e3e0a08882ccde59c53375537c6ced7039858cefed05
|
7
|
+
data.tar.gz: cb9722b3eafb690d5f5f8cb84facd79f72bc5f22513d82c7d1ac8528a971f5998248979fb2d01d54c64eee1b272175119722251138333513e0f6e2cbee58f167
|
data/lib/locales/en.plata.yml
CHANGED
data/lib/locales/es.plata.yml
CHANGED
data/lib/locales/pt.plata.yml
CHANGED
data/lib/plata.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
require 'i18n'
|
3
2
|
require "plata/version"
|
4
3
|
I18n.load_path += Dir[File.join(File.expand_path(File.dirname(__FILE__)), 'locales', '*.yml')]
|
@@ -24,14 +23,15 @@ module Plata
|
|
24
23
|
number, decimal = self.to_s.split(".")
|
25
24
|
end
|
26
25
|
|
26
|
+
|
27
27
|
def humanize
|
28
|
+
|
28
29
|
words = []
|
29
30
|
|
30
31
|
number = self.to_f
|
31
32
|
|
32
33
|
if number.to_i == 0
|
33
34
|
words << self.zero_string
|
34
|
-
decimal = number.to_s.split('.')[1]
|
35
35
|
else
|
36
36
|
decimal = number.to_s.split(".")[1].nil? ? 0 : number.to_s.split(".")[1].to_i
|
37
37
|
number = number.to_s.split(".")[0]
|
data/lib/plata/version.rb
CHANGED
data/plata.gemspec
CHANGED
@@ -26,6 +26,6 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
|
29
|
-
spec.add_development_dependency "bundler", "~> 1.
|
30
|
-
spec.add_development_dependency "rake", "~>
|
29
|
+
spec.add_development_dependency "bundler", "~> 2.1.4"
|
30
|
+
spec.add_development_dependency "rake", "~> 13.0.1"
|
31
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ga6ix
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.1.4
|
20
20
|
type: :development
|
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:
|
26
|
+
version: 2.1.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 13.0.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:
|
40
|
+
version: 13.0.1
|
41
41
|
description: Describe a number in words for English, Spanish and Portugues.
|
42
42
|
email:
|
43
43
|
- gab.edera@gmail.com
|
@@ -76,8 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
requirements: []
|
79
|
-
|
80
|
-
rubygems_version: 2.7.7
|
79
|
+
rubygems_version: 3.1.2
|
81
80
|
signing_key:
|
82
81
|
specification_version: 4
|
83
82
|
summary: Describe a number in words for English, Spanish and Portugues.
|