forward-calendar 0.1.1 → 0.1.2
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/company.rb +19 -0
- data/lib/forward_calendar/event.rb +4 -11
- data/lib/forward_calendar/identifier.rb +14 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65b3997097db0c6f98a1d027b56fd23973f7ef69
|
4
|
+
data.tar.gz: fc6ae8723e7c9f90dc4750b74ac058a5d739770b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f339693e8bbc3ab8c27537197dce137d02868f41e69d916c9352e0e9593cce6fae9f63a37469d8fb613143e8d89643ea2ddf978a15531c156bafb7032b41128
|
7
|
+
data.tar.gz: e0a9e59bbd53ad6250b29a5b926efa13ec2f091b84469c360bc21b6bc695a16a6f7176122fd32a9858eac66a44837c9d491f64d5e8db37bff3ceb488d8542321
|
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.1.
|
6
|
-
s.date = '2017-12-
|
5
|
+
s.version = '0.1.2'
|
6
|
+
s.date = '2017-12-19'
|
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,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'happymapper'
|
4
|
+
require_relative 'node'
|
5
|
+
require_relative 'identifier'
|
6
|
+
|
7
|
+
module ForwardCalendar
|
8
|
+
class Company < Node
|
9
|
+
include HappyMapper
|
10
|
+
tag 'company'
|
11
|
+
|
12
|
+
has_many :identifiers, Identifier, tag: 'identifier'
|
13
|
+
|
14
|
+
element :name, String, tag: 'companyName'
|
15
|
+
element :is_public, Boolean, tag: 'isPublic'
|
16
|
+
|
17
|
+
alias public? is_public
|
18
|
+
end
|
19
|
+
end
|
@@ -3,19 +3,17 @@
|
|
3
3
|
require 'happymapper'
|
4
4
|
require_relative 'node'
|
5
5
|
require_relative './location'
|
6
|
+
require_relative './company'
|
6
7
|
require_relative './helper/normalized_string'
|
7
8
|
|
8
9
|
module ForwardCalendar
|
9
|
-
class
|
10
|
+
class Event < Node
|
10
11
|
include HappyMapper
|
11
|
-
tag '
|
12
|
+
tag 'event'
|
12
13
|
|
13
14
|
has_many :locations, Location, tag: 'eventLocation'
|
14
|
-
end
|
15
15
|
|
16
|
-
|
17
|
-
include HappyMapper
|
18
|
-
tag 'event'
|
16
|
+
has_many :companies, Company, tag: 'company'
|
19
17
|
|
20
18
|
element :id, Integer, tag: 'eventID'
|
21
19
|
element :type, Helper::NormalizedString, tag: 'eventType'
|
@@ -26,10 +24,5 @@ module ForwardCalendar
|
|
26
24
|
element :start, Date, tag: 'start'
|
27
25
|
element :end, Date, tag: 'end'
|
28
26
|
element :url, String, tag: 'URL'
|
29
|
-
element :event_locations, Locations, tag: 'eventLocations'
|
30
|
-
|
31
|
-
def locations
|
32
|
-
event_locations&.locations
|
33
|
-
end
|
34
27
|
end
|
35
28
|
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.1.
|
4
|
+
version: 0.1.2
|
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: 2017-12-
|
11
|
+
date: 2017-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -183,9 +183,11 @@ files:
|
|
183
183
|
- lib/forward-calendar.rb
|
184
184
|
- lib/forward_calendar.rb
|
185
185
|
- lib/forward_calendar/address.rb
|
186
|
+
- lib/forward_calendar/company.rb
|
186
187
|
- lib/forward_calendar/event.rb
|
187
188
|
- lib/forward_calendar/forward_calendar.rb
|
188
189
|
- lib/forward_calendar/helper/normalized_string.rb
|
190
|
+
- lib/forward_calendar/identifier.rb
|
189
191
|
- lib/forward_calendar/location.rb
|
190
192
|
- lib/forward_calendar/location_end_time.rb
|
191
193
|
- lib/forward_calendar/location_start_time.rb
|