g5_foundation_client 0.4.2 → 0.5.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +1 -4
- data/g5_foundation_client.gemspec +2 -2
- data/lib/g5_foundation_client.rb +1 -0
- data/lib/g5_foundation_client/models/amenity.rb +13 -0
- data/lib/g5_foundation_client/models/location.rb +5 -1
- data/lib/g5_foundation_client/version.rb +1 -1
- data/spec/fixtures/hub-client.json +167 -149
- data/spec/fixtures/hub-location.json +17 -1
- data/spec/lib/g5_foundation_client/models/amenity_spec.rb +22 -0
- data/spec/lib/g5_foundation_client/models/client_spec.rb +1 -1
- data/spec/lib/g5_foundation_client/models/location_spec.rb +21 -2
- data/spec/spec_helper.rb +1 -0
- metadata +26 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fd8b87c71782c1bb666b902a566fd777ec56211
|
4
|
+
data.tar.gz: 8c8b327793af64b9e031cfefda8f3193a7d8c93c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46dce111c3476a5933898a136272ab76751df790f3b0e7343f96de988015132e0cb3ccc0f87a0b86295666a266c4c37ec77ecbcad56f9816062810efe772a2ec
|
7
|
+
data.tar.gz: c5e5283416b2421247d132657a50bdc73ec2be7065ff6ee858640ab00ef2ecb429825b8ac7f81afd8dcf2c449f425dc2a588582a2a67f91a200dba8af7540e3d
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1
|
1
|
+
2.3.1
|
data/.travis.yml
CHANGED
@@ -24,8 +24,8 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.5"
|
26
26
|
spec.add_development_dependency "rake"
|
27
|
-
|
28
|
-
spec.add_development_dependency "rspec"
|
27
|
+
spec.add_development_dependency "rspec"
|
28
|
+
spec.add_development_dependency "rspec-its"
|
29
29
|
spec.add_development_dependency "webmock"
|
30
30
|
spec.add_development_dependency "pry"
|
31
31
|
end
|
data/lib/g5_foundation_client.rb
CHANGED
@@ -18,6 +18,7 @@ require 'g5_foundation_client/record_not_found_exception'
|
|
18
18
|
require 'g5_foundation_client/fetcher'
|
19
19
|
|
20
20
|
require 'g5_foundation_client/models/findable_by_uid'
|
21
|
+
require 'g5_foundation_client/models/amenity'
|
21
22
|
require 'g5_foundation_client/models/location'
|
22
23
|
require 'g5_foundation_client/models/client'
|
23
24
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module G5FoundationClient
|
2
|
+
class Amenity
|
3
|
+
attr_reader :attributes
|
4
|
+
|
5
|
+
def initialize(attrs)
|
6
|
+
@attributes = ActiveSupport::HashWithIndifferentAccess.new(attrs)
|
7
|
+
end
|
8
|
+
|
9
|
+
[:name, :icon, :id, :created_at, :updated_at].each do |field|
|
10
|
+
define_method(field) { self.attributes[field] }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -31,7 +31,7 @@ class G5FoundationClient::Location
|
|
31
31
|
:recycling_center, :swimming_pool, :hot_tub, :storage_available, :tennis_court, :wifi_available, :other_community_amenities,
|
32
32
|
:primary_offering_other, :ga_tracking_id, :ga_profile_id, :landmark_1_type, :landmark_1_name, :landmark_2_type, :landmark_2_name,
|
33
33
|
:property_feature_1, :property_feature_2, :property_feature_3, :apartment_amenity_1, :apartment_amenity_2,
|
34
|
-
:community_amenity_1, :community_amenity_2, :status].each do |field|
|
34
|
+
:community_amenity_1, :community_amenity_2, :status, :no_call_tracking].each do |field|
|
35
35
|
define_method(field) { self.location_hash[field] }
|
36
36
|
end
|
37
37
|
|
@@ -45,4 +45,8 @@ class G5FoundationClient::Location
|
|
45
45
|
return street_address_1 if street_address_2.blank?
|
46
46
|
"#{street_address_1}\n#{street_address_2}"
|
47
47
|
end
|
48
|
+
|
49
|
+
def amenities
|
50
|
+
self.location_hash.fetch(:amenities, []).collect { |amen_hash| ::G5FoundationClient::Amenity.new(amen_hash) }
|
51
|
+
end
|
48
52
|
end
|
@@ -1,4 +1,5 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"client": {
|
2
3
|
"id": 2,
|
3
4
|
"uid": "http://192.168.33.30:3000/clients/g5-c-6hng302-no-store",
|
4
5
|
"name": "no store",
|
@@ -17,153 +18,170 @@
|
|
17
18
|
"created_at": "2014-10-08T20:27:36.008Z",
|
18
19
|
"updated_at": "2014-10-08T20:27:36.008Z",
|
19
20
|
"locations": [
|
20
|
-
|
21
|
+
{
|
22
|
+
"id": 3,
|
23
|
+
"uid": "http://192.168.33.30:3000/clients/g5-c-6hng302-no-store/locations/g5-cl-6hng303-brussels",
|
24
|
+
"client_id": 2,
|
25
|
+
"client_uid": "http://192.168.33.30:3000/clients/g5-c-6hng302-no-store",
|
26
|
+
"name": "brussels",
|
27
|
+
"corporate": false,
|
28
|
+
"created_at": "2014-10-08T20:27:36.011Z",
|
29
|
+
"updated_at": "2014-10-08T20:27:36.011Z",
|
30
|
+
"urn": "g5-cl-6hng303-brussels",
|
31
|
+
"street_address_1": "20270 W North Ave",
|
32
|
+
"street_address_2": "",
|
33
|
+
"city": "Brookfield",
|
34
|
+
"state": "WI",
|
35
|
+
"postal_code": "53045-4278",
|
36
|
+
"fax": "(262) 744-9458",
|
37
|
+
"email": "perry@hertler.org",
|
38
|
+
"hours": "",
|
39
|
+
"twitter_username": "",
|
40
|
+
"facebook_username": "",
|
41
|
+
"yelp_username": "",
|
42
|
+
"pinterest_username": "",
|
43
|
+
"foursquare_username": "",
|
44
|
+
"tumblr_username": "",
|
45
|
+
"instagram_username": "",
|
46
|
+
"vimeo_username": "",
|
47
|
+
"youtube_username": "",
|
48
|
+
"domain": "http://nostore.com/brussels",
|
49
|
+
"phone_number": "(262) 744-9458",
|
50
|
+
"neighborhood": "",
|
51
|
+
"boat_storage": false,
|
52
|
+
"business_storage": false,
|
53
|
+
"gate_access": false,
|
54
|
+
"security_monitoring": false,
|
55
|
+
"business_center": false,
|
56
|
+
"climate_controlled": false,
|
57
|
+
"heated_cooled": false,
|
58
|
+
"friendly_staff": false,
|
59
|
+
"covered_drivethru": false,
|
60
|
+
"covered_loading": false,
|
61
|
+
"rv_boat_storage": false,
|
62
|
+
"outside_parking": false,
|
63
|
+
"deliveries": false,
|
64
|
+
"dollies_carts": false,
|
65
|
+
"digital_surveillance": false,
|
66
|
+
"drive_up_access": false,
|
67
|
+
"electronic_gate": false,
|
68
|
+
"uhaul_trucks": false,
|
69
|
+
"budget_trucks": false,
|
70
|
+
"moving_trucks": false,
|
71
|
+
"free_truck": false,
|
72
|
+
"fenced_lighted": false,
|
73
|
+
"ground_level_units": false,
|
74
|
+
"high_ceilings": false,
|
75
|
+
"individual_alarmed_units": false,
|
76
|
+
"mail_boxes": false,
|
77
|
+
"major_credit_cards": false,
|
78
|
+
"military_discounts": false,
|
79
|
+
"student_discount": false,
|
80
|
+
"senior_discount": false,
|
81
|
+
"month_to_month": false,
|
82
|
+
"no_admin_fee": false,
|
83
|
+
"no_deposits": false,
|
84
|
+
"no_late_fees": false,
|
85
|
+
"online_bill_pay": false,
|
86
|
+
"packing_moving_supplies": false,
|
87
|
+
"boxes_locks": false,
|
88
|
+
"tenant_insurance": false,
|
89
|
+
"truck_rentals": false,
|
90
|
+
"wide_driveways": false,
|
91
|
+
"wine_storage": false,
|
92
|
+
"other_features": "",
|
93
|
+
"rv_storage": false,
|
94
|
+
"seven_day_access": false,
|
95
|
+
"other_storage": "",
|
96
|
+
"specific_demographic": "",
|
97
|
+
"primary_offering": "",
|
98
|
+
"secondary_other": "",
|
99
|
+
"secondary_condo": false,
|
100
|
+
"secondary_townhomes": false,
|
101
|
+
"secondary_apartments": false,
|
102
|
+
"floor_plans": "",
|
103
|
+
"nearby_schools": "",
|
104
|
+
"highrise_structure": false,
|
105
|
+
"garden_structure": false,
|
106
|
+
"townhome_structure": false,
|
107
|
+
"modern_structure": false,
|
108
|
+
"nearby_employers": "",
|
109
|
+
"dogs_allowed": false,
|
110
|
+
"cats_allowed": false,
|
111
|
+
"accessibility": "0",
|
112
|
+
"air_conditioned": false,
|
113
|
+
"cable_included": false,
|
114
|
+
"ceiling_fans": false,
|
115
|
+
"custom_cabinetry": false,
|
116
|
+
"dishwasher": false,
|
117
|
+
"energy_efficient": false,
|
118
|
+
"fireplace": false,
|
119
|
+
"granite_counters": false,
|
120
|
+
"hardwood_floors": false,
|
121
|
+
"private_balcony": false,
|
122
|
+
"private_patio": false,
|
123
|
+
"refrigerator": false,
|
124
|
+
"stainless_appliances": false,
|
125
|
+
"smoke_free": false,
|
126
|
+
"style_design": "",
|
127
|
+
"style_cost": "",
|
128
|
+
"walkin_closet": false,
|
129
|
+
"washer_dryer": false,
|
130
|
+
"has_view": false,
|
131
|
+
"other_amenities": "",
|
132
|
+
"carport_parking": false,
|
133
|
+
"club_house": false,
|
134
|
+
"dog_park": false,
|
135
|
+
"corporate_suites": false,
|
136
|
+
"family_friendly": false,
|
137
|
+
"fitness_center": false,
|
138
|
+
"furnished_apartments": false,
|
139
|
+
"garages": false,
|
140
|
+
"gated_entrance": false,
|
141
|
+
"laundry_facilities": false,
|
142
|
+
"online_rental_payments": false,
|
143
|
+
"onsite_management": false,
|
144
|
+
"close_park": false,
|
145
|
+
"pet_friendly": false,
|
146
|
+
"playground": false,
|
147
|
+
"recycling_center": false,
|
148
|
+
"swimming_pool": false,
|
149
|
+
"hot_tub": false,
|
150
|
+
"storage_available": false,
|
151
|
+
"tennis_court": false,
|
152
|
+
"wifi_available": false,
|
153
|
+
"other_community_amenities": "",
|
154
|
+
"primary_offering_other": null,
|
155
|
+
"ga_tracking_id": "",
|
156
|
+
"ga_profile_id": "",
|
157
|
+
"landmark_1_type": "",
|
158
|
+
"landmark_1_name": "",
|
159
|
+
"landmark_2_type": "",
|
160
|
+
"landmark_2_name": "",
|
161
|
+
"property_feature_1": "",
|
162
|
+
"property_feature_2": "",
|
163
|
+
"property_feature_3": "",
|
164
|
+
"apartment_amenity_1": "",
|
165
|
+
"apartment_amenity_2": "",
|
166
|
+
"community_amenity_1": "",
|
167
|
+
"community_amenity_2": "",
|
168
|
+
"amenities": [
|
169
|
+
{
|
170
|
+
"id": 1,
|
171
|
+
"name": "Covered Parking",
|
172
|
+
"icon": "fa fa-parking-interior",
|
173
|
+
"created_at": "2016-11-22T09:20:16.549-08:00",
|
174
|
+
"updated_at": "2016-11-22T09:20:16.549-08:00"
|
175
|
+
},
|
176
|
+
{
|
21
177
|
"id": 3,
|
22
|
-
"
|
23
|
-
"
|
24
|
-
"
|
25
|
-
"
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
"urn": "g5-cl-6hng303-brussels",
|
30
|
-
"street_address_1": "20270 W North Ave",
|
31
|
-
"street_address_2": "",
|
32
|
-
"city": "Brookfield",
|
33
|
-
"state": "WI",
|
34
|
-
"postal_code": "53045-4278",
|
35
|
-
"fax": "(262) 744-9458",
|
36
|
-
"email": "perry@hertler.org",
|
37
|
-
"hours": "",
|
38
|
-
"twitter_username": "",
|
39
|
-
"facebook_username": "",
|
40
|
-
"yelp_username": "",
|
41
|
-
"pinterest_username": "",
|
42
|
-
"foursquare_username": "",
|
43
|
-
"tumblr_username": "",
|
44
|
-
"instagram_username": "",
|
45
|
-
"vimeo_username": "",
|
46
|
-
"youtube_username": "",
|
47
|
-
"domain": "http://nostore.com/brussels",
|
48
|
-
"phone_number": "(262) 744-9458",
|
49
|
-
"neighborhood": "",
|
50
|
-
"boat_storage": false,
|
51
|
-
"business_storage": false,
|
52
|
-
"gate_access": false,
|
53
|
-
"security_monitoring": false,
|
54
|
-
"business_center": false,
|
55
|
-
"climate_controlled": false,
|
56
|
-
"heated_cooled": false,
|
57
|
-
"friendly_staff": false,
|
58
|
-
"covered_drivethru": false,
|
59
|
-
"covered_loading": false,
|
60
|
-
"rv_boat_storage": false,
|
61
|
-
"outside_parking": false,
|
62
|
-
"deliveries": false,
|
63
|
-
"dollies_carts": false,
|
64
|
-
"digital_surveillance": false,
|
65
|
-
"drive_up_access": false,
|
66
|
-
"electronic_gate": false,
|
67
|
-
"uhaul_trucks": false,
|
68
|
-
"budget_trucks": false,
|
69
|
-
"moving_trucks": false,
|
70
|
-
"free_truck": false,
|
71
|
-
"fenced_lighted": false,
|
72
|
-
"ground_level_units": false,
|
73
|
-
"high_ceilings": false,
|
74
|
-
"individual_alarmed_units": false,
|
75
|
-
"mail_boxes": false,
|
76
|
-
"major_credit_cards": false,
|
77
|
-
"military_discounts": false,
|
78
|
-
"student_discount": false,
|
79
|
-
"senior_discount": false,
|
80
|
-
"month_to_month": false,
|
81
|
-
"no_admin_fee": false,
|
82
|
-
"no_deposits": false,
|
83
|
-
"no_late_fees": false,
|
84
|
-
"online_bill_pay": false,
|
85
|
-
"packing_moving_supplies": false,
|
86
|
-
"boxes_locks": false,
|
87
|
-
"tenant_insurance": false,
|
88
|
-
"truck_rentals": false,
|
89
|
-
"wide_driveways": false,
|
90
|
-
"wine_storage": false,
|
91
|
-
"other_features": "",
|
92
|
-
"rv_storage": false,
|
93
|
-
"seven_day_access": false,
|
94
|
-
"other_storage": "",
|
95
|
-
"specific_demographic": "",
|
96
|
-
"primary_offering": "",
|
97
|
-
"secondary_other": "",
|
98
|
-
"secondary_condo": false,
|
99
|
-
"secondary_townhomes": false,
|
100
|
-
"secondary_apartments": false,
|
101
|
-
"floor_plans": "",
|
102
|
-
"nearby_schools": "",
|
103
|
-
"highrise_structure": false,
|
104
|
-
"garden_structure": false,
|
105
|
-
"townhome_structure": false,
|
106
|
-
"modern_structure": false,
|
107
|
-
"nearby_employers": "",
|
108
|
-
"dogs_allowed": false,
|
109
|
-
"cats_allowed": false,
|
110
|
-
"accessibility": "0",
|
111
|
-
"air_conditioned": false,
|
112
|
-
"cable_included": false,
|
113
|
-
"ceiling_fans": false,
|
114
|
-
"custom_cabinetry": false,
|
115
|
-
"dishwasher": false,
|
116
|
-
"energy_efficient": false,
|
117
|
-
"fireplace": false,
|
118
|
-
"granite_counters": false,
|
119
|
-
"hardwood_floors": false,
|
120
|
-
"private_balcony": false,
|
121
|
-
"private_patio": false,
|
122
|
-
"refrigerator": false,
|
123
|
-
"stainless_appliances": false,
|
124
|
-
"smoke_free": false,
|
125
|
-
"style_design": "",
|
126
|
-
"style_cost": "",
|
127
|
-
"walkin_closet": false,
|
128
|
-
"washer_dryer": false,
|
129
|
-
"has_view": false,
|
130
|
-
"other_amenities": "",
|
131
|
-
"carport_parking": false,
|
132
|
-
"club_house": false,
|
133
|
-
"dog_park": false,
|
134
|
-
"corporate_suites": false,
|
135
|
-
"family_friendly": false,
|
136
|
-
"fitness_center": false,
|
137
|
-
"furnished_apartments": false,
|
138
|
-
"garages": false,
|
139
|
-
"gated_entrance": false,
|
140
|
-
"laundry_facilities": false,
|
141
|
-
"online_rental_payments": false,
|
142
|
-
"onsite_management": false,
|
143
|
-
"close_park": false,
|
144
|
-
"pet_friendly": false,
|
145
|
-
"playground": false,
|
146
|
-
"recycling_center": false,
|
147
|
-
"swimming_pool": false,
|
148
|
-
"hot_tub": false,
|
149
|
-
"storage_available": false,
|
150
|
-
"tennis_court": false,
|
151
|
-
"wifi_available": false,
|
152
|
-
"other_community_amenities": "",
|
153
|
-
"primary_offering_other": null,
|
154
|
-
"ga_tracking_id": "",
|
155
|
-
"ga_profile_id": "",
|
156
|
-
"landmark_1_type": "",
|
157
|
-
"landmark_1_name": "",
|
158
|
-
"landmark_2_type": "",
|
159
|
-
"landmark_2_name": "",
|
160
|
-
"property_feature_1": "",
|
161
|
-
"property_feature_2": "",
|
162
|
-
"property_feature_3": "",
|
163
|
-
"apartment_amenity_1": "",
|
164
|
-
"apartment_amenity_2": "",
|
165
|
-
"community_amenity_1": "",
|
166
|
-
"community_amenity_2": ""
|
167
|
-
}
|
178
|
+
"name": "WIFI",
|
179
|
+
"icon": "fa fa-wifi",
|
180
|
+
"created_at": "2016-11-22T09:20:16.578-08:00",
|
181
|
+
"updated_at": "2016-11-22T09:20:16.578-08:00"
|
182
|
+
}
|
183
|
+
]
|
184
|
+
}
|
168
185
|
]
|
169
|
-
}
|
186
|
+
}
|
187
|
+
}
|
@@ -145,6 +145,22 @@
|
|
145
145
|
"apartment_amenity_1": "",
|
146
146
|
"apartment_amenity_2": "",
|
147
147
|
"community_amenity_1": "",
|
148
|
-
"community_amenity_2": ""
|
148
|
+
"community_amenity_2": "",
|
149
|
+
"amenities": [
|
150
|
+
{
|
151
|
+
"id": 1,
|
152
|
+
"name": "Covered Parking",
|
153
|
+
"icon": "fa fa-parking-interior",
|
154
|
+
"created_at": "2016-11-22T09:20:16.549-08:00",
|
155
|
+
"updated_at": "2016-11-22T09:20:16.549-08:00"
|
156
|
+
},
|
157
|
+
{
|
158
|
+
"id": 3,
|
159
|
+
"name": "WIFI",
|
160
|
+
"icon": "fa fa-wifi",
|
161
|
+
"created_at": "2016-11-22T09:20:16.578-08:00",
|
162
|
+
"updated_at": "2016-11-22T09:20:16.578-08:00"
|
163
|
+
}
|
164
|
+
]
|
149
165
|
}
|
150
166
|
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe G5FoundationClient::Amenity do
|
4
|
+
subject { described_class.new({
|
5
|
+
id: id,
|
6
|
+
name: name,
|
7
|
+
icon: icon,
|
8
|
+
created_at: created_at,
|
9
|
+
updated_at: updated_at
|
10
|
+
}) }
|
11
|
+
let(:id) { 1 }
|
12
|
+
let(:name) { 'Covered Parking' }
|
13
|
+
let(:icon) { 'fa fa-parking-interior' }
|
14
|
+
let(:created_at) { '2016-11-22T09:20:16.549-08:00' }
|
15
|
+
let(:updated_at) { '2016-11-22T09:20:16.549-08:00' }
|
16
|
+
|
17
|
+
its(:id) { is_expected.to eq(id) }
|
18
|
+
its(:name) { is_expected.to eq(name) }
|
19
|
+
its(:icon) { is_expected.to eq(icon) }
|
20
|
+
its(:created_at) { is_expected.to eq(created_at) }
|
21
|
+
its(:updated_at) { is_expected.to eq(updated_at) }
|
22
|
+
end
|
@@ -41,7 +41,7 @@ describe G5FoundationClient::Client do
|
|
41
41
|
|
42
42
|
it "instantiates associated Locations" do
|
43
43
|
expect(client.locations.length).to eq(2)
|
44
|
-
expect(client.locations.all? { |l| l.is_a?(G5FoundationClient::Location) }).to
|
44
|
+
expect(client.locations.all? { |l| l.is_a?(G5FoundationClient::Location) }).to be_truthy
|
45
45
|
expect(client.locations.map(&:name)).to eq(['Location 1', 'Location 2'])
|
46
46
|
end
|
47
47
|
end
|
@@ -27,7 +27,22 @@ describe G5FoundationClient::Location do
|
|
27
27
|
city: "Testville",
|
28
28
|
postal_code: "31337",
|
29
29
|
status: "Pending",
|
30
|
-
client: client
|
30
|
+
client: client,
|
31
|
+
amenities: [{
|
32
|
+
id: 1,
|
33
|
+
name: "Covered Parking",
|
34
|
+
icon: "fa fa-parking-interior",
|
35
|
+
created_at: "2016-11-22T09:20:16.549-08:00",
|
36
|
+
updated_at: "2016-11-22T09:20:16.549-08:00"
|
37
|
+
},
|
38
|
+
{
|
39
|
+
id: 3,
|
40
|
+
name: "WIFI",
|
41
|
+
icon: "fa fa-wifi",
|
42
|
+
created_at: "2016-11-22T09:20:16.578-08:00",
|
43
|
+
updated_at: "2016-11-22T09:20:16.578-08:00"
|
44
|
+
}
|
45
|
+
]
|
31
46
|
)
|
32
47
|
end
|
33
48
|
|
@@ -38,7 +53,7 @@ describe G5FoundationClient::Location do
|
|
38
53
|
its(:name) { should eql("Test Name") }
|
39
54
|
its(:phone_number) { should eql("123-123-1234") }
|
40
55
|
its(:domain) { should eql("example.com") }
|
41
|
-
its(:corporate) { should
|
56
|
+
its(:corporate) { should be_truthy }
|
42
57
|
its(:floor_plans) { should eql("Apartments") }
|
43
58
|
its(:primary_amenity) { should eql("Pony Rides") }
|
44
59
|
its(:primary_landmark) { should eql("An enormous bust of Brett Favre") }
|
@@ -54,6 +69,10 @@ describe G5FoundationClient::Location do
|
|
54
69
|
it 'deletes client from hash' do
|
55
70
|
expect(subject.location_hash[:client]).to be_nil
|
56
71
|
end
|
72
|
+
|
73
|
+
it 'builds amenities' do
|
74
|
+
expect(subject.amenities.collect(&:name)).to eq(['Covered Parking', 'WIFI'])
|
75
|
+
end
|
57
76
|
end
|
58
77
|
|
59
78
|
describe '.find_by_uid' do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: g5_foundation_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Don Petersen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -84,16 +84,30 @@ dependencies:
|
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec-its
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: webmock
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -141,6 +155,7 @@ files:
|
|
141
155
|
- lib/g5_foundation_client.rb
|
142
156
|
- lib/g5_foundation_client/error.rb
|
143
157
|
- lib/g5_foundation_client/fetcher.rb
|
158
|
+
- lib/g5_foundation_client/models/amenity.rb
|
144
159
|
- lib/g5_foundation_client/models/client.rb
|
145
160
|
- lib/g5_foundation_client/models/findable_by_uid.rb
|
146
161
|
- lib/g5_foundation_client/models/location.rb
|
@@ -152,6 +167,7 @@ files:
|
|
152
167
|
- spec/fixtures/hub-clients.json
|
153
168
|
- spec/fixtures/hub-location.json
|
154
169
|
- spec/lib/g5_foundation_client/fetcher_spec.rb
|
170
|
+
- spec/lib/g5_foundation_client/models/amenity_spec.rb
|
155
171
|
- spec/lib/g5_foundation_client/models/client_spec.rb
|
156
172
|
- spec/lib/g5_foundation_client/models/location_spec.rb
|
157
173
|
- spec/lib/g5_foundation_client_spec.rb
|
@@ -171,12 +187,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
171
187
|
version: '0'
|
172
188
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
189
|
requirements:
|
174
|
-
- - "
|
190
|
+
- - ">"
|
175
191
|
- !ruby/object:Gem::Version
|
176
|
-
version:
|
192
|
+
version: 1.3.1
|
177
193
|
requirements: []
|
178
194
|
rubyforge_project:
|
179
|
-
rubygems_version: 2.
|
195
|
+
rubygems_version: 2.5.1
|
180
196
|
signing_key:
|
181
197
|
specification_version: 4
|
182
198
|
summary: Client gem to interact with G5 services.
|
@@ -185,6 +201,7 @@ test_files:
|
|
185
201
|
- spec/fixtures/hub-clients.json
|
186
202
|
- spec/fixtures/hub-location.json
|
187
203
|
- spec/lib/g5_foundation_client/fetcher_spec.rb
|
204
|
+
- spec/lib/g5_foundation_client/models/amenity_spec.rb
|
188
205
|
- spec/lib/g5_foundation_client/models/client_spec.rb
|
189
206
|
- spec/lib/g5_foundation_client/models/location_spec.rb
|
190
207
|
- spec/lib/g5_foundation_client_spec.rb
|