circleci-bundle-update-pr 3.0.0 → 4.0.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: 10da4d9e8e3d7bcc1040720c63a9d62ea1689d0a1aba20af4afdacbc0aa259e7
4
- data.tar.gz: 036edf4a72c54c7ac75cb1847cf2d18261018125ef213984ddb29af0b6ac7d04
3
+ metadata.gz: 988716c33812da28b13641f57780aed6130741771d549fe11d92333bc7e5b449
4
+ data.tar.gz: e1f52e9dbcaf1c833e721b47c902dfc92ab79b441e885fc50da4d8708744710d
5
5
  SHA512:
6
- metadata.gz: a8a3a0f6db5c3e59bed66ba14dfbb8a7bbcd5cf608eba9d0f3a84e6e4af17dd7124fb8bb37a9b770326db656d8bc9dd7062b28a57b75b4a5ffadc9af1d5b2fdf
7
- data.tar.gz: 7dc7f107ba41295e5641759ffd70c045cdaa728ab91bc40ed4c227e254139a8bcd9534c9fbbc42dde877969950a84804bee2ce073cd59d04649609b098968a76
6
+ metadata.gz: f44eee34a01a224b41c24b8ec44db37c2893fd158bf2d9e35a85197108ce7a9d6dedf26e7174464eb209a403920970dd57f16d993ec43402d68faeb1fd2374db
7
+ data.tar.gz: e0f1e14c82f981197d1b826028c26e02f1ccaa3002373af23c8e9814d89ae93129dd496f87810203e8efdeae8fc77ac7d9d7b2e99f9173b02c63e7de3f4d2c99
data/.circleci/config.yml CHANGED
@@ -8,7 +8,7 @@ executors:
8
8
  parameters:
9
9
  ruby_version:
10
10
  type: enum
11
- enum: ['2.5', '2.6', '2.7', '3.0']
11
+ enum: ['2.7', '3.0', '3.1', '3.2']
12
12
  docker:
13
13
  - image: cimg/ruby:<< parameters.ruby_version >>
14
14
  working_directory: ~/repo
@@ -23,7 +23,7 @@ commands:
23
23
  parameters:
24
24
  ruby_version:
25
25
  type: enum
26
- enum: ['2.5', '2.6', '2.7', '3.0']
26
+ enum: ['2.7', '3.0', '3.1', '3.2']
27
27
  steps:
28
28
  - restore_cache:
29
29
  name: Restore bundle cache
@@ -34,25 +34,20 @@ commands:
34
34
  parameters:
35
35
  ruby_version:
36
36
  type: enum
37
- enum: ['2.5', '2.6', '2.7', '3.0']
37
+ enum: ['2.7', '3.0', '3.1', '3.2']
38
38
  steps:
39
39
  - save_cache:
40
40
  name: Save bundle cache
41
41
  key: gems-ruby<< parameters.ruby_version >>-{{ .Environment.COMMON_CACHE_KEY }}-{{ checksum "Gemfile.lock" }}
42
42
  paths:
43
43
  - ~/repo/vendor/bundle
44
- install_bundler:
45
- steps:
46
- - run:
47
- name: install bundler
48
- command: gem install -N bundler:1.17.3 # same version as Gemfile.lock
49
44
 
50
45
  jobs:
51
46
  build:
52
47
  parameters:
53
48
  ruby_version:
54
49
  type: enum
55
- enum: ['2.5', '2.6', '2.7', '3.0']
50
+ enum: ['2.7', '3.0', '3.1', '3.2']
56
51
  executor:
57
52
  name: default
58
53
  ruby_version: << parameters.ruby_version >>
@@ -61,11 +56,11 @@ jobs:
61
56
  - checkout
62
57
  - restore_bundle_cache:
63
58
  ruby_version: << parameters.ruby_version >>
64
- - install_bundler
65
59
  - run:
66
60
  name: bundle install
67
61
  command: |
