shopify_graphql 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/shopify_graphql/managers/webhooks_manager.rb +5 -1
- data/lib/shopify_graphql/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7081c7f634ac890bc428d5eb2e67d260cebf1dae0cb56ee514d375a39de76c2f
|
4
|
+
data.tar.gz: 48e7c7b931e462502a93359e175ec13858988e5435be1f3e8dc114b75680103c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9db31af58e597e5d0b91e66e388ae8d1a2b75afcc08fc0c75e9a3a84ac3ffd4f2b94466c3747ed5131750b19d88283ec274ae6c366ea377368f6d98303a72d4
|
7
|
+
data.tar.gz: 4b8ad458b06267f51d35b9b1e56d85ec3f7ed4582928cba184567f047c8cd628e6d80d1d70199a004c9a0fbfeacd14bf624e80af4ed7f9b1f10e04ed1664fb12
|
data/README.md
CHANGED
@@ -257,6 +257,8 @@ ShopifyGraphql.configure do |config|
|
|
257
257
|
end
|
258
258
|
```
|
259
259
|
|
260
|
+
You can also use `WEBHOOKS_ENABLED=true` env variable to enable webhooks (useful in development).
|
261
|
+
|
260
262
|
## License
|
261
263
|
|
262
264
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -55,8 +55,12 @@ module ShopifyGraphql
|
|
55
55
|
|
56
56
|
private
|
57
57
|
|
58
|
+
def webhook_environments
|
59
|
+
ShopifyGraphql.configuration.webhook_enabled_environments
|
60
|
+
end
|
61
|
+
|
58
62
|
def webhooks_enabled?
|
59
|
-
if
|
63
|
+
if webhook_environments.include?(Rails.env) || ActiveModel::Type::Boolean.new.cast(ENV["WEBHOOKS_ENABLED"])
|
60
64
|
true
|
61
65
|
else
|
62
66
|
Rails.logger.info("[ShopifyGraphql] Webhooks disabled in #{Rails.env} environment. Check you config.")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kirill Platonov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|