bundlegem 1.2.0.pre.rc.1 → 1.2.0.pre.rc.2
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 +1 -0
- data/lib/bundlegem/cli/dir_to_template.rb +10 -1
- data/lib/bundlegem/version.rb +1 -1
- data/lib/bundlegem.rb +14 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d3396aa291659923937258c81aefb04741601ccc6dce52f5863617fa6309dfb
|
4
|
+
data.tar.gz: 136b3cc175a67d535bf51a2c501e216f30e55aca1b6cbd4ea19a6917a7e7f123
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38537a96e14f9ad0793d5758011cf41666667ee7674b0ab8f4cff559a9405a4959fcf9c44effa1c3473d318f86c53a18cc20b355dfdcc3e674255aa0fbfebec4
|
7
|
+
data.tar.gz: b662bfcd7fb5a56e75e7e7834da3b0f91accdcd734e5b2f1ad689ea3b35140e5beadce725089b6460abb2b17b75c92933fd53e1af477f85e63835e6db9a3951d
|
data/changelog
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
- TBD
|
3
3
|
|
4
4
|
** 0.2.0 **
|
5
|
+
- Feature: improves stdout feedback to enhance UX
|
5
6
|
- Feature: hides stack trace when user is simply missing a bundlegem.yml file
|
6
7
|
- Feature: allows interpolation of template variables within bootstrap_command
|
7
8
|
- Feature: adds a 'config[:title]' variable
|
@@ -5,11 +5,20 @@ module Bundlegem::CLI
|
|
5
5
|
module DirToTemplate
|
6
6
|
class << self
|
7
7
|
|
8
|
+
# returns the list of templates currently available as a well formatted string
|
8
9
|
def go
|
9
10
|
validate_working_directory!
|
10
11
|
file_enumerator = Find.find('.')
|
11
12
|
|
12
|
-
Bundlegem::Core::DirToTemplate.🧙🪄! file_enumerator
|
13
|
+
output = Bundlegem::Core::DirToTemplate.🧙🪄! file_enumerator
|
14
|
+
|
15
|
+
if output.empty?
|
16
|
+
output = "You have no templates. You can install the public example templates with\n"
|
17
|
+
output += "the below command\n\n"
|
18
|
+
output += "bundlegem --install-public-templates"
|
19
|
+
end
|
20
|
+
|
21
|
+
output
|
13
22
|
end
|
14
23
|
|
15
24
|
private
|
data/lib/bundlegem/version.rb
CHANGED
data/lib/bundlegem.rb
CHANGED
@@ -29,6 +29,7 @@ module Bundlegem
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def install_public_templates
|
32
|
+
validate_git_is_installed!
|
32
33
|
configurator = Configurator.new
|
33
34
|
config_file_data = configurator.config_file_data
|
34
35
|
puts "Downloading templates from the following locations: \n #{config_file_data['public_templates'].split(" ").join("\n ")}"
|
@@ -45,6 +46,19 @@ module Bundlegem
|
|
45
46
|
end
|
46
47
|
end
|
47
48
|
|
49
|
+
def validate_git_is_installed!
|
50
|
+
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
|
51
|
+
ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
|
52
|
+
exts.each do |ext|
|
53
|
+
exe = File.join(path, "git#{ext}")
|
54
|
+
return if File.executable?(exe) && !File.directory?(exe)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
puts "Error: `git` command not found. Please install Git and ensure it's in your PATH."
|
59
|
+
exit 1
|
60
|
+
end
|
61
|
+
|
48
62
|
def dir_to_template
|
49
63
|
puts CLI::DirToTemplate.go
|
50
64
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundlegem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.0.pre.rc.
|
4
|
+
version: 1.2.0.pre.rc.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TheNotary
|
@@ -116,9 +116,9 @@ licenses:
|
|
116
116
|
- MIT
|
117
117
|
metadata:
|
118
118
|
bug_tracker_uri: https://github.com/TheNotary/bundlegem/issues
|
119
|
-
changelog_uri: https://github.com/TheNotary/bundlegem/releases/tag/v1.2.0-rc.
|
120
|
-
documentation_uri: https://api.rubyonrails.org/v1.2.0-rc.
|
121
|
-
source_code_uri: https://github.com/TheNotary/bundlegem/tree/v1.2.0-rc.
|
119
|
+
changelog_uri: https://github.com/TheNotary/bundlegem/releases/tag/v1.2.0-rc.2
|
120
|
+
documentation_uri: https://api.rubyonrails.org/v1.2.0-rc.2/
|
121
|
+
source_code_uri: https://github.com/TheNotary/bundlegem/tree/v1.2.0-rc.2
|
122
122
|
rdoc_options: []
|
123
123
|
require_paths:
|
124
124
|
- lib
|