xduration 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +12 -0
- data/.travis.yml +10 -0
- data/CHANGELOG +8 -0
- data/Gemfile +4 -0
- data/LICENSE +20 -0
- data/README.md +100 -0
- data/Rakefile +14 -0
- data/config/locales/duration/da.yml +16 -0
- data/config/locales/duration/pt.yml +16 -0
- data/lib/duration/fixnum.rb +11 -0
- data/lib/duration/macros.rb +2 -0
- data/lib/duration/mongoid.rb +36 -0
- data/lib/duration/numeric.rb +60 -0
- data/lib/duration/rails/engine.rb +9 -0
- data/lib/duration/time_units/day.rb +12 -0
- data/lib/duration/time_units/decade.rb +11 -0
- data/lib/duration/time_units/hour.rb +12 -0
- data/lib/duration/time_units/minute.rb +12 -0
- data/lib/duration/time_units/month.rb +12 -0
- data/lib/duration/time_units/second.rb +11 -0
- data/lib/duration/time_units/week.rb +11 -0
- data/lib/duration/time_units/year.rb +11 -0
- data/lib/duration/time_units.rb +3 -0
- data/lib/duration/version.rb +3 -0
- data/lib/duration.rb +240 -0
- data/lib/xduration.rb +2 -0
- data/test/fixtures/locales/da.yml +16 -0
- data/test/fixtures/locales/pt.yml +16 -0
- data/test/helper.rb +15 -0
- data/test/test_duration.rb +180 -0
- data/test/test_i18n.rb +82 -0
- data/test/test_macros.rb +168 -0
- data/test/test_mongoid.rb +70 -0
- data/xduration.gemspec +32 -0
- metadata +229 -0
metadata
ADDED
@@ -0,0 +1,229 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: xduration
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.2.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Jose Peleteiro
|
9
|
+
- Bruno Azisaka Maciel
|
10
|
+
- Kristian Mandrup
|
11
|
+
autorequire:
|
12
|
+
bindir: bin
|
13
|
+
cert_chain: []
|
14
|
+
date: 2012-05-07 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: activesupport
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ! '>='
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 3.0.0
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ! '>='
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 3.0.0
|
32
|
+
- !ruby/object:Gem::Dependency
|
33
|
+
name: i18n
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: bundler
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 1.0.0
|
56
|
+
type: :development
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - ! '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 1.0.0
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: minitest
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ! '>='
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
72
|
+
type: :development
|
73
|
+
prerelease: false
|
74
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: yard
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: rake
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ! '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: simplecov
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
116
|
+
requirements:
|
117
|
+
- - ! '>='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: 0.3.5
|
120
|
+
type: :development
|
121
|
+
prerelease: false
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
124
|
+
requirements:
|
125
|
+
- - ! '>='
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: 0.3.5
|
128
|
+
- !ruby/object:Gem::Dependency
|
129
|
+
name: mongoid
|
130
|
+
requirement: !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
132
|
+
requirements:
|
133
|
+
- - ~>
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: 2.4.0
|
136
|
+
type: :development
|
137
|
+
prerelease: false
|
138
|
+
version_requirements: !ruby/object:Gem::Requirement
|
139
|
+
none: false
|
140
|
+
requirements:
|
141
|
+
- - ~>
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: 2.4.0
|
144
|
+
- !ruby/object:Gem::Dependency
|
145
|
+
name: rails
|
146
|
+
requirement: !ruby/object:Gem::Requirement
|
147
|
+
none: false
|
148
|
+
requirements:
|
149
|
+
- - ! '>='
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '3.1'
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
none: false
|
156
|
+
requirements:
|
157
|
+
- - ! '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '3.1'
|
160
|
+
description: Duration type
|
161
|
+
email:
|
162
|
+
- jose@peleteiro.net
|
163
|
+
- bruno@azisaka.com.br
|
164
|
+
- kmandrup@gmail.com
|
165
|
+
executables: []
|
166
|
+
extensions: []
|
167
|
+
extra_rdoc_files: []
|
168
|
+
files:
|
169
|
+
- .gitignore
|
170
|
+
- .travis.yml
|
171
|
+
- CHANGELOG
|
172
|
+
- Gemfile
|
173
|
+
- LICENSE
|
174
|
+
- README.md
|
175
|
+
- Rakefile
|
176
|
+
- config/locales/duration/da.yml
|
177
|
+
- config/locales/duration/pt.yml
|
178
|
+
- lib/duration.rb
|
179
|
+
- lib/duration/fixnum.rb
|
180
|
+
- lib/duration/macros.rb
|
181
|
+
- lib/duration/mongoid.rb
|
182
|
+
- lib/duration/numeric.rb
|
183
|
+
- lib/duration/rails/engine.rb
|
184
|
+
- lib/duration/time_units.rb
|
185
|
+
- lib/duration/time_units/day.rb
|
186
|
+
- lib/duration/time_units/decade.rb
|
187
|
+
- lib/duration/time_units/hour.rb
|
188
|
+
- lib/duration/time_units/minute.rb
|
189
|
+
- lib/duration/time_units/month.rb
|
190
|
+
- lib/duration/time_units/second.rb
|
191
|
+
- lib/duration/time_units/week.rb
|
192
|
+
- lib/duration/time_units/year.rb
|
193
|
+
- lib/duration/version.rb
|
194
|
+
- lib/xduration.rb
|
195
|
+
- test/fixtures/locales/da.yml
|
196
|
+
- test/fixtures/locales/pt.yml
|
197
|
+
- test/helper.rb
|
198
|
+
- test/test_duration.rb
|
199
|
+
- test/test_i18n.rb
|
200
|
+
- test/test_macros.rb
|
201
|
+
- test/test_mongoid.rb
|
202
|
+
- xduration.gemspec
|
203
|
+
homepage: http://github.com/kristianmandrup/xduration
|
204
|
+
licenses: []
|
205
|
+
post_install_message:
|
206
|
+
rdoc_options:
|
207
|
+
- --charset=UTF-8
|
208
|
+
require_paths:
|
209
|
+
- lib
|
210
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
211
|
+
none: false
|
212
|
+
requirements:
|
213
|
+
- - ! '>='
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
217
|
+
none: false
|
218
|
+
requirements:
|
219
|
+
- - ! '>='
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: 1.3.6
|
222
|
+
requirements: []
|
223
|
+
rubyforge_project:
|
224
|
+
rubygems_version: 1.8.24
|
225
|
+
signing_key:
|
226
|
+
specification_version: 3
|
227
|
+
summary: Duration type
|
228
|
+
test_files: []
|
229
|
+
has_rdoc:
|