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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01cac2cb35073ac3d2fbcc5a3348f02d16c48c9e00fdbffe45f84a6eb751cdf5
4
- data.tar.gz: aa46c0b2f3449e106a906b141edc6f899f03944ae2472274201a9c158e9dc7d4
3
+ metadata.gz: 9d3396aa291659923937258c81aefb04741601ccc6dce52f5863617fa6309dfb
4
+ data.tar.gz: 136b3cc175a67d535bf51a2c501e216f30e55aca1b6cbd4ea19a6917a7e7f123
5
5
  SHA512:
6
- metadata.gz: 1f75e66cfb9efc80e68853c85a25f3d98550094c84ef151b62d9d8fc0fd5c140d04ea45b5885e7f33fbca40a366b28312d8fb8866f3df7012b96057403738aef
7
- data.tar.gz: dc4eb16a79fbc0bb119f53a5c04e5447297000891108c3c234dfdd88c332dd189d3e10d3b1f64e8df085952f0977512faf9a6b8b6cc13b3e84329ff8a59bce36
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
@@ -1,3 +1,3 @@
1
1
  module Bundlegem
2
- VERSION = "1.2.0-rc.1"
2
+ VERSION = "1.2.0-rc.2"
3
3
  end
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.1
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.1
120
- documentation_uri: https://api.rubyonrails.org/v1.2.0-rc.1/
121
- source_code_uri: https://github.com/TheNotary/bundlegem/tree/v1.2.0-rc.1
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