learn-generate 1.0.14 → 1.0.15

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: 18d3800acece40e26c13c12feba044a2c269e29b
4
- data.tar.gz: ac5de84f2834d15f9c99ce4b3b2487cbc94e9314
3
+ metadata.gz: 7083b7453caca61040642960737e2a8b637cbb24
4
+ data.tar.gz: 9c82b7183789720f12525ab3a8c753f476d4e5c6
5
5
  SHA512:
6
- metadata.gz: 89d92ae038d63381653e2a2f8acdd1369d7cd57e2287385b1fda38140d904310004008342fcfb685f2316d22c03f2b1fd17af4b51356ab5554016696eda3e5ad
7
- data.tar.gz: 0f846bac2d80cd4ab04b6eff76294a308a4bdbabcf71cf47b52613449fe6a0235fcaa38ae04731fdf3f70b996576d3b774c3bda991053280c103de45e952d33b
6
+ metadata.gz: 4d2a8331112f9777581e41bbf545dd7b18030b142956f2276ec4dcecf38f9cb28782868034a62d6b0a70fdbdc209d14e1bc6052bffbcbff9e2e73ab33392a0a6
7
+ data.tar.gz: 6d2d1f5c3ef4eb181990e9f759db90681ad173bbca133fcd309fb7b62567c0c42feb929f7001dca64cb539a37ce8f3fd40231f1e98fd1a97b5bb474cad5658f3
data/README.md CHANGED
@@ -8,47 +8,48 @@ Assumes installation of git.
8
8
 
9
9
  ## Installation
10
10
 
