bundlegem 0.0.13 → 0.0.14
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/.gitignore +1 -0
- data/bundlegem.gemspec +3 -3
- data/changelog +4 -0
- data/lib/bundlegem/cli/gem.rb +3 -3
- data/lib/bundlegem/configurator.rb +1 -1
- data/lib/bundlegem/template_manager.rb +2 -2
- data/lib/bundlegem/version.rb +1 -1
- data/lib/bundlegem.rb +1 -1
- data/spec/bundlegem_spec.rb +4 -4
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d25b0d1c8d8979da5e2f8354d8ee1ec927c103202a379ef5c02b221ab7f1f8aa
|
4
|
+
data.tar.gz: 180774ef2a0cebab93940a880921ab59279d1d831f7d31c6daf9c0a8c4a4d4c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d8336a33e61ce573341936dbd8bd89586fd6302299c4d9111d0b50810ecdea01e668a6317344e0202c99fc423cc541db43f96afe5c8fbc351862ea7dbe9b2b1
|
7
|
+
data.tar.gz: 2ef917281a2f763ef4f78976740e10402591f64c956e4d6c7d921dc05497094cb4b3a923f6cc850ea9b12cbba041dc194a30b61c3929b2e98f9c1f6519871782
|
data/.gitignore
CHANGED
data/bundlegem.gemspec
CHANGED
@@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency "thor", "0.19.1"
|
22
|
-
spec.add_dependency "bundler"
|
22
|
+
spec.add_dependency "bundler", "~> 2.5"
|
23
23
|
|
24
|
-
#spec.add_development_dependency "bundler"
|
25
|
-
spec.add_development_dependency "rake", "~>
|
24
|
+
#spec.add_development_dependency "bundler"#, "~> 1.8"
|
25
|
+
spec.add_development_dependency "rake", "~> 13.2"
|
26
26
|
spec.add_development_dependency "rspec"
|
27
27
|
spec.add_development_dependency "pry"
|
28
28
|
end
|
data/changelog
CHANGED
@@ -9,7 +9,11 @@
|
|
9
9
|
Completed on Master:
|
10
10
|
- Nothing yet
|
11
11
|
|
12
|
+
** 0.0.14 **
|
13
|
+
- Bugfix: The project didn't work with ruby 3 due to use of the method `exists?`???
|
12
14
|
|
15
|
+
** 0.0.13 **
|
16
|
+
- Adds new built-in java template
|
13
17
|
|
14
18
|
** 0.0.12 **
|
15
19
|
- Feature: File mode (permissions) is now cloned from source template file's permissions to dest
|
data/lib/bundlegem/cli/gem.rb
CHANGED
@@ -15,7 +15,7 @@ module Bundlegem
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def run
|
18
|
-
raise_project_with_that_name_already_exists! if File.
|
18
|
+
raise_project_with_that_name_already_exists! if File.exist?(target)
|
19
19
|
|
20
20
|
underscored_name = name.tr('-', '_')
|
21
21
|
namespaced_path = name.tr('-', '/')
|
@@ -151,7 +151,7 @@ module Bundlegem
|
|
151
151
|
def match_template_src
|
152
152
|
template_src = TemplateManager.get_template_src(options)
|
153
153
|
|
154
|
-
if File.
|
154
|
+
if File.exist?(template_src)
|
155
155
|
return template_src # 'newgem' refers to the built in template that comes with the gem
|
156
156
|
else
|
157
157
|
raise_template_not_found! # else message the user that the template could not be found
|
@@ -212,7 +212,7 @@ module Bundlegem
|
|
212
212
|
context = instance_eval("binding")
|
213
213
|
|
214
214
|
make_file(destination, config) do
|
215
|
-
content = ERB.new(::File.binread(source),
|
215
|
+
content = ERB.new(::File.binread(source), trim_mode: "-", eoutvar: "@output_buffer").result(context)
|
216
216
|
content = block.call(content) if block
|
217
217
|
content
|
218
218
|
end
|
@@ -67,7 +67,7 @@ module Bundlegem
|
|
67
67
|
|
68
68
|
def create_config_file_if_needed!
|
69
69
|
FileUtils.mkdir_p @user_defined_templates_path
|
70
|
-
FileUtils.cp("#{SOURCE_ROOT}/config/config", @config_file) unless File.
|
70
|
+
FileUtils.cp("#{SOURCE_ROOT}/config/config", @config_file) unless File.exist? @config_file
|
71
71
|
end
|
72
72
|
|
73
73
|
def create_new_template(template_name)
|
@@ -43,7 +43,7 @@ module Bundlegem
|
|
43
43
|
#
|
44
44
|
def find_in_source_paths(target)
|
45
45
|
src_in_source_path = "#{File.dirname(__FILE__)}/templates/#{target}"
|
46
|
-
return src_in_source_path if File.
|
46
|
+
return src_in_source_path if File.exist?(src_in_source_path)
|
47
47
|
target # failed, hopefully full path to a user specified gem template file
|
48
48
|
end
|
49
49
|
|
@@ -51,7 +51,7 @@ module Bundlegem
|
|
51
51
|
# within the gem's source
|
52
52
|
def file_in_source?(target)
|
53
53
|
src_in_source_path = "#{File.dirname(__FILE__)}/templates/#{target}"
|
54
|
-
File.
|
54
|
+
File.exist?(src_in_source_path)
|
55
55
|
end
|
56
56
|
|
57
57
|
end
|
data/lib/bundlegem/version.rb
CHANGED
data/lib/bundlegem.rb
CHANGED
@@ -42,7 +42,7 @@ module Bundlegem
|
|
42
42
|
config_file_data['best_templates'].split.each do |url|
|
43
43
|
uri = URI.parse(url)
|
44
44
|
template_folder_name = File.basename(uri.path).sub(/\.git$/, "")
|
45
|
-
if !File.
|
45
|
+
if !File.exist?("#{ENV['HOME']}/.bundlegem/templates/#{template_folder_name}")
|
46
46
|
cmd = "cd #{ENV['HOME']}/.bundlegem/templates && git clone #{url}"
|
47
47
|
cmd += " 2> /dev/null" if $test_env
|
48
48
|
`#{cmd}`
|
data/spec/bundlegem_spec.rb
CHANGED
@@ -21,7 +21,7 @@ describe Bundlegem do
|
|
21
21
|
list_output = Bundlegem.list
|
22
22
|
|
23
23
|
expect(list_output).to eq " PREDEFINED:\n * newgem (default)\n c_extension_gem\n cli_gem\n\n MISC:\n empty_template\n\n"
|
24
|
-
expect(File.
|
24
|
+
expect(File.exist?("#{ENV['HOME']}/.bundlegem")).to be true
|
25
25
|
end
|
26
26
|
|
27
27
|
it "lists with good categories" do
|
@@ -38,7 +38,7 @@ describe Bundlegem do
|
|
38
38
|
gem_name = "tmp_gem"
|
39
39
|
|
40
40
|
capture_stdout { Bundlegem.gem(options, gem_name) }
|
41
|
-
expect(File.
|
41
|
+
expect(File.exist?("#{@dst_dir}/#{gem_name}/README.md")).to be_truthy
|
42
42
|
end
|
43
43
|
|
44
44
|
it "can generate the c_ext gem fine" do
|
@@ -46,7 +46,7 @@ describe Bundlegem do
|
|
46
46
|
gem_name = "tmp_gem"
|
47
47
|
|
48
48
|
capture_stdout { Bundlegem.gem(options, gem_name) }
|
49
|
-
expect(File.
|
49
|
+
expect(File.exist?("#{@dst_dir}/#{gem_name}/ext/tmp_gem/#{gem_name}.c")).to be_truthy
|
50
50
|
end
|
51
51
|
|
52
52
|
|
@@ -62,7 +62,7 @@ describe Bundlegem do
|
|
62
62
|
|
63
63
|
it "can download best templates from the web" do
|
64
64
|
capture_stdout { Bundlegem.install_best_templates }
|
65
|
-
expect(File.
|
65
|
+
expect(File.exist?("#{ENV['HOME']}/.bundlegem/templates/arduino/README.md")).to be_truthy
|
66
66
|
end
|
67
67
|
|
68
68
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundlegem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TheNotary
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -28,30 +28,30 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.5'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.2'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '13.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
- !ruby/object:Gem::Version
|
187
187
|
version: '0'
|
188
188
|
requirements: []
|
189
|
-
rubygems_version: 3.
|
189
|
+
rubygems_version: 3.5.7
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: this gem makes more gems!
|