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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a12b64c81231b047dbba014ec6ca581322fcbe8
4
- data.tar.gz: e79b9313e90499d7530a59e4da7d15eeeb54c2ba
3
+ metadata.gz: 65b3997097db0c6f98a1d027b56fd23973f7ef69
4
+ data.tar.gz: fc6ae8723e7c9f90dc4750b74ac058a5d739770b
5
5
  SHA512:
6
- metadata.gz: 6f3eac055c4e1bf09f886bd152bc39491493077be3c8af7f346377754cb937eb1e7d90032aa2296c727d86b2076fbb251e838387e05d16bf2f7a887ba0a65d5d
7
- data.tar.gz: 00cda194d2c52913d1360398c14cce3aee27306d75a5464353517284d8a2f9b4fc62e63f0686a9dc7d73d0c90be4abfdea4096acc7f64b90638446493b2e232e
6
+ metadata.gz: 3f339693e8bbc3ab8c27537197dce137d02868f41e69d916c9352e0e9593cce6fae9f63a37469d8fb613143e8d89643ea2ddf978a15531c156bafb7032b41128
7
+ data.tar.gz: e0a9e59bbd53ad6250b29a5b926efa13ec2f091b84469c360bc21b6bc695a16a6f7176122fd32a9858eac66a44837c9d491f64d5e8db37bff3ceb488d8542321
@@ -2,8 +2,8 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'forward-calendar'
5
- s.version = '0.1.1'
6
- s.date = '2017-12-11'
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 Locations < Node
10
+ class Event < Node
10
11
  include HappyMapper
11
- tag 'eventLocations'
12
+ tag 'event'
12
13
 
13
14
  has_many :locations, Location, tag: 'eventLocation'
14
- end
15
15
 
16
- class Event < Node
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
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'happymapper'
4
+ require_relative 'node'
5
+
6
+ module ForwardCalendar
7
+ class Identifier < Node
8
+ include HappyMapper
9
+ tag 'identifier'
10
+
11
+ attribute :type, String
12
+ content :value
13
+ end
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.1.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 00:00:00.000000000 Z
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