timespan 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +8 -9
- data/Gemfile.lock +81 -76
- data/README.md +16 -1
- data/Rakefile +8 -8
- data/VERSION +1 -1
- data/lib/timespan/core_ext/range.rb +35 -4
- data/spec/timespan/core_ext/duration_range_spec.rb +39 -0
- data/timespan.gemspec +24 -27
- metadata +18 -34
data/Gemfile
CHANGED
@@ -4,24 +4,23 @@ gem 'chronic'
|
|
4
4
|
gem 'chronic_duration'
|
5
5
|
gem 'activesupport', '>= 3.0.0'
|
6
6
|
gem 'spanner'
|
7
|
-
gem 'sugar-high', '
|
8
|
-
gem 'xduration', '
|
7
|
+
gem 'sugar-high', '>= 0.7.3' # for range intersect
|
8
|
+
gem 'xduration', '>= 2.2'
|
9
9
|
|
10
10
|
group :test, :development do
|
11
11
|
gem "rspec", ">= 2.8.0"
|
12
|
-
gem 'rails', '>= 3.
|
12
|
+
gem 'rails', '>= 3.1'
|
13
13
|
# gem 'mongoid', '>= 2.4'
|
14
14
|
# gem 'bson', '>= 1.6'
|
15
15
|
|
16
|
-
gem 'mongoid',
|
16
|
+
gem 'mongoid', '>= 3.0'
|
17
17
|
gem 'origin-selectable_ext', '~> 0.1.1'
|
18
18
|
# gem 'i18n'
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
21
|
group :development do
|
23
|
-
gem "rdoc", ">= 3.12"
|
24
|
-
gem "bundler", ">= 1.
|
25
|
-
gem "jeweler", ">= 1.8.
|
26
|
-
gem "simplecov",">= 0.
|
22
|
+
# gem "rdoc", ">= 3.12"
|
23
|
+
gem "bundler", ">= 1.2.0"
|
24
|
+
gem "jeweler", ">= 1.8.4", github: 'technicalpickles/jeweler'
|
25
|
+
gem "simplecov",">= 0.7"
|
27
26
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,117 +1,123 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git://github.com/technicalpickles/jeweler.git
|
3
|
+
revision: a6a204f974a109ef2a2ca8fe477558dabab1ead6
|
4
|
+
specs:
|
5
|
+
jeweler (1.8.4)
|
6
|
+
bundler (~> 1.0)
|
7
|
+
git (>= 1.2.5)
|
8
|
+
rake
|
9
|
+
rdoc
|
10
|
+
|
1
11
|
GEM
|
2
12
|
remote: http://rubygems.org/
|
3
13
|
specs:
|
4
|
-
actionmailer (3.2.
|
5
|
-
actionpack (= 3.2.
|
14
|
+
actionmailer (3.2.12)
|
15
|
+
actionpack (= 3.2.12)
|
6
16
|
mail (~> 2.4.4)
|
7
|
-
actionpack (3.2.
|
8
|
-
activemodel (= 3.2.
|
9
|
-
activesupport (= 3.2.
|
17
|
+
actionpack (3.2.12)
|
18
|
+
activemodel (= 3.2.12)
|
19
|
+
activesupport (= 3.2.12)
|
10
20
|
builder (~> 3.0.0)
|
11
21
|
erubis (~> 2.7.0)
|
12
22
|
journey (~> 1.0.4)
|
13
|
-
rack (~> 1.4.
|
23
|
+
rack (~> 1.4.5)
|
14
24
|
rack-cache (~> 1.2)
|
15
25
|
rack-test (~> 0.6.1)
|
16
|
-
sprockets (~> 2.1
|
17
|
-
activemodel (3.2.
|
18
|
-
activesupport (= 3.2.
|
26
|
+
sprockets (~> 2.2.1)
|
27
|
+
activemodel (3.2.12)
|
28
|
+
activesupport (= 3.2.12)
|
19
29
|
builder (~> 3.0.0)
|
20
|
-
activerecord (3.2.
|
21
|
-
activemodel (= 3.2.
|
22
|
-
activesupport (= 3.2.
|
30
|
+
activerecord (3.2.12)
|
31
|
+
activemodel (= 3.2.12)
|
32
|
+
activesupport (= 3.2.12)
|
23
33
|
arel (~> 3.0.2)
|
24
34
|
tzinfo (~> 0.3.29)
|
25
|
-
activeresource (3.2.
|
26
|
-
activemodel (= 3.2.
|
27
|
-
activesupport (= 3.2.
|
28
|
-
activesupport (3.2.
|
35
|
+
activeresource (3.2.12)
|
36
|
+
activemodel (= 3.2.12)
|
37
|
+
activesupport (= 3.2.12)
|
38
|
+
activesupport (3.2.12)
|
29
39
|
i18n (~> 0.6)
|
30
40
|
multi_json (~> 1.0)
|
31
41
|
arel (3.0.2)
|
32
|
-
builder (3.0.
|
33
|
-
chronic (0.
|
34
|
-
chronic_duration (0.
|
42
|
+
builder (3.0.4)
|
43
|
+
chronic (0.9.1)
|
44
|
+
chronic_duration (0.10.2)
|
35
45
|
numerizer (~> 0.1.1)
|
36
|
-
diff-lcs (1.1
|
46
|
+
diff-lcs (1.2.1)
|
37
47
|
erubis (2.7.0)
|
38
48
|
git (1.2.5)
|
39
49
|
hike (1.2.1)
|
40
|
-
i18n (0.6.
|
41
|
-
jeweler (1.8.3)
|
42
|
-
bundler (~> 1.0)
|
43
|
-
git (>= 1.2.5)
|
44
|
-
rake
|
45
|
-
rdoc
|
50
|
+
i18n (0.6.4)
|
46
51
|
journey (1.0.4)
|
47
|
-
json (1.7.
|
52
|
+
json (1.7.7)
|
48
53
|
mail (2.4.4)
|
49
54
|
i18n (>= 0.4.0)
|
50
55
|
mime-types (~> 1.16)
|
51
56
|
treetop (~> 1.4.8)
|
52
|
-
mime-types (1.
|
53
|
-
mongoid (3.
|
54
|
-
activemodel (~> 3.
|
55
|
-
moped (~> 1.
|
57
|
+
mime-types (1.21)
|
58
|
+
mongoid (3.1.2)
|
59
|
+
activemodel (~> 3.2)
|
60
|
+
moped (~> 1.4.2)
|
56
61
|
origin (~> 1.0)
|
57
62
|
tzinfo (~> 0.3.22)
|
58
|
-
moped (1.
|
59
|
-
multi_json (1.
|
63
|
+
moped (1.4.3)
|
64
|
+
multi_json (1.6.1)
|
60
65
|
numerizer (0.1.1)
|
61
|
-
origin (1.0.
|
66
|
+
origin (1.0.11)
|
62
67
|
origin-selectable_ext (0.1.1)
|
63
68
|
origin
|
64
69
|
polyglot (0.3.3)
|
65
|
-
rack (1.4.
|
70
|
+
rack (1.4.5)
|
66
71
|
rack-cache (1.2)
|
67
72
|
rack (>= 0.4)
|
68
|
-
rack-ssl (1.3.
|
73
|
+
rack-ssl (1.3.3)
|
69
74
|
rack
|
70
|
-
rack-test (0.6.
|
75
|
+
rack-test (0.6.2)
|
71
76
|
rack (>= 1.0)
|
72
|
-
rails (3.2.
|
73
|
-
actionmailer (= 3.2.
|
74
|
-
actionpack (= 3.2.
|
75
|
-
activerecord (= 3.2.
|
76
|
-
activeresource (= 3.2.
|
77
|
-
activesupport (= 3.2.
|
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)
|
78
83
|
bundler (~> 1.0)
|
79
|
-
railties (= 3.2.
|
80
|
-
railties (3.2.
|
81
|
-
actionpack (= 3.2.
|
82
|
-
activesupport (= 3.2.
|
84
|
+
railties (= 3.2.12)
|
85
|
+
railties (3.2.12)
|
86
|
+
actionpack (= 3.2.12)
|
87
|
+
activesupport (= 3.2.12)
|
83
88
|
rack-ssl (~> 1.3.2)
|
84
89
|
rake (>= 0.8.7)
|
85
90
|
rdoc (~> 3.4)
|
86
91
|
thor (>= 0.14.6, < 2.0)
|
87
|
-
rake (0.
|
88
|
-
rdoc (3.12)
|
92
|
+
rake (10.0.3)
|
93
|
+
rdoc (3.12.2)
|
89
94
|
json (~> 1.4)
|
90
|
-
rspec (2.
|
91
|
-
rspec-core (~> 2.
|
92
|
-
rspec-expectations (~> 2.
|
93
|
-
rspec-mocks (~> 2.
|
94
|
-
rspec-core (2.
|
95
|
-
rspec-expectations (2.
|
96
|
-
diff-lcs (
|
97
|
-
rspec-mocks (2.
|
98
|
-
simplecov (0.
|
99
|
-
multi_json (~> 1.
|
100
|
-
simplecov-html (~> 0.
|
101
|
-
simplecov-html (0.
|
102
|
-
spanner (0.0.
|
103
|
-
sprockets (2.
|
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
|
+
simplecov (0.7.1)
|
104
|
+
multi_json (~> 1.0)
|
105
|
+
simplecov-html (~> 0.7.1)
|
106
|
+
simplecov-html (0.7.1)
|
107
|
+
spanner (0.0.1)
|
108
|
+
sprockets (2.2.2)
|
104
109
|
hike (~> 1.2)
|
110
|
+
multi_json (~> 1.0)
|
105
111
|
rack (~> 1.0)
|
106
112
|
tilt (~> 1.1, != 1.3.0)
|
107
113
|
sugar-high (0.7.3)
|
108
|
-
thor (0.
|
109
|
-
tilt (1.3.
|
110
|
-
treetop (1.4.
|
114
|
+
thor (0.17.0)
|
115
|
+
tilt (1.3.5)
|
116
|
+
treetop (1.4.12)
|
111
117
|
polyglot
|
112
118
|
polyglot (>= 0.3.1)
|
113
|
-
tzinfo (0.3.
|
114
|
-
xduration (2.2.
|
119
|
+
tzinfo (0.3.37)
|
120
|
+
xduration (2.2.3)
|
115
121
|
activesupport (>= 3.0.0)
|
116
122
|
i18n
|
117
123
|
|
@@ -120,16 +126,15 @@ PLATFORMS
|
|
120
126
|
|
121
127
|
DEPENDENCIES
|
122
128
|
activesupport (>= 3.0.0)
|
123
|
-
bundler (>= 1.
|
129
|
+
bundler (>= 1.2.0)
|
124
130
|
chronic
|
125
131
|
chronic_duration
|
126
|
-
jeweler (>= 1.8.
|
127
|
-
mongoid (
|
132
|
+
jeweler (>= 1.8.4)!
|
133
|
+
mongoid (>= 3.0)
|
128
134
|
origin-selectable_ext (~> 0.1.1)
|
129
|
-
rails (>= 3.
|
130
|
-
rdoc (>= 3.12)
|
135
|
+
rails (>= 3.1)
|
131
136
|
rspec (>= 2.8.0)
|
132
|
-
simplecov (>= 0.
|
137
|
+
simplecov (>= 0.7)
|
133
138
|
spanner
|
134
|
-
sugar-high (
|
135
|
-
xduration (
|
139
|
+
sugar-high (>= 0.7.3)
|
140
|
+
xduration (>= 2.2)
|
data/README.md
CHANGED
@@ -107,7 +107,7 @@ da:
|
|
107
107
|
|
108
108
|
## Timespan for Mongoid
|
109
109
|
|
110
|
-
Tested and works with Mongoid 2.4 and 3.0+
|
110
|
+
Tested and works with Mongoid 2.4 and 3.0+ (also tested with Mongoid 4)
|
111
111
|
|
112
112
|
Custom Timespan datatype:
|
113
113
|
|
@@ -336,6 +336,21 @@ They both override the method `#allowed_units` to provide a particular list:
|
|
336
336
|
|
337
337
|
`ShortDurationRange` supports time ranges less than a day, whereas `LongDurationRange` only supports time ranges of a day or more.
|
338
338
|
|
339
|
+
To create a `LongDurationRange` or `ShortDurationRange` from a range, you can use the macros:
|
340
|
+
|
341
|
+
```ruby
|
342
|
+
long_time_range = (1..5).days(:long)
|
343
|
+
|
344
|
+
# or simply
|
345
|
+
|
346
|
+
long_time_range = (1..5).days!
|
347
|
+
|
348
|
+
# and for short time range
|
349
|
+
|
350
|
+
long_time_range = (1..5).minutes(:short)
|
351
|
+
short_time_range = (1..5).hours!
|
352
|
+
```
|
353
|
+
|
339
354
|
## Client side helpers
|
340
355
|
|
341
356
|
This gem now includes som javascript assets to assist in performing date and timespan (duration) calculations on the client side also:
|
data/Rakefile
CHANGED
@@ -38,12 +38,12 @@ end
|
|
38
38
|
|
39
39
|
task :default => :spec
|
40
40
|
|
41
|
-
require 'rdoc/task'
|
42
|
-
Rake::RDocTask.new do |rdoc|
|
43
|
-
|
41
|
+
# require 'rdoc/task'
|
42
|
+
# Rake::RDocTask.new do |rdoc|
|
43
|
+
# version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
44
44
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
end
|
45
|
+
# rdoc.rdoc_dir = 'rdoc'
|
46
|
+
# rdoc.title = "timespan #{version}"
|
47
|
+
# rdoc.rdoc_files.include('README*')
|
48
|
+
# rdoc.rdoc_files.include('lib/**/*.rb')
|
49
|
+
# end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.5
|
@@ -34,6 +34,11 @@ class DurationRange < DelegateDecorator
|
|
34
34
|
@range = range
|
35
35
|
end
|
36
36
|
|
37
|
+
|
38
|
+
def self.allowed_unit? unit
|
39
|
+
allowed_units.include? unit.to_sym
|
40
|
+
end
|
41
|
+
|
37
42
|
def allowed_unit? unit
|
38
43
|
allowed_units.include? unit.to_sym
|
39
44
|
end
|
@@ -141,23 +146,49 @@ class DurationRange < DelegateDecorator
|
|
141
146
|
end
|
142
147
|
|
143
148
|
class LongDurationRange < DurationRange
|
144
|
-
def allowed_units
|
149
|
+
def self.allowed_units
|
145
150
|
[:days, :weeks, :months, :years]
|
146
151
|
end
|
152
|
+
|
153
|
+
def allowed_units
|
154
|
+
LongDurationRange.allowed_units
|
155
|
+
end
|
147
156
|
end
|
148
157
|
|
149
158
|
class ShortDurationRange < DurationRange
|
150
|
-
def allowed_units
|
159
|
+
def self.allowed_units
|
151
160
|
[:seconds, :minutes, :hours]
|
152
161
|
end
|
162
|
+
|
163
|
+
def allowed_units
|
164
|
+
ShortDurationRange.allowed_units
|
165
|
+
end
|
153
166
|
end
|
154
167
|
|
155
168
|
|
156
169
|
class Range
|
157
170
|
[:seconds, :minutes, :hours, :days, :weeks, :months, :years].each do |unit|
|
158
|
-
define_method unit do
|
171
|
+
define_method "#{unit}!" do
|
172
|
+
time_length = ::ShortDurationRange.allowed_unit?(unit.to_sym) ? :short : :long
|
173
|
+
self.send(unit, time_length)
|
174
|
+
end
|
175
|
+
|
176
|
+
define_method unit do |type = :duration, subtype = nil|
|
159
177
|
timerange = Range.new self.min.send(unit), self.max.send(unit)
|
160
|
-
|
178
|
+
|
179
|
+
subtype = type if [:long, :short].include? type.to_sym
|
180
|
+
|
181
|
+
if type != :timespan
|
182
|
+
time_range_class = if ::ShortDurationRange.allowed_unit? unit.to_sym
|
183
|
+
subtype == :short ? ::ShortDurationRange : ::DurationRange
|
184
|
+
elsif ::LongDurationRange.allowed_unit? unit.to_sym
|
185
|
+
subtype == :long ? ::LongDurationRange : ::DurationRange
|
186
|
+
else
|
187
|
+
::DurationRange
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
type == :timespan ? TimespanRange.new(timerange, unit) : time_range_class.new(timerange, unit)
|
161
192
|
end
|
162
193
|
end
|
163
194
|
end
|
@@ -15,6 +15,45 @@ describe Range do
|
|
15
15
|
specify { subject.min.should == 1.day }
|
16
16
|
specify { subject.max.should == 5.days }
|
17
17
|
end
|
18
|
+
|
19
|
+
describe 'create ShortDurationRange with hours(:short)' do
|
20
|
+
let(:range) { (1..5) }
|
21
|
+
let (:timerange) { range.hours(:short) }
|
22
|
+
|
23
|
+
specify { subject.should be_a ShortDurationRange }
|
24
|
+
|
25
|
+
its(:min) { should be_a Fixnum }
|
26
|
+
its(:max) { should be_a Fixnum }
|
27
|
+
|
28
|
+
specify { subject.min.should == 1.hour }
|
29
|
+
specify { subject.max.should == 5.hours }
|
30
|
+
end
|
31
|
+
|
32
|
+
describe 'create LongDurationRange with weeks(:long)' do
|
33
|
+
let(:range) { (1..5) }
|
34
|
+
let (:timerange) { range.weeks(:long) }
|
35
|
+
|
36
|
+
specify { subject.should be_a LongDurationRange }
|
37
|
+
|
38
|
+
its(:min) { should be_a Fixnum }
|
39
|
+
its(:max) { should be_a Fixnum }
|
40
|
+
|
41
|
+
specify { subject.min.should == 1.weeks }
|
42
|
+
specify { subject.max.should == 5.weeks }
|
43
|
+
end
|
44
|
+
|
45
|
+
describe 'create LongDurationRange with weeks!' do
|
46
|
+
let(:range) { (1..5) }
|
47
|
+
let (:timerange) { range.weeks! }
|
48
|
+
|
49
|
+
specify { subject.should be_a LongDurationRange }
|
50
|
+
|
51
|
+
its(:min) { should be_a Fixnum }
|
52
|
+
its(:max) { should be_a Fixnum }
|
53
|
+
|
54
|
+
specify { subject.min.should == 1.weeks }
|
55
|
+
specify { subject.max.should == 5.weeks }
|
56
|
+
end
|
18
57
|
end
|
19
58
|
|
20
59
|
describe DurationRange do
|
data/timespan.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "timespan"
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kristian Mandrup"]
|
12
|
-
s.date = "2013-
|
12
|
+
s.date = "2013-03-13"
|
13
13
|
s.description = "Makes it easy to calculate time distance in different units"
|
14
14
|
s.email = "kmandrup@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -72,7 +72,7 @@ Gem::Specification.new do |s|
|
|
72
72
|
s.homepage = "http://github.com/kristianmandrup/timespan"
|
73
73
|
s.licenses = ["MIT"]
|
74
74
|
s.require_paths = ["lib"]
|
75
|
-
s.rubygems_version = "1.8.
|
75
|
+
s.rubygems_version = "1.8.25"
|
76
76
|
s.summary = "Use timespans in ruby"
|
77
77
|
|
78
78
|
if s.respond_to? :specification_version then
|
@@ -83,47 +83,44 @@ Gem::Specification.new do |s|
|
|
83
83
|
s.add_runtime_dependency(%q<chronic_duration>, [">= 0"])
|
84
84
|
s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0"])
|
85
85
|
s.add_runtime_dependency(%q<spanner>, [">= 0"])
|
86
|
-
s.add_runtime_dependency(%q<sugar-high>, ["
|
87
|
-
s.add_runtime_dependency(%q<xduration>, ["
|
86
|
+
s.add_runtime_dependency(%q<sugar-high>, [">= 0.7.3"])
|
87
|
+
s.add_runtime_dependency(%q<xduration>, [">= 2.2"])
|
88
88
|
s.add_development_dependency(%q<rspec>, [">= 2.8.0"])
|
89
|
-
s.add_development_dependency(%q<rails>, [">= 3.
|
90
|
-
s.add_development_dependency(%q<mongoid>, ["
|
89
|
+
s.add_development_dependency(%q<rails>, [">= 3.1"])
|
90
|
+
s.add_development_dependency(%q<mongoid>, [">= 3.0"])
|
91
91
|
s.add_development_dependency(%q<origin-selectable_ext>, ["~> 0.1.1"])
|
92
|
-
s.add_development_dependency(%q<
|
93
|
-
s.add_development_dependency(%q<
|
94
|
-
s.add_development_dependency(%q<
|
95
|
-
s.add_development_dependency(%q<simplecov>, [">= 0.5"])
|
92
|
+
s.add_development_dependency(%q<bundler>, [">= 1.2.0"])
|
93
|
+
s.add_development_dependency(%q<jeweler>, [">= 1.8.4"])
|
94
|
+
s.add_development_dependency(%q<simplecov>, [">= 0.7"])
|
96
95
|
else
|
97
96
|
s.add_dependency(%q<chronic>, [">= 0"])
|
98
97
|
s.add_dependency(%q<chronic_duration>, [">= 0"])
|
99
98
|
s.add_dependency(%q<activesupport>, [">= 3.0.0"])
|
100
99
|
s.add_dependency(%q<spanner>, [">= 0"])
|
101
|
-
s.add_dependency(%q<sugar-high>, ["
|
102
|
-
s.add_dependency(%q<xduration>, ["
|
100
|
+
s.add_dependency(%q<sugar-high>, [">= 0.7.3"])
|
101
|
+
s.add_dependency(%q<xduration>, [">= 2.2"])
|
103
102
|
s.add_dependency(%q<rspec>, [">= 2.8.0"])
|
104
|
-
s.add_dependency(%q<rails>, [">= 3.
|
105
|
-
s.add_dependency(%q<mongoid>, ["
|
103
|
+
s.add_dependency(%q<rails>, [">= 3.1"])
|
104
|
+
s.add_dependency(%q<mongoid>, [">= 3.0"])
|
106
105
|
s.add_dependency(%q<origin-selectable_ext>, ["~> 0.1.1"])
|
107
|
-
s.add_dependency(%q<
|
108
|
-
s.add_dependency(%q<
|
109
|
-
s.add_dependency(%q<
|
110
|
-
s.add_dependency(%q<simplecov>, [">= 0.5"])
|
106
|
+
s.add_dependency(%q<bundler>, [">= 1.2.0"])
|
107
|
+
s.add_dependency(%q<jeweler>, [">= 1.8.4"])
|
108
|
+
s.add_dependency(%q<simplecov>, [">= 0.7"])
|
111
109
|
end
|
112
110
|
else
|
113
111
|
s.add_dependency(%q<chronic>, [">= 0"])
|
114
112
|
s.add_dependency(%q<chronic_duration>, [">= 0"])
|
115
113
|
s.add_dependency(%q<activesupport>, [">= 3.0.0"])
|
116
114
|
s.add_dependency(%q<spanner>, [">= 0"])
|
117
|
-
s.add_dependency(%q<sugar-high>, ["
|
118
|
-
s.add_dependency(%q<xduration>, ["
|
115
|
+
s.add_dependency(%q<sugar-high>, [">= 0.7.3"])
|
116
|
+
s.add_dependency(%q<xduration>, [">= 2.2"])
|
119
117
|
s.add_dependency(%q<rspec>, [">= 2.8.0"])
|
120
|
-
s.add_dependency(%q<rails>, [">= 3.
|
121
|
-
s.add_dependency(%q<mongoid>, ["
|
118
|
+
s.add_dependency(%q<rails>, [">= 3.1"])
|
119
|
+
s.add_dependency(%q<mongoid>, [">= 3.0"])
|
122
120
|
s.add_dependency(%q<origin-selectable_ext>, ["~> 0.1.1"])
|
123
|
-
s.add_dependency(%q<
|
124
|
-
s.add_dependency(%q<
|
125
|
-
s.add_dependency(%q<
|
126
|
-
s.add_dependency(%q<simplecov>, [">= 0.5"])
|
121
|
+
s.add_dependency(%q<bundler>, [">= 1.2.0"])
|
122
|
+
s.add_dependency(%q<jeweler>, [">= 1.8.4"])
|
123
|
+
s.add_dependency(%q<simplecov>, [">= 0.7"])
|
127
124
|
end
|
128
125
|
end
|
129
126
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timespan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chronic
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
81
81
|
none: false
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - ! '>='
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: 0.7.3
|
86
86
|
type: :runtime
|
@@ -88,7 +88,7 @@ dependencies:
|
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
89
|
none: false
|
90
90
|
requirements:
|
91
|
-
- -
|
91
|
+
- - ! '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: 0.7.3
|
94
94
|
- !ruby/object:Gem::Dependency
|
@@ -96,7 +96,7 @@ dependencies:
|
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
99
|
-
- -
|
99
|
+
- - ! '>='
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '2.2'
|
102
102
|
type: :runtime
|
@@ -104,7 +104,7 @@ dependencies:
|
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '2.2'
|
110
110
|
- !ruby/object:Gem::Dependency
|
@@ -130,7 +130,7 @@ dependencies:
|
|
130
130
|
requirements:
|
131
131
|
- - ! '>='
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: '3.
|
133
|
+
version: '3.1'
|
134
134
|
type: :development
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -138,13 +138,13 @@ dependencies:
|
|
138
138
|
requirements:
|
139
139
|
- - ! '>='
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version: '3.
|
141
|
+
version: '3.1'
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
143
|
name: mongoid
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
145
145
|
none: false
|
146
146
|
requirements:
|
147
|
-
- -
|
147
|
+
- - ! '>='
|
148
148
|
- !ruby/object:Gem::Version
|
149
149
|
version: '3.0'
|
150
150
|
type: :development
|
@@ -152,7 +152,7 @@ dependencies:
|
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
153
|
none: false
|
154
154
|
requirements:
|
155
|
-
- -
|
155
|
+
- - ! '>='
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '3.0'
|
158
158
|
- !ruby/object:Gem::Dependency
|
@@ -171,22 +171,6 @@ dependencies:
|
|
171
171
|
- - ~>
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: 0.1.1
|
174
|
-
- !ruby/object:Gem::Dependency
|
175
|
-
name: rdoc
|
176
|
-
requirement: !ruby/object:Gem::Requirement
|
177
|
-
none: false
|
178
|
-
requirements:
|
179
|
-
- - ! '>='
|
180
|
-
- !ruby/object:Gem::Version
|
181
|
-
version: '3.12'
|
182
|
-
type: :development
|
183
|
-
prerelease: false
|
184
|
-
version_requirements: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
|
-
requirements:
|
187
|
-
- - ! '>='
|
188
|
-
- !ruby/object:Gem::Version
|
189
|
-
version: '3.12'
|
190
174
|
- !ruby/object:Gem::Dependency
|
191
175
|
name: bundler
|
192
176
|
requirement: !ruby/object:Gem::Requirement
|
@@ -194,7 +178,7 @@ dependencies:
|
|
194
178
|
requirements:
|
195
179
|
- - ! '>='
|
196
180
|
- !ruby/object:Gem::Version
|
197
|
-
version: 1.
|
181
|
+
version: 1.2.0
|
198
182
|
type: :development
|
199
183
|
prerelease: false
|
200
184
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -202,7 +186,7 @@ dependencies:
|
|
202
186
|
requirements:
|
203
187
|
- - ! '>='
|
204
188
|
- !ruby/object:Gem::Version
|
205
|
-
version: 1.
|
189
|
+
version: 1.2.0
|
206
190
|
- !ruby/object:Gem::Dependency
|
207
191
|
name: jeweler
|
208
192
|
requirement: !ruby/object:Gem::Requirement
|
@@ -210,7 +194,7 @@ dependencies:
|
|
210
194
|
requirements:
|
211
195
|
- - ! '>='
|
212
196
|
- !ruby/object:Gem::Version
|
213
|
-
version: 1.8.
|
197
|
+
version: 1.8.4
|
214
198
|
type: :development
|
215
199
|
prerelease: false
|
216
200
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -218,7 +202,7 @@ dependencies:
|
|
218
202
|
requirements:
|
219
203
|
- - ! '>='
|
220
204
|
- !ruby/object:Gem::Version
|
221
|
-
version: 1.8.
|
205
|
+
version: 1.8.4
|
222
206
|
- !ruby/object:Gem::Dependency
|
223
207
|
name: simplecov
|
224
208
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,7 +210,7 @@ dependencies:
|
|
226
210
|
requirements:
|
227
211
|
- - ! '>='
|
228
212
|
- !ruby/object:Gem::Version
|
229
|
-
version: '0.
|
213
|
+
version: '0.7'
|
230
214
|
type: :development
|
231
215
|
prerelease: false
|
232
216
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -234,7 +218,7 @@ dependencies:
|
|
234
218
|
requirements:
|
235
219
|
- - ! '>='
|
236
220
|
- !ruby/object:Gem::Version
|
237
|
-
version: '0.
|
221
|
+
version: '0.7'
|
238
222
|
description: Makes it easy to calculate time distance in different units
|
239
223
|
email: kmandrup@gmail.com
|
240
224
|
executables: []
|
@@ -309,7 +293,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
309
293
|
version: '0'
|
310
294
|
segments:
|
311
295
|
- 0
|
312
|
-
hash:
|
296
|
+
hash: -910273826810424952
|
313
297
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
314
298
|
none: false
|
315
299
|
requirements:
|
@@ -318,7 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
318
302
|
version: '0'
|
319
303
|
requirements: []
|
320
304
|
rubyforge_project:
|
321
|
-
rubygems_version: 1.8.
|
305
|
+
rubygems_version: 1.8.25
|
322
306
|
signing_key:
|
323
307
|
specification_version: 3
|
324
308
|
summary: Use timespans in ruby
|