disco_app 0.6.4 → 0.6.5

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: e5341341dc5eed693f033ebff1b63c7c53d068838321446867753c87c39eb58c
4
- data.tar.gz: f3b11e3a89df6491a290aa57376e8d9836ce2456026be50856c6e0e702db7ec2
3
+ metadata.gz: 8f7c3fa69d7d40efc67ae58e4094b26dddbe43dd88ca7e14cfccecceca75d39b
4
+ data.tar.gz: 2a6af21f5c3b4c449ceed89c87179af6114a27708e469e19cd2dc66af1a92013
5
5
  SHA512:
6
- metadata.gz: 935f6a935d67afa3d7d04ff62939eef451dbcce4d407a56e08b2bb7162311581b019aa1c0052595d7158179aa23f3d93ad91edbf52dac6055a5ec7c5ea997397
7
- data.tar.gz: 3767fc325cf46e9bfaba54b38e952783b4c8c5070929007f71fd534807a2d8cce30129225f43883842f511a561cb3cf8187129f0cc90f49f43094f7568d464a7
6
+ metadata.gz: 14633c37030a784960030d6b7ab1550834c55ebf04567bf116f0f471ca542bac63904cab028ca7ca81c31da476abfa85784715518cad8afc384a3c12f4e18ea0
7
+ data.tar.gz: 2e7690604315c2d9a2988c5f9d907916ae1662be99e378e40474fdc496d8b2981258e6c74d6fb1d9452547e907762fe2c2e237ab878e7a4b8801741660a553b2
@@ -47,9 +47,15 @@ module DiscoApp::Concerns::Shop
47
47
  end
48
48
 
49
49
  # Return the absolute URL to the shop's storefront.
50
- # @TODO: Account for HTTPS.
51
50
  def url
52
- "http://#{domain}"
51
+ "#{protocol}://#{domain}"
52
+ end
53
+
54
+ # Return the protocol the shop's storefront uses.
55
+ # @TODO: Consider when we may want to allow https: here. For now, automatic
56
+ # redirection should do most of the work.
57
+ def protocol
58
+ 'http'
53
59
  end
54
60
 
55
61
  # Return the absolute URL to the shop's admin.
@@ -1,3 +1,3 @@
1
1
  module DiscoApp
2
- VERSION = "0.6.4"
2
+ VERSION = "0.6.5"
3
3
  end
@@ -61,7 +61,8 @@ class DiscoAppGenerator < Rails::Generators::Base
61
61
  application "# Set defaults for charges created by the application"
62
62
 
63
63
  # Set the "real charges" config variable to false explicitly by default.
64
- # Only in production do we read from the environment variable and potentially have it become true.
64
+ # Only in production do we read from the environment variable and
65
+ # potentially have it become true.
65
66
  application "config.x.shopify_charges_real = false\n"
66
67
  application "# Explicitly prevent real charges being created by default"
67
68
  application "config.x.shopify_charges_real = ENV['SHOPIFY_CHARGES_REAL'] == 'true'\n", env: :production
@@ -71,11 +72,18 @@ class DiscoAppGenerator < Rails::Generators::Base
71
72
  application "config.active_job.queue_adapter = :sidekiq\n", env: :production
72
73
  application "# Use Sidekiq as the active job backend", env: :production
73
74
 
74
- # Ensure the application configuration uses the DEFAULT_HOST environment variable to set up support for reverse
75
- # routing absolute URLS (needed when generating Webhook URLs for example).
75
+ # Ensure the application configuration uses the DEFAULT_HOST environment
76
+ # variable to set up support for reverse routing absolute URLS (needed when
77
+ # generating Webhook URLs for example).
76
78
  application "routes.default_url_options[:host] = ENV['DEFAULT_HOST']\n"
77
79
  application "# Set the default host for absolute URL routing purposes"
78
80
 
81
+ # Add loading of the default application proxy prefix to set up support for
82
+ # reverse routings absolute proxy URLS.
83
+ application "config.x.shopify_app_proxy_prefix = ENV['SHOPIFY_APP_PROXY_PREFIX']\n"
84
+ application "# Set the application proxy path for absolute URL routing purposes"
85
+
86
+ # Add the Shopify application name to the configuration.
79
87
  application "config.x.shopify_app_name = ENV['SHOPIFY_APP_NAME']\n"
80
88
  application "# Set the name of the application"
81
89
 
@@ -113,8 +121,8 @@ class DiscoAppGenerator < Rails::Generators::Base
113
121
  remove_file 'app/assets/stylesheets/application.css'
114
122
 
115
123
  # Remove the layout files created by ShopifyApp
116
- remove_file 'app/views/layout/application.html.erb'
117
- remove_file 'app/views/layout/embedded_app.html.erb'
124
+ remove_file 'app/views/layouts/application.html.erb'
125
+ remove_file 'app/views/layouts/embedded_app.html.erb'
118
126
  end
119
127
 
120
128
  # Add the Disco App test helper to test/test_helper.rb
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.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Ballard