pidgin2adium 3.2.1 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ChangeLog CHANGED
@@ -1,3 +1,9 @@
1
+ === 3.2.2 / 2010-11-08
2
+ * Use DateTime#strftime to get dates in xmlschema format. DateTime#xmlschema
3
+ doesn't exist in Ruby 1.8, and Ruby 1.9 has DateTime#iso8601, not
4
+ DateTime#xmlschema. Just use strftime. Thanks to Matthew Jakubowski for
5
+ pointing this bug out.
6
+
1
7
  === 3.2.1 / 2010-11-08
2
8
  * Use straight DateTime.parse when possible, and only fall back on hacky
3
9
  Date._strptime when we have to.
@@ -226,22 +226,24 @@ module Pidgin2Adium
226
226
  def create_adium_time(time)
227
227
  return nil if time.nil?
228
228
  if is_minimal_time?(time)
229
- new_time = try_to_parse_minimal_time(time)
229
+ datetime = try_to_parse_minimal_time(time)
230
230
  else
231
231
  begin
232
- new_time = DateTime.parse(time)
232
+ datetime = DateTime.parse(time)
233
233
  rescue ArgumentError
234
- new_time = try_to_parse_time(time)
235
- if new_time.nil?
234
+ datetime = try_to_parse_time(time)
235
+ if datetime.nil?
236
236
  Pidgin2Adium.oops("#{time} couldn't be parsed. Please open an issue on GitHub: https://github.com/gabebw/pidgin2adium/issues")
237
237
  return nil
238
238
  end
239
239
  end
240
240
  end
241
241
 
242
- return nil if new_time.nil?
242
+ return nil if datetime.nil?
243
243
 
244
- new_time.xmlschema
244
+ # Instead of dealing with Ruby 1.9 vs Ruby 1.8, DateTime vs Date vs
245
+ # Time, and #xmlschema vs #iso8601, just use strftime.
246
+ datetime.strftime('%Y-%m-%dT%H:%M:%S%Z')
245
247
  end
246
248
 
247
249
  # Extract required data from the file. Run by parse. Sets these
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pidgin2Adium
2
- VERSION = "3.2.1"
2
+ VERSION = "3.2.2"
3
3
  end
data/pidgin2adium.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pidgin2adium}
8
- s.version = "3.2.1"
8
+ s.version = "3.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Gabe Berke-Williams"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 3
7
7
  - 2
8
- - 1
9
- version: 3.2.1
8
+ - 2
9
+ version: 3.2.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Gabe Berke-Williams