Skip to content

Commit 9e05a44

Browse files
authored
Support for Ruby 3.0
This adds support for Ruby 3.0. Namely droping the use of last argument keyword parameters. In addition, dependencies have been upgraded to their latest versions and GitHub action now tests against all latest stable versions. The action has also been updated to support the new native bundler caching provided by the setup-ruby action. Merges #249 LGTM given by: @nhance
1 parent 7456fc0 commit 9e05a44

File tree

10 files changed

+114
-66
lines changed

10 files changed

+114
-66
lines changed

.github/workflows/multi-ruby-tests.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,13 @@ jobs:
1212
fail-fast: true
1313
matrix:
1414
os: [ ubuntu-latest, macos-latest ]
15-
ruby: ['2.5.8', '2.6.6', '2.7.1 ']
15+
ruby: ['2.6.6', '2.7.2', '3.0.0 ']
1616
runs-on: ${{ matrix.os }}
1717
steps:
1818
- uses: actions/checkout@v2
1919
- uses: ruby/setup-ruby@v1
2020
with:
2121
ruby-version: ${{ matrix.ruby }}
22-
- uses: actions/cache@v1
23-
with:
24-
path: vendor/bundle
25-
key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
26-
restore-keys: |
27-
bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-
28-
- name: bundle install
29-
run: |
30-
bundle config path vendor/bundle
31-
bundle install --jobs 4 --retry 3
22+
bundler-cache: true
3223
- name: Run Tests for Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
3324
run: bundle exec rake

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.1
1+
3.0.0

CHANGELOG.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
# Changelog
22