11
- Visit [http://gems.flatironschool.com/](http://gems.flatironschool.com/)
11
+ `gem install learn-co`
12
12
 
13
13
  ## Usage
14
14
 
15
- `flatiron-lab-generator <lab-type> <lab-name>`
15
+ `learn new <lab-name> -t|--template <template-name>`
16
16
 
17
- ### With git
17
+ ## Lab Templates
18
18
 
19
- Execute as `flatiron-lab-generator <lab-type> <lab-name> -g` if you want your template to be created with an initialized git repository.
19
+ The current list of templates is:
20
20
 
21
- ## Lab Types
22
-
23
- Lab types have been outlined in the [Curriculum Style Guide](https://github.com/learn-co-curriculum/curriculum-style-guide/blob/master/lab-templates.md)
24
-
25
- These are the Lab Types:
26
-
27
- * fundamental-ruby
28
- * command-line
29
- * SQL
30
21
  * activerecord
31
- * rake
22
+ * command-line
23
+ * front-end
24
+ * fundamental-ruby
25
+ * ios
26
+ * js
27
+ * kids
28
+ * python
32
29
  * rack
30
+ * rake
31
+ * readme
33
32
  * sinatra-classic
34
33
  * sinatra-mvc
35
- * js
36
- * front-end
37
- * kids
38
-
39
- We have the [flatiron-rails gem](https://github.com/flatiron-school/flatiron-rails) for generating Rails labs.
34
+ * sql
40
35
 
41
- ## Lab Name
36
+ ## Other Options
42
37
 
43
- The lab-name refers to the name of the lab (example: Sinatra-ORM-Halloween).
38
+ 1. `--list`: see the most up-to-date list of available templates
44
39
 
45
- ## Reposit
40
+ ## Contributing
46
41
 
47
- Logan made an awesome gem that creates a remote git repository from the command line. It's called [Reposit](https://github.com/loganhasson/reposit). After installing that and following the setup steps, run `reposit <lab name> -o learn-co-curriculum`.
42
+ 1. Fork it ( https://github.com/flatiron-labs/learn-generate/fork )
43
+ 2. Create your feature branch (git checkout -b my-new-feature)
44
+ 3. Commit your changes (git commit -am 'Add some feature')
45
+ 4. Push to the branch (git push origin my-new-feature)
46
+ 5. Create a new Pull Request
48
47
 
49
- ## Contributing
48
+ ## Contributing new templates
50
49
 
51
- 1. Clone
52
- 2. Checkout a new feature branch
53
- 3. Be sure to run the tests
54
- 4. Open PR
50
+ 1. Fork the templates repository ( https://github.com/learn-co-curriculum/learn-generate-templates/fork )
51
+ 2. Create your new template branch (git checkout -b my-new-template)
52
+ 3. Commit your changes (git commit -am 'Add a new teamplate')
53
+ 4. Push to the branch (git push origin my-new-template)
54
+ 5. Create a new Pull Request
55
+ 6. Your template will be reviewed, and any relevant changes to the gem will be made before merging
data/bin/learn-generate CHANGED
@@ -21,7 +21,7 @@ templates_list = template_loader.printable_list
21
21
 
22
22
  my_banner = <<-EOS
23
23
 
24
- Usage: learn generate <lab-name> -t <template-name>
24
+ Usage: learn new <lab-name> -t <template-name>
25
25
 
26
26
  Available templates:
27
27
 
@@ -12,10 +12,12 @@ module LearnGenerate
12
12
  'erb-static-site',
13
13
  'rack',
14
14
  'sinatra-classic',
15
+ 'sinatra-classic-db',
15
16
  'sinatra-mvc',
16
17
  'js',
17
18
  'front-end',
18
- 'kids'
19
+ 'kids',
20
+ 'readme'
19
21
  ]
20
22
 
21
23
  def initialize(internet)
@@ -1,3 +1,3 @@
1
1
  module LearnGenerate
2
- VERSION = '1.0.14'
2
+ VERSION = '1.0.15'
3
3
  end
File without changes
@@ -0,0 +1,3 @@
1
+ --color
2
+ --format documentation
3
+ --require spec_helper
@@ -0,0 +1,15 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'activerecord', :require => 'active_record'
4
+ gem 'sinatra-activerecord', :require => 'sinatra/activerecord'
5
+
6
+ gem 'sinatra'
7
+ gem 'sqlite3'
8
+ gem 'tux'
9
+ gem 'pry'
10
+ gem 'pry-nav'
11
+ gem 'rake'
12
+ gem 'rspec'
13
+ gem 'rack-test'
14
+ gem 'database_cleaner', git: 'https://github.com/bmabey/database_cleaner.git'
15
+ gem 'require_all'
@@ -0,0 +1,7 @@
1
+ #Learn.co Educational Content License
2
+
3
+ Copyright (c) 2015 Flatiron School, Inc
4
+
5
+ The Flatiron School, Inc. owns this Educational Content. However, the Flatiron School supports the development and availability of educational materials in the public domain. Therefore, the Flatiron School grants Users of the Flatiron Educational Content set forth in this repository certain rights to reuse, build upon and share such Educational Content subject to the terms of the Educational Content License set forth [here](http://learn.co/content-license) (http://learn.co/content-license). You must read carefully the terms and conditions contained in the Educational Content License as such terms govern access to and use of the Educational Content.
6
+
7
+ Flatiron School is willing to allow you access to and use of the Educational Content only on the condition that you accept all of the terms and conditions contained in the Educational Content License set forth [here](http://learn.co/content-license) (http://learn.co/content-license). By accessing and/or using the Educational Content, you are agreeing to all of the terms and conditions contained in the Educational Content License. If you do not agree to any or all of the terms of the Educational Content License, you are prohibited from accessing, reviewing or using in any way the Educational Content.
@@ -0,0 +1,5 @@
1
+ ---
2
+ tags:
3
+ languages:
4
+ resources:
5
+ ---
@@ -0,0 +1,10 @@
1
+ ENV["SINATRA_ENV"] ||= "development"
2
+
3
+ require_relative './config/environment'
4
+ require 'sinatra/activerecord/rake'
5
+
6
+ # Type `rake -T` on your command line to see the available rake tasks.
7
+
8
+ task :console do
9
+ Pry.start
10
+ end
@@ -0,0 +1,4 @@
1
+ require_relative 'config/environment'
2
+
3
+ class App < Sinatra::Base
4
+ end
@@ -0,0 +1,7 @@
1
+ require './config/environment'
2
+
3
+ if ActiveRecord::Migrator.needs_migration?
4
+ raise 'Migrations are pending. Run `rake db:migrate` to resolve the issue.'
5
+ end
6
+
7
+ run App
@@ -0,0 +1,12 @@
1
+ ENV['SINATRA_ENV'] ||= "development"
2
+
3
+ require 'bundler/setup'
4
+ Bundler.require(:default, ENV['SINATRA_ENV'])
5
+
6
+ ActiveRecord::Base.establish_connection(
7
+ :adapter => "sqlite3",
8
+ :database => "db/#{ENV['SINATRA_ENV']}.sqlite"
9
+ )
10
+
11
+ require './app'
12
+ require_all 'models'
@@ -0,0 +1 @@
1
+ #Placeholder for a model
@@ -0,0 +1,5 @@
1
+ require_relative '../config/environment.rb'
2
+
3
+ RSpec.configure do |config|
4
+
5
+ end
File without changes
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.14
4
+ version: 1.0.15
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-09 00:00:00.000000000 Z
11
+ date: 2015-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -140,6 +140,21 @@ files:
140
140
  - lib/templates/rake/spec/rakefile_spec.rb
141
141
  - lib/templates/rake/spec/spec_helper.rb
142
142
  - lib/templates/readme/README.md
143
+ - lib/templates/sinatra-classic-db/.gitignore
144
+ - lib/templates/sinatra-classic-db/.rspec
145
+ - lib/templates/sinatra-classic-db/Gemfile
146
+ - lib/templates/sinatra-classic-db/LICENSE.md
147
+ - lib/templates/sinatra-classic-db/README.md
148
+ - lib/templates/sinatra-classic-db/Rakefile
149
+ - lib/templates/sinatra-classic-db/app.rb
150
+ - lib/templates/sinatra-classic-db/config.ru
151
+ - lib/templates/sinatra-classic-db/config/environment.rb
152
+ - lib/templates/sinatra-classic-db/models/model.rb
153
+ - lib/templates/sinatra-classic-db/public/images/.keep
154
+ - lib/templates/sinatra-classic-db/public/javascripts/.keep
155
+ - lib/templates/sinatra-classic-db/public/stylesheets/.keep
156
+ - lib/templates/sinatra-classic-db/spec/spec_helper.rb
157
+ - lib/templates/sinatra-classic-db/views/.keep
143
158
  - lib/templates/sinatra-classic/.gitignore
144
159
  - lib/templates/sinatra-classic/.rspec
145
160
  - lib/templates/sinatra-classic/README.md