icalendar 1.5.1 → 1.5.2

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: 44c08a1f244a35efd4affc4705028dfe9798f707
4
- data.tar.gz: f67a4772936897ed6fed5efd4d3d6d8f6c564ac9
3
+ metadata.gz: 840281a09af33da66b8c292c3eedda0aafd3ce60
4
+ data.tar.gz: 2f5c282164f680485f8f6cc16dfacc0874e542bb
5
5
  SHA512:
6
- metadata.gz: 336fc24e516f61e887be407e55c5670475c965770a13e42be3b97fc1843cb02f5a21f40cba4aa76887f868c51637c0d9510548748f4dce34d8ff0d62579d0529
7
- data.tar.gz: aeb52da8e30cea70b4faaa2b931b827e19952837f85c2403959859702fa2b80213a0ef4d05d0c7d45ac0ab99bc90b7fa6f96e36e5bc7d1c163d1f6ac4dca06ee
6
+ metadata.gz: bf6e5b790341c0f4cf523d08b19b67590d631ab4740246ae2f56fcb486e3261f302d59d6e8ed4eb689fa80b1290c11605e62bfc64f1197c6a8a0013d8ae3390d
7
+ data.tar.gz: b52091e873332de047e71bcfbc6b2c75b2f54a01b8c40dc98964c8f850f0ef9b4ae25d4f62368a5018ea5341aac991e351e62c2b9b2ee7f9b6f159717c8c594c
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 1.5.2 2014-02-22
2
+ * Output timezone components first
3
+ * Fix undefined local variable or method 'e' - Jason Stirk
4
+
1
5
  === 1.5.1 2014-02-27
2
6
  * Check for dtend existence before setting timezone - Jonas Grau
3
7
  * Clean up and refactor components - Kasper Timm Hansen
@@ -11,7 +11,7 @@ require 'logger'
11
11
 
12
12
  module Icalendar #:nodoc:
13
13
 
14
- VERSION = '1.5.1'
14
+ VERSION = '1.5.2'
15
15
 
16
16
  # A simple error class to differentiate iCalendar library exceptions
17
17
  # from ruby language exceptions or others.
@@ -9,7 +9,7 @@
9
9
  module Icalendar
10
10
 
11
11
  class Calendar < Component
12
- ical_component :events, :todos, :journals, :freebusys, :timezones
12
+ ical_component :timezones, :events, :todos, :journals, :freebusys
13
13
 
14
14
  ical_property :calscale, :calendar_scale
15
15
  ical_property :prodid, :product_id
@@ -42,8 +42,8 @@ module Icalendar
42
42
  if block
43
43
  instance_eval(&block)
44
44
  if tzid
45
- dtstart.ical_params = { "TZID" => e.tzid }
46
- dtend.ical_params = { "TZID" => e.tzid } unless dtend.nil?
45
+ dtstart.ical_params = { "TZID" => tzid }
46
+ dtend.ical_params = { "TZID" => tzid } unless dtend.nil?
47
47
  end
48
48
  end
49
49
  end
@@ -43,6 +43,26 @@ class TestCalendar < Test::Unit::TestCase
43
43
  end
44
44
  end
45
45
 
46
+ def test_block_creation_with_timezone
47
+ cal = Calendar.new
48
+
49
+ event_start = DateTime.new 1997, 9, 3, 19, 0, 0
50
+ tz = TZInfo::Timezone.get "Europe/Copenhagen"
51
+ timezone = tz.ical_timezone event_start
52
+ cal.add timezone
53
+
54
+ cal.event do
55
+ dtstart event_start
56
+ dtend "19970903T190000Z"
57
+ summary "This is my summary"
58
+ end
59
+
60
+ cal.events.each do |ev|
61
+ assert_equal(event_start, ev.dtstart)
62
+ assert_equal("19970903T190000Z", ev.dtend)
63
+ end
64
+ end
65
+
46
66
  def test_create_multiple_event_calendar
47
67
  # Create a fresh calendar
48
68
  Timecop.freeze DateTime.new(2013, 12, 26, 5, 0, 0, '+0000')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icalendar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Ahearn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-28 00:00:00.000000000 Z
11
+ date: 2014-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake