clio-gcal4ruby 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -93,7 +93,7 @@ module GCal4Ruby
93
93
 
94
94
  class Base
95
95
  AUTH_URL = "https://www.google.com/accounts/ClientLogin"
96
- CALENDAR_LIST_FEED = "http://www.google.com/calendar/feeds/default/allcalendars/full"
96
+ CALENDAR_LIST_FEED = "https://www.google.com/calendar/feeds/default/allcalendars/full"
97
97
  @proxy_info = nil
98
98
  @auth_token = nil
99
99
  @debug = false
@@ -108,6 +108,7 @@ module GCal4Ruby
108
108
  # Returns the Net::HTTPResponse object on succces, or raises the appropriate
109
109
  # error if a non 20x response code is received.
110
110
  def send_post(url, content, header=nil)
111
+ url.gsub!("http://","https://")
111
112
  header = auth_header(header)
112
113
  ret = nil
113
114
  location = URI.parse(url)
@@ -158,6 +159,7 @@ module GCal4Ruby
158
159
  # Returns the Net::HTTPResponse object on succces, or raises the appropriate
159
160
  # error if a non 20x response code is received.
160
161
  def send_put(url, content, header=nil)
162
+ url.gsub!("http://","https://")
161
163
  header = auth_header(header)
162
164
  ret = nil
163
165
  location = URI.parse(url)
@@ -202,6 +204,7 @@ module GCal4Ruby
202
204
  # Returns the Net::HTTPResponse object on succces, or raises the appropriate
203
205
  # error if a non 20x response code is received.
204
206
  def send_get(url, header = nil)
207
+ url.gsub!("http://","https://")
205
208
  header = auth_header(header)
206
209
  ret = nil
207
210
  location = URI.parse(url)
@@ -249,6 +252,7 @@ module GCal4Ruby
249
252
  # Returns the Net::HTTPResponse object on succces, or raises the appropriate
250
253
  # error if a non 20x response code is received.
251
254
  def send_delete(url, header = nil)
255
+ url.gsub!("http://","https://")
252
256
  header = auth_header(header)
253
257
  ret = nil
254
258
  location = URI.parse(url)
@@ -32,7 +32,7 @@ module GCal4Ruby
32
32
  :show_timezone => true
33
33
  }
34
34
 
35
- CALENDAR_FEED = "http://www.google.com/calendar/feeds/default/owncalendars/full"
35
+ CALENDAR_FEED = "https://www.google.com/calendar/feeds/default/owncalendars/full"
36
36
 
37
37
  attr_accessor :title, :summary, :hidden, :timezone, :color, :where, :selected
38
38
  attr_reader :service, :id, :event_feed, :editable, :edit_feed, :self_feed
@@ -44,16 +44,17 @@ module GCal4Ruby
44
44
  self.send("#{key}=", value)
45
45
  end
46
46
 
47
- # @xml ||= CALENDAR_XML
48
- # @exists = false
49
- # @title ||= ""
50
- # @summary ||= ""
51
- # @public ||= false
52
- # @hidden ||= false
53
- # @timezone ||= "America/Los_Angeles"
54
- # @color ||= "#2952A3"
55
- # @where ||= ""
56
- # return true
47
+ @xml ||= CALENDAR_XML
48
+ @exists = false
49
+ @title ||= ""
50
+ @summary ||= ""
51
+ @public ||= false
52
+ @hidden ||= false
53
+ @timezone ||= "America/Los_Angeles"
54
+ @color ||= "#2952A3"
55
+ @where ||= ""
56
+ # return true
57
+ return self
57
58
  end
58
59
 
59
60
  def exists?
@@ -94,7 +95,7 @@ module GCal4Ruby
94
95
  def public=(param)
95
96
  permissions = param ? 'http://schemas.google.com/gCal/2005#read' : 'none'
96
97
 
97
- path = "http://www.google.com/calendar/feeds/#{@id}/acl/full/default"
98
+ path = "https://www.google.com/calendar/feeds/#{@id}/acl/full/default"
98
99
  request = REXML::Document.new(ACL_XML) # What/Where is ACL_XML???
99
100
  request.root.elements.each() do |ele|
100
101
  if ele.name == 'role'
@@ -179,7 +180,7 @@ module GCal4Ruby
179
180
  end
180
181
 
181
182
  def self.query(service, query_term)
182
- url = 'http://www.google.com/calendar/feeds/default/allcalendars/full'+"?q="+CGI.escape(query_term)
183
+ url = 'https://www.google.com/calendar/feeds/default/allcalendars/full'+"?q="+CGI.escape(query_term)
183
184
  ret = service.send_get(url)
184
185
  puts "==return=="
185
186
  puts ret.body
@@ -461,7 +461,7 @@ module GCal4Ruby
461
461
  query_string += "&ctz=#{timezone.gsub(" ", "_")}" if timezone
462
462
  query_string += "&singleevents=#{single_events}" if single_events
463
463
  if query_string
464
- events = calendar.service.send_get("http://www.google.com/calendar/feeds/#{calendar.id}/private/full?"+query_string)
464
+ events = calendar.service.send_get("https://www.google.com/calendar/feeds/#{calendar.id}/private/full?"+query_string)
465
465
  ret = []
466
466
  REXML::Document.new(events.read_body).root.elements.each("entry"){}.map do |entry|
467
467
  Event.define_xml_namespaces(entry)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clio-gcal4ruby
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 3
10
- version: 0.3.3
9
+ - 4
10
+ version: 0.3.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mike Reich