disco_app 0.4.4 → 0.5.0

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
  SHA256:
3
- metadata.gz: d222fef3052055acefd393dca486ab68f5f7693d5a01cc30164a83808d9125c1
4
- data.tar.gz: 515b778901873217f1932c63822031cde81c3f1efe1c1ec11d5c515c8128e3eb
3
+ metadata.gz: e94f1a57f95b758fd65f751679875a60ca89e1ccd211c3ae4223e12b3962d33b
4
+ data.tar.gz: e60095bae476ae30411b7dbc346075ab9bfc6edd4a89e971b40549550094add0
5
5
  SHA512:
6
- metadata.gz: ceb9c5f888bab2694146b7585b7e6258dd32233fed4458b17c8d09fb6aa307bc2a5541ff0cfe8f74dba4695929ce4133467cd5e045aaf624146c3c51caf0865b
7
- data.tar.gz: b2b5d1789bc7b4b61b8632316ec0dde497c9912609327ba379b43b727224cfc8f28f735ba929cbe8de8dfe72a3802fe0ee4a543aca7e70ba35ac726cb801622f
6
+ metadata.gz: 63d9d433da4bead908a2677d6edc22f71611132c775695bd3b15228d5291ff57a3f61594792df40dd05151a38c2e9b2f88faeac4c75d11b4fbe906c63967709f
7
+ data.tar.gz: 322af952fb19124ffdd22af1ed022ac8afd8c99133247ce863406320ca6b7e822d00e24c83de735ed789296b5dbc7c4a6434268feaebf2ca4efd3e1d8b9d6e8b
@@ -5,7 +5,7 @@ module DiscoApp
5
5
  included do
6
6
  before_action :verify_carrier_request_signature
7
7
  end
8
-
8
+
9
9
  private
10
10
 
11
11
  def verify_carrier_request_signature
@@ -24,9 +24,5 @@ module DiscoApp
24
24
  calculated_hmac == hmac_header
25
25
  end
26
26
 
27
- def carrier_request_domain
28
- request.headers['HTTP_X_SHOPIFY_SHOP_DOMAIN']
29
- end
30
-
31
27
  end
32
28
  end
@@ -12,6 +12,11 @@ module DiscoApp
12
12
  # Define possible charge statuses as an enum.
13
13
  enum charge_status: [:charge_none, :charge_pending, :charge_accepted, :charge_declined, :charge_active, :charge_cancelled, :charge_waived]
14
14
 
15
+ # Define some useful scopes.
16
+ scope :status, -> (status) { where status: status }
17
+ scope :installed, -> { where status: ShopifySession.statuses[:installed] }
18
+ scope :has_active_shopify_plan, -> { where.not(plan_name: [:cancelled, :frozen]) }
19
+
15
20
  # Alias 'with_shopify_session' as 'temp', as per our existing conventions.
16
21
  alias_method :temp, :with_shopify_session
17
22
  end
@@ -0,0 +1,16 @@
1
+ class AddMoreMetaToShops < ActiveRecord::Migration
2
+ def change
3
+ add_column :shops, :plan_display_name, :string
4
+ add_column :shops, :latitude, :decimal
5
+ add_column :shops, :longitude, :decimal
6
+ add_column :shops, :customer_email, :string
7
+ add_column :shops, :plan_display_name, :string
8
+ add_column :shops, :password_enabled, :boolean
9
+ add_column :shops, :phone, :string
10
+ add_column :shops, :primary_locale, :string
11
+ add_column :shops, :ships_to_countries, :string
12
+ add_column :shops, :timezone, :string
13
+ add_column :shops, :iana_timezone, :string
14
+ add_column :shops, :has_storefront, :boolean
15
+ end
16
+ end
@@ -1,3 +1,3 @@
1
1
  module DiscoApp
2
- VERSION = "0.4.4"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: disco_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Ballard
@@ -213,6 +213,7 @@ files:
213
213
  - db/migrate/20150525162112_add_status_to_shops.rb
214
214
  - db/migrate/20150525171422_add_meta_to_shops.rb
215
215
  - db/migrate/20150629210346_add_charge_status_to_shop.rb
216
+ - db/migrate/20150814214025_add_more_meta_to_shops.rb
216
217
  - lib/disco_app.rb
217
218
  - lib/disco_app/engine.rb
218
219
  - lib/disco_app/version.rb