fast_track 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +13 -11
- data/bin/track +2 -1
- data/fast_track.gemspec +5 -1
- data/lib/fast_track.rb +42 -65
- data/lib/fast_track/commands.rb +32 -0
- data/lib/fast_track/config.rb +1 -1
- data/lib/fast_track/dsl.rb +14 -0
- data/lib/fast_track/exceptions.rb +1 -1
- data/lib/fast_track/ext.rb +5 -0
- data/lib/fast_track/generator.rb +30 -4
- data/lib/fast_track/track.rb +103 -67
- data/lib/fast_track/track_methods.rb +51 -1
- data/lib/fast_track/version.rb +1 -1
- data/lib/tracks/awesome_defaults.rb +19 -18
- data/lib/tracks/backbone.rb +17 -33
- data/lib/tracks/better_exceptions.rb +11 -15
- data/lib/tracks/cancan.rb +8 -9
- data/lib/tracks/devise.rb +48 -76
- data/lib/tracks/errbit_heroku.rb +2 -6
- data/lib/tracks/guard.rb +18 -17
- data/lib/tracks/heroku.rb +5 -0
- data/lib/tracks/jquery.rb +6 -15
- data/lib/tracks/mysql.rb +7 -9
- data/lib/tracks/omniauth.rb +61 -62
- data/lib/tracks/quite_assets.rb +7 -0
- data/lib/tracks/rolify.rb +8 -9
- data/lib/tracks/rspec.rb +12 -0
- data/lib/tracks/thin.rb +39 -0
- data/lib/tracks/twitter_bootstrap.rb +50 -55
- metadata +60 -6
- data/lib/fast_track/thin.rb +0 -21
data/lib/tracks/mysql.rb
CHANGED
@@ -1,12 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
end
|
1
|
+
track "mysql" do
|
2
|
+
gemfile do
|
3
|
+
gem 'mysql2'
|
4
|
+
end
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
end
|
6
|
+
# TODO: Add config/database.yml to include mysql2
|
7
|
+
before_migrate do
|
8
|
+
rake "db:create:all"
|
11
9
|
end
|
12
10
|
end
|
data/lib/tracks/omniauth.rb
CHANGED
@@ -1,76 +1,75 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
# Add Omniauth without adding any social networks
|
5
|
-
#
|
6
|
-
# Based on this gist: https://gist.github.com/schleg/993566
|
7
|
-
class Omniauth < Track
|
8
|
-
gemfile do
|
9
|
-
gem "omniauth"
|
10
|
-
end
|
1
|
+
# Based on this gist: https://gist.github.com/schleg/993566
|
2
|
+
track "omniauth" do
|
3
|
+
desc "Use Omniauth"
|
11
4
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
5
|
+
gemfile do
|
6
|
+
gem "omniauth"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
track "omniauth_authentications" do
|
11
|
+
desc "Omniauth + User Authorization table"
|
12
|
+
|
13
|
+
before_migrate do
|
14
|
+
migration "add_name_to_users", {
|
15
|
+
"name" => "string"
|
16
|
+
}
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
end
|
18
|
+
model "Authorization", {
|
19
|
+
"provider" => "string",
|
20
|
+
"uid" => "string",
|
21
|
+
"user_id" => "integer",
|
22
|
+
"token" => "string",
|
23
|
+
"secret" => "string",
|
24
|
+
"name" => "string",
|
25
|
+
"link" => "string"
|
26
|
+
}
|
27
27
|
end
|
28
|
+
end
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
{
|
35
|
-
controller: "devise_facebook/omniauth_controller.rb",
|
36
|
-
initializer: "devise_facebook/initializer.rb",
|
37
|
-
config: "devise_facebook/facebook.yml",
|
38
|
-
user: "devise_facebook/user.rb"
|
39
|
-
}
|
40
|
-
end
|
30
|
+
track "omniauth_facebook" do
|
31
|
+
gemfile do
|
32
|
+
gem "omniauth"
|
33
|
+
gem "omniauth-facebook"
|
34
|
+
end
|
41
35
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
36
|
+
before_migration do
|
37
|
+
migration "AddUidToUsers", {
|
38
|
+
"provider" => "string",
|
39
|
+
"uid" => "string",
|
40
|
+
"name" => "string"
|
41
|
+
}
|
42
|
+
end
|
46
43
|
|
47
|
-
|
44
|
+
after_migration do
|
45
|
+
gsub_file "config/routes.rb", "devise_for :users", 'devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }'
|
48
46
|
|
49
|
-
|
47
|
+
file "app/controllers/users/omniauth_callbacks_controller.rb", controller_file
|
48
|
+
file "config/initializers/devise_facebook.rb", initializer_file
|
49
|
+
# TODO:
|
50
|
+
file "app/models/user.rb", user_file, :force => true
|
50
51
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
52
|
+
# TODO: Use options passed to thor
|
53
|
+
file "config/facebook.yml", facebook_yml
|
54
|
+
end
|
55
|
+
|
56
|
+
def template_directory
|
57
|
+
"devise_facebook"
|
58
|
+
end
|
56
59
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
+
def controller_file
|
61
|
+
read_file("omniauth_controller.rb")
|
62
|
+
end
|
60
63
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
file "config/facebook.yml", open_file(:config)
|
64
|
+
def initializer_file
|
65
|
+
read_file("initializer.rb")
|
66
|
+
end
|
65
67
|
|
66
|
-
|
67
|
-
|
68
|
+
def facebook_yml
|
69
|
+
read_file("facebook.yml")
|
70
|
+
end
|
68
71
|
|
69
|
-
|
70
|
-
|
71
|
-
"[APP_ID]" => config[:app_id],
|
72
|
-
"[APP_SECRET]" => config[:app_secret]
|
73
|
-
}
|
74
|
-
end
|
72
|
+
def user_file
|
73
|
+
read_file("user.rb")
|
75
74
|
end
|
76
75
|
end
|
data/lib/tracks/rolify.rb
CHANGED
@@ -1,12 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
class Rolify < Track
|
4
|
-
gemfile do
|
5
|
-
gem 'rolify'
|
6
|
-
end
|
1
|
+
track "rolify" do
|
2
|
+
desc "Add roles to your users"
|
7
3
|
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
gemfile do
|
5
|
+
gem 'rolify'
|
6
|
+
end
|
7
|
+
|
8
|
+
before_migrate do
|
9
|
+
generate "rolify:role"
|
11
10
|
end
|
12
11
|
end
|
data/lib/tracks/rspec.rb
ADDED
data/lib/tracks/thin.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
track "thin" do
|
2
|
+
name "Thin"
|
3
|
+
desc "Uses the thin rack web server"
|
4
|
+
|
5
|
+
gemfile do
|
6
|
+
gem "thin"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
track "production_thin" do
|
11
|
+
requires "thin"
|
12
|
+
|
13
|
+
name "Production Thin"
|
14
|
+
desc "Install thin on a production server"
|
15
|
+
|
16
|
+
tutorial_url "http://kvz.io/blog/2010/09/21/ruby-with-nginx-on-ubuntu-lucid/"
|
17
|
+
tutorial_url "http://jordanhollinger.com/2011/04/22/how-to-use-thin-effectivly"
|
18
|
+
|
19
|
+
after_bundle do
|
20
|
+
run "rvmsudo thin install"
|
21
|
+
create_file "/etc/thin/#{config.app_name}.yml", sample_thin_config
|
22
|
+
end
|
23
|
+
|
24
|
+
def template_directory
|
25
|
+
"twitter_bootstrap"
|
26
|
+
end
|
27
|
+
|
28
|
+
def flash_helper
|
29
|
+
read_file("bootstrap_flash_helper.rb")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
track "nginx_thin" do
|
34
|
+
requires "thin"
|
35
|
+
|
36
|
+
tutorial_url "http://www.funonrails.com/2010/03/nginx-and-thin-installation-and.html"
|
37
|
+
|
38
|
+
# TODO!
|
39
|
+
end
|
@@ -1,74 +1,69 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
gem 'jquery-rails'
|
1
|
+
track "twitter_bootstrap" do
|
2
|
+
gemfile do
|
3
|
+
gem "twitter-bootstrap-rails"
|
4
|
+
gem "less-rails"
|
5
|
+
gem 'jquery-rails'
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
end
|
7
|
+
gem_group :assets do
|
8
|
+
gem 'less'
|
9
|
+
gem 'commonjs'
|
10
|
+
gem 'therubyracer', :platforms => :ruby
|
13
11
|
end
|
12
|
+
end
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
def template_directory
|
15
|
+
"twitter_bootstrap"
|
16
|
+
end
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
def flash_helper
|
19
|
+
read_file("bootstrap_flash_helper.rb")
|
20
|
+
end
|
22
21
|
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
def application_css
|
23
|
+
read_file("application.css")
|
24
|
+
end
|
26
25
|
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
before_migrate do
|
27
|
+
generate "controller Home index"
|
28
|
+
route "root to: 'home#index'"
|
30
29
|
|
31
|
-
|
32
|
-
|
30
|
+
generate "bootstrap:install less"
|
31
|
+
generate "bootstrap:layout application fixed --force"
|
33
32
|
|
34
|
-
|
35
|
-
|
36
|
-
end
|
33
|
+
create_file "app/helpers/bootstrap_flash_helper.rb", flash_helper
|
34
|
+
create_file "app/assets/stylesheets/application.css", application_css, force: true
|
37
35
|
end
|
36
|
+
end
|
38
37
|
|
39
|
-
|
40
|
-
|
41
|
-
def template_directory
|
42
|
-
"twitter_bootstrap_nav_bar"
|
43
|
-
end
|
38
|
+
track "twitter_boostrap_nav_bar" do
|
39
|
+
requires "devise"
|
44
40
|
|
45
|
-
|
46
|
-
|
47
|
-
|
41
|
+
def template_directory
|
42
|
+
"twitter_bootstrap_nav_bar"
|
43
|
+
end
|
48
44
|
|
49
|
-
|
50
|
-
|
51
|
-
|
45
|
+
def layout_for_application
|
46
|
+
read_file("application.html.erb")
|
47
|
+
end
|
52
48
|
|
53
|
-
|
54
|
-
|
55
|
-
|
49
|
+
def nav_bar
|
50
|
+
read_file("_navigation.html.erb")
|
51
|
+
end
|
56
52
|
|
57
|
-
|
58
|
-
|
59
|
-
|
53
|
+
def messages
|
54
|
+
read_file("_messages.html.erb")
|
55
|
+
end
|
60
56
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
end
|
57
|
+
def application_helper
|
58
|
+
read_file("application_helper.rb")
|
59
|
+
end
|
65
60
|
|
66
|
-
|
67
|
-
|
61
|
+
before_migrate do
|
62
|
+
create_file "app/views/layouts/application.html.erb", layout_for_application, force: true
|
63
|
+
create_file "app/helpers/application_helper.rb", application_helper, force: true
|
68
64
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
end
|
65
|
+
# NOTE: _navigation.html.erb requires Devise to work properly!
|
66
|
+
create_file "app/views/layouts/_navigation.html.erb", nav_bar
|
67
|
+
create_file "app/views/layouts/_messages.html.erb", messages
|
73
68
|
end
|
74
69
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fast_track
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-09-
|
12
|
+
date: 2013-09-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -75,6 +75,54 @@ dependencies:
|
|
75
75
|
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: thor
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rails
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :runtime
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: hooks
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
78
126
|
description: Leverage the Rails generator to architect new Rails apps with lots of
|
79
127
|
default gems, templates, and other recipes, quickly.
|
80
128
|
email:
|
@@ -94,10 +142,12 @@ files:
|
|
94
142
|
- fast_track.gemspec
|
95
143
|
- lib/fast_track.rb
|
96
144
|
- lib/fast_track/app.rb
|
145
|
+
- lib/fast_track/commands.rb
|
97
146
|
- lib/fast_track/config.rb
|
147
|
+
- lib/fast_track/dsl.rb
|
98
148
|
- lib/fast_track/exceptions.rb
|
149
|
+
- lib/fast_track/ext.rb
|
99
150
|
- lib/fast_track/generator.rb
|
100
|
-
- lib/fast_track/thin.rb
|
101
151
|
- lib/fast_track/track.rb
|
102
152
|
- lib/fast_track/track_methods.rb
|
103
153
|
- lib/fast_track/version.rb
|
@@ -115,12 +165,16 @@ files:
|
|
115
165
|
- lib/tracks/devise.rb
|
116
166
|
- lib/tracks/errbit_heroku.rb
|
117
167
|
- lib/tracks/guard.rb
|
168
|
+
- lib/tracks/heroku.rb
|
118
169
|
- lib/tracks/jquery.rb
|
119
170
|
- lib/tracks/mysql.rb
|
120
171
|
- lib/tracks/omniauth.rb
|
172
|
+
- lib/tracks/quite_assets.rb
|
121
173
|
- lib/tracks/rolify.rb
|
174
|
+
- lib/tracks/rspec.rb
|
175
|
+
- lib/tracks/thin.rb
|
122
176
|
- lib/tracks/twitter_bootstrap.rb
|
123
|
-
homepage:
|
177
|
+
homepage: http://fast-track.io
|
124
178
|
licenses:
|
125
179
|
- MIT
|
126
180
|
post_install_message:
|
@@ -135,7 +189,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
189
|
version: '0'
|
136
190
|
segments:
|
137
191
|
- 0
|
138
|
-
hash:
|
192
|
+
hash: -250593940606032247
|
139
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
194
|
none: false
|
141
195
|
requirements:
|
@@ -144,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
198
|
version: '0'
|
145
199
|
segments:
|
146
200
|
- 0
|
147
|
-
hash:
|
201
|
+
hash: -250593940606032247
|
148
202
|
requirements: []
|
149
203
|
rubyforge_project:
|
150
204
|
rubygems_version: 1.8.25
|