groundskeeper-bitcore 0.40.0 → 0.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63b42f4cf4e163dfc17e0a4147e94bbf7f40145ff2d3c61acf1f16956d7049c4
4
- data.tar.gz: b740118a9ad4636b675f6eaa45d2bf34c22f270dfb7e3147d9aa5811de8b3fa4
3
+ metadata.gz: da5799840ef9bbac5114d77cfbc1f37b782df84834e695a381109d819aad481c
4
+ data.tar.gz: 2d2b95234bfb51e22d6606cfe16432a0f81235de8509b277d6c163fda1cf08db
5
5
  SHA512:
6
- metadata.gz: dd96e1cd5f4c020abd8d1ec4e621ff3515423a3ff45dc7d9555babfe3e6cf75bd46467d11cc61a20a9cc1a81b5ba4c6d202db36e92d1be72082a7099afe4f29a
7
- data.tar.gz: '079eba57ab1b9d79e70f01841c62945b6b69e95b3a16db24b2e029306b2f4bc8541c6f2bbded56fa031e82fa71f4692ae3e442552730f2f0a5d9fabb1d464b43'
6
+ metadata.gz: b689a1738d0fd53aa9ca8d1e60ad3a4f92c86c435dc81aba2d9839e47e942a538aa7c0d422c96832a558adb68491686c52a5d17ee8345bc521401ab3af7e6464
7
+ data.tar.gz: 79821aed6f749e32a658b017a64c5cae5a7a0e57a91b12bcf0828fffb5a57f05b726193296e028c7879a917b335a24ff71cc16330e1012853782e95a6858fd59
@@ -0,0 +1,24 @@
1
+ # This workflow uses actions that are not certified by GitHub. They are
2
+ # provided by a third-party and are governed by separate terms of service,
3
+ # privacy policy, and support documentation.
4
+ #
5
+ # This workflow will install a prebuilt Ruby version, install dependencies, and
6
+ # run tests.
7
+ name: "Test CI"
8
+ on:
9
+ push:
10
+ branches: [ "**" ]
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v4
17
+ - name: Install Ruby and gems
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ bundler-cache: true
21
+ - name: Install Sentry CLI
22
+ run: curl -sL https://sentry.io/get-cli/ | bash
23
+ - name: Run tests
24
+ run: bundle exec rake
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
data/Gemfile.lock ADDED
@@ -0,0 +1,126 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ groundskeeper-bitcore (0.42.0)
5
+ activesupport
6
+ jira-ruby (~> 3.0)
7
+ mina (~> 1.2)
8
+ mina-whenever (~> 1.0.1)
9
+ openssl (~> 3.3)
10
+ thor (~> 1.0)
11
+
12
+ GEM
13
+ remote: https://rubygems.org/
14
+ specs:
15
+ activesupport (7.1.4)
16
+ base64
17
+ bigdecimal
18
+ concurrent-ruby (~> 1.0, >= 1.0.2)
19
+ connection_pool (>= 2.2.5)
20
+ drb
21
+ i18n (>= 1.6, < 2)
22
+ minitest (>= 5.1)
23
+ mutex_m
24
+ tzinfo (~> 2.0)
25
+ ast (2.4.3)
26
+ atlassian-jwt (0.2.1)
27
+ jwt (~> 2.1)
28
+ base64 (0.2.0)
29
+ bigdecimal (3.1.8)
30
+ byebug (11.1.3)
31
+ concurrent-ruby (1.3.5)
32
+ connection_pool (2.4.1)
33
+ docile (1.4.1)
34
+ drb (2.2.1)
35
+ hashie (5.0.0)
36
+ i18n (1.14.7)
37
+ concurrent-ruby (~> 1.0)
38
+ jira-ruby (3.0.0)
39
+ activesupport
40
+ atlassian-jwt
41
+ multipart-post
42
+ oauth (~> 1.0)
43
+ json (2.16.0)
44
+ jwt (2.8.2)
45
+ base64
46
+ language_server-protocol (3.17.0.5)
47
+ lint_roller (1.1.0)
48
+ mina (1.2.5)
49
+ rake
50
+ mina-whenever (1.0.1)
51
+ mina (~> 1.0)
52
+ minitest (5.25.4)
53
+ multipart-post (2.4.1)
54
+ mutex_m (0.2.0)
55
+ oauth (1.1.0)
56
+ oauth-tty (~> 1.0, >= 1.0.1)
57
+ snaky_hash (~> 2.0)
58
+ version_gem (~> 1.1)
59
+ oauth-tty (1.0.5)
60
+ version_gem (~> 1.1, >= 1.1.1)
61
+ openssl (3.3.2)
62
+ parallel (1.27.0)
63
+ parser (3.3.10.0)
64
+ ast (~> 2.4.1)
65
+ racc
66
+ prism (1.6.0)
67
+ racc (1.8.1)
68
+ rainbow (3.1.1)
69
+ rake (13.2.1)
70
+ regexp_parser (2.11.3)
71
+ rubocop (1.81.7)
72
+ json (~> 2.3)
73
+ language_server-protocol (~> 3.17.0.2)
74
+ lint_roller (~> 1.1.0)
75
+ parallel (~> 1.10)
76
+ parser (>= 3.3.0.2)
77
+ rainbow (>= 2.2.2, < 4.0)
78
+ regexp_parser (>= 2.9.3, < 3.0)
79
+ rubocop-ast (>= 1.47.1, < 2.0)
80
+ ruby-progressbar (~> 1.7)
81
+ unicode-display_width (>= 2.4.0, < 4.0)
82
+ rubocop-ast (1.48.0)
83
+ parser (>= 3.3.7.2)
84
+ prism (~> 1.4)
85
+ rubocop-minitest (0.38.1)
86
+ lint_roller (~> 1.1)
87
+ rubocop (>= 1.75.0, < 2.0)
88
+ rubocop-ast (>= 1.38.0, < 2.0)
89
+ rubocop-performance (1.24.0)
90
+ lint_roller (~> 1.1)
91
+ rubocop (>= 1.72.1, < 2.0)
92
+ rubocop-ast (>= 1.38.0, < 2.0)
93
+ ruby-progressbar (1.13.0)
94
+ simplecov (0.22.0)
95
+ docile (~> 1.1)
96
+ simplecov-html (~> 0.11)
97
+ simplecov_json_formatter (~> 0.1)
98
+ simplecov-html (0.12.3)
99
+ simplecov_json_formatter (0.1.4)
100
+ snaky_hash (2.0.1)
101
+ hashie
102
+ version_gem (~> 1.1, >= 1.1.1)
103
+ thor (1.3.2)
104
+ tzinfo (2.0.6)
105
+ concurrent-ruby (~> 1.0)
106
+ unicode-display_width (3.2.0)
107
+ unicode-emoji (~> 4.1)
108
+ unicode-emoji (4.1.0)
109
+ version_gem (1.1.4)
110
+
111
+ PLATFORMS
112
+ arm64-darwin-23
113
+ ruby
114
+
115
+ DEPENDENCIES
116
+ bundler (~> 4.0)
117
+ byebug (~> 11.1)
118
+ groundskeeper-bitcore!
119
+ minitest (~> 5.0)
120
+ rubocop (~> 1.23)
121
+ rubocop-minitest
122
+ rubocop-performance (~> 1.12)
123
+ simplecov (~> 0.14)
124
+
125
+ BUNDLED WITH
126
+ 4.0.3
data/README.md CHANGED
@@ -29,6 +29,12 @@ export BITBUCKET_USERNAME="bitbucket_username"
29
29
  export BITBUCKET_APP_PASSWORD="app_password"
30
30
  ```
31
31
 
32
+ For integration with Github, install the [Github CLI](https://cli.github.com/) and run:
33
+
34
+ ```bash
35
+ gh auth login -h='github.com' -p='SSH' --skip-ssh-key -w
36
+ ```
37
+
32
38
  For integration with Sentry, find or create your auth token
33
39
  [from here](https://sentry.io/settings/account/api/auth-tokens/) with the scopes `event:admin, event:read, member:read, org:read, project:read, project:releases, team:read`:
34
40
 
@@ -1,4 +1,4 @@
1
- image: 'isgmhradd/rails-ruby312:2023-05-15'
1
+ image: 'isgmhradd/rails-ruby333-node20:2025-07-16'
2
2
 
3
3
  clone:
4
4
  depth: 1
@@ -12,7 +12,8 @@ pipelines:
12
12
  - curl -sL https://sentry.io/get-cli/ | bash
13
13
  - gem install bundler
14
14
  # install gems
15
- - bundle install --path vendor
15
+ - bundle config set path 'vendor'
16
+ - bundle install
16
17
  - bundle update --bundler
17
18
  # build/lint/test
18
19
  - bundle exec rake
@@ -39,7 +39,7 @@ Gem::Specification.new do |spec|
39
39
  spec.add_dependency "openssl", "~> 3.3"
40
40
  spec.add_dependency "thor", "~> 1.0"
41
41
 
42
- spec.add_development_dependency "bundler", "~> 2.0"
42
+ spec.add_development_dependency "bundler", "~> 4.0"
43
43
  spec.add_development_dependency "byebug", "~> 11.1"
44
44
  spec.add_development_dependency "minitest", "~> 5.0"
45
45
  spec.add_development_dependency "rubocop", "~> 1.23"
@@ -27,7 +27,8 @@ module Groundskeeper
27
27
  project = Project.build(repository.name)
28
28
  deploy_url = "https://#{project.full_dns(stage)}"
29
29
  website = Website.new(deploy_url)
30
- bitbucket = Bitbucket.build
30
+ git = Git.build
31
+ remote_version_control = git.bitbucket? ? Bitbucket.build : Github.build
31
32
  sentry = Sentry.build(
32
33
  project_name: project.sentry_project,
33
34
  version_prefix: repository.name
@@ -37,8 +38,8 @@ module Groundskeeper
37
38
 
38
39
  new(
39
40
  console: console,
40
- bitbucket: bitbucket,
41
- git: Git.build,
41
+ remote_version_control: remote_version_control,
42
+ git: git,
42
43
  jira: Jira.build(project.jira_prefix),
43
44
  project: project,
44
45
  repository: repository,
@@ -59,7 +60,7 @@ module Groundskeeper
59
60
  # rubocop:disable Metrics/MethodLength,Metrics/ParameterLists
60
61
  def initialize(
61
62
  console:, version_file:,
62
- bitbucket: nil,
63
+ remote_version_control: nil,
63
64
  git: nil,
64
65
  jira: nil,
65
66
  project: nil,
@@ -71,7 +72,7 @@ module Groundskeeper
71
72
  website: nil
72
73
  )
73
74
  @console = console
74
- @bitbucket = bitbucket
75
+ @remote_version_control = remote_version_control
75
76
  @git = git
76
77
  @jira = jira
77
78
  @project = project
@@ -112,7 +113,7 @@ module Groundskeeper
112
113
  is_initial_release = !version_file.exists?
113
114
 
114
115
  return missing_jira_credentials unless jira.credentials?
115
- return missing_bitbucket_credentials unless bitbucket.credentials?
116
+ return missing_bitbucket_credentials unless remote_version_control.credentials?
116
117
  return groundskeeper_outdated unless check_groundskeeper_version
117
118
  return unrecognized_version unless version_file.rails?
118
119
 
@@ -172,7 +173,7 @@ module Groundskeeper
172
173
  private
173
174
 
174
175
  # collaborators
175
- attr_reader :bitbucket, :console, :git, :jira, :project,
176
+ attr_reader :remote_version_control, :console, :git, :jira, :project,
176
177
  :repository, :rubygems, :sentry, :slack, :ssh, :version_file,
177
178
  :website
178
179
  # state
@@ -293,7 +294,7 @@ module Groundskeeper
293
294
  end
294
295
 
295
296
  def create_pr
296
- bitbucket.create_pr(
297
+ remote_version_control.create_pr(
297
298
  repository: repository.name, branch_name: new_branch_name
298
299
  )
299
300
  end
@@ -102,5 +102,13 @@ module Groundskeeper
102
102
  def origin_url
103
103
  git.execute(ORIGIN_URL).strip
104
104
  end
105
+
106
+ def bitbucket?
107
+ origin_url.include?("bitbucket.org")
108
+ end
109
+
110
+ def github?
111
+ origin_url.include?("github.com")
112
+ end
105
113
  end
106
114
  end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+
5
+ module Groundskeeper
6
+ # Github API wrapper
7
+ class Github
8
+ COMMAND = "gh api"
9
+ GITHUB_ORG = "NU-RADD"
10
+ HOSTNAME = "github.com"
11
+ CREATE_PR = <<~REQUEST.split.join(" ")
12
+ --method POST
13
+ -H "Accept: application/vnd.github+json"
14
+ -H "X-GitHub-Api-Version: 2022-11-28"
15
+ --hostname #{HOSTNAME}
16
+ /repos/#{GITHUB_ORG}/%<repository>s/pulls
17
+ -f 'title=%<branch_name>s' -f 'head=%<branch_name>s' -f 'base=main'
18
+ REQUEST
19
+
20
+ attr_reader :github
21
+
22
+ # :nocov:
23
+ def self.build
24
+ new Executable.new(COMMAND)
25
+ end
26
+ # :nocov:
27
+
28
+ def initialize(github)
29
+ @github = github
30
+ end
31
+
32
+ def create_pr(repository:, branch_name:)
33
+ github.execute(format(CREATE_PR, repository: repository, branch_name: branch_name))
34
+ end
35
+
36
+ # :nocov:
37
+ def credentials?
38
+ true
39
+ end
40
+ # :nocov:
41
+ end
42
+ end
@@ -8,6 +8,7 @@ module Groundskeeper
8
8
  MODULE_NAME_EXPRESSION = /module (\w+)/
9
9
  NAMESPACE_FILE = "%slib/%s.rb"
10
10
  MODULE_DIRECTORY = "%slib/%s"
11
+ ROOT_VERSION_FILE = "%s.version"
11
12
  VERSION_FILE = "#{MODULE_DIRECTORY}/version.rb".freeze
12
13
  VERSION_EXPRESSION = /(?<=VERSION = ")([^"]+)(?=")/
13
14
 
@@ -22,14 +23,12 @@ module Groundskeeper
22
23
  folder_namespace = StringUtils.underscore(project_name)
23
24
  namespace_file_path =
24
25
  format(NAMESPACE_FILE, relative_path, folder_namespace)
25
- version_file_path = format(VERSION_FILE, relative_path, folder_namespace)
26
26
 
27
27
  new(
28
28
  relative_path,
29
29
  project_name: project_name,
30
30
  config_file: config_file,
31
- namespace_file: Groundskeeper::Document.new(namespace_file_path),
32
- version_file: Groundskeeper::Document.new(version_file_path)
31
+ namespace_file: Groundskeeper::Document.new(namespace_file_path)
33
32
  )
34
33
  end
35
34
  # rubocop:enable Metrics/MethodLength
@@ -48,10 +47,14 @@ module Groundskeeper
48
47
  end
49
48
 
50
49
  def current_version
50
+ return version_file.read.strip if root_version_file?
51
+
51
52
  version_file.match(VERSION_EXPRESSION) || ""
52
53
  end
53
54
 
54
55
  def update_version!(value)
56
+ return version_file.write_file(value) if root_version_file?
57
+
55
58
  version_file.gsub_file VERSION_EXPRESSION, value
56
59
  end
57
60
 
@@ -97,7 +100,15 @@ module Groundskeeper
97
100
  end
98
101
 
99
102
  def find_version_file
100
- @version_file = Groundskeeper::Document.new(version_file_path)
103
+ version_file = Groundskeeper::Document.new(version_file_path)
104
+ return version_file if version_file.exists?
105
+
106
+ root_version_file = Groundskeeper::Document.new(
107
+ format(ROOT_VERSION_FILE, relative_path)
108
+ )
109
+ return root_version_file if root_version_file.exists?
110
+
111
+ version_file
101
112
  end
102
113
 
103
114
  def config_file_path
@@ -111,5 +122,9 @@ module Groundskeeper
111
122
  def folder_namespace
112
123
  StringUtils.underscore(config_file.match(MODULE_NAME_EXPRESSION))
113
124
  end
125
+
126
+ def root_version_file?
127
+ File.basename(version_file.path) == ".version"
128
+ end
114
129
  end
115
130
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Groundskeeper
4
- VERSION = "0.40.0"
4
+ VERSION = "0.42.0"
5
5
  end
data/lib/groundskeeper.rb CHANGED
@@ -10,6 +10,7 @@ require "groundskeeper/commands"
10
10
  require "groundskeeper/document"
11
11
  require "groundskeeper/executable"
12
12
  require "groundskeeper/git"
13
+ require "groundskeeper/github"
13
14
  require "groundskeeper/jira"
14
15
  require "groundskeeper/project"
15
16
  require "groundskeeper/rails_version"
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groundskeeper-bitcore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.40.0
4
+ version: 0.42.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - RADD
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-10-20 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: jira-ruby
@@ -99,14 +100,14 @@ dependencies:
99
100
  requirements:
100
101
  - - "~>"
101
102
  - !ruby/object:Gem::Version
102
- version: '2.0'
103
+ version: '4.0'
103
104
  type: :development
104
105
  prerelease: false
105
106
  version_requirements: !ruby/object:Gem::Requirement
106
107
  requirements:
107
108
  - - "~>"
108
109
  - !ruby/object:Gem::Version
109
- version: '2.0'
110
+ version: '4.0'
110
111
  - !ruby/object:Gem::Dependency
111
112
  name: byebug
112
113
  requirement: !ruby/object:Gem::Requirement
@@ -191,6 +192,7 @@ dependencies:
191
192
  - - "~>"
192
193
  - !ruby/object:Gem::Version
193
194
  version: '0.14'
195
+ description:
194
196
  email:
195
197
  - radd@northwestern.edu
196
198
  executables:
@@ -198,12 +200,14 @@ executables:
198
200
  extensions: []
199
201
  extra_rdoc_files: []
200
202
  files:
203
+ - ".github/workflows/test_ci.yml"
201
204
  - ".gitignore"
202
205
  - ".rubocop.yml"
203
206
  - ".ruby-version"
204
207
  - CHANGELOG.md
205
208
  - CODE_OF_CONDUCT.md
206
209
  - Gemfile
210
+ - Gemfile.lock
207
211
  - LICENSE.txt
208
212
  - README.md
209
213
  - Rakefile
@@ -226,6 +230,7 @@ files:
226
230
  - lib/groundskeeper/document.rb
227
231
  - lib/groundskeeper/executable.rb
228
232
  - lib/groundskeeper/git.rb
233
+ - lib/groundskeeper/github.rb
229
234
  - lib/groundskeeper/jira.rb
230
235
  - lib/groundskeeper/project.rb
231
236
  - lib/groundskeeper/rails_version.rb
@@ -244,6 +249,7 @@ licenses:
244
249
  metadata:
245
250
  allowed_push_host: https://rubygems.org
246
251
  rubygems_mfa_required: 'true'
252
+ post_install_message:
247
253
  rdoc_options: []
248
254
  require_paths:
249
255
  - lib
@@ -259,7 +265,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
259
265
  - !ruby/object:Gem::Version
260
266
  version: '0'
261
267
  requirements: []
262
- rubygems_version: 4.0.3
268
+ rubygems_version: 3.5.11
269
+ signing_key:
263
270
  specification_version: 4
264
271
  summary: A gem for managing releases and deployments.
265
272
  test_files: []