3+
## [Unreleased](https://github.com/reenhanced/gitreflow/tree/HEAD)
4+
5+
[Full Changelog](https://github.com/reenhanced/gitreflow/compare/v0.9.4...HEAD)
6+
7+
**Fixed bugs:**
8+
9+
- Deprecation warnings with Ruby 2.7.0 [\#239](https://github.com/reenhanced/gitreflow/issues/239)
10+
311
## [v0.9.4](https://github.com/reenhanced/gitreflow/tree/v0.9.4) (2020-11-10)
412

513
[Full Changelog](https://github.com/reenhanced/gitreflow/compare/v0.9.3...v0.9.4)
614

715
**Merged pull requests:**
816

17+
- Fix critical issue, and update deps [\#245](https://github.com/reenhanced/gitreflow/pull/245) ([codenamev](https://github.com/codenamev))
918
- Fixed typo [\#244](https://github.com/reenhanced/gitreflow/pull/244) ([hsbt](https://github.com/hsbt))
1019

1120
## [v0.9.3](https://github.com/reenhanced/gitreflow/tree/v0.9.3) (2020-06-02)
@@ -72,7 +81,6 @@
7281

7382
**Merged pull requests:**
7483

75-
- Fix critical issue, and update deps [\#245](https://github.com/reenhanced/gitreflow/pull/245) ([codenamev](https://github.com/codenamev))
7684
- Allows for configuring a custom base-branch [\#231](https://github.com/reenhanced/gitreflow/pull/231) ([codenamev](https://github.com/codenamev))
7785
- Fixes many scoping issues with new Workflow [\#229](https://github.com/reenhanced/gitreflow/pull/229) ([codenamev](https://github.com/codenamev))
7886
- Retry pull-request creation if there are errors [\#226](https://github.com/reenhanced/gitreflow/pull/226) ([codenamev](https://github.com/codenamev))
@@ -86,7 +94,7 @@
8694
**Merged pull requests:**
8795

8896
- Updates rubies and gems [\#221](https://github.com/reenhanced/gitreflow/pull/221) ([codenamev](https://github.com/codenamev))
89-
- Remove lingering `skip\_lgtm` options in favor of `force` option [\#218](https://github.com/reenhanced/gitreflow/pull/218) ([codenamev](https://github.com/codenamev))
97+
- Remove lingering `skip_lgtm` options in favor of `force` option [\#218](https://github.com/reenhanced/gitreflow/pull/218) ([codenamev](https://github.com/codenamev))
9098
- Remove dead code [\#217](https://github.com/reenhanced/gitreflow/pull/217) ([codenamev](https://github.com/codenamev))
9199
- Updates REAME to Markdown [\#216](https://github.com/reenhanced/gitreflow/pull/216) ([codenamev](https://github.com/codenamev))
92100
- Updates readme with details on customization [\#214](https://github.com/reenhanced/gitreflow/pull/214) ([codenamev](https://github.com/codenamev))
@@ -127,7 +135,7 @@
127135
**Merged pull requests:**
128136

129137
- 0.8.7 [\#213](https://github.com/reenhanced/gitreflow/pull/213) ([nhance](https://github.com/nhance))
130-
- Updates Github merge request to use new `merge\_method` param [\#211](https://github.com/reenhanced/gitreflow/pull/211) ([codenamev](https://github.com/codenamev))
138+
- Updates Github merge request to use new `merge_method` param [\#211](https://github.com/reenhanced/gitreflow/pull/211) ([codenamev](https://github.com/codenamev))
131139
- Adds a logger to log command runs [\#210](https://github.com/reenhanced/gitreflow/pull/210) ([codenamev](https://github.com/codenamev))
132140
- All commands that are run through reflow \(except git-config\) are now blocking [\#209](https://github.com/reenhanced/gitreflow/pull/209) ([codenamev](https://github.com/codenamev))
133141
- Fix loading of PR template from '.github' directory [\#208](https://github.com/reenhanced/gitreflow/pull/208) ([codenamev](https://github.com/codenamev))
@@ -470,7 +478,7 @@
470478

471479
**Merged pull requests:**
472480

473-
- Fix --skip-lgtm option was never passed to the `\#deliver` method [\#45](https://github.com/reenhanced/gitreflow/pull/45) ([francois](https://github.com/francois))
481+
- Fix --skip-lgtm option was never passed to the `#deliver` method [\#45](https://github.com/reenhanced/gitreflow/pull/45) ([francois](https://github.com/francois))
474482

475483
## [v0.3.2](https://github.com/reenhanced/gitreflow/tree/v0.3.2) (2013-07-25)
476484

Gemfile.lock

Lines changed: 79 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,47 @@
11
PATH
22
remote: .
33
specs:
4-
git_reflow (0.9.4)
4+
git_reflow (0.9.5)
55
bundler (>= 1.10.0)
66
codenamev_bitbucket_api (= 0.4.1)
7-
colorize (>= 0.7.0)
7+
colorize (>= 0.8.1)
88
github_api (= 0.19)
99
highline
1010
httpclient
1111

1212
GEM
1313
remote: https://rubygems.org/
1414
specs:
15-
activesupport (6.0.3.4)
15+
activesupport (6.1.3)
1616
concurrent-ruby (~> 1.0, >= 1.0.2)
17-
i18n (>= 0.7, < 2)
18-
minitest (~> 5.1)
19-
tzinfo (~> 1.1)
20-
zeitwerk (~> 2.2, >= 2.2.2)
17+
i18n (>= 1.6, < 2)
18+
minitest (>= 5.1)
19+
tzinfo (~> 2.0)
20+
zeitwerk (~> 2.3)
2121
addressable (2.7.0)
2222
public_suffix (>= 2.0.2, < 5.0)
23-
appraisal (2.2.0)
23+
appraisal (2.4.0)
2424
bundler
2525
rake
2626
thor (>= 0.14.0)
27+
async (1.28.9)
28+
console (~> 1.10)
29+
nio4r (~> 2.3)
30+
timers (~> 4.1)
31+
async-http (0.54.1)
32+
async (~> 1.25)
33+
async-io (~> 1.28)
34+
async-pool (~> 0.2)
35+
protocol-http (~> 0.21.0)
36+
protocol-http1 (~> 0.13.0)
37+
protocol-http2 (~> 0.14.0)
38+
async-http-faraday (0.9.0)
39+
async-http (~> 0.42)
40+
faraday
41+
async-io (1.30.2)
42+
async (~> 1.14)
43+
async-pool (0.3.5)
44+
async (~> 1.25)
2745
byebug (11.1.3)
2846
chronic (0.10.2)
2947
codenamev_bitbucket_api (0.4.1)
@@ -35,26 +53,34 @@ GEM
3553
simple_oauth (>= 0.3.0)
3654
coderay (1.1.3)
3755
colorize (0.8.1)
38-
concurrent-ruby (1.1.7)
39-
crack (0.4.4)
56+
concurrent-ruby (1.1.8)
57+
console (1.10.1)
58+
fiber-local
59+
crack (0.4.5)
60+
rexml
4061
descendants_tracker (0.0.4)
4162
thread_safe (~> 0.3, >= 0.3.1)
4263
diff-lcs (1.4.4)
43-
faraday (1.1.0)
64+
faraday (1.3.0)
65+
faraday-net_http (~> 1.0)
4466
multipart-post (>= 1.2, < 3)
4567
ruby2_keywords
4668
faraday-http-cache (2.2.0)
4769
faraday (>= 0.8)
70+
faraday-net_http (1.0.1)
4871
faraday_middleware (1.0.0)
4972
faraday (~> 1.0)
73+
fiber-local (1.0.0)
5074
github_api (0.19.0)
5175
addressable (~> 2.4)
5276
descendants_tracker (~> 0.0.4)
5377
faraday (>= 0.8, < 2)
5478
hashie (~> 3.5, >= 3.5.2)
5579
oauth2 (~> 1.0)
56-
github_changelog_generator (1.15.2)
80+
github_changelog_generator (1.16.1)
5781
activesupport
82+
async (>= 1.25.0)
83+
async-http-faraday
5884
faraday-http-cache
5985
multi_json
6086
octokit (~> 4.6)
@@ -65,81 +91,95 @@ GEM
6591
hashie (3.6.0)
6692
highline (2.0.3)
6793
httpclient (2.8.3)
68-
i18n (1.8.5)
94+
i18n (1.8.9)
6995
concurrent-ruby (~> 1.0)
7096
jwt (2.2.2)
7197
method_source (1.0.0)
72-
mini_portile2 (2.4.0)
73-
minitest (5.14.2)
98+
mini_portile2 (2.5.0)
99+
minitest (5.14.4)
74100
multi_json (1.15.0)
75101
multi_xml (0.6.0)
76102
multipart-post (2.1.1)
77-
nokogiri (1.10.10)
78-
mini_portile2 (~> 2.4.0)
79-
oauth2 (1.4.4)
103+
nio4r (2.5.7)
104+
nokogiri (1.11.2)
105+
mini_portile2 (~> 2.5.0)
106+
racc (~> 1.4)
107+
oauth2 (1.4.7)
80108
faraday (>= 0.8, < 2.0)
81109
jwt (>= 1.0, < 3.0)
82110
multi_json (~> 1.3)
83111
multi_xml (~> 0.5)
84112
rack (>= 1.2, < 3)
85-
octokit (4.19.0)
113+
octokit (4.20.0)
86114
faraday (>= 0.9)
87115
sawyer (~> 0.8.0, >= 0.5.3)
116+
protocol-hpack (1.4.2)
117+
protocol-http (0.21.0)
118+
protocol-http1 (0.13.2)
119+
protocol-http (~> 0.19)
120+
protocol-http2 (0.14.2)
121+
protocol-hpack (~> 1.4)
122+
protocol-http (~> 0.18)
88123
pry (0.13.1)
89124
coderay (~> 1.1)
90125
method_source (~> 1.0)
91-
pry-byebug (3.9.0)
92-
byebug (~> 11.0)
93-
pry (~> 0.13.0)
94126
public_suffix (4.0.6)
127+
racc (1.5.2)
95128
rack (2.2.3)
96129
rainbow (3.0.0)
97-
rake (13.0.1)
98-
rdoc (6.2.1)
130+
rake (13.0.3)
131+
rdoc (6.3.0)
99132
retriable (3.1.2)
133+
rexml (3.2.4)
100134
rspec (3.10.0)
101135
rspec-core (~> 3.10.0)
102136
rspec-expectations (~> 3.10.0)
103137
rspec-mocks (~> 3.10.0)
104-
rspec-core (3.10.0)
138+
rspec-core (3.10.1)
105139
rspec-support (~> 3.10.0)
106-
rspec-expectations (3.10.0)
140+
rspec-expectations (3.10.1)
107141
diff-lcs (>= 1.2.0, < 2.0)
108142
rspec-support (~> 3.10.0)
109-
rspec-mocks (3.10.0)
143+
rspec-mocks (3.10.2)
110144
diff-lcs (>= 1.2.0, < 2.0)
111145
rspec-support (~> 3.10.0)
112-
rspec-support (3.10.0)
113-
ruby2_keywords (0.0.2)
146+
rspec-support (3.10.2)
147+
ruby2_keywords (0.0.4)
148+
ruby_jard (0.3.1)
149+
byebug (>= 9.1, < 12.0)
150+
pry (~> 0.13.0)
151+
tty-screen (~> 0.8.1)
114152
sawyer (0.8.2)
115153
addressable (>= 2.3.5)
116154
faraday (> 0.8, < 2.0)
117155
simple_oauth (0.3.1)
118-
thor (1.0.1)
156+
thor (1.1.0)
119157
thread_safe (0.3.6)
120-
tzinfo (1.2.7)
121-
thread_safe (~> 0.1)
122-
webmock (3.9.3)
158+
timers (4.3.3)
159+
tty-screen (0.8.1)
160+
tzinfo (2.0.4)
161+
concurrent-ruby (~> 1.0)
162+
webmock (3.12.1)
123163
addressable (>= 2.3.6)
124164
crack (>= 0.3.2)
125165
hashdiff (>= 0.4.0, < 2.0.0)
126166
wwtd (1.4.0)
127-
zeitwerk (2.4.1)
167+
zeitwerk (2.4.2)
128168

129169
PLATFORMS
130170
ruby
131171

132172
DEPENDENCIES
133-
appraisal (= 2.2.0)
173+
appraisal (= 2.4.0)
134174
chronic
135175
git_reflow!
136176
github_changelog_generator
137-
pry-byebug
138-
rake (~> 13.0.1)
177+
rake (~> 13.0.3)
139178
rdoc
140-
rspec (~> 3.9)
179+
rspec (~> 3.10)
180+
ruby_jard
141181
webmock
142182
wwtd (= 1.4)
143183

144184
BUNDLED WITH
145-
2.1.4
185+
2.2.4

git_reflow.gemspec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ Gem::Specification.new do |s|
1919
s.require_paths = ['lib']
2020
s.rdoc_options << '--title' << 'git_reflow' << '-ri'
2121

22-
s.add_development_dependency('appraisal', '2.2.0')
22+
s.add_development_dependency('appraisal', '2.4.0')
2323
s.add_development_dependency('chronic')
2424
s.add_development_dependency('github_changelog_generator')
25-
s.add_development_dependency('pry-byebug')
26-
s.add_development_dependency('rake', '~> 13.0.1')
25+
s.add_development_dependency('ruby_jard')
26+
s.add_development_dependency('rake', '~> 13.0.3')
2727
s.add_development_dependency('rdoc')
28-
s.add_development_dependency('rspec', '~> 3.9')
28+
s.add_development_dependency('rspec', '~> 3.10')
2929
s.add_development_dependency('webmock')
3030
s.add_development_dependency('wwtd', '1.4')
3131

3232
s.add_dependency('bundler', '>= 1.10.0')
3333
s.add_dependency('codenamev_bitbucket_api', '0.4.1')
34-
s.add_dependency('colorize', '>= 0.7.0')
34+
s.add_dependency('colorize', '>= 0.8.1')
3535
s.add_dependency('github_api', '0.19')
3636
s.add_dependency('highline')
3737
s.add_dependency('httpclient')

lib/git_reflow/git_server/git_hub/pull_request.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,18 @@ def self.create(options = {})
2424
base: options[:base]))
2525
end
2626

27-
def self.find_open(to: 'master', from: GitReflow.git_server.class.current_branch)
28-
matching_pull = GitReflow.git_server.connection.pull_requests.all(GitReflow.remote_user, GitReflow.remote_repo_name, base: to, head: "#{GitReflow.remote_user}:#{from}", state: 'open').first
27+
def self.find_open(options = {})
28+
options[:to] ||= 'master'
29+
options[:from] ||= GitReflow.git_server.class.current_branch
30+
31+
matching_pull = GitReflow.git_server.connection.pull_requests.all(
32+
GitReflow.remote_user,
33+
GitReflow.remote_repo_name,
34+
base: options[:to],
35+
head: "#{GitReflow.remote_user}:#{options[:from]}",
36+
state: 'open'
37+
).first
38+
2939
if matching_pull
3040
self.new matching_pull
3141
end

lib/git_reflow/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module GitReflow
2-
VERSION = "0.9.4"
2+
VERSION = "0.9.5"
33
end

lib/git_reflow/workflow.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def command(name, **params, &block)
157157
self.commands[name] = params
158158
self.command_docs[name] = params
159159

160-
self.define_singleton_method(name) do |**args|
160+
self.define_singleton_method(name) do |args = {}|
161161
args_with_defaults = {}
162162
args.each do |name, value|
163163
if "#{value}".length <= 0 && !defaults[name].nil?

spec/lib/git_reflow_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
require 'spec_helper'
22

33
describe GitReflow do
4-
54
describe ".logger" do
65
# Ignore memoization for tests
76
before { GitReflow.instance_variable_set("@logger", nil) }

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
require 'rubygems'
22
require 'rspec'
3+
require 'ruby_jard'
34
require 'multi_json'
45
require 'webmock/rspec'
5-
require 'pry'
66

77
$LOAD_PATH << 'lib'
88
require 'git_reflow'

0 commit comments

Comments
 (0)