learn_create 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/learn_create.rb +9 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f494d104f9c0a466494f8b83a347619091fff92276f5fbd907a999048c371d2e
4
- data.tar.gz: 5ed30c4b071718e12ad1950dfb7183761c01e225b7b5edc5ddc87aeb502c1feb
3
+ metadata.gz: e0632a9b6828b2a51708d93d57a9003c1f54681efcfd85257862e576da10653a
4
+ data.tar.gz: 7275c70220e8e6d76944a5055315e19fe7f35ffd18b4b64ddc55a7c56b2649aa
5
5
  SHA512:
6
- metadata.gz: b607003eff1f5a48b1766fbe1989f199327efeafd2ac2c73fcc9205fa7fb790818f289ca675bb171d5d31c9f8167d2b28ea5832f14a537223ba8e782bb6053bc
7
- data.tar.gz: 8ee51799c4e69f9da1d5962574be5579fe5e71f4d9a5af6ed59dc67826e9cefc23d2c58ff26486437a37fbef5989649e6ee0469506a7168c0c3c924f9af32083
6
+ metadata.gz: 792350be3024c1fd3287e997aca6d60b447ecfd1bccfbe44a720b92b16239d5c28a76a083f69014b9d56824a5e4c1bb6b71f59f3ee482913898c3530c25f05dc
7
+ data.tar.gz: 95bdcad9486e72f1619824d68b8362eb84d3bb4a8f0eb75113b00ef577123c7337700540ec12fff71f7f27d1fd0c7b44800a4f36944a17fe55811bff3069ce68
data/lib/learn_create.rb CHANGED
@@ -78,14 +78,17 @@ class LearnCreate
78
78
  end
79
79
 
80
80
  def create_local_lesson(type = 'readme', language = nil)
81
- puts "Creating #{language + ' ' || ''}#{type}..."
81
+ if !language
82
+ puts "Creating #{type}..."
83
+ template_folder = "/templates/#{type}_template"
84
+ else
85
+ puts "Creating #{language} #{type}..."
86
+ template_folder = "/templates/#{language}_#{type}_template"
87
+ end
88
+
82
89
  gem_template_location = File.dirname(__FILE__)
83
- template_folder = if !language
84
- "/templates/#{type}_template"
85
- else
86
- "/templates/#{language}_#{type}_template"
87
- end
88
90
  template_path = File.expand_path(gem_template_location) + template_folder
91
+
89
92
  copy_template(template_path)
90
93
  end
91
94
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: learn_create
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - flatironschool