icalendar 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 1.2.2 2013-02-16
2
+ * added TZURL property to Timezone component - spacepixels
3
+ * correct days in RRule ("[TU,WE]" -> "TU,WE") - Christoph Finkensiep
4
+
1
5
  === 1.2.1 2012-11-12
2
6
  * Adds uid property to alarms to support iCloud - Jeroen Jacobs
3
7
  * Fix up testing docs - Eric Carty-Fickes
@@ -10,7 +10,7 @@ require 'logger'
10
10
 
11
11
  module Icalendar #:nodoc:
12
12
 
13
- VERSION = '1.2.1'
13
+ VERSION = '1.2.2'
14
14
 
15
15
  # A simple error class to differentiate iCalendar library exceptions
16
16
  # from ruby language exceptions or others.
@@ -28,6 +28,7 @@ module Icalendar
28
28
  ical_property :tzoffsetfrom, :timezone_offset_from
29
29
  ical_property :tzid, :timezone_id
30
30
  ical_property :tzname, :timezone_name
31
+ ical_property :tzurl, :timezone_url
31
32
 
32
33
  ical_property :created
33
34
  ical_property :last_modified
@@ -27,15 +27,10 @@ module Icalendar
27
27
  class Weekday
28
28
  def initialize(day, position)
29
29
  @day, @position = day, position
30
- @last = false
31
30
  end
32
31
 
33
32
  def to_s
34
- "#{@position}#{@day}#{ "," unless @last }"
35
- end
36
-
37
- def you_are_last()
38
- @last = true
33
+ "#{@position}#{@day}"
39
34
  end
40
35
  end
41
36
 
@@ -71,7 +66,13 @@ module Icalendar
71
66
  result << ";COUNT=#{@count}" if @count
72
67
  result << ";INTERVAL=#{@interval}" if @interval
73
68
  @by_list.each do |key, value|
74
- result << ";#{key.to_s.upcase}=#{value}" if value
69
+ if value
70
+ if key == :byday
71
+ result << ";BYDAY=#{value.join ','}"
72
+ else
73
+ result << ";#{key.to_s.upcase}=#{value}"
74
+ end
75
+ end
75
76
  end
76
77
  result << ";WKST=#{@wkst}" if @wkst
77
78
  result.join
@@ -99,11 +100,10 @@ module Icalendar
99
100
  def parse_weekday_list(name, string)
100
101
  match = string.match(/;#{name}=(.*?)(;|$)/)
101
102
  if match
102
- return_array = match[1].split(",").map {|weekday|
103
+ return_array = match[1].split(",").map do |weekday|
103
104
  wd_match = weekday.match(/([+-]?\d*)(SU|MO|TU|WE|TH|FR|SA)/)
104
105
  Weekday.new(wd_match[2], wd_match[1])
105
- }
106
- return_array.last.you_are_last
106
+ end
107
107
  else
108
108
  nil
109
109
  end
data/script/txt2html CHANGED
@@ -19,9 +19,9 @@ class Fixnum
19
19
  return 'th' if (10..19).include?(self % 100)
20
20
  # others
21
21
  case self % 10
22
- when 1: return 'st'
23
- when 2: return 'nd'
24
- when 3: return 'rd'
22
+ when 1 then return 'st'
23
+ when 2 then return 'nd'
24
+ when 3 then return 'rd'
25
25
  else return 'th'
26
26
  end
27
27
  end
data/website/index.html CHANGED
@@ -34,7 +34,7 @@
34
34
  <div class="sidebar">
35
35
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/icalendar"; return false'>
36
36
  <p>Get Version</p>
37
- <a href="http://rubyforge.org/projects/icalendar" class="numbers">1.1.6</a>
37
+ <a href="http://rubyforge.org/projects/icalendar" class="numbers">1.2.1</a>
38
38
  </div>
39
39
  </div>
40
40
  <h2>What</h2>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icalendar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
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: 2012-11-21 00:00:00.000000000 Z
12
+ date: 2013-02-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc
@@ -27,6 +27,22 @@ dependencies:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: '3.10'
30
+ - !ruby/object:Gem::Dependency
31
+ name: newgem
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 1.5.3
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 1.5.3
30
46
  - !ruby/object:Gem::Dependency
31
47
  name: hoe
32
48
  requirement: !ruby/object:Gem::Requirement