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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35b5c81b0fdd2c0150b85985e1ce69e1c9eb98608c677e7a1851ac34ed650d32
4
- data.tar.gz: 8399427588c5f0423971df43c2825c502cc1ecdaf052e0630b6defea6f275769
3
+ metadata.gz: 7081c7f634ac890bc428d5eb2e67d260cebf1dae0cb56ee514d375a39de76c2f
4
+ data.tar.gz: 48e7c7b931e462502a93359e175ec13858988e5435be1f3e8dc114b75680103c
5
5
  SHA512:
6
- metadata.gz: 1a33a1fc57833affe1a4e70537109f1d996b9a5331d55ee049842e78cfa722b5a4c492b6a568a7921dd671f5465d2e27c56148131a41aa0008da62868b54e5b1
7
- data.tar.gz: 2e75677d67e242e2bdaef8fcda3396d6fa5d06c02547f6dcc633ab411358c0cff968e14f54c0ef2d9b7bb187b3152988f108eedc4cd415bed7b2aed3f721e75e
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 ShopifyGraphql.configuration.webhook_enabled_environments.include?(Rails.env)
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.")
@@ -1,3 +1,3 @@
1
1
  module ShopifyGraphql
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.1
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-18 00:00:00.000000000 Z
11
+ date: 2021-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails