apps 0.2.0 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b23f1e570ff2fe9154e677f4ac4400ed38b15688a04f96c6c3bacf03bf37a9c
4
- data.tar.gz: 9d7e953d209b24a18072870377506615248edc3851d6db2994331d05b4bdcac4
3
+ metadata.gz: 8d762a4824f66d6229928fc34470ea42b524e3b1bf3a4caf9a0fb8404f1ef24d
4
+ data.tar.gz: b091af6a9df6243fb7e266eb49a01c1b0b8e711cb713d7c236423af626f52549
5
5
  SHA512:
6
- metadata.gz: b03cced80ee3d26790c915a33fe2106a743194860c0a78ee4d634d7b8c2c920814aa1f8b0631c2b956fb3b142eaecc0dc0c0df1f1d708d740f8990867da3fb7b
7
- data.tar.gz: 7065dbcc46c911e8f45cc597371c4f43926499aa060cc39968b2f996da111242647aedd867447c4b0c21e0ad9cad668060a9f7e121b8376a1fbad0e0744aea5c
6
+ metadata.gz: fc96c1269946cda1d7bfd47af3b90866cfb205e2a069b0db3e4e17ad5dce08f12344b5d48c0da5db22d699132b4d46caec0107963f20b0da6adf98526c73dbdb
7
+ data.tar.gz: 8c0d93de8530add374a3f006086f03b40752a38d1e18aa6561a9f00d9ceb987027f376b4cfddf9315a0f3c41ef1dd45ab9482bdfaf4de277485c3c259c5e0f33
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
12
  *.gem
13
+ Gemfile.lock
@@ -21,9 +21,8 @@ module Apps
21
21
 
22
22
  def build_rsvp_action(**attrs)
23
23
  Event.new(**attrs).tap do |event|
24
- event.build_location unless event.location
25
- event.location.build_address unless event.location.address
26
- event.build_rsvp_actions unless event.actions.any?
24
+ event.build_location unless event.location
25
+ event.build_rsvp_actions unless event.actions.any?
27
26
  end
28
27
  end
29
28
 
@@ -6,7 +6,11 @@ module Apps
6
6
  module Markup
7
7
  class Base
8
8
  def initialize(**attrs)
9
- attrs.each { |attr, value| instance_variable_set(:"@#{attr}", value) }
9
+ attrs.each do |name, value|
10
+ next if value.nil?
11
+
12
+ instance_variable_set(:"@#{name}", value)
13
+ end
10
14
  end
11
15
 
12
16
  def type
@@ -25,7 +25,9 @@ module Apps
25
25
  end
26
26
 
27
27
  def build_location(**attrs)
28
- self.location = Place.new(**attrs)
28
+ self.location = Place.new(**attrs).tap do |place|
29
+ place.build_address unless place.address
30
+ end
29
31
  end
30
32
 
31
33
  def build_rsvp_actions
data/lib/apps/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Apps
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Van Horn
@@ -66,7 +66,6 @@ files:
66
66
  - ".rubocop.yml"
67
67
  - ".travis.yml"
68
68
  - Gemfile
69
- - Gemfile.lock
70
69
  - LICENSE.txt
71
70
  - README.md
72
71
  - Rakefile
data/Gemfile.lock DELETED
@@ -1,35 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- apps (0.2.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- diff-lcs (1.3)
10
- rake (10.5.0)
11
- rspec (3.7.0)
12
- rspec-core (~> 3.7.0)
13
- rspec-expectations (~> 3.7.0)
14
- rspec-mocks (~> 3.7.0)
15
- rspec-core (3.7.1)
16
- rspec-support (~> 3.7.0)
17
- rspec-expectations (3.7.0)
18
- diff-lcs (>= 1.2.0, < 2.0)
19
- rspec-support (~> 3.7.0)
20
- rspec-mocks (3.7.0)
21
- diff-lcs (>= 1.2.0, < 2.0)
22
- rspec-support (~> 3.7.0)
23
- rspec-support (3.7.1)
24
-
25
- PLATFORMS
26
- ruby
27
-
28
- DEPENDENCIES
29
- apps!
30
- bundler (~> 1.16)
31
- rake (~> 10.0)
32
- rspec (~> 3.0)
33
-
34
- BUNDLED WITH
35
- 1.16.1