foobara-empty-ruby-project-generator 0.0.18 → 0.0.20
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 +4 -4
- data/CHANGELOG.md +8 -0
- data/src/manifests/project_config.rb +3 -1
- data/src/write_empty_ruby_project_to_disk.rb +30 -15
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e82a8d6af3338fe69f43a3a4573720791a5d93064c50d2fa3d1e1f95a42f12aa
|
4
|
+
data.tar.gz: 4d788a75115bf60b4bbb89089d3cfab7393fd95a3acb7b035f1e10fef6c93bf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 875efa4b26a347baf98f9c4b347f15b472cc24bc1226691fe60cad7cf284db329b7df5d4c0ae8d73d486d6f0ceeeec4642f5e13550eb05128b4cf4425bd2310e
|
7
|
+
data.tar.gz: f2ff5fbb32e62bf21d33ace1292257524f0023e35a6b1960561187529c7245ec21881cc570b06782c461622dfd7171cf2a276af4ece464e575dbfae8af9f8c2f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## [0.0.20] - 2025-05-03
|
2
|
+
|
3
|
+
- Add use_git, push_to_github, and turn_on_rbenv_bundler options and default them to false
|
4
|
+
|
5
|
+
## [0.0.19] - 2025-05-03
|
6
|
+
|
7
|
+
- Do not fail just because gh isn't installed
|
8
|
+
|
1
9
|
## [0.0.18] - 2025-04-23
|
2
10
|
|
3
11
|
- Improve interface a bit to be more intuitive re: extracting code from another repo
|
@@ -19,7 +19,9 @@ module Foobara
|
|
19
19
|
author_names [:string]
|
20
20
|
author_emails [:string]
|
21
21
|
homepage_url :string
|
22
|
-
|
22
|
+
use_git :boolean, default: false
|
23
|
+
push_to_github :boolean, default: false
|
24
|
+
turn_on_rbenv_bundler :boolean, default: false
|
23
25
|
license :string, :allow_nil, one_of: ["MIT", "Apache-2.0", "MPL-2.0", "Apache-2.0 OR MIT"]
|
24
26
|
end
|
25
27
|
|
@@ -61,6 +61,18 @@ module Foobara
|
|
61
61
|
project_config.org_slash_project_kebab
|
62
62
|
end
|
63
63
|
|
64
|
+
def push_to_github?
|
65
|
+
project_config.push_to_github
|
66
|
+
end
|
67
|
+
|
68
|
+
def turn_on_rbenv_bundler?
|
69
|
+
project_config.turn_on_rbenv_bundler
|
70
|
+
end
|
71
|
+
|
72
|
+
def use_git?
|
73
|
+
project_config.use_git
|
74
|
+
end
|
75
|
+
|
64
76
|
def generate_file_contents
|
65
77
|
puts "generating..."
|
66
78
|
# TODO: just pass this in as the inputs instead of the command??
|
@@ -72,14 +84,23 @@ module Foobara
|
|
72
84
|
bundle_install
|
73
85
|
make_bin_files_executable
|
74
86
|
rubocop_autocorrect
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
87
|
+
|
88
|
+
if use_git?
|
89
|
+
git_init unless extract_from_another_repo?
|
90
|
+
git_add_all
|
91
|
+
git_commit
|
92
|
+
git_branch_main
|
93
|
+
|
94
|
+
if push_to_github?
|
95
|
+
github_create_repo
|
96
|
+
git_add_remote_origin
|
97
|
+
push_to_github
|
98
|
+
end
|
99
|
+
|
100
|
+
if turn_on_rbenv_bundler?
|
101
|
+
rbenv_bundler_on
|
102
|
+
end
|
103
|
+
end
|
83
104
|
end
|
84
105
|
end
|
85
106
|
|
@@ -171,13 +192,7 @@ module Foobara
|
|
171
192
|
puts "pushing to github..."
|
172
193
|
|
173
194
|
cmd = "gh repo create --private #{project_config.org_slash_project_kebab}"
|
174
|
-
|
175
|
-
Open3.popen3(cmd) do |_stdin, _stdout, _stderr, wait_thr|
|
176
|
-
exit_status = wait_thr.value
|
177
|
-
unless exit_status.success?
|
178
|
-
warn "WARNING: could not #{cmd}"
|
179
|
-
end
|
180
|
-
end
|
195
|
+
run_cmd_and_write_output(cmd, raise_if_fails: false)
|
181
196
|
end
|
182
197
|
|
183
198
|
def git_add_remote_origin
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara-empty-ruby-project-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 2025-05-03 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: extract-repo
|
@@ -29,14 +29,14 @@ dependencies:
|
|
29
29
|
requirements:
|
30
30
|
- - "~>"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.0.
|
32
|
+
version: 0.0.116
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0.0.
|
39
|
+
version: 0.0.116
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: foobara-files-generator
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
|
-
rubygems_version: 3.6.
|
141
|
+
rubygems_version: 3.6.2
|
142
142
|
specification_version: 4
|
143
143
|
summary: Generates empty ruby project boilerplate code from a template
|
144
144
|
test_files: []
|