foobara-empty-ruby-project-generator 0.0.11 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/src/generators/license_generator.rb +1 -1
- data/src/generators/project_generator.rb +1 -0
- data/src/generators/readme_generator.rb +35 -0
- data/src/write_empty_ruby_project_to_disk.rb +1 -12
- data/templates/.ruby-version +1 -1
- data/templates/{README.md → README.md.erb} +1 -1
- metadata +6 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a214c64d50f6c13c5f781eff80d90605133959f1dd185a51434b804cca8b33c
|
4
|
+
data.tar.gz: c2bdf1808499edeeb3fedf53fe43d78a975a3204e717afe194f6ad1d0c92ca40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9919cc1649d12f6e3f6394d24bd3a6c683c147610b4684b16f5f89d2da0b661d29a8e3ca8bd9dd6a13d983d73d3665b20f51848260f0a12cdf61b58766b14bc
|
7
|
+
data.tar.gz: b9f26b8ec2aed38f24062f2d2eab608005c94cdf9004a74396ab14a1c4e03ba0ebfbe56825f113e9343ff96a6fc98a0351f2449ba986ecbf143c32c546223ea9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## [0.0.13] - 2025-01-03
|
2
|
+
|
3
|
+
- Bump to Ruby 3.4.1
|
4
|
+
- Fix various bugs resulting in incorrect license information
|
5
|
+
|
6
|
+
## [0.0.12] - 2024-12-16
|
7
|
+
|
8
|
+
- Fix bug preventing setting origin remote and pushing initial comit to github
|
9
|
+
|
1
10
|
## [0.0.11] - 2024-11-30
|
2
11
|
|
3
12
|
- Fix initial module naming bug
|
@@ -49,7 +49,7 @@ module Foobara
|
|
49
49
|
|
50
50
|
case licenses.size
|
51
51
|
when 1
|
52
|
-
"This project is
|
52
|
+
"This project is licensed under the #{licenses.first} license."
|
53
53
|
when 2
|
54
54
|
"This project is dual licensed under your choice of the " \
|
55
55
|
"#{licenses.first} license and the #{licenses.last} license."
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require_relative "project_generator"
|
2
|
+
|
3
|
+
module Foobara
|
4
|
+
module Generators
|
5
|
+
module EmptyRubyProjectGenerator
|
6
|
+
module Generators
|
7
|
+
class ReadmeGenerator < ProjectGenerator
|
8
|
+
def template_path
|
9
|
+
"README.md.erb"
|
10
|
+
end
|
11
|
+
|
12
|
+
def license_generator
|
13
|
+
return @license_generator if defined?(@license_generator)
|
14
|
+
|
15
|
+
@license_generator = if license
|
16
|
+
LicenseGenerator.new(relevant_manifest)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def dependencies
|
21
|
+
[*license_generator]
|
22
|
+
end
|
23
|
+
|
24
|
+
def license_message
|
25
|
+
if license_generator
|
26
|
+
license_generator.license_message
|
27
|
+
else
|
28
|
+
"Currently unlicensed."
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -161,8 +161,6 @@ module Foobara
|
|
161
161
|
# :nocov:
|
162
162
|
end
|
163
163
|
|
164
|
-
attr_accessor :origin_set, :pushed
|
165
|
-
|
166
164
|
def github_create_repo
|
167
165
|
puts "pushing to github..."
|
168
166
|
|
@@ -170,20 +168,13 @@ module Foobara
|
|
170
168
|
|
171
169
|
Open3.popen3(cmd) do |_stdin, _stdout, _stderr, wait_thr|
|
172
170
|
exit_status = wait_thr.value
|
173
|
-
|
174
|
-
# :nocov:
|
175
|
-
self.origin_set = true
|
176
|
-
self.pushed = true
|
177
|
-
# :nocov:
|
178
|
-
else
|
171
|
+
unless exit_status.success?
|
179
172
|
warn "WARNING: could not #{cmd}"
|
180
173
|
end
|
181
174
|
end
|
182
175
|
end
|
183
176
|
|
184
177
|
def git_add_remote_origin
|
185
|
-
return if origin_set
|
186
|
-
|
187
178
|
unless system("git remote add origin git@github.com:#{project_config.org_slash_project_kebab}.git")
|
188
179
|
# :nocov:
|
189
180
|
raise "could not git remote add origin git@github.com:#{project_config.org_slash_project_kebab}.git"
|
@@ -200,8 +191,6 @@ module Foobara
|
|
200
191
|
end
|
201
192
|
|
202
193
|
def push_to_github
|
203
|
-
return if pushed
|
204
|
-
|
205
194
|
Open3.popen3("git push -u origin main") do |_stdin, _stdout, stderr, wait_thr|
|
206
195
|
exit_status = wait_thr.value
|
207
196
|
unless exit_status.success?
|
data/templates/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.4.1
|
metadata
CHANGED
@@ -1,14 +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.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-04 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: extract-repo
|
@@ -52,7 +51,6 @@ dependencies:
|
|
52
51
|
- - ">="
|
53
52
|
- !ruby/object:Gem::Version
|
54
53
|
version: '0'
|
55
|
-
description:
|
56
54
|
email:
|
57
55
|
- azimux@gmail.com
|
58
56
|
executables: []
|
@@ -80,6 +78,7 @@ files:
|
|
80
78
|
- src/generators/mit_license_generator.rb
|
81
79
|
- src/generators/mpl2_license_generator.rb
|
82
80
|
- src/generators/project_generator.rb
|
81
|
+
- src/generators/readme_generator.rb
|
83
82
|
- src/generators/version_generator.rb
|
84
83
|
- src/manifests/project_config.rb
|
85
84
|
- src/types/extract_inputs.rb
|
@@ -97,7 +96,7 @@ files:
|
|
97
96
|
- templates/LICENSE-MIT.txt.erb
|
98
97
|
- templates/LICENSE-MPL-2.0.txt.erb
|
99
98
|
- templates/LICENSE.txt.erb
|
100
|
-
- templates/README.md
|
99
|
+
- templates/README.md.erb
|
101
100
|
- templates/Rakefile
|
102
101
|
- templates/bin/console.erb
|
103
102
|
- templates/bin/setup
|
@@ -124,7 +123,6 @@ metadata:
|
|
124
123
|
source_code_uri: https://github.com/foobara/empty-ruby-project-generator
|
125
124
|
changelog_uri: https://github.com/foobara/empty-ruby-project-generator/blob/main/CHANGELOG.md
|
126
125
|
rubygems_mfa_required: 'true'
|
127
|
-
post_install_message:
|
128
126
|
rdoc_options: []
|
129
127
|
require_paths:
|
130
128
|
- lib
|
@@ -132,15 +130,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
130
|
requirements:
|
133
131
|
- - ">="
|
134
132
|
- !ruby/object:Gem::Version
|
135
|
-
version: 3.
|
133
|
+
version: 3.4.0
|
136
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
135
|
requirements:
|
138
136
|
- - ">="
|
139
137
|
- !ruby/object:Gem::Version
|
140
138
|
version: '0'
|
141
139
|
requirements: []
|
142
|
-
rubygems_version: 3.
|
143
|
-
signing_key:
|
140
|
+
rubygems_version: 3.6.2
|
144
141
|
specification_version: 4
|
145
142
|
summary: Generates empty ruby project boilerplate code from a template
|
146
143
|
test_files: []
|