rafini 1.2.0 → 1.2.1

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
2
  SHA1:
3
- metadata.gz: dec030a515decf9c06b93546a0f212df061799c2
4
- data.tar.gz: 92df305b30cbbc72bed2b967076073a7b8a3e770
3
+ metadata.gz: b1b74cb41e460e337bb956cf0bb3607bea04b500
4
+ data.tar.gz: 9a7974b36425a5f9e1d85e465621540cc8583426
5
5
  SHA512:
6
- metadata.gz: 8b1911db07e48d9614ca1c9d3b5955937163e2b8b09858ffe831af8f8f86eab4edc2a6c3f236cb720e6bb70a40262e17e29d0d0ce2cfeaa2c05bd0c21ed2df20
7
- data.tar.gz: bdb731aecd1be0c482e3eb9ea7f86ec5855a375507d54bb98836a383b4306a35ee7aa7fd3fc5fb26931fdfb6fbc6fee1236ec129885527c87cbfc1fcd0da5679
6
+ metadata.gz: 537fcf606f5228cbeddd25fd78b2f3b79fb191f580191a03f33d3377ef4fedc61f1c6e3eeb45836081accbd44bcdd5e0e141139053cab83f3b2d193a6f3d0f08
7
+ data.tar.gz: 94aa362d8c89d23da926516ea4f0b1620d22486782e96bb21167c38f7b940129acc729477882dab5c989ff0e20fb53db6a49695c51255a6522159eb4bfcc6a6e
data/README.rdoc CHANGED
@@ -95,7 +95,7 @@ Just a collection of useful refinements.
95
95
 
96
96
  (The MIT License)
97
97
 
98
- Copyright (c) 2014 carlosjhr64
98
+ Copyright (c) 2017 carlosjhr64
99
99
 
100
100
  Permission is hereby granted, free of charge, to any person obtaining
101
101
  a copy of this software and associated documentation files (the
@@ -1,5 +1,44 @@
1
1
  module Rafini
2
2
  module Odometers
3
+ SEC2TIME = {
4
+ second: 60,
5
+ minute: 60,
6
+ hour: 24,
7
+ day: 7,
8
+ week: 4,
9
+ month: 13,
10
+ year: 10,
11
+ decade: 10,
12
+ centurie: 10,
13
+ millennium: 10,
14
+ age: 10,
15
+ epoch: 10,
16
+ era: 5,
17
+ eon: 2,
18
+ gigaannum: nil,
19
+ }
20
+
21
+ SCALE = {
22
+ base: {
23
+ ones: 10,
24
+ tens: 10,
25
+ hundreds: 10,
26
+ thousands: 1_000,
27
+ },
28
+ short: {
29
+ millions: 1_000,
30
+ billions: 1_000,
31
+ trillions: 1_000,
32
+ quadrillions: nil,
33
+ },
34
+ long: {
35
+ millions: 1_000_000,
36
+ billions: 1_000_000,
37
+ trillions: 1_000_000,
38
+ quadrillions: nil,
39
+ },
40
+ }
41
+
3
42
  refine ::Integer do
4
43
  # Need Rafini::Integer for #odometer
5
44
  # Need Rafini::Hash for #to_struct
@@ -27,24 +66,6 @@ module Rafini
27
66
  return hash.to_struct
28
67
  end
29
68
 
30
- SEC2TIME = {
31
- second: 60,
32
- minute: 60,
33
- hour: 24,
34
- day: 7,
35
- week: 4,
36
- month: 13,
37
- year: 10,
38
- decade: 10,
39
- centurie: 10,
40
- millennium: 10,
41
- age: 10,
42
- epoch: 10,
43
- era: 5,
44
- eon: 2,
45
- gigaannum: nil,
46
- }
47
-
48
69
  # Integer#sec2time
49
70
  # Returns a struct with the different time scales for number of seconds.
50
71
  # Note that the month(4 weeks)/year(13 months) are not meant to be exact.
@@ -54,27 +75,6 @@ module Rafini
54
75
  self.odoread(SEC2TIME)
55
76
  end
56
77
 
57
- SCALE = {
58
- base: {
59
- ones: 10,
60
- tens: 10,
61
- hundreds: 10,
62
- thousands: 1_000,
63
- },
64
- short: {
65
- millions: 1_000,
66
- billions: 1_000,
67
- trillions: 1_000,
68
- quadrillions: nil,
69
- },
70
- long: {
71
- millions: 1_000_000,
72
- billions: 1_000_000,
73
- trillions: 1_000_000,
74
- quadrillions: nil,
75
- },
76
- }
77
-
78
78
  # 1_230.illion.to_s #=> "1.23k"
79
79
  # 1_230_000.illion.to_s #=> "1.23M"
80
80
  # ...etc
@@ -1,3 +1,3 @@
1
1
  module Rafini
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
metadata CHANGED
@@ -1,17 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rafini
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - carlosjhr64
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-30 00:00:00.000000000 Z
11
+ date: 2017-08-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: |
14
- Just a collection of useful refinements.
13
+ description: 'Just a collection of useful refinements.
14
+
15
+ '
15
16
  email: carlosjhr64@gmail.com
16
17
  executables: []
17
18
  extensions: []
@@ -49,11 +50,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
50
  - !ruby/object:Gem::Version
50
51
  version: '0'
51
52
  requirements:
52
- - 'ruby: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux]'
53
+ - 'ruby: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]'
53
54
  rubyforge_project:
54
- rubygems_version: 2.4.1
55
+ rubygems_version: 2.6.11
55
56
  signing_key:
56
57
  specification_version: 4
57
58
  summary: Just a collection of useful refinements.
58
59
  test_files: []
59
- has_rdoc: