iron_bank 5.3.0 → 5.4.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: 318930655ab8662b1aff972445f64db04b8d4a728bdd99efca68d7959be3ec2e
4
- data.tar.gz: b70938147156d35cb100143d31c671af3273fc3d4615ed304eea335c0431e7c2
3
+ metadata.gz: 853859a45aaabdcfc831dca27a70882b28aa19f68b214a666cb0830ce4fa702f
4
+ data.tar.gz: 3c755dd00fad7455b402dd04ae7f649f554fce6127608e11f28c2e16f31c85d9
5
5
  SHA512:
6
- metadata.gz: 57048f30a2514b52da75fa8269d4c29dc80ae490153bd86999ece894eac442b583780adb5d66a0b0b39d9eeb9e0f3f9997b479a6729215f2f18847c8cea00b34
7
- data.tar.gz: fe64468e0f79b085ccbde1fbd1f90d483fb23ec52fafdf8e1adface0f13b98b6af23fa3b262a49a34132f7da3ffcd233b9ff73c7d607cc61d1eb4cfd63670d49
6
+ metadata.gz: 50f8865e78282701c705fd9e5b1b0f9978f152d54b7594784806153d9ffc3654d57871f6a9c4dbe1917611853915e27ff16e9b893e2bc2d848a27f963596aa32
7
+ data.tar.gz: 41e18fea0a4047734d49c8a495dfb28c2c13b7a40ef4a4737f6ccf909e4894bca44048124793cb9924ed375000e12245be67eefe559967f943b1391f7f2024f3
@@ -1,49 +1,57 @@
1
1
  name: CI
2
2
 
3
3
  on:
4
- push:
5
- branches:
6
- - main
7
4
  pull_request:
5
+ push:
8
6
  branches:
9
7
  - main
10
8
 
11
9
  jobs:
12
- test:
13
- name: Ruby
14
-
10
+ specs:
11
+ name: Ruby ${{ matrix.ruby-version }}
12
+ runs-on: ubuntu-latest
15
13
  strategy:
16
14
  matrix:
17
- ruby:
18
- - 2.6
19
- - 2.7
20
- - 3.0
21
-
22
- runs-on: ubuntu-latest
23
-
15
+ ruby-version:
16
+ - '2.7'
17
+ - '3.0'
18
+ - '3.1'
19
+ - '3.2'
24
20
  steps:
25
- - uses: zendesk/checkout@v2
26
-
21
+ - uses: zendesk/checkout@v3
27
22
  - uses: zendesk/setup-ruby@v1
28
23
  with:
29
- ruby-version: ${{ matrix.ruby }}
30
-
31
- - uses: zendesk/cache@v2
32
- with:
33
- path: vendor/bundle
34
- key: ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
35
- restore-keys: |
36
- ${{ runner.os }}-gems-
37
-
38
- - name: Install Dependencies
39
- run: |
40
- bundle config deployment true
41
- bundle config path vendor/bundle
42
- bundle install --jobs 4
43
-
44
- - name: Run Tests
45
- run: bundle exec rake
24
+ ruby-version: ${{ matrix.ruby-version }}
25
+ bundler-cache: true
26
+ - name: Run Specs
27
+ run: bundle exec rake spec
46
28
  env:
47
29
  ZUORA_CLIENT_ID: something
48
30
  ZUORA_CLIENT_SECRET: secret
49
31
  ZUORA_DOMAIN: rest.apisandbox.zuora.com
32
+
33
+ specs_successful:
34
+ name: Specs passing?
35
+ needs: specs
36
+ if: always()
37
+ runs-on: ubuntu-latest
38
+ steps:
39
+ - run: |
40
+ if ${{ needs.specs.result == 'success' }}
41
+ then
42
+ echo "All specs pass"
43
+ else
44
+ echo "Some specs failed"
45
+ false
46
+ fi
47
+
48
+ lint:
49
+ runs-on: ubuntu-latest
50
+ steps:
51
+ - uses: zendesk/checkout@v3
52
+ - name: Set up Ruby
53
+ uses: zendesk/setup-ruby@v1
54
+ with:
55
+ ruby-version: "3.0"
56
+ bundler-cache: true
57
+ - run: bundle exec rake rubocop
@@ -0,0 +1,12 @@
1
+ name: Ruby Gem Publish
2
+
3
+ on:
4
+ push:
5
+ tags: v*
6
+
7
+ jobs:
8
+ call-workflow:
9
+ uses: zendesk/gw/.github/workflows/ruby-gem-publication.yml@main
10
+ secrets:
11
+ RUBY_GEMS_API_KEY: ${{ secrets.RUBY_GEMS_API_KEY }}
12
+ RUBY_GEMS_TOTP_DEVICE: ${{ secrets.RUBY_GEMS_TOTP_DEVICE }}
data/.rubocop.yml CHANGED
@@ -5,6 +5,7 @@ AllCops:
5
5
  DisplayStyleGuide: true