68
- bundle check || bundle install --jobs=4 --retry=3 --path=vendor/bundle
62
+ bundle config set --local path vendor/bundle
63
+ bundle check || bundle install --jobs=4 --retry=3
69
64
  bundle clean
70
65
  - save_bundle_cache:
71
66
  ruby_version: << parameters.ruby_version >>
@@ -75,13 +70,12 @@ jobs:
75
70
  continuous_bundle_update:
76
71
  executor:
77
72
  name: default
78
- ruby_version: '3.0'
73
+ ruby_version: '3.2'
79
74
  steps:
80
75
  - setup_requirements
81
76
  - checkout
82
77
  - restore_bundle_cache:
83
- ruby_version: '3.0'
84
- - install_bundler
78
+ ruby_version: '3.2'
85
79
  - run:
86
80
  name: Install edge circleci-bundle-update-pr
87
81
  command: |
@@ -96,18 +90,18 @@ workflows:
96
90
  version: 2
97
91
  ordinary:
98
92
  jobs:
99
- - build:
100
- name: ruby-2.5
101
- ruby_version: '2.5'
102
- - build:
103
- name: ruby-2.6
104
- ruby_version: '2.6'
105
93
  - build:
106
94
  name: ruby-2.7
107
95
  ruby_version: '2.7'
108
96
  - build:
109
97
  name: ruby-3.0
110
98
  ruby_version: '3.0'
99
+ - build:
100
+ name: ruby-3.1
101
+ ruby_version: '3.1'
102
+ - build:
103
+ name: ruby-3.2
104
+ ruby_version: '3.2'
111
105
  nightly:
112
106
  triggers:
113
107
  - schedule:
data/.rubocop.yml CHANGED
@@ -6,6 +6,9 @@ AllCops:
6
6
  NewCops: enable
7
7
  TargetRubyVersion: 2.5
8
8
 
9
+ Gemspec/DevelopmentDependencies:
10
+ EnforcedStyle: gemspec
11
+
9
12
  Layout/LineLength:
10
13
  Enabled: false
11
14
 
data/Gemfile.lock CHANGED
@@ -1,84 +1,75 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- circleci-bundle-update-pr (3.0.0)
4
+ circleci-bundle-update-pr (4.0.0)
5
5
  compare_linker (>= 1.4.0)
6
6
  octokit
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- addressable (2.8.0)
12
- public_suffix (>= 2.0.2, < 5.0)
11
+ addressable (2.8.1)
12
+ public_suffix (>= 2.0.2, < 6.0)
13
13
  ast (2.4.2)
14
14
  compare_linker (1.4.4)
15
15
  httpclient
16
16
  octokit
17
- diff-lcs (1.4.4)
18
- faraday (1.8.0)
19
- faraday-em_http (~> 1.0)
20
- faraday-em_synchrony (~> 1.0)
21
- faraday-excon (~> 1.1)
22
- faraday-httpclient (~> 1.0.1)
23
- faraday-net_http (~> 1.0)
24
- faraday-net_http_persistent (~> 1.1)
25
- faraday-patron (~> 1.0)
26
- faraday-rack (~> 1.0)
27
- multipart-post (>= 1.2, < 3)
17
+ diff-lcs (1.5.0)
18
+ faraday (2.7.4)
19
+ faraday-net_http (>= 2.0, < 3.1)
28
20
  ruby2_keywords (>= 0.0.4)
29
- faraday-em_http (1.0.0)
30
- faraday-em_synchrony (1.0.0)
31
- faraday-excon (1.1.0)
32
- faraday-httpclient (1.0.1)
33
- faraday-net_http (1.0.1)
34
- faraday-net_http_persistent (1.2.0)
35
- faraday-patron (1.0.0)
36
- faraday-rack (1.0.0)
21
+ faraday-net_http (3.0.2)
37
22
  httpclient (2.8.3)
