Class: FakeShopify::StubApp
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- FakeShopify::StubApp
- Defined in:
- lib/fake_shopify/stub_app.rb,
lib/fake_shopify/routes/plus.rb,
lib/fake_shopify/routes/events.rb,
lib/fake_shopify/routes/orders.rb,
lib/fake_shopify/routes/billing.rb,
lib/fake_shopify/routes/products.rb,
lib/fake_shopify/routes/analytics.rb,
lib/fake_shopify/routes/customers.rb,
lib/fake_shopify/routes/discounts.rb,
lib/fake_shopify/routes/inventory.rb,
lib/fake_shopify/routes/metafield.rb,
lib/fake_shopify/routes/online_store.rb,
lib/fake_shopify/routes/sales_channel.rb,
lib/fake_shopify/routes/marketing_event.rb,
lib/fake_shopify/routes/shopify_payments.rb,
lib/fake_shopify/routes/store_properties.rb,
lib/fake_shopify/routes/tender_transaction.rb,
lib/fake_shopify/routes/shipping_and_fulfillment.rb
Instance Method Summary collapse
Instance Method Details
#fixture(api_version, file_name) ⇒ Object
6 7 8 9 |
# File 'lib/fake_shopify/stub_app.rb', line 6 def fixture(api_version, file_name) file_path = File.join(FakeShopify.fixture_path, api_version.to_s, "#{file_name}.json") File.open(file_path, "rb").read end |
#json_response(response_code, response_body) ⇒ Object
11 12 13 14 15 |
# File 'lib/fake_shopify/stub_app.rb', line 11 def json_response(response_code, response_body) content_type :json status response_code response_body end |