6
6
  NewCops: enable
7
7
  SuggestExtensions: false
8
+ TargetRubyVersion: 2.7
8
9
 
9
10
  Layout/DotPosition:
10
11
  EnforcedStyle: trailing
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.7
1
+ 2.7.7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- iron_bank (5.3.0)
4
+ iron_bank (5.4.0)
5
5
  faraday (~> 1)
6
6
  faraday_middleware (~> 1)
7
7
  nokogiri (~> 1)
@@ -9,23 +9,22 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (6.1.1)
12
+ activesupport (7.0.4.3)
13
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
14
  i18n (>= 1.6, < 2)
15
15
  minitest (>= 5.1)
16
16
  tzinfo (~> 2.0)
17
- zeitwerk (~> 2.3)
18
17
  ast (2.4.2)
19
18
  bump (0.10.0)
20
19
  byebug (11.1.3)
21
20
  coderay (1.1.3)
22
- concurrent-ruby (1.1.7)
23
- diff-lcs (1.4.4)
24
- docile (1.3.4)
25
- dotenv (2.7.6)
26
- factory_bot (6.1.0)
21
+ concurrent-ruby (1.2.2)
22
+ diff-lcs (1.5.0)
23
+ docile (1.4.0)
24
+ dotenv (2.8.1)
25
+ factory_bot (6.2.1)
27
26
  activesupport (>= 5.0.0)
28
- faraday (1.10.0)
27
+ faraday (1.10.3)
29
28
  faraday-em_http (~> 1.0)
30
29
  faraday-em_synchrony (~> 1.0)
31
30
  faraday-excon (~> 1.1)
@@ -50,78 +49,77 @@ GEM
50
49
  faraday-retry (1.0.3)
51
50
  faraday_middleware (1.2.0)
52
51
  faraday (~> 1.0)
53
- i18n (1.8.7)
52
+ i18n (1.13.0)
54
53
  concurrent-ruby (~> 1.0)
54
+ json (2.6.3)
55
55
  kwalify (0.7.2)
56
56
  method_source (1.0.0)
57
- mini_portile2 (2.8.0)
58
- minitest (5.14.3)
59
- multipart-post (2.2.3)
60
- nokogiri (1.13.6)
57
+ mini_portile2 (2.8.2)
58
+ minitest (5.18.0)
59
+ multipart-post (2.3.0)
60
+ nokogiri (1.14.3)
61
61
  mini_portile2 (~> 2.8.0)
62
62
  racc (~> 1.4)
63
- parallel (1.22.1)
64
- parser (3.0.3.2)
63
+ parallel (1.23.0)
64
+ parser (3.2.2.1)
65
65
  ast (~> 2.4.1)
66
- pry (0.13.1)
66
+ pry (0.14.2)
67
67
  coderay (~> 1.1)
68
68
  method_source (~> 1.0)
69
- pry-byebug (3.9.0)
69
+ pry-byebug (3.10.1)
70
70
  byebug (~> 11.0)
71
- pry (~> 0.13.0)
72
- psych (3.3.0)
73
- racc (1.6.0)
71
+ pry (>= 0.13, < 0.15)
72
+ racc (1.6.2)
74
73
  rainbow (3.1.1)
75
- rake (13.0.3)
76
- reek (6.0.3)
74
+ rake (13.0.6)
75
+ reek (6.1.4)
77
76
  kwalify (~> 0.7.0)
78
- parser (~> 3.0.0)
79
- psych (~> 3.1)
77
+ parser (~> 3.2.0)
80
78
  rainbow (>= 2.0, < 4.0)
81
- regexp_parser (2.5.0)
79
+ regexp_parser (2.8.0)
82
80
  rexml (3.2.5)
