ice_cube 0.7.7 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -238,7 +238,7 @@ module IceCube
238
238
  # String serialization
239
239
  def to_s
240
240
  pieces = []
241
- ed = exdates; rd = rdates - ed
241
+ ed = extimes; rd = rtimes - ed
242
242
  pieces.concat rd.sort.map { |t| t.strftime(TO_S_TIME_FORMAT) }
243
243
  pieces.concat rrules.map { |t| t.to_s }
244
244
  pieces.concat exrules.map { |t| "not #{t.to_s}" }
@@ -278,10 +278,10 @@ module IceCube
278
278
  data[:duration] = duration if duration
279
279
  data[:rrules] = recurrence_rules.map(&:to_hash)
280
280
  data[:exrules] = exception_rules.map(&:to_hash)
281
- data[:rdates] = recurrence_times.map do |rt|
281
+ data[:rtimes] = recurrence_times.map do |rt|
282
282
  TimeUtil.serialize_time(rt)
283
283
  end
284
- data[:exdates] = exception_times.map do |et|
284
+ data[:extimes] = exception_times.map do |et|
285
285
  TimeUtil.serialize_time(et)
286
286
  end
287
287
  data
@@ -296,6 +296,13 @@ module IceCube
296
296
  schedule.end_time = TimeUtil.deserialize_time(data[:end_time]) if data[:end_time]
297
297
  data[:rrules] && data[:rrules].each { |h| schedule.rrule(IceCube::Rule.from_hash(h)) }
298
298
  data[:exrules] && data[:exrules].each { |h| schedule.exrule(IceCube::Rule.from_hash(h)) }
299
+ data[:rtimes] && data[:rtimes].each do |t|
300
+ schedule.add_recurrence_time TimeUtil.deserialize_time(t)
301
+ end
302
+ data[:extimes] && data[:extimes].each do |t|
303
+ schedule.add_exception_time TimeUtil.deserialize_time(t)
304
+ end
305
+ # Also serialize old format for backward compat
299
306
  data[:rdates] && data[:rdates].each do |t|
300
307
  schedule.add_recurrence_time TimeUtil.deserialize_time(t)
301
308
  end
@@ -1,5 +1,5 @@
1
1
  module IceCube
2
2
 
3
- VERSION = '0.7.7'
3
+ VERSION = '0.7.8'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ice_cube
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.7
4
+ version: 0.7.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-15 00:00:00.000000000Z
12
+ date: 2012-02-25 00:00:00.000000000 -05:00
13
+ default_executable:
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: rspec
16
- requirement: &2153297040 !ruby/object:Gem::Requirement
17
+ requirement: &70283886751000 !ruby/object:Gem::Requirement
17
18
  none: false
18
19
  requirements:
19
20
  - - ! '>='
@@ -21,10 +22,10 @@ dependencies:
21
22
  version: '0'
22
23
  type: :development
23
24
  prerelease: false
24
- version_requirements: *2153297040
25
+ version_requirements: *70283886751000
25
26
  - !ruby/object:Gem::Dependency
26
27
  name: active_support
27
- requirement: &2153296340 !ruby/object:Gem::Requirement
28
+ requirement: &70283886750480 !ruby/object:Gem::Requirement
28
29
  none: false
29
30
  requirements:
30
31
  - - ! '>='
@@ -32,10 +33,10 @@ dependencies:
32
33
  version: 3.0.0
33
34
  type: :development
34
35
  prerelease: false
35
- version_requirements: *2153296340
36
+ version_requirements: *70283886750480
36
37
  - !ruby/object:Gem::Dependency
37
38
  name: tzinfo
38
- requirement: &2153295880 !ruby/object:Gem::Requirement
39
+ requirement: &70283886750060 !ruby/object:Gem::Requirement
39
40
  none: false
40
41
  requirements:
41
42
  - - ! '>='
@@ -43,7 +44,7 @@ dependencies:
43
44
  version: '0'
44
45
  type: :development
45
46
  prerelease: false
46
- version_requirements: *2153295880
47
+ version_requirements: *70283886750060
47
48
  description: ice_cube is a recurring date library for Ruby. It allows for quick,
48
49
  programatic expansion of recurring date rules.
49
50
  email: john@crepezzi.com
@@ -91,6 +92,7 @@ files:
91
92
  - lib/ice_cube/version.rb
92
93
  - lib/ice_cube.rb
93
94
  - spec/spec_helper.rb
95
+ has_rdoc: true
94
96
  homepage: http://seejohnrun.github.com/ice_cube/
95
97
  licenses: []
96
98
  post_install_message:
@@ -111,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
113
  version: '0'
112
114
  requirements: []
113
115
  rubyforge_project: ice-cube
114
- rubygems_version: 1.8.15
116
+ rubygems_version: 1.6.2
115
117
  signing_key:
116
118
  specification_version: 3
117
119
  summary: Ruby Date Recurrence Library