bunny_app 2.0.1 → 2.1.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: ddee2a75dd5e0d155b6262ef9a0af252be0da7a23bf65c5b7082afe8f87944b4
4
- data.tar.gz: 3ff475f3847b63fb0b0a2b779bf3df21f0ba5ed6d8cc682764e60b0b71eab2e9
3
+ metadata.gz: 713f2dd54e42a46e2bde441a09420de5e685a00f35f0683d156a0bc25e53b1a5
4
+ data.tar.gz: adf590d8fe14df2b06399e3d1c55e1dfe3866956f5e9ce8f3596e6f451ac6637
5
5
  SHA512:
6
- metadata.gz: 634afceda6fe87a0de908fdfd8926dde84c48d0d8a56ebc54d4a08defb94ab3ace346646ec037eb5c6ded014788beeb5602cb1c0560a69c0ac2e47a8a22355ce
7
- data.tar.gz: e0c605da0b2f6e53f2aef46e62067e1f575d73641d16eaf9b246ae6291c4e3b8903dd8f4f38a46ef5e83eae3008fb78b0e241ea7e00397582863f34ac097cca7
6
+ metadata.gz: 31fd8695d7c7b5215ecfc7420304d5a8430c95a9880dab644cf421dc0e1efa5c9c929960c6510c58efb0a6a484b78b7fbd506baba50098245e505955c642fd4e
7
+ data.tar.gz: 9167b52dd6dea36438f5c05aa93de5cc554918b5baa43517c59ca213fb5bca61670d9ad1ab982832ae8c7c26e6b1e1d8d0c8e123ec99bbefdf32c95cc7f029e6
@@ -92,7 +92,7 @@ module BunnyApp
92
92
  end
93
93
 
94
94
  def verify_ssl
95
- return true unless ENV['IGNORE_SSL']
95
+ true unless ENV['IGNORE_SSL']
96
96
  end
97
97
 
98
98
  def host_header
@@ -35,6 +35,8 @@ module BunnyApp
35
35
  variables[:attributes][:usageAt] = usage_at unless usage_at.nil?
36
36
 
37
37
  res = Client.new.query(@feature_usage_create_mutation, variables)
38
+ raise ResponseError, res['data']['featureUsageCreate']['errors'].join(',') if res['data']['featureUsageCreate']['errors']
39
+
38
40
  res['data']['featureUsageCreate']['featureUsage']
39
41
  end
40
42
  end
@@ -22,6 +22,8 @@ module BunnyApp
22
22
  }
23
23
 
24
24
  res = Client.new.query(@platform_create_mutation, variables)
25
+ raise ResponseError, res['data']['platformCreate']['errors'].join(',') if res['data']['platformCreate']['errors']
26
+
25
27
  res['data']['platformCreate']['platform']
26
28
  end
27
29
  end
@@ -17,6 +17,8 @@ module BunnyApp
17
17
  }
18
18
 
19
19
  res = Client.new.query(@portal_session_create_mutation, variables)
20
+ raise ResponseError, res['data']['portalSessionCreate']['errors'].join(',') if res['data']['portalSessionCreate']['errors']
21
+
20
22
  res['data']['portalSessionCreate']['token']
21
23
  end
22
24
  end
@@ -1,6 +1,6 @@
1
1
  module BunnyApp
2
2
  class Subscription
3
- @subscription_create_mutation = <<-'GRAPHQL'
3
+ @subscription_create_mutation = <<-GRAPHQL
4
4
  mutation subscriptionCreate ($attributes: SubscriptionAttributes!) {
5
5
  subscriptionCreate (attributes: $attributes) {
6
6
  subscription {
@@ -19,6 +19,7 @@ module BunnyApp
19
19
  startDate
20
20
  endDate
21
21
  state
22
+ evergreen
22
23
  plan {
23
24
  code
24
25
  name
@@ -38,7 +39,7 @@ module BunnyApp
38
39
  }
39
40
  GRAPHQL
40
41
 
41
- @subscription_cancel_mutation = <<-'GRAPHQL'
42
+ @subscription_cancel_mutation = <<-GRAPHQL
42
43
  mutation subscriptionCancel ($ids: [ID!]!) {
43
44
  subscriptionCancel (ids: $ids) {
44
45
  errors
@@ -51,7 +52,8 @@ module BunnyApp
51
52
  variables = {
52
53
  attributes: {
53
54
  priceListCode: price_list_code,
54
- trial: options[:trial] || false
55
+ trial: options[:trial] || false,
56
+ evergreen: options[:evergreen] || false
55
57
  }
56
58
  }
57
59
 
@@ -76,6 +78,8 @@ module BunnyApp
76
78
  end
77
79
 
78
80
  res = Client.new.query(@subscription_create_mutation, variables)
81
+ raise ResponseError, res['data']['subscriptionCreate']['errors'].join(',') if res['data']['subscriptionCreate']['errors']
82
+
79
83
  res['data']['subscriptionCreate']['subscription']
80
84
  end
81
85
 
@@ -84,7 +88,8 @@ module BunnyApp
84
88
  ids: [subscription_id]
85
89
  }
86
90
 
87
- Client.new.query(@subscription_cancel_mutation, variables)
91
+ res = Client.new.query(@subscription_cancel_mutation, variables)
92
+ raise ResponseError, res['data']['subscriptionCancel']['errors'].join(',') if res['data']['subscriptionCancel']['errors']
88
93
 
89
94
  true
90
95
  end
@@ -52,6 +52,8 @@ module BunnyApp
52
52
  }
53
53
 
54
54
  res = Client.new.query(@tenant_create_mutation, variables)
55
+ raise ResponseError, res['data']['tenantCreate']['errors'].join(',') if res['data']['tenantCreate']['errors']
56
+
55
57
  res['data']['tenantCreate']['tenant']
56
58
  end
57
59
 
@@ -61,6 +63,7 @@ module BunnyApp
61
63
  }
62
64
 
63
65
  res = Client.new.query(@tenant_query, variables)
66
+
64
67
  res['data']['tenant']
65
68
  end
66
69
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BunnyApp
4
- VERSION = '2.0.1'
4
+ VERSION = '2.1.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bunny_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bunny
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-09-05 00:00:00.000000000 Z
12
+ date: 2024-01-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty