rails_new 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +11 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +92 -0
- data/README.md +56 -0
- data/Rakefile +1 -0
- data/bin/rails_new +8 -0
- data/lib/rails_new.rb +5 -0
- data/lib/rails_new/version.rb +3 -0
- data/rails_new.gemspec +22 -0
- data/template.rb +130 -0
- metadata +84 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
rails_new (0.0.1)
|
|
5
|
+
rails (= 3.2.9)
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
actionmailer (3.2.9)
|
|
11
|
+
actionpack (= 3.2.9)
|
|
12
|
+
mail (~> 2.4.4)
|
|
13
|
+
actionpack (3.2.9)
|
|
14
|
+
activemodel (= 3.2.9)
|
|
15
|
+
activesupport (= 3.2.9)
|
|
16
|
+
builder (~> 3.0.0)
|
|
17
|
+
erubis (~> 2.7.0)
|
|
18
|
+
journey (~> 1.0.4)
|
|
19
|
+
rack (~> 1.4.0)
|
|
20
|
+
rack-cache (~> 1.2)
|
|
21
|
+
rack-test (~> 0.6.1)
|
|
22
|
+
sprockets (~> 2.2.1)
|
|
23
|
+
activemodel (3.2.9)
|
|
24
|
+
activesupport (= 3.2.9)
|
|
25
|
+
builder (~> 3.0.0)
|
|
26
|
+
activerecord (3.2.9)
|
|
27
|
+
activemodel (= 3.2.9)
|
|
28
|
+
activesupport (= 3.2.9)
|
|
29
|
+
arel (~> 3.0.2)
|
|
30
|
+
tzinfo (~> 0.3.29)
|
|
31
|
+
activeresource (3.2.9)
|
|
32
|
+
activemodel (= 3.2.9)
|
|
33
|
+
activesupport (= 3.2.9)
|
|
34
|
+
activesupport (3.2.9)
|
|
35
|
+
i18n (~> 0.6)
|
|
36
|
+
multi_json (~> 1.0)
|
|
37
|
+
arel (3.0.2)
|
|
38
|
+
builder (3.0.4)
|
|
39
|
+
erubis (2.7.0)
|
|
40
|
+
hike (1.2.1)
|
|
41
|
+
i18n (0.6.1)
|
|
42
|
+
journey (1.0.4)
|
|
43
|
+
json (1.7.5)
|
|
44
|
+
mail (2.4.4)
|
|
45
|
+
i18n (>= 0.4.0)
|
|
46
|
+
mime-types (~> 1.16)
|
|
47
|
+
treetop (~> 1.4.8)
|
|
48
|
+
mime-types (1.19)
|
|
49
|
+
multi_json (1.3.7)
|
|
50
|
+
polyglot (0.3.3)
|
|
51
|
+
rack (1.4.1)
|
|
52
|
+
rack-cache (1.2)
|
|
53
|
+
rack (>= 0.4)
|
|
54
|
+
rack-ssl (1.3.2)
|
|
55
|
+
rack
|
|
56
|
+
rack-test (0.6.2)
|
|
57
|
+
rack (>= 1.0)
|
|
58
|
+
rails (3.2.9)
|
|
59
|
+
actionmailer (= 3.2.9)
|
|
60
|
+
actionpack (= 3.2.9)
|
|
61
|
+
activerecord (= 3.2.9)
|
|
62
|
+
activeresource (= 3.2.9)
|
|
63
|
+
activesupport (= 3.2.9)
|
|
64
|
+
bundler (~> 1.0)
|
|
65
|
+
railties (= 3.2.9)
|
|
66
|
+
railties (3.2.9)
|
|
67
|
+
actionpack (= 3.2.9)
|
|
68
|
+
activesupport (= 3.2.9)
|
|
69
|
+
rack-ssl (~> 1.3.2)
|
|
70
|
+
rake (>= 0.8.7)
|
|
71
|
+
rdoc (~> 3.4)
|
|
72
|
+
thor (>= 0.14.6, < 2.0)
|
|
73
|
+
rake (10.0.2)
|
|
74
|
+
rdoc (3.12)
|
|
75
|
+
json (~> 1.4)
|
|
76
|
+
sprockets (2.2.1)
|
|
77
|
+
hike (~> 1.2)
|
|
78
|
+
multi_json (~> 1.0)
|
|
79
|
+
rack (~> 1.0)
|
|
80
|
+
tilt (~> 1.1, != 1.3.0)
|
|
81
|
+
thor (0.16.0)
|
|
82
|
+
tilt (1.3.3)
|
|
83
|
+
treetop (1.4.12)
|
|
84
|
+
polyglot
|
|
85
|
+
polyglot (>= 0.3.1)
|
|
86
|
+
tzinfo (0.3.35)
|
|
87
|
+
|
|
88
|
+
PLATFORMS
|
|
89
|
+
ruby
|
|
90
|
+
|
|
91
|
+
DEPENDENCIES
|
|
92
|
+
rails_new!
|
data/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# About
|
|
2
|
+
|
|
3
|
+
Customizable Rails template for Twitter Bootstrap, Devise and more!
|
|
4
|
+
|
|
5
|
+
# Required Rails version
|
|
6
|
+
|
|
7
|
+
Rails 3.2.9
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
gem install rails_new
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
rails_new project_name # default database: postgresql
|
|
16
|
+
|
|
17
|
+
After that, you'll answer some questions about what you want to use (Twitter Bootstrap, Devise, etc).
|
|
18
|
+
|
|
19
|
+
## Customization
|
|
20
|
+
|
|
21
|
+
You can also customize the default Rails options:
|
|
22
|
+
|
|
23
|
+
rails_new project_name -d mysql # check all options using `rails new --help`
|
|
24
|
+
|
|
25
|
+
## Contributing
|
|
26
|
+
|
|
27
|
+
1. Fork it
|
|
28
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
29
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
30
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
31
|
+
5. Create new Pull Request
|
|
32
|
+
|
|
33
|
+
## Licence
|
|
34
|
+
|
|
35
|
+
Copyright (c) 2012 Lucas Caton
|
|
36
|
+
|
|
37
|
+
MIT License
|
|
38
|
+
|
|
39
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
40
|
+
a copy of this software and associated documentation files (the
|
|
41
|
+
"Software"), to deal in the Software without restriction, including
|
|
42
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
43
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
44
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
45
|
+
the following conditions:
|
|
46
|
+
|
|
47
|
+
The above copyright notice and this permission notice shall be
|
|
48
|
+
included in all copies or substantial portions of the Software.
|
|
49
|
+
|
|
50
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
51
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
52
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
53
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
54
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
55
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
56
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/bin/rails_new
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/ruby
|
|
2
|
+
#
|
|
3
|
+
# rails_new
|
|
4
|
+
# Created by Lucas Caton at 2012, november 23
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
app_name = 'teste' # Pegar via parametro
|
|
8
|
+
system "rails new #{app_name} --skip-bundle --skip-test-unit -d postgresql -m https://raw.github.com/lucascaton/rails_new/master/template.rb"
|
data/lib/rails_new.rb
ADDED
data/rails_new.gemspec
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'rails_new/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |gem|
|
|
7
|
+
gem.name = 'rails_new'
|
|
8
|
+
gem.version = RailsNew::VERSION
|
|
9
|
+
gem.authors = ['Lucas Caton']
|
|
10
|
+
gem.email = ['lucascaton@gmail.com']
|
|
11
|
+
gem.description = %q{Customizable Rails template for Twitter Bootstrap, Devise and more!}
|
|
12
|
+
gem.summary = %q{Customizable Rails template for Twitter Bootstrap, Devise and more!}
|
|
13
|
+
gem.homepage = 'https://github.com/lucascaton/rails_new'
|
|
14
|
+
|
|
15
|
+
gem.add_dependency 'rails', '3.2.9'
|
|
16
|
+
# gem.add_development_dependency 'rspec'
|
|
17
|
+
|
|
18
|
+
gem.files = `git ls-files`.split($/)
|
|
19
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
20
|
+
gem.test_files = gem.files.grep(%r{^(spec)/})
|
|
21
|
+
gem.require_paths = ['lib']
|
|
22
|
+
end
|
data/template.rb
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
def yes_wizard?(question)
|
|
2
|
+
answer = ask " \e[1m\e[32mpromp".rjust(10) + " \e[0m#{question} \e[33m(y/n)\e[0m"
|
|
3
|
+
case answer.downcase
|
|
4
|
+
when 'yes', 'y'
|
|
5
|
+
true
|
|
6
|
+
when 'no', 'n'
|
|
7
|
+
false
|
|
8
|
+
else
|
|
9
|
+
yes_wizard?(question)
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
if yes_wizard?('Create first commits?')
|
|
14
|
+
@create_commits = true
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def rewrite_file(file_name, content)
|
|
18
|
+
system "rm #{file_name} && > #{file_name}"
|
|
19
|
+
append_to_file(file_name, content)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
remove_file 'public/index.html'
|
|
23
|
+
remove_file 'app/assets/images/rails.png'
|
|
24
|
+
|
|
25
|
+
rewrite_file 'Gemfile', %Q(
|
|
26
|
+
source 'https://rubygems.org'
|
|
27
|
+
ruby '1.9.3'
|
|
28
|
+
|
|
29
|
+
gem 'haml-rails'
|
|
30
|
+
gem 'jquery-rails'
|
|
31
|
+
gem 'pg'
|
|
32
|
+
gem 'rails', '3.2.9'
|
|
33
|
+
|
|
34
|
+
group :development do
|
|
35
|
+
gem 'thin'
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
group :development, :test do
|
|
39
|
+
gem 'pry'
|
|
40
|
+
gem 'awesome_print'
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
group :test do
|
|
44
|
+
gem 'capybara'
|
|
45
|
+
gem 'database_cleaner'
|
|
46
|
+
gem 'factory_girl_rails'
|
|
47
|
+
gem 'forgery'
|
|
48
|
+
gem 'poltergeist'
|
|
49
|
+
gem 'rspec-rails'
|
|
50
|
+
gem 'simplecov', require: false
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
group :assets do
|
|
54
|
+
gem 'sass-rails', '~> 3.2.3'
|
|
55
|
+
gem 'coffee-rails', '~> 3.2.1'
|
|
56
|
+
gem 'uglifier', '>= 1.0.3'
|
|
57
|
+
end
|
|
58
|
+
).strip
|
|
59
|
+
|
|
60
|
+
rewrite_file '.gitignore', %Q(
|
|
61
|
+
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
|
62
|
+
#
|
|
63
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
|
64
|
+
# or operating system, you probably want to add a global ignore instead:
|
|
65
|
+
# git config --global core.excludesfile ~/.gitignore_global
|
|
66
|
+
|
|
67
|
+
# Ignore bundler config
|
|
68
|
+
/.bundle
|
|
69
|
+
|
|
70
|
+
# Ignore all logfiles and tempfiles
|
|
71
|
+
/log/*.log
|
|
72
|
+
/tmp
|
|
73
|
+
|
|
74
|
+
# Ignore config files
|
|
75
|
+
/config/database.yml
|
|
76
|
+
|
|
77
|
+
# Ignore docs
|
|
78
|
+
/doc/api
|
|
79
|
+
/doc/app
|
|
80
|
+
|
|
81
|
+
# Ignore public sub-directories
|
|
82
|
+
/public/packages/*
|
|
83
|
+
/public/system/*
|
|
84
|
+
|
|
85
|
+
# Ignore files from text editors and IDEs
|
|
86
|
+
Session.vim
|
|
87
|
+
*.sw?
|
|
88
|
+
|
|
89
|
+
# Ignore files from Operating System
|
|
90
|
+
*~
|
|
91
|
+
.DS_Store
|
|
92
|
+
|
|
93
|
+
# Ignore files from Ctags
|
|
94
|
+
/tags
|
|
95
|
+
|
|
96
|
+
# Ignore files from RVM
|
|
97
|
+
/.rvmrc
|
|
98
|
+
|
|
99
|
+
# Ignore files from SASS
|
|
100
|
+
/.sass-cache/
|
|
101
|
+
|
|
102
|
+
# Ignore routes cache
|
|
103
|
+
/.routes
|
|
104
|
+
|
|
105
|
+
# Ignore simplecov files
|
|
106
|
+
coverage/
|
|
107
|
+
|
|
108
|
+
# Ignore other files
|
|
109
|
+
rails_best_practices_output.html
|
|
110
|
+
).strip
|
|
111
|
+
|
|
112
|
+
system 'bundle install'
|
|
113
|
+
|
|
114
|
+
if @create_commits
|
|
115
|
+
system 'git init'
|
|
116
|
+
system 'git add .'
|
|
117
|
+
system "git commit -am 'Initial Rails directory structure'"
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# if yes_wizard?('Install and configure Twitter Bootstrap Rails gem?')
|
|
121
|
+
# end
|
|
122
|
+
#
|
|
123
|
+
# if yes_wizard?('Install and configure Devise gem?')
|
|
124
|
+
# end
|
|
125
|
+
#
|
|
126
|
+
# if yes_wizard?('Use brazilian portuguese locale (I18n)?')
|
|
127
|
+
# # Apagar config/locales/en.yml
|
|
128
|
+
# # Incluir config/locales*.pt-BR.yml
|
|
129
|
+
# # Atualizar config/application.rb
|
|
130
|
+
# end
|
metadata
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: rails_new
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
prerelease:
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- Lucas Caton
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
date: 2012-11-23 00:00:00.000000000 Z
|
|
13
|
+
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
15
|
+
name: rails
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
|
+
none: false
|
|
18
|
+
requirements:
|
|
19
|
+
- - '='
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 3.2.9
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
none: false
|
|
26
|
+
requirements:
|
|
27
|
+
- - '='
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: 3.2.9
|
|
30
|
+
description: Customizable Rails template for Twitter Bootstrap, Devise and more!
|
|
31
|
+
email:
|
|
32
|
+
- lucascaton@gmail.com
|
|
33
|
+
executables:
|
|
34
|
+
- !binary |-
|
|
35
|
+
cmFpbHNfbmV3
|
|
36
|
+
extensions: []
|
|
37
|
+
extra_rdoc_files: []
|
|
38
|
+
files:
|
|
39
|
+
- !binary |-
|
|
40
|
+
LmdpdGlnbm9yZQ==
|
|
41
|
+
- !binary |-
|
|
42
|
+
R2VtZmlsZQ==
|
|
43
|
+
- !binary |-
|
|
44
|
+
R2VtZmlsZS5sb2Nr
|
|
45
|
+
- !binary |-
|
|
46
|
+
UkVBRE1FLm1k
|
|
47
|
+
- !binary |-
|
|
48
|
+
UmFrZWZpbGU=
|
|
49
|
+
- !binary |-
|
|
50
|
+
YmluL3JhaWxzX25ldw==
|
|
51
|
+
- !binary |-
|
|
52
|
+
bGliL3JhaWxzX25ldy5yYg==
|
|
53
|
+
- !binary |-
|
|
54
|
+
bGliL3JhaWxzX25ldy92ZXJzaW9uLnJi
|
|
55
|
+
- !binary |-
|
|
56
|
+
cmFpbHNfbmV3LmdlbXNwZWM=
|
|
57
|
+
- !binary |-
|
|
58
|
+
dGVtcGxhdGUucmI=
|
|
59
|
+
homepage: https://github.com/lucascaton/rails_new
|
|
60
|
+
licenses: []
|
|
61
|
+
post_install_message:
|
|
62
|
+
rdoc_options: []
|
|
63
|
+
require_paths:
|
|
64
|
+
- lib
|
|
65
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
|
+
none: false
|
|
67
|
+
requirements:
|
|
68
|
+
- - ! '>='
|
|
69
|
+
- !ruby/object:Gem::Version
|
|
70
|
+
version: '0'
|
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
|
+
none: false
|
|
73
|
+
requirements:
|
|
74
|
+
- - ! '>='
|
|
75
|
+
- !ruby/object:Gem::Version
|
|
76
|
+
version: '0'
|
|
77
|
+
requirements: []
|
|
78
|
+
rubyforge_project:
|
|
79
|
+
rubygems_version: 1.8.24
|
|
80
|
+
signing_key:
|
|
81
|
+
specification_version: 3
|
|
82
|
+
summary: Customizable Rails template for Twitter Bootstrap, Devise and more!
|
|
83
|
+
test_files: []
|
|
84
|
+
has_rdoc:
|