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 +6 -0
- data/lib/pidgin2adium/parsers/basic_parser.rb +8 -6
- data/lib/version.rb +1 -1
- data/pidgin2adium.gemspec +1 -1
- metadata +2 -2
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
|
-
|
229
|
+
datetime = try_to_parse_minimal_time(time)
|
230
230
|
else
|
231
231
|
begin
|
232
|
-
|
232
|
+
datetime = DateTime.parse(time)
|
233
233
|
rescue ArgumentError
|
234
|
-
|
235
|
-
if
|
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
|
242
|
+
return nil if datetime.nil?
|
243
243
|
|
244
|
-
|
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
data/pidgin2adium.gemspec
CHANGED