timespan 0.5.9 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cfd36c1ee037ecbbecc0f4fd7d0c74a1e31b526d
4
+ data.tar.gz: 0dd9334c8f9b8b790f4f2a06af01ae13a954e934
5
+ SHA512:
6
+ metadata.gz: 5e67e9078b11cec2c2a474bae454231b1d29fe8c8e52bead6cb1ce31fd1714a9fca4a49aab38d9da74863cad379b9524fff5753834b131d49a9614b650485507
7
+ data.tar.gz: 3f522872245d5b7a79da3f103912ddc4cc8d1d68007a5b2c79570bc9196f33dfcb061091cec033dc79ad04f4464bb8c229dcd0f569540522625950f51fdd5e2b
data/.gitignore CHANGED
@@ -1,49 +1,9 @@
1
- # rcov generated
2
- coverage
3
- coverage.data
4
-
5
- # rdoc generated
6
- rdoc
7
-
8
- # yard generated
9
- doc
10
- .yardoc
11
-
12
- # bundler
13
- .bundle
14
-
15
- # jeweler generated
16
- pkg
17
-
18
- # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
19
- #
20
- # * Create a file at ~/.gitignore
21
- # * Include files you want ignored
22
- # * Run: git config --global core.excludesfile ~/.gitignore
23
- #
24
- # After doing this, these files will be ignored in all your git projects,
25
- # saving you from having to 'pollute' every project you touch with them
26
- #
27
- # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
28
- #
29
- # For MacOS:
30
- #
1
+ .bundle/
2
+ log/*.log
3
+ pkg/
4
+ spec/dummy/logs
5
+ spec/dummy/public
6
+ spec/dummy/temp
7
+
8
+ Gemfile.lock
31
9
  .DS_Store
32
-
33
- # For TextMate
34
- *.tmproj
35
- tmtags
36
-
37
- # For emacs:
38
- #*~
39
- \#*
40
- .\#*
41
-
42
- # For vim:
43
- *.swp
44
-
45
- # For redcar:
46
- .redcar
47
-
48
- # For rubinius:
49
- #*.rbc
data/README.md CHANGED
@@ -30,6 +30,15 @@ Will calculate time diff between two dates, then allow you to get the time diffe
30
30
 
31
31
  See specs for more examples of usage
32
32
 
33
+ ## For use with Mongoid
34
+
35
+ ```ruby
36
+ gem 'mongoid'
37
+ gem 'origin-selectable_ext'
38
+
39
+ gem 'timespan'
40
+ ```
41
+
33
42
  ## Comparison
34
43
 
35
44
  ```ruby
@@ -1,3 +1,3 @@
1
1
  class Timespan
2
- VERSION = '0.5.9'
2
+ VERSION = '0.6.0'
3
3
  end
@@ -1,5 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
+ # require 'time-lord'
4
+
3
5
  # To test and make sure that none of the included gems or any core extensions of this gem fuck up the
4
6
  # normal date calculation/comparison etc functionality of Ruby and Rails ;)
5
7
 
@@ -9,6 +11,6 @@ describe 'Ensure system Time calculations still operate as the should!' do
9
11
  end
10
12
 
11
13
  it 'should add Date + Time normally' do
12
- expect(Date.today + 3.days).to eq 3.days.from_now.to_date
14
+ expect(Date.today + 3.days).to eq 3.days.from_now
13
15
  end
14
16
  end
@@ -20,18 +20,17 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_dependency 'chronic'
22
22
  spec.add_dependency 'chronic_duration'
23
- spec.add_dependency 'activesupport', '>= 3.0'
23
+ spec.add_dependency 'activesupport', '>= 3.0'
24
24
  spec.add_dependency 'spanner'
25
- spec.add_dependency 'sugar-high', '>= 0.7.3'
26
- spec.add_dependency 'xduration', '>= 3.0.0'
25
+ spec.add_dependency 'sugar-high', '>= 0.7.3'
26
+ spec.add_dependency 'xduration', '>= 3.0.0'
27
+ spec.add_dependency 'origin-selectable_ext'
27
28
 
28
- spec.add_development_dependency "bundler", "~> 1.3"
29
29
  spec.add_development_dependency "rake"
30
-
31
30
  spec.add_development_dependency "rspec", ">= 2.12.0"
32
-
33
31
  spec.add_development_dependency 'rails', '>= 3.1'
34
32
 
35
- spec.add_development_dependency 'mongoid', '>= 3.0'
33
+ # Mongoid specific
34
+ spec.add_development_dependency 'mongoid', '>= 3.0'
36
35
  spec.add_development_dependency 'origin-selectable_ext', '~> 0.1.1'
37
36
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timespan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9
5
- prerelease:
4
+ version: 0.6.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Kristian Mandrup
@@ -14,183 +13,160 @@ dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: chronic
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: chronic_duration
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: activesupport
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '3.0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '3.0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: spanner
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: sugar-high
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: 0.7.3
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: 0.7.3
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: xduration
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: 3.0.0
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
96
  version: 3.0.0
110
97
  - !ruby/object:Gem::Dependency
111
- name: bundler
98
+ name: origin-selectable_ext
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ~>
101
+ - - '>='
116
102
  - !ruby/object:Gem::Version
117
- version: '1.3'
118
- type: :development
103
+ version: '0'
104
+ type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ~>
108
+ - - '>='
124
109
  - !ruby/object:Gem::Version
125
- version: '1.3'
110
+ version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: rake
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - '>='
132
116
  - !ruby/object:Gem::Version
133
117
  version: '0'
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - '>='
140
123
  - !ruby/object:Gem::Version
141
124
  version: '0'
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: rspec
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
- - - ! '>='
129
+ - - '>='
148
130
  - !ruby/object:Gem::Version
149
131
  version: 2.12.0
150
132
  type: :development
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
- - - ! '>='
136
+ - - '>='
156
137
  - !ruby/object:Gem::Version
157
138
  version: 2.12.0
158
139
  - !ruby/object:Gem::Dependency
159
140
  name: rails
160
141
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
142
  requirements:
163
- - - ! '>='
143
+ - - '>='
164
144
  - !ruby/object:Gem::Version
165
145
  version: '3.1'
166
146
  type: :development
167
147
  prerelease: false
168
148
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
149
  requirements:
171
- - - ! '>='
150
+ - - '>='
172
151
  - !ruby/object:Gem::Version
173
152
  version: '3.1'
174
153
  - !ruby/object:Gem::Dependency
175
154
  name: mongoid
176
155
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
156
  requirements:
179
- - - ! '>='
157
+ - - '>='
180
158
  - !ruby/object:Gem::Version
181
159
  version: '3.0'
182
160
  type: :development
183
161
  prerelease: false
184
162
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
163
  requirements:
187
- - - ! '>='
164
+ - - '>='
188
165
  - !ruby/object:Gem::Version
189
166
  version: '3.0'
190
167
  - !ruby/object:Gem::Dependency
191
168
  name: origin-selectable_ext
192
169
  requirement: !ruby/object:Gem::Requirement
193
- none: false
194
170
  requirements:
195
171
  - - ~>
196
172
  - !ruby/object:Gem::Version
@@ -198,7 +174,6 @@ dependencies:
198
174
  type: :development
199
175
  prerelease: false
200
176
  version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
177
  requirements:
203
178
  - - ~>
204
179
  - !ruby/object:Gem::Version
@@ -215,7 +190,6 @@ files:
215
190
  - .rspec
216
191
  - CHANGELOG.md
217
192
  - Gemfile
218
- - Gemfile.lock
219
193
  - LICENSE.txt
220
194
  - README.md
221
195
  - Rakefile
@@ -267,33 +241,26 @@ files:
267
241
  homepage:
268
242
  licenses:
269
243
  - MIT
244
+ metadata: {}
270
245
  post_install_message:
271
246
  rdoc_options: []
272
247
  require_paths:
273
248
  - lib
274
249
  required_ruby_version: !ruby/object:Gem::Requirement
275
- none: false
276
250
  requirements:
277
- - - ! '>='
251
+ - - '>='
278
252
  - !ruby/object:Gem::Version
279
253
  version: '0'
280
- segments:
281
- - 0
282
- hash: -3269727965690523754
283
254
  required_rubygems_version: !ruby/object:Gem::Requirement
284
- none: false
285
255
  requirements:
286
- - - ! '>='
256
+ - - '>='
287
257
  - !ruby/object:Gem::Version
288
258
  version: '0'
289
- segments:
290
- - 0
291
- hash: -3269727965690523754
292
259
  requirements: []
293
260
  rubyforge_project:
294
- rubygems_version: 1.8.25
261
+ rubygems_version: 2.0.0
295
262
  signing_key:
296
- specification_version: 3
263
+ specification_version: 4
297
264
  summary: Calculate and store time distance (Mongoid only)
298
265
  test_files:
299
266
  - spec/spec_helper.rb
@@ -321,3 +288,4 @@ test_files:
321
288
  - spec/timespan/units_spec.rb
322
289
  - spec/timespan_init_spec.rb
323
290
  - spec/timespan_spec.rb
291
+ has_rdoc:
@@ -1,130 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- timespan (0.5.9)
5
- activesupport (>= 3.0)
6
- chronic
7
- chronic_duration
8
- spanner
9
- sugar-high (>= 0.7.3)
10
- xduration (>= 3.0.0)
11
-
12
- GEM
13
- remote: http://rubygems.org/
14
- specs:
15
- actionmailer (3.2.12)
16
- actionpack (= 3.2.12)
17
- mail (~> 2.4.4)
18
- actionpack (3.2.12)
19
- activemodel (= 3.2.12)
20
- activesupport (= 3.2.12)
21
- builder (~> 3.0.0)
22
- erubis (~> 2.7.0)
23
- journey (~> 1.0.4)
24
- rack (~> 1.4.5)
25
- rack-cache (~> 1.2)
26
- rack-test (~> 0.6.1)
27
- sprockets (~> 2.2.1)
28
- activemodel (3.2.12)
29
- activesupport (= 3.2.12)
30
- builder (~> 3.0.0)
31
- activerecord (3.2.12)
32
- activemodel (= 3.2.12)
33
- activesupport (= 3.2.12)
34
- arel (~> 3.0.2)
35
- tzinfo (~> 0.3.29)
36
- activeresource (3.2.12)
37
- activemodel (= 3.2.12)
38
- activesupport (= 3.2.12)
39
- activesupport (3.2.12)
40
- i18n (~> 0.6)
41
- multi_json (~> 1.0)
42
- arel (3.0.2)
43
- builder (3.0.4)
44
- chronic (0.9.1)
45
- chronic_duration (0.10.2)
46
- numerizer (~> 0.1.1)
47
- diff-lcs (1.2.1)
48
- erubis (2.7.0)
49
- hike (1.2.1)
50
- i18n (0.6.4)
51
- journey (1.0.4)
52
- json (1.7.7)
53
- mail (2.4.4)
54
- i18n (>= 0.4.0)
55
- mime-types (~> 1.16)
56
- treetop (~> 1.4.8)
57
- mime-types (1.21)
58
- mongoid (3.1.2)
59
- activemodel (~> 3.2)
60
- moped (~> 1.4.2)
61
- origin (~> 1.0)
62
- tzinfo (~> 0.3.22)
63
- moped (1.4.5)
64
- multi_json (1.7.2)
65
- numerizer (0.1.1)
66
- origin (1.0.11)
67
- origin-selectable_ext (0.1.1)
68
- origin
69
- polyglot (0.3.3)
70
- rack (1.4.5)
71
- rack-cache (1.2)
72
- rack (>= 0.4)
73
- rack-ssl (1.3.3)
74
- rack
75
- rack-test (0.6.2)
76
- rack (>= 1.0)
77
- rails (3.2.12)
78
- actionmailer (= 3.2.12)
79
- actionpack (= 3.2.12)
80
- activerecord (= 3.2.12)
81
- activeresource (= 3.2.12)
82
- activesupport (= 3.2.12)
83
- bundler (~> 1.0)
84
- railties (= 3.2.12)
85
- railties (3.2.12)
86
- actionpack (= 3.2.12)
87
- activesupport (= 3.2.12)
88
- rack-ssl (~> 1.3.2)
89
- rake (>= 0.8.7)
90
- rdoc (~> 3.4)
91
- thor (>= 0.14.6, < 2.0)
92
- rake (10.0.4)
93
- rdoc (3.12.2)
94
- json (~> 1.4)
95
- rspec (2.13.0)
96
- rspec-core (~> 2.13.0)
97
- rspec-expectations (~> 2.13.0)
98
- rspec-mocks (~> 2.13.0)
99
- rspec-core (2.13.1)
100
- rspec-expectations (2.13.0)
101
- diff-lcs (>= 1.1.3, < 2.0)
102
- rspec-mocks (2.13.0)
103
- spanner (0.0.2)
104
- sprockets (2.2.2)
105
- hike (~> 1.2)
106
- multi_json (~> 1.0)
107
- rack (~> 1.0)
108
- tilt (~> 1.1, != 1.3.0)
109
- sugar-high (0.7.3)
110
- thor (0.18.0)
111
- tilt (1.3.6)
112
- treetop (1.4.12)
113
- polyglot
114
- polyglot (>= 0.3.1)
115
- tzinfo (0.3.37)
116
- xduration (3.0.0)
117
- activesupport (>= 3.0.0)
118
- i18n (>= 0.6)
119
-
120
- PLATFORMS
121
- ruby
122
-
123
- DEPENDENCIES
124
- bundler (~> 1.3)
125
- mongoid (>= 3.0)
126
- origin-selectable_ext (~> 0.1.1)
127
- rails (>= 3.1)
128
- rake
129
- rspec (>= 2.12.0)
130
- timespan!