peddler 1.6.3 → 1.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -16
- data/lib/mws.rb +2 -0
- data/lib/mws/feeds.rb +2 -0
- data/lib/mws/feeds/client.rb +2 -0
- data/lib/mws/finances.rb +2 -0
- data/lib/mws/finances/client.rb +6 -2
- data/lib/mws/fulfillment_inbound_shipment.rb +2 -0
- data/lib/mws/fulfillment_inbound_shipment/client.rb +23 -10
- data/lib/mws/fulfillment_inventory.rb +2 -0
- data/lib/mws/fulfillment_inventory/client.rb +2 -0
- data/lib/mws/fulfillment_outbound_shipment.rb +2 -0
- data/lib/mws/fulfillment_outbound_shipment/client.rb +21 -5
- data/lib/mws/merchant_fulfillment.rb +2 -0
- data/lib/mws/merchant_fulfillment/client.rb +4 -1
- data/lib/mws/off_amazon_payments.rb +2 -0
- data/lib/mws/off_amazon_payments/client.rb +51 -23
- data/lib/mws/orders.rb +2 -0
- data/lib/mws/orders/client.rb +6 -3
- data/lib/mws/products.rb +2 -0
- data/lib/mws/products/client.rb +30 -14
- data/lib/mws/recommendations.rb +2 -0
- data/lib/mws/recommendations/client.rb +6 -2
- data/lib/mws/reports.rb +2 -0
- data/lib/mws/reports/client.rb +2 -0
- data/lib/mws/sellers.rb +2 -0
- data/lib/mws/sellers/client.rb +2 -0
- data/lib/mws/subscriptions.rb +2 -0
- data/lib/mws/subscriptions/client.rb +21 -9
- data/lib/peddler.rb +2 -0
- data/lib/peddler/client.rb +2 -0
- data/lib/peddler/errors/builder.rb +2 -0
- data/lib/peddler/errors/error.rb +4 -0
- data/lib/peddler/errors/handler.rb +2 -0
- data/lib/peddler/errors/parser.rb +2 -0
- data/lib/peddler/flat_file_parser.rb +4 -1
- data/lib/peddler/headers.rb +2 -0
- data/lib/peddler/marketplace.rb +2 -0
- data/lib/peddler/operation.rb +2 -0
- data/lib/peddler/parser.rb +2 -0
- data/lib/peddler/structured_list.rb +2 -0
- data/lib/peddler/vcr_matcher.rb +2 -0
- data/lib/peddler/version.rb +1 -1
- data/lib/peddler/xml_parser.rb +2 -0
- data/lib/peddler/xml_response_parser.rb +2 -0
- data/test/credentials.rb +23 -0
- data/test/helper.rb +2 -0
- data/test/integration/test_errors.rb +6 -5
- data/test/integration/test_feeds.rb +2 -0
- data/test/integration/test_fulfillment_inbound_shipment.rb +2 -0
- data/test/integration/test_fulfillment_inventory.rb +2 -0
- data/test/integration/test_fulfillment_outbound_shipment.rb +2 -0
- data/test/integration/test_merchant_fulfillment.rb +2 -0
- data/test/integration/test_multibyte_queries.rb +3 -4
- data/test/integration/test_mws_headers.rb +3 -4
- data/test/integration/test_off_amazon_payments.rb +2 -0
- data/test/integration/test_orders.rb +8 -10
- data/test/integration/test_products.rb +2 -0
- data/test/integration/test_recommendations.rb +2 -0
- data/test/integration/test_reports.rb +2 -0
- data/test/integration/test_sellers.rb +2 -0
- data/test/integration/test_subscriptions.rb +2 -0
- data/test/integration_helper.rb +25 -12
- data/test/null_client.rb +2 -0
- data/test/recorder.rb +2 -0
- data/test/unit/mws/test_feeds_client.rb +2 -0
- data/test/unit/mws/test_finances_client.rb +2 -0
- data/test/unit/mws/test_fulfillment_inbound_shipment_client.rb +2 -0
- data/test/unit/mws/test_fulfillment_inventory_client.rb +2 -0
- data/test/unit/mws/test_fulfillment_outbound_shipment_client.rb +7 -2
- data/test/unit/mws/test_merchant_fulfillment_client.rb +2 -0
- data/test/unit/mws/test_off_amazon_payments_client.rb +2 -0
- data/test/unit/mws/test_orders_client.rb +2 -0
- data/test/unit/mws/test_products_client.rb +2 -0
- data/test/unit/mws/test_recommendations_client.rb +2 -0
- data/test/unit/mws/test_reports_client.rb +2 -0
- data/test/unit/mws/test_sellers_client.rb +2 -0
- data/test/unit/mws/test_subscriptions_client.rb +2 -0
- data/test/unit/peddler/errors/test_builder.rb +2 -0
- data/test/unit/peddler/errors/test_error.rb +2 -0
- data/test/unit/peddler/errors/test_handler.rb +2 -0
- data/test/unit/peddler/errors/test_parser.rb +2 -0
- data/test/unit/peddler/test_client.rb +6 -2
- data/test/unit/peddler/test_flat_file_parser.rb +27 -24
- data/test/unit/peddler/test_headers.rb +2 -0
- data/test/unit/peddler/test_marketplace.rb +2 -0
- data/test/unit/peddler/test_operation.rb +2 -0
- data/test/unit/peddler/test_parser.rb +2 -0
- data/test/unit/peddler/test_structured_list.rb +2 -0
- data/test/unit/peddler/test_vcr_matcher.rb +2 -0
- data/test/unit/peddler/test_xml_parser.rb +3 -1
- data/test/unit/peddler/test_xml_response_parser.rb +2 -0
- data/test/unit/test_mws.rb +2 -0
- metadata +58 -58
- data/test/mws.yml +0 -36
data/lib/mws/orders.rb
CHANGED
data/lib/mws/orders/client.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'peddler/client'
|
2
4
|
|
3
5
|
module MWS
|
@@ -106,9 +108,10 @@ module MWS
|
|
106
108
|
private
|
107
109
|
|
108
110
|
def require_start_time!
|
109
|
-
if operation.
|
110
|
-
|
111
|
-
|
111
|
+
return if operation.key?('CreatedAfter')
|
112
|
+
return if operation.key?('LastUpdatedAfter')
|
113
|
+
|
114
|
+
raise ArgumentError, 'specify created_after or last_updated_after'
|
112
115
|
end
|
113
116
|
end
|
114
117
|
end
|
data/lib/mws/products.rb
CHANGED
data/lib/mws/products/client.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'peddler/client'
|
2
4
|
|
3
5
|
module MWS
|
@@ -13,7 +15,8 @@ module MWS
|
|
13
15
|
# Lists products and their attributes, based on a search query
|
14
16
|
#
|
15
17
|
# @see http://docs.developer.amazonservices.com/en_US/products/Products_ListMatchingProducts.html
|
16
|
-
# @overload list_matching_products(query, opts = { marketplace_id:
|
18
|
+
# @overload list_matching_products(query, opts = { marketplace_id:
|
19
|
+
# primary_marketplace_id })
|
17
20
|
# @param [String] query
|
18
21
|
# @param [Hash] opts
|
19
22
|
# @option opts [String] :marketplace_id
|
@@ -30,7 +33,8 @@ module MWS
|
|
30
33
|
# SellerSKU, UPC, EAN, ISBN, and JAN values
|
31
34
|
#
|
32
35
|
# @see http://docs.developer.amazonservices.com/en_US/products/Products_GetMatchingProduct.html
|
33
|
-
# @overload get_matching_product_for_id(id_type, *ids, opts = {
|
36
|
+
# @overload get_matching_product_for_id(id_type, *ids, opts = {
|
37
|
+
# marketplace_id: primary_marketplace_id })
|
34
38
|
# @param [String] id_type
|
35
39
|
# @param [String] id one or more ids
|
36
40
|
# @param [Hash] opts
|
@@ -49,7 +53,8 @@ module MWS
|
|
49
53
|
# Lists products and their attributes, based on a list of ASIN values
|
50
54
|
#
|
51
55
|
# @see http://docs.developer.amazonservices.com/en_US/products/Products_GetMatchingProductForId.html
|
52
|
-
# @overload get_matching_product(*asins, opts = { marketplace_id:
|
56
|
+
# @overload get_matching_product(*asins, opts = { marketplace_id:
|
57
|
+
# primary_marketplace_id })
|
53
58
|
# @param [String] asin one or more asins
|
54
59
|
# @param [Hash] opts
|
55
60
|
# @option opts [String] :marketplace_id
|
@@ -67,7 +72,8 @@ module MWS
|
|
67
72
|
# Gets the current competitive price of a product, based on Seller SKU
|
68
73
|
#
|
69
74
|
# @see http://docs.developer.amazonservices.com/en_US/products/Products_GetCompetitivePricingForSKU.html
|
70
|
-
# @overload get_competitive_pricing_for_sku(*seller_skus, opts = {
|
75
|
+
# @overload get_competitive_pricing_for_sku(*seller_skus, opts = {
|
76
|
+
# marketplace_id: primary_marketplace_id })
|
71
77
|
# @param [String] seller_sku one or more seller_skus
|
72
78
|
# @param [Hash] opts
|
73
79
|
# @option opts [String] :marketplace_id
|
@@ -85,7 +91,8 @@ module MWS
|
|
85
91
|
# Gets the current competitive price of a product, identified by its ASIN
|
86
92
|
#
|
87
93
|
# @see http://docs.developer.amazonservices.com/en_US/products/Products_GetCompetitivePricingForASIN.html
|
88
|
-
# @overload get_competitive_pricing_for_asin(*asins, opts = {
|
94
|
+
# @overload get_competitive_pricing_for_asin(*asins, opts = {
|
95
|
+
# marketplace_id: primary_marketplace_id })
|
89
96
|
# @param [String] asin one or more asins
|
90
97
|
# @param [Hash] opts
|
91
98
|
# @option opts [String] :marketplace_id
|
@@ -104,7 +111,8 @@ module MWS
|
|
104
111
|
# a product, based on Seller SKU
|
105
112
|
#
|
106
113
|
# @see http://docs.developer.amazonservices.com/en_US/products/Products_GetLowestOfferListingsForSKU.html
|
107
|
-
# @overload get_lowest_offer_listings_for_sku(*seller_skus, opts = {
|
114
|
+
# @overload get_lowest_offer_listings_for_sku(*seller_skus, opts = {
|
115
|
+
# marketplace_id: primary_marketplace_id })
|
108
116
|
# @param [String] seller_sku one or more seller_skus
|
109
117
|
# @param [Hash] opts
|
110
118
|
# @option opts [String] :marketplace_id
|
@@ -125,7 +133,8 @@ module MWS
|
|
125
133
|
# a product, identified by its ASIN
|
126
134
|
#
|
127
135
|
# @see http://docs.developer.amazonservices.com/en_US/products/Products_GetLowestOfferListingsForASIN.html
|
128
|
-
# @overload get_lowest_offer_listings_for_asin(*asins, opts = {
|
136
|
+
# @overload get_lowest_offer_listings_for_asin(*asins, opts = {
|
137
|
+
# marketplace_id: primary_marketplace_id })
|
129
138
|
# @param [String] asin one or more asins
|
130
139
|
# @param [Hash] opts
|
131
140
|
# @option opts [String] :marketplace_id
|
@@ -145,13 +154,15 @@ module MWS
|
|
145
154
|
# Gets lowest priced offers for a single product, based on SellerSKU
|
146
155
|
#
|
147
156
|
# @see http://docs.developer.amazonservices.com/en_MX/products/Products_GetLowestPricedOffersForSKU.html
|
148
|
-
# @overload get_lowest_priced_offers_for_sku(seller_sku, item_condition,
|
157
|
+
# @overload get_lowest_priced_offers_for_sku(seller_sku, item_condition,
|
158
|
+
# opts = { marketplace_id: primary_marketplace_id })
|
149
159
|
# @param [String] seller_sku
|
150
160
|
# @param [String] item_condition
|
151
161
|
# @param [Hash] opts
|
152
162
|
# @option opts [String] :marketplace_id
|
153
163
|
# @return [Peddler::XMLParser]
|
154
|
-
def get_lowest_priced_offers_for_sku(seller_sku, item_condition,
|
164
|
+
def get_lowest_priced_offers_for_sku(seller_sku, item_condition,
|
165
|
+
opts = {})
|
155
166
|
opts.update(
|
156
167
|
'SellerSKU' => seller_sku,
|
157
168
|
'ItemCondition' => item_condition
|
@@ -165,7 +176,8 @@ module MWS
|
|
165
176
|
# Gets lowest priced offers for a single product, based on ASIN
|
166
177
|
#
|
167
178
|
# @see http://docs.developer.amazonservices.com/en_MX/products/Products_GetLowestPricedOffersForASIN.html
|
168
|
-
# @overload get_lowest_priced_offers_for_asin(asin, item_condition, opts =
|
179
|
+
# @overload get_lowest_priced_offers_for_asin(asin, item_condition, opts =
|
180
|
+
# { marketplace_id: primary_marketplace_id })
|
169
181
|
# @param [String] asin
|
170
182
|
# @param [String] item_condition
|
171
183
|
# @param [Hash] opts
|
@@ -200,7 +212,8 @@ module MWS
|
|
200
212
|
# Seller SKU
|
201
213
|
#
|
202
214
|
# @see http://docs.developer.amazonservices.com/en_US/products/Products_GetMyPriceForSKU.html
|
203
|
-
# @overload get_my_price_for_sku(*seller_skus, opts = { marketplace_id:
|
215
|
+
# @overload get_my_price_for_sku(*seller_skus, opts = { marketplace_id:
|
216
|
+
# primary_marketplace_id })
|
204
217
|
# @param [String] seller_sku one or more seller_skus
|
205
218
|
# @param [Hash] opts
|
206
219
|
# @option opts [String] :marketplace_id
|
@@ -220,7 +233,8 @@ module MWS
|
|
220
233
|
# its ASIN
|
221
234
|
#
|
222
235
|
# @see http://docs.developer.amazonservices.com/en_US/products/Products_GetMyPriceForASIN.html
|
223
|
-
# @overload get_my_price_for_asin(*asins, opts = { marketplace_id:
|
236
|
+
# @overload get_my_price_for_asin(*asins, opts = { marketplace_id:
|
237
|
+
# primary_marketplace_id })
|
224
238
|
# @param [String] asin one or more asins
|
225
239
|
# @param [Hash] opts
|
226
240
|
# @option opts [String] :marketplace_id
|
@@ -240,7 +254,8 @@ module MWS
|
|
240
254
|
# Seller`SKU
|
241
255
|
#
|
242
256
|
# @see http://docs.developer.amazonservices.com/en_US/products/Products_GetProductCategoriesForSKU.html
|
243
|
-
# @overload get_product_categories_for_sku(sku, opts = { marketplace_id:
|
257
|
+
# @overload get_product_categories_for_sku(sku, opts = { marketplace_id:
|
258
|
+
# primary_marketplace_id })
|
244
259
|
# @param [String] seller_sku
|
245
260
|
# @param [Hash] opts
|
246
261
|
# @option opts [String] :marketplace_id
|
@@ -255,7 +270,8 @@ module MWS
|
|
255
270
|
# Gets parent product categories that a product belongs to, based on ASIN
|
256
271
|
#
|
257
272
|
# @see http://docs.developer.amazonservices.com/en_US/products/Products_GetProductCategoriesForASIN.html
|
258
|
-
# @overload get_product_categories_for_asin(asin, opts = { marketplace_id:
|
273
|
+
# @overload get_product_categories_for_asin(asin, opts = { marketplace_id:
|
274
|
+
# primary_marketplace_id })
|
259
275
|
# @param [String] asin
|
260
276
|
# @param [Hash] opts
|
261
277
|
# @option opts [String] :marketplace_id
|
data/lib/mws/recommendations.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'peddler/client'
|
2
4
|
|
3
5
|
module MWS
|
@@ -17,7 +19,8 @@ module MWS
|
|
17
19
|
# @see http://docs.developer.amazonservices.com/en_US/recommendations/Recommendations_GetLastUpdatedTimeForRecommendations.html
|
18
20
|
# @param [String] marketplace_id
|
19
21
|
# @return [Peddler::XMLParser]
|
20
|
-
def get_last_updated_time_for_recommendations(marketplace_id =
|
22
|
+
def get_last_updated_time_for_recommendations(marketplace_id =
|
23
|
+
primary_marketplace_id)
|
21
24
|
operation('GetLastUpdatedTimeForRecommendations')
|
22
25
|
.add('MarketplaceId' => marketplace_id)
|
23
26
|
|
@@ -28,7 +31,8 @@ module MWS
|
|
28
31
|
# categories for a specific marketplace
|
29
32
|
#
|
30
33
|
# @see http://docs.developer.amazonservices.com/en_US/recommendations/Recommendations_ListRecommendations.html
|
31
|
-
# @overload list_recommendations(opts = { marketplace_id:
|
34
|
+
# @overload list_recommendations(opts = { marketplace_id:
|
35
|
+
# primary_marketplace_id })
|
32
36
|
# @param [Hash] opts
|
33
37
|
# @option opts [String] :marketplace_id
|
34
38
|
# @option opts [String] :recommendation_category
|
data/lib/mws/reports.rb
CHANGED
data/lib/mws/reports/client.rb
CHANGED
data/lib/mws/sellers.rb
CHANGED
data/lib/mws/sellers/client.rb
CHANGED
data/lib/mws/subscriptions.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'peddler/client'
|
2
4
|
|
3
5
|
module MWS
|
@@ -18,7 +20,8 @@ module MWS
|
|
18
20
|
# @param [String] sqs_queue_url
|
19
21
|
# @param [String] marketplace_id
|
20
22
|
# @return [Peddler::XMLParser]
|
21
|
-
def register_destination(sqs_queue_url,
|
23
|
+
def register_destination(sqs_queue_url,
|
24
|
+
marketplace_id = primary_marketplace_id)
|
22
25
|
operation('RegisterDestination')
|
23
26
|
.add('MarketplaceId' => marketplace_id)
|
24
27
|
.add(build_destination(sqs_queue_url))
|
@@ -32,7 +35,8 @@ module MWS
|
|
32
35
|
# @param [String] sqs_queue_url
|
33
36
|
# @param [String] marketplace_id
|
34
37
|
# @return [Peddler::XMLParser]
|
35
|
-
def deregister_destination(sqs_queue_url,
|
38
|
+
def deregister_destination(sqs_queue_url,
|
39
|
+
marketplace_id = primary_marketplace_id)
|
36
40
|
operation('DeregisterDestination')
|
37
41
|
.add('MarketplaceId' => marketplace_id)
|
38
42
|
.add(build_destination(sqs_queue_url))
|
@@ -58,7 +62,9 @@ module MWS
|
|
58
62
|
# @param [String] sqs_queue_url
|
59
63
|
# @param [String] marketplace_id
|
60
64
|
# @return [Peddler::XMLParser]
|
61
|
-
def send_test_notification_to_destination(sqs_queue_url,
|
65
|
+
def send_test_notification_to_destination(sqs_queue_url,
|
66
|
+
marketplace_id =
|
67
|
+
primary_marketplace_id)
|
62
68
|
operation('SendTestNotificationToDestination')
|
63
69
|
.add('MarketplaceId' => marketplace_id)
|
64
70
|
.add(build_destination(sqs_queue_url))
|
@@ -73,7 +79,8 @@ module MWS
|
|
73
79
|
# @param [String] sqs_queue_url
|
74
80
|
# @param [String] marketplace_id
|
75
81
|
# @return [Peddler::XMLParser]
|
76
|
-
def create_subscription(notification_type, sqs_queue_url,
|
82
|
+
def create_subscription(notification_type, sqs_queue_url,
|
83
|
+
marketplace_id = primary_marketplace_id)
|
77
84
|
operation('CreateSubscription')
|
78
85
|
.add('MarketplaceId' => marketplace_id)
|
79
86
|
.add(build_subscription(notification_type, sqs_queue_url))
|
@@ -88,7 +95,8 @@ module MWS
|
|
88
95
|
# @param [String] sqs_queue_url
|
89
96
|
# @param [String] marketplace_id
|
90
97
|
# @return [Peddler::XMLParser]
|
91
|
-
def get_subscription(notification_type, sqs_queue_url,
|
98
|
+
def get_subscription(notification_type, sqs_queue_url,
|
99
|
+
marketplace_id = primary_marketplace_id)
|
92
100
|
operation('GetSubscription')
|
93
101
|
.add(
|
94
102
|
'MarketplaceId' => marketplace_id,
|
@@ -106,7 +114,8 @@ module MWS
|
|
106
114
|
# @param [String] sqs_queue_url
|
107
115
|
# @param [String] marketplace_id
|
108
116
|
# @return [Peddler::XMLParser]
|
109
|
-
def delete_subscription(notification_type, sqs_queue_url,
|
117
|
+
def delete_subscription(notification_type, sqs_queue_url,
|
118
|
+
marketplace_id = primary_marketplace_id)
|
110
119
|
operation('DeleteSubscription')
|
111
120
|
.add(
|
112
121
|
'MarketplaceId' => marketplace_id,
|
@@ -137,7 +146,8 @@ module MWS
|
|
137
146
|
# @param [Boolean] enabled
|
138
147
|
# @param [String] marketplace_id
|
139
148
|
# @return [Peddler::XMLParser]
|
140
|
-
def update_subscription(notification_type, sqs_queue_url, enabled,
|
149
|
+
def update_subscription(notification_type, sqs_queue_url, enabled,
|
150
|
+
marketplace_id = primary_marketplace_id)
|
141
151
|
operation('UpdateSubscription')
|
142
152
|
.add('MarketplaceId' => marketplace_id)
|
143
153
|
.add(build_subscription(notification_type, sqs_queue_url, enabled))
|
@@ -169,8 +179,10 @@ module MWS
|
|
169
179
|
'Subscription.IsEnabled' => enabled,
|
170
180
|
'Subscription.NotificationType' => notification_type,
|
171
181
|
'Subscription.Destination.DeliveryChannel' => 'SQS',
|
172
|
-
'Subscription.Destination.AttributeList.member.1.Key' =>
|
173
|
-
|
182
|
+
'Subscription.Destination.AttributeList.member.1.Key' =>
|
183
|
+
'sqsQueueUrl',
|
184
|
+
'Subscription.Destination.AttributeList.member.1.Value' =>
|
185
|
+
sqs_queue_url
|
174
186
|
}
|
175
187
|
end
|
176
188
|
end
|
data/lib/peddler.rb
CHANGED
data/lib/peddler/client.rb
CHANGED
data/lib/peddler/errors/error.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'delegate'
|
2
4
|
require 'csv'
|
3
5
|
require 'digest/md5'
|
@@ -34,7 +36,8 @@ module Peddler
|
|
34
36
|
private
|
35
37
|
|
36
38
|
def scrub_body!(encoding)
|
37
|
-
|
39
|
+
return if body.encoding == Encoding::UTF_8
|
40
|
+
self.body = body.dup.force_encoding(encoding)
|
38
41
|
end
|
39
42
|
|
40
43
|
def extract_content_and_summary
|
data/lib/peddler/headers.rb
CHANGED
data/lib/peddler/marketplace.rb
CHANGED
data/lib/peddler/operation.rb
CHANGED
data/lib/peddler/parser.rb
CHANGED
data/lib/peddler/vcr_matcher.rb
CHANGED
data/lib/peddler/version.rb
CHANGED
data/lib/peddler/xml_parser.rb
CHANGED
data/test/credentials.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'forwardable'
|
4
|
+
require 'yaml'
|
5
|
+
|
6
|
+
module Credentials
|
7
|
+
class <<self
|
8
|
+
extend Forwardable
|
9
|
+
include Enumerable
|
10
|
+
|
11
|
+
attr_reader :all
|
12
|
+
|
13
|
+
def_delegators :all, :each
|
14
|
+
end
|
15
|
+
|
16
|
+
%w[mws.yml mws.yml.example].each do |path|
|
17
|
+
file = File.expand_path("../#{path}", __FILE__)
|
18
|
+
if File.exist?(file)
|
19
|
+
@all = YAML.load_file(file)
|
20
|
+
break
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|