38
- multipart-post (2.1.1)
39
- octokit (4.21.0)
40
- faraday (>= 0.9)
41
- sawyer (~> 0.8.0, >= 0.5.3)
42
- parallel (1.19.2)
43
- parser (3.0.2.0)
23
+ json (2.6.3)
24
+ octokit (6.0.1)
25
+ faraday (>= 1, < 3)
26
+ sawyer (~> 0.9)
27
+ parallel (1.22.1)
28
+ parser (3.2.1.0)
44
29
  ast (~> 2.4.1)
45
- public_suffix (4.0.6)
46
- rainbow (3.0.0)
30
+ public_suffix (5.0.1)
31
+ rainbow (3.1.1)
47
32
  rake (13.0.6)
48
- regexp_parser (2.1.1)
33
+ regexp_parser (2.7.0)
49
34
  rexml (3.2.5)
50
- rspec (3.10.0)
51
- rspec-core (~> 3.10.0)
52
- rspec-expectations (~> 3.10.0)
53
- rspec-mocks (~> 3.10.0)
54
- rspec-core (3.10.1)
55
- rspec-support (~> 3.10.0)
56
- rspec-expectations (3.10.1)
35
+ rspec (3.12.0)
36
+ rspec-core (~> 3.12.0)
37
+ rspec-expectations (~> 3.12.0)
38
+ rspec-mocks (~> 3.12.0)
39
+ rspec-core (3.12.1)
40
+ rspec-support (~> 3.12.0)
41
+ rspec-expectations (3.12.2)
57
42
  diff-lcs (>= 1.2.0, < 2.0)
58
- rspec-support (~> 3.10.0)
59
- rspec-mocks (3.10.2)
43
+ rspec-support (~> 3.12.0)
44
+ rspec-mocks (3.12.3)
60
45
  diff-lcs (>= 1.2.0, < 2.0)
61
- rspec-support (~> 3.10.0)
62
- rspec-support (3.10.2)
63
- rubocop (1.22.0)
46
+ rspec-support (~> 3.12.0)
47
+ rspec-support (3.12.0)
48
+ rubocop (1.45.1)
49
+ json (~> 2.3)
64
50
  parallel (~> 1.10)
65
- parser (>= 3.0.0.0)
51
+ parser (>= 3.2.0.0)
66
52
  rainbow (>= 2.2.2, < 4.0)
67
53
  regexp_parser (>= 1.8, < 3.0)
68
- rexml
69
- rubocop-ast (>= 1.12.0, < 2.0)
54
+ rexml (>= 3.2.5, < 4.0)
55
+ rubocop-ast (>= 1.24.1, < 2.0)
70
56
  ruby-progressbar (~> 1.7)
71
- unicode-display_width (>= 1.4.0, < 3.0)
72
- rubocop-ast (1.12.0)
73
- parser (>= 3.0.1.1)
74
- rubocop-rspec (2.5.0)
75
- rubocop (~> 1.19)
57
+ unicode-display_width (>= 2.4.0, < 3.0)
58
+ rubocop-ast (1.26.0)
59
+ parser (>= 3.2.1.0)
60
+ rubocop-capybara (2.17.0)
61
+ rubocop (~> 1.41)
62
+ rubocop-rake (0.6.0)
63
+ rubocop (~> 1.0)
64
+ rubocop-rspec (2.18.1)
65
+ rubocop (~> 1.33)
66
+ rubocop-capybara (~> 2.17)
76
67
  ruby-progressbar (1.11.0)
77
68
  ruby2_keywords (0.0.5)
78
- sawyer (0.8.2)
69
+ sawyer (0.9.2)
79
70
  addressable (>= 2.3.5)
80
- faraday (> 0.8, < 2.0)
81
- unicode-display_width (2.1.0)
71
+ faraday (>= 0.17.3, < 3)
72
+ unicode-display_width (2.4.2)
82
73
 
83
74
  PLATFORMS
84
75
  ruby
@@ -91,11 +82,11 @@ PLATFORMS
91
82
  DEPENDENCIES
92
83
  bundler
93
84
  circleci-bundle-update-pr!
