learn-generate 1.0.13 → 1.0.14

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: 59702b4b218cd2baa8de818eda14862f4f11b563
4
- data.tar.gz: e1b2a467637a515285475a1a51dec37e5445aea2
3
+ metadata.gz: 18d3800acece40e26c13c12feba044a2c269e29b
4
+ data.tar.gz: ac5de84f2834d15f9c99ce4b3b2487cbc94e9314
5
5
  SHA512:
6
- metadata.gz: ddeec14af60777b4f295d4b710ff00a4a3d6638c27041d3fa758bb2e98cf292cd8d763f2a0f07d1dcca1b9bdba1b18659d1558e04b1ae2ce379ca589470f17ac
7
- data.tar.gz: dd0c6f937318e6fe53d9dd1742e82506107327a9b9f987223109ad6d586030ea8f87edfeadae449f054f20856f8a6baa8308ebd0683c1575753f4dc14e14b160
6
+ metadata.gz: 89d92ae038d63381653e2a2f8acdd1369d7cd57e2287385b1fda38140d904310004008342fcfb685f2316d22c03f2b1fd17af4b51356ab5554016696eda3e5ad
7
+ data.tar.gz: 0f846bac2d80cd4ab04b6eff76294a308a4bdbabcf71cf47b52613449fe6a0235fcaa38ae04731fdf3f70b996576d3b774c3bda991053280c103de45e952d33b
@@ -3,8 +3,7 @@ module LearnGenerate
3
3
  module DotLearnHelper
4
4
  def build_dot_learn
5
5
  File.open('.learn', 'a') do |f|
6
- f << "languages:
7
- tags:"
6
+ f.write("tags:\n - tag1\nlanguages:\n - language1\nresources: 0")
8
7
  end
9
8
  end
10
9
  end
@@ -24,11 +24,11 @@ module LearnGenerate
24
24
  copy
25
25
  name_lab
26
26
  FileUtils.cd("#{lab_name}") do
27
- touch_spec unless ['js', 'sinatra-mvc', 'front-end', 'python'].include?(template_type)
27
+ touch_spec unless ['js', 'sinatra-mvc', 'front-end', 'python', 'readme'].include?(template_type)
28
28
  touch_dot_learn
29
29
  build_dot_learn
30
30
  git_init
31
- bundle_init unless ['js', 'front-end', 'python'].include?(template_type)
31
+ bundle_init unless ['js', 'front-end', 'python', 'readme'].include?(template_type)
32
32
  edit_readme
33
33
  fundamental_helper if template_type == "fundamental-ruby"
34
34
  command_line_helper if template_type == "command-line"
@@ -68,8 +68,17 @@ module LearnGenerate
68
68
  end
69
69
 
70
70
  def edit_readme
71
- File.open("README.md", 'a') do |f|
72
- f << "\n# #{formatted_name}"
71
+ if template_type == 'readme'
72
+ readme_contents = File.read('README.md')
73
+ readme_contents.sub!('## Objectives', "# #{formatted_name}\n\n## Objectives")
74
+
75
+ File.open('README.md', 'w+') do |f|
76
+ f.write(readme_contents)
77
+ end
78
+ else
79
+ File.open('README.md', 'a') do |f|
80
+ f << "\n# #{formatted_name}"
81
+ end
73
82
  end
74
83
  end
75
84
 
@@ -1,3 +1,3 @@
1
1
  module LearnGenerate
2
- VERSION = '1.0.13'
2
+ VERSION = '1.0.14'
3
3
  end
@@ -0,0 +1,23 @@
1
+ ---
2
+ tags:
3
+ level:
4
+ languages:
5
+ resources:
6
+ ---
7
+
8
+ ## Objectives
9
+
10
+ 1. Objective 1
11
+ 2. Objective 2
12
+
13
+ ## Instructions
14
+
15
+ Create make the tests pass Heroku lab. API Nokogiri guest speaker belongs_to RESTful binder.ply. Url Rails slack it to me. Asset pipeline Feelings Friday puts "woof" API open source.
16
+
17
+ Destroy now we can teach dogs to do anything link drop tables lab The Gucci bundle install. Associations def iterate infobesity Twitter. Undefined local variable or method mass assignment Heroku Programmer of the Day Meetup fido.bark. Internet create. Ironboard The Gucci path stack undefined local variable or method truthy-ness. Sqlite3 scooter blog posts DRY The Gucci cat. Truthy-ness bundle.
18
+
19
+ ### Part 1: Do Some Stuff
20
+
21
+ ## Resources
22
+
23
+ * [Stack Exchange](http://www.stackexchange.com) - [Some Question on Stack Exchange](http://www.stackexchange.com/questions/123)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: learn-generate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.13
4
+ version: 1.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flatiron School
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-02 00:00:00.000000000 Z
11
+ date: 2015-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -139,6 +139,7 @@ files:
139
139
  - lib/templates/rake/lib/file.rb
140
140
  - lib/templates/rake/spec/rakefile_spec.rb
141
141
  - lib/templates/rake/spec/spec_helper.rb
142
+ - lib/templates/readme/README.md
142
143
  - lib/templates/sinatra-classic/.gitignore
143
144
  - lib/templates/sinatra-classic/.rspec
144
145
  - lib/templates/sinatra-classic/README.md