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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f7c3fa69d7d40efc67ae58e4094b26dddbe43dd88ca7e14cfccecceca75d39b
|
4
|
+
data.tar.gz: 2a6af21f5c3b4c449ceed89c87179af6114a27708e469e19cd2dc66af1a92013
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
"
|
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.
|
data/lib/disco_app/version.rb
CHANGED
@@ -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
|
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
|
75
|
-
# routing absolute URLS (needed when
|
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/
|
117
|
-
remove_file 'app/views/
|
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
|