94
- parallel (< 1.20.0)
95
85
  rake
96
86
  rspec
97
87
  rubocop
88
+ rubocop-rake
98
89
  rubocop-rspec
99
90
 
100
91
  BUNDLED WITH
101
- 1.17.3
92
+ 2.4.6
data/README.md CHANGED
@@ -101,7 +101,7 @@ General usage:
101
101
  $ circleci-bundle-update-pr <git username> <git email address>
102
102
  ```
103
103
 
104
- By default, it works only on master branch, but you can also explicitly specify any branches rather than only master branch by adding them to the arguments.
104
+ By default, it works only on master or main branches, but you can also explicitly specify any branches rather than only these branches by adding them to the arguments.
105
105
 
106
106
  ```
107
107
  $ circleci-bundle-update-pr <git username> <git email address> master develop topic
@@ -15,7 +15,7 @@ opt.parse!(ARGV)
15
15
  Circleci::Bundle::Update::Pr.create_if_needed(
16
16
  git_username: ARGV.shift,
17
17
  git_email: ARGV.shift,
18
- git_branches: ARGV.empty? ? ['master'] : ARGV,
18
+ git_branches: ARGV.empty? ? %w[master main] : ARGV,
19
19
  assignees: options[:assignees],
20
20
  reviewers: options[:reviewers],
21
21
  labels: options[:labels],
@@ -14,9 +14,10 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = 'https://github.com/masutaka/circleci-bundle-update-pr'
15
15
  spec.license = 'MIT'
16
16
 
17
+ spec.metadata['rubygems_mfa_required'] = 'true'
18
+
17
19
  spec.files = `git ls-files -z`.split("\x0")
18
20
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
21
  spec.require_paths = ['lib']
21
22
 
22
23
  spec.required_ruby_version = '>= 2.5.0'
@@ -25,9 +26,9 @@ Gem::Specification.new do |spec|
25
26
  spec.add_dependency 'octokit'
26
27
 
27
28
  spec.add_development_dependency 'bundler'
28
- spec.add_development_dependency 'parallel', '< 1.20.0' # parallel-1.20.0 requires ruby version >= 2.5, which used by rubocop
29
29
  spec.add_development_dependency 'rake'
30
30
  spec.add_development_dependency 'rspec'
31
31
  spec.add_development_dependency 'rubocop'
32
+ spec.add_development_dependency 'rubocop-rake'
32
33
  spec.add_development_dependency 'rubocop-rspec'
33
34
  end
@@ -4,7 +4,7 @@ module Circleci
4
4
  module Bundle
5
5
  module Update
6
6
  module Pr
7
- VERSION = '3.0.0'
7
+ VERSION = '4.0.0'
8
8
  end
9
9
  end
10
10
  end
@@ -7,7 +7,7 @@ module Circleci
7
7
  module Bundle
8
8
  module Update
9
9
  module Pr
10
- def self.create_if_needed(git_username: nil, git_email: nil, git_branches: ['master'],
10
+ def self.create_if_needed(git_username: nil, git_email: nil, git_branches: %w[master main],
11
11
  assignees: nil, reviewers: nil, labels: nil, allow_dup_pr: false)
12
12
  raise_if_env_unvalid!
13
13
 
@@ -16,8 +16,8 @@ module Circleci
16
16
  return
17
17
  end
18
18
 
19
- unless target_branch?(running_branch: ENV['CIRCLE_BRANCH'], target_branches: git_branches)
20
- puts "Skip because CIRCLE_BRANCH[#{ENV['CIRCLE_BRANCH']}] is not included in target branches[#{git_branches.join(',')}]."
19
+ unless target_branch?(running_branch: ENV.fetch('CIRCLE_BRANCH', nil), target_branches: git_branches)
20
+ puts "Skip because CIRCLE_BRANCH[#{ENV.fetch('CIRCLE_BRANCH', nil)}] is not included in target branches[#{git_branches.join(',')}]."
21
21
  return
22
22
  end
23
23
 
@@ -37,17 +37,17 @@ module Circleci
37
37
  request_review(pull_request[:number], reviewers) if reviewers
38
38
  end
39
39
 
40
- BRANCH_PREFIX = ENV['BRANCH_PREFIX'] || 'bundle-update-'.freeze
41
- TITLE_PREFIX = ENV['TITLE_PREFIX'] || 'bundle update at '.freeze
40
+ BRANCH_PREFIX = ENV.fetch('BRANCH_PREFIX', nil) || 'bundle-update-'.freeze
41
+ TITLE_PREFIX = ENV.fetch('TITLE_PREFIX', nil) || 'bundle update at '.freeze
42
42
 
43
43
  def self.raise_if_env_unvalid!
44
44
  raise "$CIRCLE_PROJECT_USERNAME isn't set" unless ENV['CIRCLE_PROJECT_USERNAME']
45
45
  raise "$CIRCLE_PROJECT_REPONAME isn't set" unless ENV['CIRCLE_PROJECT_REPONAME']
46
46
  raise "$GITHUB_ACCESS_TOKEN isn't set" unless ENV['GITHUB_ACCESS_TOKEN']
47
- if ENV['ENTERPRISE_OCTOKIT_ACCESS_TOKEN'] && !ENV['ENTERPRISE_OCTOKIT_API_ENDPOINT']
47
+ if ENV.fetch('ENTERPRISE_OCTOKIT_ACCESS_TOKEN', nil) && !ENV['ENTERPRISE_OCTOKIT_API_ENDPOINT']
48
48
  raise "$ENTERPRISE_OCTOKIT_API_ENDPOINT isn't set"
49
49
  end
50
- if !ENV['ENTERPRISE_OCTOKIT_ACCESS_TOKEN'] && ENV['ENTERPRISE_OCTOKIT_API_ENDPOINT']
50
+ if !ENV['ENTERPRISE_OCTOKIT_ACCESS_TOKEN'] && ENV.fetch('ENTERPRISE_OCTOKIT_API_ENDPOINT', nil)
51
51
  raise "$ENTERPRISE_OCTOKIT_ACCESS_TOKEN isn't set"
52
52
  end
53
53
  end
@@ -106,7 +106,7 @@ module Circleci
106
106
  def self.create_branch(git_username, git_email)
107
107
  branch = "#{BRANCH_PREFIX}#{now.strftime('%Y%m%d%H%M%S')}"
108
108
 
109
- current_ref = client.ref(repo_full_name, "heads/#{ENV['CIRCLE_BRANCH']}")
109
+ current_ref = client.ref(repo_full_name, "heads/#{ENV.fetch('CIRCLE_BRANCH', nil)}")
110
110
  branch_ref = client.create_ref(repo_full_name, "heads/#{branch}", current_ref.object.sha)
111
111
 
112
112
  branch_commit = client.commit(repo_full_name, branch_ref.object.sha)
@@ -151,7 +151,7 @@ module Circleci
151
151
  # @return [Sawyer::Resource] The newly created pull request
152
152
  def self.create_pull_request(branch)
153
153
  title = "#{TITLE_PREFIX}#{now.strftime('%Y-%m-%d %H:%M:%S %Z')}"
154
- client.create_pull_request(repo_full_name, ENV['CIRCLE_BRANCH'], branch, title)
154
+ client.create_pull_request(repo_full_name, ENV.fetch('CIRCLE_BRANCH', nil), branch, title)
155
155
  end
156
156
  private_class_method :create_pull_request
157
157
 
@@ -161,7 +161,7 @@ module Circleci
161
161
  private_class_method :add_labels
162
162
 
163
163
  def self.update_pull_request_body(pr_number)
164
- ENV['OCTOKIT_ACCESS_TOKEN'] = ENV['GITHUB_ACCESS_TOKEN']
164
+ ENV['OCTOKIT_ACCESS_TOKEN'] = ENV.fetch('GITHUB_ACCESS_TOKEN', nil)
165
165
  compare_linker = CompareLinker.new(repo_full_name, pr_number)
166
166
  compare_linker.formatter = CompareLinker::Formatter::Markdown.new
167
167
 
@@ -198,10 +198,10 @@ Powered by [circleci-bundle-update-pr](https://rubygems.org/gems/circleci-bundle
198
198
 
199
199
  def self.client
200
200
  if enterprise?
201
- Octokit::Client.new(access_token: ENV['ENTERPRISE_OCTOKIT_ACCESS_TOKEN'],
202
- api_endpoint: ENV['ENTERPRISE_OCTOKIT_API_ENDPOINT'])
201
+ Octokit::Client.new(access_token: ENV.fetch('ENTERPRISE_OCTOKIT_ACCESS_TOKEN', nil),
202
+ api_endpoint: ENV.fetch('ENTERPRISE_OCTOKIT_API_ENDPOINT', nil))
203
203
  else
204
- Octokit::Client.new(access_token: ENV['GITHUB_ACCESS_TOKEN'])
204
+ Octokit::Client.new(access_token: ENV.fetch('GITHUB_ACCESS_TOKEN', nil))
205
205
  end
206
206
  end
207
207
  private_class_method :client
@@ -215,15 +215,15 @@ Powered by [circleci-bundle-update-pr](https://rubygems.org/gems/circleci-bundle
215
215
  #
216
216
  # @return [String] e.g. 'masutaka/circleci-bundle-update-pr'
217
217
  def self.repo_full_name
218
- @repo_full_name ||= "#{ENV['CIRCLE_PROJECT_USERNAME']}/#{ENV['CIRCLE_PROJECT_REPONAME']}"
218
+ @repo_full_name ||= "#{ENV.fetch('CIRCLE_PROJECT_USERNAME', nil)}/#{ENV.fetch('CIRCLE_PROJECT_REPONAME', nil)}"
219
219
  end
220
220
  private_class_method :repo_full_name
221
221
 
222
222
  def self.github_host
223
223
  # A format like https://github.com/masutaka/circleci-bundle-update-pr.git
224
- return Regexp.last_match(1) if ENV['CIRCLE_REPOSITORY_URL'] =~ %r{https://(.+?)/}
224
+ return Regexp.last_match(1) if ENV.fetch('CIRCLE_REPOSITORY_URL', nil) =~ %r{https://(.+?)/}
225
225
  # A format like git@github.com:masutaka/compare_linker.git
226
- return Regexp.last_match(1) if ENV['CIRCLE_REPOSITORY_URL'] =~ /([^@]+?):/
226
+ return Regexp.last_match(1) if ENV.fetch('CIRCLE_REPOSITORY_URL', nil) =~ /([^@]+?):/
227
227
 
228
228
  'github.com'
229
229
  end
@@ -241,7 +241,7 @@ Powered by [circleci-bundle-update-pr](https://rubygems.org/gems/circleci-bundle
241
241
  #
242
242
  # @return [String]
243
243
  def self.lockfile_path
244
- workdir_env = ENV['CIRCLE_WORKING_DIRECTORY']
244
+ workdir_env = ENV.fetch('CIRCLE_WORKING_DIRECTORY', nil)
245
245
  return 'Gemfile.lock' unless workdir_env
246
246
 
247
247
  workdir = Pathname.new(workdir_env).expand_path
@@ -54,7 +54,7 @@ describe Circleci::Bundle::Update::Pr::Note do
54
54
 
55
55
  context 'with .circleci/BUNDLE_UPDATE_NOTE.md' do
56
56
  before do
57
- File.open('.circleci/BUNDLE_UPDATE_NOTE.md', 'w') { |f| f.write('I am .circleci/BUNDLE_UPDATE_NOTE.md') }
57
+ File.write('.circleci/BUNDLE_UPDATE_NOTE.md', 'I am .circleci/BUNDLE_UPDATE_NOTE.md')
58
58
  end
59
59
 
60
60
  it { is_expected.to eq 'I am .circleci/BUNDLE_UPDATE_NOTE.md' }
@@ -62,7 +62,7 @@ describe Circleci::Bundle::Update::Pr::Note do
62
62
 
63
63
  context 'with CIRCLECI_BUNDLE_UPDATE_NOTE.md' do
64
64
  before do
65
- File.open('CIRCLECI_BUNDLE_UPDATE_NOTE.md', 'w') { |f| f.write('I am CIRCLECI_BUNDLE_UPDATE_NOTE.md') }
65
+ File.write('CIRCLECI_BUNDLE_UPDATE_NOTE.md', 'I am CIRCLECI_BUNDLE_UPDATE_NOTE.md')
66
66
  end
67
67
 
68
68
  it { is_expected.to eq 'I am CIRCLECI_BUNDLE_UPDATE_NOTE.md' }
@@ -70,8 +70,8 @@ describe Circleci::Bundle::Update::Pr::Note do
70
70
 
71
71
  context 'with .circleci/BUNDLE_UPDATE_NOTE.md and CIRCLECI_BUNDLE_UPDATE_NOTE.md' do
72
72
  before do
73
- File.open('.circleci/BUNDLE_UPDATE_NOTE.md', 'w') { |f| f.write('I am .circleci/BUNDLE_UPDATE_NOTE.md') }
74
- File.open('CIRCLECI_BUNDLE_UPDATE_NOTE.md', 'w') { |f| f.write('I am CIRCLECI_BUNDLE_UPDATE_NOTE.md') }
73
+ File.write('.circleci/BUNDLE_UPDATE_NOTE.md', 'I am .circleci/BUNDLE_UPDATE_NOTE.md')
74
+ File.write('CIRCLECI_BUNDLE_UPDATE_NOTE.md', 'I am CIRCLECI_BUNDLE_UPDATE_NOTE.md')
75
75
  end
76
76
 
77
77
  it { is_expected.to eq 'I am .circleci/BUNDLE_UPDATE_NOTE.md' }
@@ -75,11 +75,7 @@ describe Circleci::Bundle::Update::Pr do
75
75
  end
76
76
 
77
77
  context "when ENV['CIRCLE_WORKING_DIRECTORY'] is relative path" do
78
- let(:workdir_env) do
79
- project_dir = Pathname.getwd.to_s
80
- home_dir = Pathname.new(ENV['HOME']).to_s
81
- project_dir.sub(home_dir, '~')
82
- end
78
+ let(:workdir_env) { Pathname.getwd.to_s.sub(Dir.home, '~') }
83
79
  let(:src_dir) { 'spec/tmp' }
84
80
 
85
81
  around do |e|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: circleci-bundle-update-pr
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Masuda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-03 00:00:00.000000000 Z
11
+ date: 2023-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: compare_linker
@@ -53,21 +53,21 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: parallel
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "<"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 1.20.0
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "<"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 1.20.0
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
70
+ name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rspec
84
+ name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rubocop
98
+ name: rubocop-rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -151,7 +151,8 @@ files:
151
151
  homepage: https://github.com/masutaka/circleci-bundle-update-pr
152
152
  licenses:
153
153
  - MIT
154
- metadata: {}
154
+ metadata:
155
+ rubygems_mfa_required: 'true'
155
156
  post_install_message:
156
157
  rdoc_options: []
157
158
  require_paths:
@@ -167,11 +168,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
168
  - !ruby/object:Gem::Version
168
169
  version: '0'
169
170
  requirements: []
170
- rubygems_version: 3.2.22
171
+ rubygems_version: 3.4.6
171
172
  signing_key:
172
173
  specification_version: 4
173
174
  summary: Provide continues bundle update using CircleCI
174
- test_files:
175
- - spec/circleci/bundle/update/pr/note_spec.rb
176
- - spec/circleci/bundle/update/pr_spec.rb
177
- - spec/spec_helper.rb
175
+ test_files: []