83
- rspec (3.10.0)
84
- rspec-core (~> 3.10.0)
85
- rspec-expectations (~> 3.10.0)
86
- rspec-mocks (~> 3.10.0)
87
- rspec-core (3.10.1)
88
- rspec-support (~> 3.10.0)
89
- rspec-expectations (3.10.1)
81
+ rspec (3.12.0)
82
+ rspec-core (~> 3.12.0)
83
+ rspec-expectations (~> 3.12.0)
84
+ rspec-mocks (~> 3.12.0)
85
+ rspec-core (3.12.2)
86
+ rspec-support (~> 3.12.0)
87
+ rspec-expectations (3.12.3)
90
88
  diff-lcs (>= 1.2.0, < 2.0)
91
- rspec-support (~> 3.10.0)
92
- rspec-mocks (3.10.1)
89
+ rspec-support (~> 3.12.0)
90
+ rspec-mocks (3.12.5)
93
91
  diff-lcs (>= 1.2.0, < 2.0)
94
- rspec-support (~> 3.10.0)
95
- rspec-support (3.10.1)
96
- rubocop (1.24.1)
92
+ rspec-support (~> 3.12.0)
93
+ rspec-support (3.12.0)
94
+ rubocop (1.50.2)
95
+ json (~> 2.3)
97
96
  parallel (~> 1.10)
98
- parser (>= 3.0.0.0)
97
+ parser (>= 3.2.0.0)
99
98
  rainbow (>= 2.2.2, < 4.0)
100
99
  regexp_parser (>= 1.8, < 3.0)
101
- rexml
102
- rubocop-ast (>= 1.15.1, < 2.0)
100
+ rexml (>= 3.2.5, < 4.0)
101
+ rubocop-ast (>= 1.28.0, < 2.0)
103
102
  ruby-progressbar (~> 1.7)
104
- unicode-display_width (>= 1.4.0, < 3.0)
105
- rubocop-ast (1.15.2)
106
- parser (>= 3.0.1.1)
107
- rubocop-performance (1.9.2)
108
- rubocop (>= 0.90.0, < 2.0)
103
+ unicode-display_width (>= 2.4.0, < 3.0)
104
+ rubocop-ast (1.28.1)
105
+ parser (>= 3.2.1.0)
106
+ rubocop-performance (1.17.1)
107
+ rubocop (>= 1.7.0, < 2.0)
109
108
  rubocop-ast (>= 0.4.0)
110
- ruby-progressbar (1.11.0)
109
+ ruby-progressbar (1.13.0)
111
110
  ruby2_keywords (0.0.5)
112
- shoulda-matchers (4.5.0)
111
+ shoulda-matchers (4.5.1)
113
112
  activesupport (>= 4.2.0)
114
- simplecov (0.21.2)
113
+ simplecov (0.22.0)
115
114
  docile (~> 1.1)
116
115
  simplecov-html (~> 0.11)
117
116
  simplecov_json_formatter (~> 0.1)
118
117
  simplecov-html (0.12.3)
119
- simplecov_json_formatter (0.1.2)
120
- timecop (0.9.5)
121
- tzinfo (2.0.4)
118
+ simplecov_json_formatter (0.1.4)
119
+ timecop (0.9.6)
120
+ tzinfo (2.0.6)
122
121
  concurrent-ruby (~> 1.0)
123
- unicode-display_width (2.1.0)
124
- zeitwerk (2.4.2)
122
+ unicode-display_width (2.4.2)
125
123
 
126
124
  PLATFORMS
127
125
  ruby
data/Rakefile CHANGED
@@ -42,10 +42,10 @@ def setup_iron_bank
42
42
  require "iron_bank"
43
43
 
44
44
  IronBank.configure do |config|
45
- config.client_id = ENV["ZUORA_CLIENT_ID"]
46
- config.client_secret = ENV["ZUORA_CLIENT_SECRET"]
45
+ config.client_id = ENV.fetch("ZUORA_CLIENT_ID", nil)
46
+ config.client_secret = ENV.fetch("ZUORA_CLIENT_SECRET", nil)
47
47
  config.auth_type = ENV.fetch("ZUORA_AUTH_TYPE", "token")
48
- config.domain = ENV["ZUORA_DOMAIN"]
49
- config.excluded_fields_file = ENV["ZUORA_EXCLUDED_FIELDS_FILE"]
48
+ config.domain = ENV.fetch("ZUORA_DOMAIN", nil)
49
+ config.excluded_fields_file = ENV.fetch("ZUORA_EXCLUDED_FIELDS_FILE", nil)
50
50
  end
51
51
  end
data/bin/console CHANGED
@@ -7,12 +7,12 @@ require "iron_bank"
7
7
  require "pry-byebug"
8
8
 
9
9
  IronBank.configure do |config|
