bundlegem 1.2.0.pre.rc.2 → 1.2.0

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: 9d3396aa291659923937258c81aefb04741601ccc6dce52f5863617fa6309dfb
4
- data.tar.gz: 136b3cc175a67d535bf51a2c501e216f30e55aca1b6cbd4ea19a6917a7e7f123
3
+ metadata.gz: 4d9582c9d97b6654a46d274e6d463dd81b9a6b61418b0930f01ac4174ec87848
4
+ data.tar.gz: f1f2f668bed8f34a4e1fcb019ad928a6c6b80dee1b7f03c1591f4c2213268efb
5
5
  SHA512:
6
- metadata.gz: 38537a96e14f9ad0793d5758011cf41666667ee7674b0ab8f4cff559a9405a4959fcf9c44effa1c3473d318f86c53a18cc20b355dfdcc3e674255aa0fbfebec4
7
- data.tar.gz: b662bfcd7fb5a56e75e7e7834da3b0f91accdcd734e5b2f1ad689ea3b35140e5beadce725089b6460abb2b17b75c92933fd53e1af477f85e63835e6db9a3951d
6
+ metadata.gz: 25afe26124dd631077f2d897bf7a537df2a337297ae5ac3efcf37cbe3c54783762e4d301262a4d4e5a9303e53440410b2bf0a6a8046d467947fea10331cd17b1
7
+ data.tar.gz: c62f5d22ea1fb68338339d131c9609ba400ca65df3a239f9fc7af21f8c639110333789c632693bcc99952e06fc03a68e9000c175b09bc6ed5d4edaf1f18105b4
data/README.md CHANGED
@@ -51,6 +51,14 @@ Configuration is optional and comes from your gitconfig file. At the user level
51
51
  repo-domain = github.com
52
52
  ```
53
53
 
54
+ Alternatively, run these commands:
55
+
56
+ ```
57
+ git config --global user.email your-public-gh@email.com
58
+ git config --global user.name YOUR_GH_NAME
59
+ git config --global user.repo-domain github.com
60
+ ```
61
+
54
62
  #### Create Your Own Template
55
63
 
56
64
  You can create a new template for a project class you expect to use more than once:
@@ -5,20 +5,11 @@ 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
9
8
  def go
10
9
  validate_working_directory!
11
10
  file_enumerator = Find.find('.')
12
11
 
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
12
+ Bundlegem::Core::DirToTemplate.🧙🪄! file_enumerator
22
13
  end
23
14
 
24
15
  private
@@ -40,7 +40,10 @@ module Bundlegem::CLI
40
40
  end
41
41
 
42
42
  if git_user_name.empty?
43
- raise "git config user.name didn't return a value. Please double check your username configurations in ~/.gitconfig"
43
+ puts "Error: git config user.name didn't return a value. You'll probably want to make sure that's configured with your github username:"
44
+ puts ""
45
+ puts "git config --global user.name YOUR_GH_NAME"
46
+ exit 1
44
47
  else
45
48
  # git_repo_path = provider.com/user/name
46
49
  git_repo_path = "#{git_repo_domain}/#{git_user_name}/#{name}".downcase # downcasing for languages like go that are creative
@@ -20,7 +20,7 @@ module Bundlegem::Core::DirToTemplate
20
20
  repopulate_gitignore(path, new_path) unless dry_run
21
21
 
22
22
  files_changed << "Renamed: #{path} -> #{new_path}"
23
- end
23
+ end
24
24
  files_changed
25
25
  end
26
26
 
@@ -1,3 +1,3 @@
1
1
  module Bundlegem
2
- VERSION = "1.2.0-rc.2"
2
+ VERSION = "1.2.0"
3
3
  end
data/lib/bundlegem.rb CHANGED
@@ -23,9 +23,16 @@ module Bundlegem
23
23
  available_templates = configurator.collect_user_defined_templates
24
24
 
25
25
  available_templates = group_hashes_by_key(available_templates)
26
- output_string = convert_grouped_hashes_to_output(available_templates)
26
+ output = convert_grouped_hashes_to_output(available_templates)
27
27
 
28
- mark_default_template(output_string, configurator.default_template)
28
+ if output.empty?
29
+ empty_output_msg = "You have no templates. You can install the public example templates with\n"
30
+ empty_output_msg += "the below command:\n\n"
31
+ empty_output_msg += "bundlegem --install-public-templates"
32
+ return empty_output_msg
33
+ end
34
+
35
+ mark_default_template(output, configurator.default_template)
29
36
  end
30
37
 
31
38
  def install_public_templates
@@ -16,6 +16,13 @@ describe Bundlegem do
16
16
 
17
17
  # List
18
18
 
19
+ it 'gives the user a helpful output when there are no templates installed' do
20
+ list_output = Bundlegem.list
21
+
22
+ expect(list_output).to start_with "You have no templates."
23
+ expect(File).to exist("#{ENV['HOME']}/.bundlegem")
24
+ end
25
+
19
26
  it 'creates a config file if needed and lists properly' do
20
27
  create_user_defined_template
21
28
 
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.2
4
+ version: 1.2.0
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.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
119
+ changelog_uri: https://github.com/TheNotary/bundlegem/releases/tag/v1.2.0
120
+ documentation_uri: https://api.rubyonrails.org/v1.2.0/
121
+ source_code_uri: https://github.com/TheNotary/bundlegem/tree/v1.2.0
122
122
  rdoc_options: []
123
123
  require_paths:
124
124
  - lib