forward-calendar 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/forward-calendar.gemspec +2 -2
- data/lib/forward_calendar/helper/time_as_utc.rb +17 -0
- data/lib/forward_calendar/location_time.rb +2 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3fbf5afb2a097ae21d89820a69d0ae447d7134f
|
4
|
+
data.tar.gz: 23826644a7f02affeaf8c07bb1aad879b9623045
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 260bb35bbb6b3eddd3371f27877482d09def272a4760d20db8f5b9d102f5150799c3e35f2224f99fd617edb65ac2ffc2684cbdaa856f0f00e5051c3cdcb5f054
|
7
|
+
data.tar.gz: 0aa0d660058654226e3a37862d1d89622426025f8dba0d08b33e87ab47cc365f98e1d35173ab91d823e8ffaac10ece933d6e2faa960f5c74a2e39599a5270235
|
data/forward-calendar.gemspec
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'forward-calendar'
|
5
|
-
s.version = '0.
|
6
|
-
s.date = '
|
5
|
+
s.version = '0.2.0'
|
6
|
+
s.date = '2018-01-10'
|
7
7
|
s.summary = 'Forward Calendar XML parser'
|
8
8
|
s.description = 'Parser for Forward Calendar XML files'
|
9
9
|
s.homepage = 'https://github.com/AlphaExchange/forward-calendar-rb'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'happymapper'
|
3
|
+
require 'active_support/time'
|
4
|
+
|
5
|
+
module ForwardCalendar
|
6
|
+
module Helper
|
7
|
+
class TimeAsUtc
|
8
|
+
def self.parse(value)
|
9
|
+
Time.find_zone('UTC').parse(value)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
HappyMapper::SupportedTypes.register_type(ForwardCalendar::Helper::TimeAsUtc) do |value|
|
16
|
+
ForwardCalendar::Helper::TimeAsUtc.parse(value)
|
17
|
+
end
|
@@ -2,12 +2,13 @@
|
|
2
2
|
|
3
3
|
require 'happymapper'
|
4
4
|
require_relative 'node'
|
5
|
+
require_relative 'helper/time_as_utc'
|
5
6
|
|
6
7
|
module ForwardCalendar
|
7
8
|
class LocationTime < Node
|
8
9
|
include HappyMapper
|
9
10
|
|
10
|
-
element :datetime,
|
11
|
+
element :datetime, Helper::TimeAsUtc, tag: 'datetime'
|
11
12
|
element :timezone, String, tag: 'timezone'
|
12
13
|
end
|
13
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forward-calendar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- João Simões
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- lib/forward_calendar/event.rb
|
188
188
|
- lib/forward_calendar/forward_calendar.rb
|
189
189
|
- lib/forward_calendar/helper/normalized_string.rb
|
190
|
+
- lib/forward_calendar/helper/time_as_utc.rb
|
190
191
|
- lib/forward_calendar/identifier.rb
|
191
192
|
- lib/forward_calendar/location.rb
|
192
193
|
- lib/forward_calendar/location_end_time.rb
|