bundlegem 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbdb68afebfbeb334228842740af8526fa5504cc
4
- data.tar.gz: 42d17ac31d85fa50bdcfef6c5a1bbef3b864546a
3
+ metadata.gz: 2639d9ec157c0b9cdb0e87753217e073bb412274
4
+ data.tar.gz: 368d168d1a5f4673e551ff1d54558db9dea0cb58
5
5
  SHA512:
6
- metadata.gz: 66bc0d28dfe1a4ec6515e2bfbf9e9a7c82f273b3e8d6fbbfa73f35adb083c6b26f974b6d603b9754d8bbca55e3bfe7bdd8f47e5dd13fcf7945ea66d5c88c202a
7
- data.tar.gz: 570a2bf84fac4530e10884ecef11008d6555e8a7b3736f6128c37d90d28144380254488c9741168209a97500d5c0b15381c6358853e06b0c1168b0660c8b3f10
6
+ metadata.gz: e916e6dea777b7b9624d4608d8726cad09a3342f5e3158249d8863ed428014506048e50ef971e3dd02d4e4c364b17a5e227d66d47aced1ce9d7c99be355b1d15
7
+ data.tar.gz: 3efff9f90496b8e8c6c223afe504be88a322ae81802f657af9e76c0db0e1966381195c044d7f5e654ab9904bf56d5c21ad06ec828b490714a1d94ad30a6ce9a0
data/changelog CHANGED
@@ -4,12 +4,19 @@
4
4
  * CLI with web client
5
5
  - Restore the original UI that was in bundler
6
6
  - Ability to load templates from github
7
+ - Track a list of additional web templates in this repo
8
+ - Allow for it to be listed
9
+ - Hint the user to cd into ~/.bundlegem/gem_templates and clone any they choose
7
10
  - CMD: --newtemplate to start new template
8
11
  - CMD: --templateize-current-directory to make the current directory into a
9
12
  new template
10
13
  - Behavior: gems in the ~/.bundlegem/gem_templates folder take precidence over
11
- built in gems?
14
+ built in gems? ...add prompt
15
+
16
+
17
+ ** 0.0.4 **
12
18
  - Tell the user what files are being created
19
+ - Created config['git_repo_url'] variable to be used in templates
13
20
 
14
21
 
15
22
  ** 0.0.3 **
@@ -38,6 +38,7 @@ module Bundlegem
38
38
  :constant_array => constant_array,
39
39
  :author => git_user_name.empty? ? "TODO: Write your name" : git_user_name,
40
40
  :email => git_user_email.empty? ? "TODO: Write your email address" : git_user_email,
41
+ :git_repo_url => git_user_name.empty? ? "TODO: set your git username so link to repo is automatic" : "https://github.com/#{git_user_name}/#{underscored_name}",
41
42
  :template => options[:template],
42
43
  :test => options[:test],
43
44
  :ext => options[:ext],
@@ -108,6 +109,8 @@ module Bundlegem
108
109
  )
109
110
  end
110
111
 
112
+ puts "Creating new project folder\n\n"
113
+
111
114
  template_src = match_template_src
112
115
  template_directories = dynamically_generate_template_directories
113
116
  templates = dynamically_generate_templates || templates
@@ -126,6 +129,8 @@ module Bundlegem
126
129
  # Open gemspec in editor
127
130
  thor.run("#{options["edit"]} \"#{target.join("#{name}.gemspec")}\"")
128
131
  end
132
+
133
+ puts "\nComplete."
129
134
  end
130
135
 
131
136
  private
@@ -162,7 +167,9 @@ module Bundlegem
162
167
 
163
168
  def create_template_directories(template_directories, target)
164
169
  template_directories.each do |k,v|
165
- FileUtils.mkdir_p("#{target}/#{v}")
170
+ d = "#{target}/#{v}"
171
+ puts " mkdir #{d} ..."
172
+ FileUtils.mkdir_p(d)
166
173
  end
167
174
  end
168
175
 
@@ -172,14 +179,14 @@ module Bundlegem
172
179
  if template_exists_within_repo?(template_src) or File.exists?(template_src)
173
180
  return template_src # 'newgem' refers to the built in template that comes with the gem
174
181
  else
175
- raise_templet_not_found! # else message the user that the template could not be found
182
+ raise_template_not_found! # else message the user that the template could not be found
176
183
  end
177
184
  end
178
185
 
179
186
  def get_template_src
180
187
  template_name = options["template"].nil? ? "newgem" : options["template"]
181
188
 
182
- if template_exists_within_repo?(template_name) # if template_exists_within_repo?(template_name)
189
+ if template_exists_within_repo?(template_name)
183
190
  gem_template_location = get_internal_template_location
184
191
  else
185
192
  gem_template_location = File.expand_path("~/.bundlegem/gem_templates")
@@ -313,6 +320,7 @@ module Bundlegem
313
320
  #
314
321
  def make_file(destination, config, &block)
315
322
  FileUtils.mkdir_p(File.dirname(destination))
323
+ puts " Writing #{destination} ..."
316
324
  File.open(destination, "wb") { |f| f.write block.call }
317
325
  end
318
326
 
@@ -334,7 +342,7 @@ module Bundlegem
334
342
  exit
335
343
  end
336
344
 
337
- def raise_templet_not_found!
345
+ def raise_template_not_found!
338
346
  err_missing_template = "Could not find template folder '#{options["template"]}' in `~/.bundle/gem_templates/`. Please check to make sure your desired template exists."
339
347
  puts err_missing_template
340
348
  Bundler.ui.error err_missing_template
@@ -30,7 +30,6 @@ module Bundlegem
30
30
  template_dirs = Dir.entries(user_definition_directory).select do |entry|
31
31
  File.directory?(File.join(user_definition_directory, entry)) and !(entry =='.' || entry == '..')
32
32
  end
33
- binding.pry
34
33
 
35
34
  pairs = []
36
35
  template_dirs.each do |dir|
@@ -1,3 +1,3 @@
1
1
  module Bundlegem
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -24,11 +24,12 @@ describe Bundlegem do
24
24
  end
25
25
 
26
26
  it "lists with good categories" do
27
- create_user_defined_template("ARDUINO")
27
+ category = "ARDUINO"
28
+ create_user_defined_template(category)
28
29
 
29
30
  list_output = Bundlegem.list
30
31
 
31
- binding.pry
32
+ expect(list_output.include?(category)).to be true
32
33
  end
33
34
 
34
35
  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: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - TheNotary