10
- config.client_id = ENV["ZUORA_CLIENT_ID"]
11
- config.client_secret = ENV["ZUORA_CLIENT_SECRET"]
10
+ config.client_id = ENV.fetch("ZUORA_CLIENT_ID", nil)
11
+ config.client_secret = ENV.fetch("ZUORA_CLIENT_SECRET", nil)
12
12
  config.auth_type = ENV.fetch("ZUORA_AUTH_TYPE", "token")
13
- config.domain = ENV["ZUORA_DOMAIN"]
14
- config.excluded_fields_file = ENV["ZUORA_EXCLUDED_FIELDS_FILE"]
15
- config.users_file = ENV["ZUORA_USERS_FILE"]
13
+ config.domain = ENV.fetch("ZUORA_DOMAIN", nil)
14
+ config.excluded_fields_file = ENV.fetch("ZUORA_EXCLUDED_FIELDS_FILE", nil)
15
+ config.users_file = ENV.fetch("ZUORA_USERS_FILE", nil)
16
16
  end
17
17
 
18
18
  Pry.start
data/iron_bank.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  "mturan@zendesk.com"
20
20
  ]
21
21
 
22
- spec.required_ruby_version = ">= 2.6"
22
+ spec.required_ruby_version = ">= 2.7"
23
23
 
24
24
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
25
25
  f.match(%r{^(test|spec|features)/})
@@ -18,7 +18,7 @@ module IronBank
18
18
  end
19
19
 
20
20
  def self.export
21
- FileUtils.mkdir_p(directory) unless Dir.exist?(directory)
21
+ FileUtils.mkdir_p(directory)
22
22
  RESOURCE_QUERY_FIELDS.each_key { |resource| new(resource).save_file }
23
23
  end
24
24
 
@@ -64,7 +64,7 @@ module IronBank
64
64
 
65
65
  def ensure_range_single_condition
66
66
  return if conditions.count <= 1
67
- return unless conditions.values.any? { |value| value.is_a?(Array) }
67
+ return unless conditions.values.any?(Array)
68
68
 
69
69
  raise "Filter ranges must be used in isolation."
70
70
  end
@@ -12,7 +12,7 @@ module IronBank
12
12
  end
13
13
 
14
14
  def self.export
15
- FileUtils.mkdir_p(directory) unless Dir.exist?(directory)
15
+ FileUtils.mkdir_p(directory)
16
16
  new(IronBank.client).export
17
17
  reset
18
18
  import
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IronBank
4
- VERSION = "5.3.0"
4
+ VERSION = "5.4.0"
5
5
  API_VERSION = "v1"
6
6
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_bank
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.0
4
+ version: 5.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mickael Pham
8
8
  - Cheng Cui
9
9
  - Ryan Ringler
10
10
  - Mustafa Turan
11
- autorequire:
11
+ autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2022-06-28 00:00:00.000000000 Z
14
+ date: 2023-05-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: faraday
@@ -55,7 +55,7 @@ dependencies:
55
55
  - - "~>"
56
56
  - !ruby/object:Gem::Version
57
57
  version: '1'
58
- description:
58
+ description:
59
59
  email:
60
60
  - mickael@zendesk.com
61
61
  - ccui@zendesk.com
@@ -69,6 +69,7 @@ files:
69
69
  - ".github/CODEOWNERS"
70
70
  - ".github/PULL_REQUEST_TEMPLATE.md"
71
71
  - ".github/workflows/ci.yml"
72
+ - ".github/workflows/ruby-gem-publication.yml"
72
73
  - ".gitignore"
73
74
  - ".reek.yml"
74
75
  - ".rspec"
@@ -156,7 +157,7 @@ licenses:
156
157
  - Apache-2.0
157
158
  metadata:
158
159
  rubygems_mfa_required: 'true'
159
- post_install_message:
160
+ post_install_message:
160
161
  rdoc_options: []
161
162
  require_paths:
162
163
  - lib
@@ -164,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
164
165
  requirements:
165
166
  - - ">="
166
167
  - !ruby/object:Gem::Version
167
- version: '2.6'
168
+ version: '2.7'
168
169
  required_rubygems_version: !ruby/object:Gem::Requirement
169
170
  requirements:
170
171
  - - ">="
@@ -172,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
173
  version: '0'
173
174
  requirements: []
174
175
  rubygems_version: 3.0.3.1
175
- signing_key:
176
+ signing_key:
176
177
  specification_version: 4
177
178
  summary: An opinionated Ruby interface to the Zuora API.
178
179
  test_files: []