bootup 0.0.1alpha → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,31 +2,38 @@
2
2
 
3
3
  Provides a rails generator to install essential gems required to start a new rails app.
4
4
 
5
- The following assumptions are made about the environment:
6
-
7
- 1. Postgres is installed & configured. (Yes, also assuming that postgres would be used with the application)
8
-
9
-
10
5
  ## Installation
11
6
 
12
7
  Add this line to your application's Gemfile:
13
8
 
14
- gem 'bootup', git: "git://github.com/recklessrahul/bootup.git"
9
+ gem 'bootup'
15
10
 
16
11
  And then execute:
17
12
 
18
13
  $ bundle
19
14
 
15
+ For the latest release,
16
+
17
+ gem 'bootup', git: "git://github.com/recklessrahul/bootup.git"
18
+ $ bundle
19
+
20
20
  ## Usage
21
21
 
22
22
  Run
23
23
 
24
- 'rails g bootup'
24
+ $ rails g bootup
25
25
  or
26
26
 
27
- 'rails g bootup *APP_NAME*'
27
+ $ rails g bootup -f
28
+
29
+ **CAUTION:** The '-f' will overwrite & replace files without prompting you. As a rule, use this generator on a brand new application only.
30
+
31
+ If you wish to explicitly supply a database name, use
32
+
33
+ $ rails g bootup *APP_NAME*
34
+
28
35
 
29
- *Note:* If *APP_NAME* is not supplied, the root folder name would be used as *APP_NAME*.
36
+ Note: If *APP_NAME* is not supplied, the root folder name would be used as *APP_NAME*.
30
37
 
31
38
  ## What does the generator install?
32
39
 
@@ -1,3 +1,3 @@
1
1
  module Bootup
2
- VERSION = "0.0.1alpha"
2
+ VERSION = "0.0.1"
3
3
  end
@@ -5,8 +5,9 @@ class BootupGenerator < Rails::Generators::Base
5
5
  def generate_bootup
6
6
  log :generate, "Booting #{app_name}"
7
7
 
8
+ @db = ask("Would you like to use Postgres?")
8
9
  log :generate, "Copying Gemfile"
9
- copy_file "Gemfile", "Gemfile"
10
+ template "Gemfile.erb", "Gemfile"
10
11
 
11
12
  log :generate, "Running Bundler"
12
13
  inside Rails.root do
@@ -18,11 +19,14 @@ class BootupGenerator < Rails::Generators::Base
18
19
  run "rm public/index.html"
19
20
  end
20
21
 
21
- log :generate, "Initializing database.yml"
22
- template 'database.yml.erb', 'config/database.yml'
22
+ if @db == 'y' or @db == 'yes'
23
+ log :generate, "Initializing database.yml"
24
+ template 'database.yml.erb', 'config/database.yml'
25
+
26
+ log :generate, "Creating database"
27
+ rake("db:create")
28
+ end
23
29
 
24
- log :generate, "Creating database"
25
- rake("db:create")
26
30
 
27
31
  log :generate, "Installing Twitter Bootstrap"
28
32
  generate "bootstrap:install"
@@ -1,7 +1,11 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails', '3.2.3'
4
+ <% if @db == 'y' or @db == 'yes' -%>
4
5
  gem 'pg'
6
+ <% else -%>
7
+ gem 'sqlite3'
8
+ <% end -%>
5
9
  gem 'jquery-rails'
6
10
  gem 'simple_form'
7
11
  gem 'thin'
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1alpha
5
- prerelease: 5
4
+ version: 0.0.1
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Rahul Jayaraman
@@ -29,7 +29,7 @@ files:
29
29
  - lib/bootup/version.rb
30
30
  - lib/generators/bootup/USAGE
31
31
  - lib/generators/bootup/bootup_generator.rb
32
- - lib/generators/bootup/templates/Gemfile
32
+ - lib/generators/bootup/templates/Gemfile.erb
33
33
  - lib/generators/bootup/templates/Guardfile
34
34
  - lib/generators/bootup/templates/application.css
35
35
  - lib/generators/bootup/templates/application.js
@@ -50,9 +50,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
50
50
  required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
- - - ! '>'
53
+ - - ! '>='
54
54
  - !ruby/object:Gem::Version
55
- version: 1.3.1
55
+ version: '0'
56
56
  requirements: []
57
57
  rubyforge_project:
58
58
  rubygems_version: 1.8.15