ey_rails_wizard 0.5.0 → 0.6.0
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/ChangeLog.md +15 -3
- data/lib/rails_wizard/template.rb +1 -1
- data/scrolls/active_admin.rb +1 -0
- data/scrolls/cucumber.rb +6 -3
- data/scrolls/delayed_job.rb +1 -1
- data/scrolls/eycloud.rb +2 -2
- data/scrolls/git.rb +4 -2
- data/scrolls/github.rb +2 -2
- data/scrolls/guard.rb +75 -0
- data/scrolls/jquery.rb +3 -12
- data/scrolls/mysql.rb +33 -11
- data/scrolls/passenger.rb +1 -0
- data/scrolls/postgresql.rb +54 -0
- data/scrolls/prototype.rb +12 -2
- data/scrolls/rails_basics.rb +4 -0
- data/scrolls/resque.rb +1 -2
- data/scrolls/simple_form.rb +3 -3
- data/scrolls/twitter_bootstrap.rb +15 -5
- data/scrolls/{activerecord.rb → zzz/activerecord.rb} +0 -0
- data/scrolls/{cancan.rb → zzz/cancan.rb} +0 -0
- data/scrolls/{carrierwave.rb → zzz/carrierwave.rb} +0 -0
- data/scrolls/{carrierwave_direct.rb → zzz/carrierwave_direct.rb} +0 -0
- data/scrolls/{cartographer.rb → zzz/cartographer.rb} +0 -0
- data/scrolls/{devise.rb → zzz/devise.rb} +0 -0
- data/scrolls/{devise_invitable.rb → zzz/devise_invitable.rb} +0 -0
- data/scrolls/{event_calendar.rb → zzz/event_calendar.rb} +0 -0
- data/scrolls/{factory_girl.rb → zzz/factory_girl.rb} +0 -0
- data/scrolls/{ffaker.rb → zzz/ffaker.rb} +0 -0
- data/scrolls/{fixture_builder.rb → zzz/fixture_builder.rb} +0 -0
- data/scrolls/{forgery.rb → zzz/forgery.rb} +0 -0
- data/scrolls/{haml.rb → zzz/haml.rb} +0 -0
- data/scrolls/{heroku.rb → zzz/heroku.rb} +0 -0
- data/scrolls/{hoptoad.rb → zzz/hoptoad.rb} +0 -0
- data/scrolls/{inherited_resources.rb → zzz/inherited_resources.rb} +0 -0
- data/scrolls/{intercom.rb → zzz/intercom.rb} +0 -0
- data/scrolls/{jammit.rb → zzz/jammit.rb} +0 -0
- data/scrolls/{jasmine.rb → zzz/jasmine.rb} +0 -0
- data/scrolls/{mini_magick.rb → zzz/mini_magick.rb} +0 -0
- data/scrolls/{mongo_mapper.rb → zzz/mongo_mapper.rb} +0 -0
- data/scrolls/{mongohq.rb → zzz/mongohq.rb} +0 -0
- data/scrolls/{mongoid.rb → zzz/mongoid.rb} +0 -0
- data/scrolls/{mootools.rb → zzz/mootools.rb} +0 -0
- data/scrolls/{newrelic.rb → zzz/newrelic.rb} +0 -0
- data/scrolls/{nifty_generators.rb → zzz/nifty_generators.rb} +0 -0
- data/scrolls/{oa_oauth.rb → zzz/oa_oauth.rb} +0 -0
- data/scrolls/zzz/omniauth.rb +55 -0
- data/scrolls/{paper_trail.rb → zzz/paper_trail.rb} +0 -0
- data/scrolls/{pow.rb → zzz/pow.rb} +0 -0
- data/scrolls/{rails_admin.rb → zzz/rails_admin.rb} +1 -0
- data/scrolls/{rails_dev_tweaks.rb → zzz/rails_dev_tweaks.rb} +0 -0
- data/scrolls/{rails_erd.rb → zzz/rails_erd.rb} +0 -0
- data/scrolls/{rails_footnotes.rb → zzz/rails_footnotes.rb} +0 -0
- data/scrolls/{ransack.rb → zzz/ransack.rb} +0 -0
- data/scrolls/{rmagick.rb → zzz/rmagick.rb} +0 -0
- data/scrolls/{sass.rb → zzz/sass.rb} +0 -0
- data/scrolls/{sequel.rb → zzz/sequel.rb} +0 -0
- data/scrolls/{settingslogic.rb → zzz/settingslogic.rb} +0 -0
- data/scrolls/{shoulda_matchers.rb → zzz/shoulda_matchers.rb} +0 -0
- data/scrolls/{sidekiq.rb → zzz/sidekiq.rb} +0 -0
- data/scrolls/{slim.rb → zzz/slim.rb} +0 -0
- data/scrolls/{thinking_sphinx.rb → zzz/thinking_sphinx.rb} +0 -0
- data/spec/rails_wizard/template_spec.rb +17 -8
- data/version.rb +1 -1
- metadata +65 -64
- data/scrolls/omniauth.rb +0 -17
- data/scrolls/twitter_bootstrap_rails_v1.rb +0 -144
data/ChangeLog.md
CHANGED
@@ -1,9 +1,21 @@
|
|
1
1
|
# ChangeLog
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
## v0.6
|
4
|
+
|
5
|
+
* `twitter_bootstrap` - automatically includes `simple_form`; includes flash msg
|
5
6
|
* `github` - asks for a new repo name if cannot create a repository
|
6
|
-
*
|
7
|
+
* `rails_basics` - default flash message
|
8
|
+
* `jquery` & `prototype` - former is already default in Rails 3.1+ now
|
9
|
+
|
10
|
+
New
|
11
|
+
* `guard` - guard support for all supported scrolls
|
12
|
+
* `postgresql`
|
13
|
+
* All untested scrolls moved into scrolls/zzz
|
14
|
+
|
15
|
+
## v0.5
|
16
|
+
|
17
|
+
* `twitter_bootstrap` - based on public RailsCast
|
18
|
+
* `eycloud` - now using `ey_cli` to create/boot environments
|
7
19
|
|
8
20
|
## v0.4
|
9
21
|
|
data/scrolls/active_admin.rb
CHANGED
data/scrolls/cucumber.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
-
|
2
|
-
gem '
|
3
|
-
gem '
|
1
|
+
gem_group :test do
|
2
|
+
gem 'cucumber-rails', :require => false # https://github.com/cucumber/cucumber-rails/issues/202
|
3
|
+
gem 'capybara'
|
4
|
+
gem 'database_cleaner'
|
5
|
+
end
|
6
|
+
|
4
7
|
|
5
8
|
after_bundler do
|
6
9
|
generate "cucumber:install --capybara#{' --rspec' if scrolls.include?('rspec')}#{' -D' unless scrolls.include?('activerecord')}"
|
data/scrolls/delayed_job.rb
CHANGED
data/scrolls/eycloud.rb
CHANGED
data/scrolls/git.rb
CHANGED
data/scrolls/github.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
gem 'github', '>= 0.7.0', :group => [:development]
|
1
|
+
gem 'github', '>= 0.7.0', :require => nil, :group => [:development]
|
2
2
|
|
3
3
|
after_everything do
|
4
4
|
tried_create_already = false
|
@@ -22,7 +22,7 @@ end
|
|
22
22
|
__END__
|
23
23
|
|
24
24
|
name: GitHub
|
25
|
-
description:
|
25
|
+
description: Push project to new GitHub repository
|
26
26
|
author: drnic
|
27
27
|
|
28
28
|
category: deployment
|
data/scrolls/guard.rb
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
prepend_file 'Gemfile' do <<-RUBY
|
2
|
+
require 'rbconfig'
|
3
|
+
HOST_OS = RbConfig::CONFIG['host_os']
|
4
|
+
|
5
|
+
RUBY
|
6
|
+
end
|
7
|
+
|
8
|
+
append_file 'Gemfile' do <<-RUBY
|
9
|
+
|
10
|
+
guard_notifications = #{config['guard_notifications'].inspect}
|
11
|
+
group :development do
|
12
|
+
case HOST_OS
|
13
|
+
when /darwin/i
|
14
|
+
gem 'rb-fsevent'
|
15
|
+
gem 'ruby_gntp' if guard_notifications
|
16
|
+
when /linux/i
|
17
|
+
gem 'libnotify'
|
18
|
+
gem 'rb-inotify'
|
19
|
+
when /mswin|windows/i
|
20
|
+
gem 'rb-fchange'
|
21
|
+
gem 'win32console'
|
22
|
+
gem 'rb-notifu' if guard_notifications
|
23
|
+
end
|
24
|
+
end
|
25
|
+
RUBY
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
# LiveReload
|
30
|
+
|
31
|
+
application nil, :env => "development" do
|
32
|
+
"config.middleware.insert_before(Rack::Lock, Rack::LiveReload)"
|
33
|
+
end
|
34
|
+
|
35
|
+
gem_group :development do
|
36
|
+
gem 'guard-livereload'
|
37
|
+
gem 'yajl-ruby'
|
38
|
+
gem 'rack-livereload'
|
39
|
+
|
40
|
+
# Guard for other Scrolls
|
41
|
+
|
42
|
+
gem 'guard-bundler'
|
43
|
+
gem 'guard-test' if scrolls.include? 'test_unit'
|
44
|
+
|
45
|
+
KNOWN_GUARD_SCROLLS = %w[cucumber haml less passenger puma redis resque rspec unicorn]
|
46
|
+
KNOWN_GUARD_SCROLLS.each do |scroll|
|
47
|
+
gem "guard-#{scroll}" if scrolls.include? scroll
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
after_bundler do
|
52
|
+
run "bundle exec guard init"
|
53
|
+
|
54
|
+
# TODO move livereload to the top of the Guardfile so it is zippy quick
|
55
|
+
end
|
56
|
+
|
57
|
+
|
58
|
+
__END__
|
59
|
+
|
60
|
+
name: Guard
|
61
|
+
description: Command line tool to file system modification events; Powers Up with other scrolls!
|
62
|
+
author: drnic
|
63
|
+
website: https://github.com/guard/guard
|
64
|
+
|
65
|
+
requires: []
|
66
|
+
run_after: []
|
67
|
+
run_before: []
|
68
|
+
|
69
|
+
category: other
|
70
|
+
# exclusive:
|
71
|
+
|
72
|
+
config:
|
73
|
+
- guard_notifications:
|
74
|
+
type: boolean
|
75
|
+
prompt: "Enable desktop Guard/Growl notifications?"
|
data/scrolls/jquery.rb
CHANGED
@@ -1,20 +1,11 @@
|
|
1
|
-
|
2
|
-
after_bundler do
|
3
|
-
ui = config['ui'] ? ' --ui' : ''
|
4
|
-
generate "jquery:install#{ui}"
|
5
|
-
end
|
1
|
+
# No additional code required.
|
6
2
|
|
7
3
|
__END__
|
8
4
|
|
9
5
|
name: jQuery
|
10
|
-
description: "
|
11
|
-
author:
|
6
|
+
description: "jQuery as the JavaScript framework"
|
7
|
+
author: drnic
|
12
8
|
|
13
9
|
exclusive: javascript_framework
|
14
10
|
category: assets
|
15
|
-
tags: [javascript, framework, defaults]
|
16
11
|
|
17
|
-
config:
|
18
|
-
- ui:
|
19
|
-
type: boolean
|
20
|
-
prompt: Install jQuery UI?
|
data/scrolls/mysql.rb
CHANGED
@@ -1,12 +1,6 @@
|
|
1
|
-
|
2
|
-
gem "mysql2", :group => :production
|
3
|
-
else
|
4
|
-
gem "mysql2"
|
5
|
-
end
|
6
|
-
# TODO what about Windows?
|
7
|
-
# TODO what if you only want MySQL in production?
|
1
|
+
gem "mysql2"
|
8
2
|
|
9
|
-
# TODO
|
3
|
+
# TODO what about Windows?
|
10
4
|
|
11
5
|
# if scroll?("eycloud")
|
12
6
|
# mysql_versions = [
|
@@ -16,14 +10,42 @@ end
|
|
16
10
|
# @mysql_stack = multiple_choice("Create app to which Engine Yard Cloud account?", mysql_versions)
|
17
11
|
# end
|
18
12
|
|
13
|
+
after_bundler do
|
14
|
+
rake "db:create:all" if config['auto_create']
|
15
|
+
|
16
|
+
if config['populate_rake_task']
|
17
|
+
sample_rake = <<-RUBY
|
18
|
+
require './config/environment'
|
19
|
+
namespace :db do
|
20
|
+
desc "Populate the database with sample data"
|
21
|
+
task :sample do
|
22
|
+
end
|
23
|
+
task :populate => :sample
|
24
|
+
end
|
25
|
+
RUBY
|
26
|
+
File.open("lib/tasks/sample.rake", 'w') {|f| f.write(sample_rake)}
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
19
30
|
__END__
|
20
31
|
|
21
32
|
name: MySQL
|
22
|
-
description: Use MySQL for production database
|
33
|
+
description: Use MySQL for dev & production database
|
23
34
|
author: drnic
|
24
35
|
|
25
36
|
exclusive: orm
|
26
37
|
category: persistence
|
27
|
-
tags: [sql, orm, mysql]
|
28
38
|
|
29
|
-
run_before: [eycloud]
|
39
|
+
run_before: [eycloud]
|
40
|
+
|
41
|
+
args: -d mysql
|
42
|
+
|
43
|
+
config:
|
44
|
+
- auto_create:
|
45
|
+
type: boolean
|
46
|
+
prompt: "Create MySQL database with default configuration?"
|
47
|
+
|
48
|
+
- populate_rake_task:
|
49
|
+
type: boolean
|
50
|
+
prompt: "Add db:sample rake task?"
|
51
|
+
|
data/scrolls/passenger.rb
CHANGED
@@ -0,0 +1,54 @@
|
|
1
|
+
gem "pg"
|
2
|
+
|
3
|
+
gsub_file "config/database.yml", /username: .*/, "username: #{config['pg_username']}"
|
4
|
+
gsub_file "config/database.yml", /password: .*/, "username: #{config['pg_password']}"
|
5
|
+
|
6
|
+
# if scroll?("eycloud")
|
7
|
+
# @db_stack = "postgresql_91"
|
8
|
+
# end
|
9
|
+
|
10
|
+
after_bundler do
|
11
|
+
rake "db:create:all" if config['auto_create']
|
12
|
+
|
13
|
+
if config['populate_rake_task']
|
14
|
+
sample_rake = <<-RUBY
|
15
|
+
require './config/environment'
|
16
|
+
namespace :db do
|
17
|
+
desc "Populate the database with sample data"
|
18
|
+
task :sample do
|
19
|
+
end
|
20
|
+
task :populate => :sample
|
21
|
+
end
|
22
|
+
RUBY
|
23
|
+
File.open("lib/tasks/sample.rake", 'w') {|f| f.write(sample_rake)}
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
__END__
|
28
|
+
|
29
|
+
name: PostgreSQL
|
30
|
+
description: Use PostgreSQL for dev & production database
|
31
|
+
author: drnic
|
32
|
+
|
33
|
+
exclusive: orm
|
34
|
+
category: persistence
|
35
|
+
|
36
|
+
run_before: [eycloud]
|
37
|
+
|
38
|
+
args: -d postgresql
|
39
|
+
|
40
|
+
config:
|
41
|
+
- auto_create:
|
42
|
+
type: boolean
|
43
|
+
prompt: "Create PostgreSQL database with default configuration?"
|
44
|
+
|
45
|
+
- populate_rake_task:
|
46
|
+
type: boolean
|
47
|
+
prompt: "Add db:sample rake task?"
|
48
|
+
|
49
|
+
- pg_username:
|
50
|
+
type: string
|
51
|
+
prompt: "PostgreSQL username:"
|
52
|
+
- pg_password:
|
53
|
+
type: string
|
54
|
+
prompt: "PostgreSQL password:"
|
data/scrolls/prototype.rb
CHANGED
@@ -1,11 +1,21 @@
|
|
1
1
|
gem "prototype-rails"
|
2
2
|
|
3
|
+
after_bundler do
|
4
|
+
gsub_file "app/assets/javascripts/application.js", "//= require prototype_ujs", <<-EOS
|
5
|
+
//= require prototype_ujs
|
6
|
+
//= require effects
|
7
|
+
//= require dragdrop
|
8
|
+
//= require controls
|
9
|
+
EOS
|
10
|
+
end
|
11
|
+
|
3
12
|
__END__
|
4
13
|
|
5
14
|
name: Prototype
|
6
|
-
description: "
|
15
|
+
description: "Prototype.JS as the JavaScript framework"
|
7
16
|
author: mbleigh
|
8
17
|
|
9
18
|
exclusive: javascript_framework
|
10
19
|
category: assets
|
11
|
-
|
20
|
+
|
21
|
+
args: -j prototype
|
data/scrolls/rails_basics.rb
CHANGED
@@ -6,6 +6,10 @@ after_bundler do
|
|
6
6
|
remove_file "public/index.html"
|
7
7
|
remove_file "public/images/rails.png"
|
8
8
|
generate "controller home index"
|
9
|
+
gsub_file "app/controllers/home_controller.rb", /def index/, <<-RUBY
|
10
|
+
def index
|
11
|
+
flash.now[:notice] = "Welcome! - love Engine Yard Rails Wizard"
|
12
|
+
RUBY
|
9
13
|
route "root :to => 'home#index'"
|
10
14
|
|
11
15
|
run "mv README.rdoc RAILS_README.rdoc"
|
data/scrolls/resque.rb
CHANGED
@@ -4,8 +4,7 @@ say_wizard 'Applying fix suggested in https://github.com/defunkt/resque/pull/403
|
|
4
4
|
append_file "Rakefile", "\ntask 'resque:setup' => :environment # for https://github.com/defunkt/resque/pull/403\n"
|
5
5
|
|
6
6
|
if scroll? "eycloud_recipes_on_deploy"
|
7
|
-
gem 'eycloud-
|
8
|
-
|
7
|
+
gem 'eycloud-recipe-resque', :group => :eycloud
|
9
8
|
|
10
9
|
create_file "config/initializers/resque.rb", <<-RUBY
|
11
10
|
resque_yml = File.expand_path('../../resque.yml', __FILE__)
|
data/scrolls/simple_form.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
gem 'simple_form'
|
2
2
|
|
3
3
|
after_bundler do
|
4
|
-
if scroll? "
|
4
|
+
if scroll? "twitter_bootstrap"
|
5
5
|
generate "simple_form:install --bootstrap"
|
6
6
|
else
|
7
7
|
generate "simple_form:install"
|
@@ -13,7 +13,7 @@ __END__
|
|
13
13
|
name: Simple Form
|
14
14
|
description: Install Simple Form to generate nicely formatted forms.
|
15
15
|
author: jonochang
|
16
|
+
website: https://github.com/plataformatec/simple_form
|
16
17
|
|
17
18
|
exclusive: forms
|
18
|
-
category:
|
19
|
-
tags: [forms]
|
19
|
+
category: templating
|
@@ -5,12 +5,19 @@ end
|
|
5
5
|
after_bundler do
|
6
6
|
generate "bootstrap:install"
|
7
7
|
layout = config["twitter_bootstrap_layout"]
|
8
|
-
generate "bootstrap:layout #{layout}"
|
9
|
-
gsub_file "app/controllers/application_controller.rb", /class ApplicationController < ActionController::Base/, <<-RUBY
|
10
|
-
class ApplicationController < ActionController::Base
|
11
|
-
layout "#{layout}"
|
12
|
-
RUBY
|
8
|
+
generate "bootstrap:layout application #{layout} -f"
|
13
9
|
|
10
|
+
html_to_find = layout == "fluid" ? '<div class="row-fluid">' : '<div class="content">'
|
11
|
+
gsub_file "app/views/layouts/application.html.erb", /#{html_to_find}/, <<-HTML
|
12
|
+
<% flash.each do |name, msg| %>
|
13
|
+
<div class="alert alert-<%= name == :notice ? "success" : "error" %>">
|
14
|
+
<a class="close" data-dismiss="alert">×</a>
|
15
|
+
<%= msg %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
#{html_to_find}
|
19
|
+
HTML
|
20
|
+
|
14
21
|
end
|
15
22
|
|
16
23
|
__END__
|
@@ -22,6 +29,9 @@ category: stylesheet
|
|
22
29
|
exclusive: stylesheet
|
23
30
|
tags: [css, stylesheet]
|
24
31
|
|
32
|
+
requires: [simple_form]
|
33
|
+
run_before: [simple_form]
|
34
|
+
|
25
35
|
config:
|
26
36
|
- twitter_bootstrap_layout:
|
27
37
|
prompt: "Which Twitter Bootstrap layout?"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,55 @@
|
|
1
|
+
strategy_gem = ""
|
2
|
+
while strategy_gem.size == 0
|
3
|
+
strategy_gem = ask_wizard "Which rubygem contains the strategy you choose? (e.g. 'omniauth-github'; press ENTER to see all)"
|
4
|
+
|
5
|
+
if strategy_gem.size == 0
|
6
|
+
say_custom "omniauth", "Displaying all strategies"
|
7
|
+
run "gem list --remote omniauth-"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
gem 'omniauth', '~> 1.0'
|
12
|
+
gem strategy_gem
|
13
|
+
|
14
|
+
if strategy_gem =~ /omniauth-(.*)(?:-provider)?/
|
15
|
+
strategy = $1
|
16
|
+
else
|
17
|
+
strategy = "unknown"
|
18
|
+
end
|
19
|
+
|
20
|
+
after_bundler do
|
21
|
+
route "match '/auth/:provider/callback', :to => 'sessions#callback'"
|
22
|
+
file 'app/controllers/sessions_controller.rb', <<-RUBY
|
23
|
+
class SessionsController < ApplicationController
|
24
|
+
def callback
|
25
|
+
auth # Do what you want with the auth hash!
|
26
|
+
end
|
27
|
+
|
28
|
+
def auth
|
29
|
+
request.env['omniauth.auth']
|
30
|
+
end
|
31
|
+
end
|
32
|
+
RUBY
|
33
|
+
|
34
|
+
initializer "omniauth.rb", <<-RUBY
|
35
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
36
|
+
provider :#{strategy}, ENV['#{strategy.upcase}_KEY']
|
37
|
+
end
|
38
|
+
RUBY
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
# TODO consult https://raw.github.com/RailsApps/rails3-application-templates/master/rails3-mongoid-omniauth-template.rb
|
43
|
+
|
44
|
+
after_everything do
|
45
|
+
say_custom "omniauth", "NOTICE: Please consult the strategy for final instructions https://github.com/search?q=#{strategy}"
|
46
|
+
end
|
47
|
+
|
48
|
+
__END__
|
49
|
+
|
50
|
+
name: OmniAuth
|
51
|
+
description: "Install OmniAuth and a selected Strategy/Provider"
|
52
|
+
author: drnic
|
53
|
+
|
54
|
+
exclusive: authentication
|
55
|
+
category: authentication
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -11,10 +11,14 @@ describe RailsWizard::Template do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
describe '#scrolls_with_dependencies' do
|
14
|
-
def
|
14
|
+
def s(*deps)
|
15
15
|
mock(:Class, :requires => deps, :superclass => RailsWizard::Scroll)
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
|
+
def scroll(name)
|
19
|
+
RailsWizard::Scrolls[name]
|
20
|
+
end
|
21
|
+
|
18
22
|
subject do
|
19
23
|
@template = RailsWizard::Template.new([])
|
20
24
|
@template.stub!(:scrolls).and_return(@scrolls)
|
@@ -23,26 +27,31 @@ describe RailsWizard::Template do
|
|
23
27
|
end
|
24
28
|
|
25
29
|
it 'should return the same number scrolls if none have dependencies' do
|
26
|
-
@scrolls = [
|
30
|
+
@scrolls = [s, s]
|
27
31
|
subject.scrolls_with_dependencies.size.should == 2
|
28
32
|
end
|
29
33
|
|
30
34
|
it 'should handle simple dependencies' do
|
31
|
-
@scrolls = [
|
35
|
+
@scrolls = [s(s, s), s(s)]
|
32
36
|
subject.scrolls_with_dependencies.size.should == 5
|
33
37
|
end
|
34
38
|
|
35
39
|
it 'should handle multi-level dependencies' do
|
36
|
-
@scrolls = [
|
40
|
+
@scrolls = [s(s(s))]
|
37
41
|
subject.scrolls_with_dependencies.size.should == 3
|
38
42
|
end
|
39
43
|
|
40
44
|
it 'should uniqify' do
|
41
|
-
a =
|
42
|
-
b =
|
43
|
-
c =
|
45
|
+
a = s
|
46
|
+
b = s(a)
|
47
|
+
c = s(s, a, b)
|
44
48
|
@scrolls = [a,b,c]
|
45
49
|
subject.scrolls_with_dependencies.size.should == 4
|
46
50
|
end
|
51
|
+
|
52
|
+
it 'should resolve and sort' do
|
53
|
+
template = RailsWizard::Template.new([scroll('eycloud')])
|
54
|
+
template.resolve_scrolls.should == [scroll('eycloud_recipes_on_deploy'), scroll('git'), scroll('github'), scroll('eycloud')]
|
55
|
+
end
|
47
56
|
end
|
48
57
|
end
|
data/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ey_rails_wizard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-04-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: i18n
|
17
|
-
requirement: &
|
17
|
+
requirement: &70103438493620 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70103438493620
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: json
|
28
|
-
requirement: &
|
28
|
+
requirement: &70103438492940 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - =
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 1.6.5
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70103438492940
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: activesupport
|
39
|
-
requirement: &
|
39
|
+
requirement: &70103438508420 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '3.0'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70103438508420
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: thor
|
50
|
-
requirement: &
|
50
|
+
requirement: &70103438507640 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '0'
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70103438507640
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: rspec
|
61
|
-
requirement: &
|
61
|
+
requirement: &70103438506740 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ~>
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: 2.5.0
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *70103438506740
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: bundler
|
72
|
-
requirement: &
|
72
|
+
requirement: &70103438506100 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: 1.1.0
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *70103438506100
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: rails
|
83
|
-
requirement: &
|
83
|
+
requirement: &70103438505580 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ! '>='
|
@@ -88,10 +88,10 @@ dependencies:
|
|
88
88
|
version: 3.0.0
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *70103438505580
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: ZenTest
|
94
|
-
requirement: &
|
94
|
+
requirement: &70103438505000 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
97
97
|
- - ! '>='
|
@@ -99,7 +99,7 @@ dependencies:
|
|
99
99
|
version: '0'
|
100
100
|
type: :development
|
101
101
|
prerelease: false
|
102
|
-
version_requirements: *
|
102
|
+
version_requirements: *70103438505000
|
103
103
|
description: Quickly and easily create Rails application templates featuring dozens
|
104
104
|
of popular libraries tuned for Engine Yard Cloud
|
105
105
|
email:
|
@@ -132,73 +132,74 @@ files:
|
|
132
132
|
- lib/rails_wizard/template.rb
|
133
133
|
- sample.rb
|
134
134
|
- scrolls/active_admin.rb
|
135
|
-
- scrolls/activerecord.rb
|
136
|
-
- scrolls/cancan.rb
|
137
135
|
- scrolls/capybara.rb
|
138
|
-
- scrolls/carrierwave.rb
|
139
|
-
- scrolls/carrierwave_direct.rb
|
140
|
-
- scrolls/cartographer.rb
|
141
136
|
- scrolls/cucumber.rb
|
142
137
|
- scrolls/delayed_job.rb
|
143
|
-
- scrolls/devise.rb
|
144
|
-
- scrolls/devise_invitable.rb
|
145
138
|
- scrolls/env_yaml.rb
|
146
|
-
- scrolls/event_calendar.rb
|
147
139
|
- scrolls/eycloud.rb
|
148
140
|
- scrolls/eycloud_recipes_on_deploy.rb
|
149
|
-
- scrolls/factory_girl.rb
|
150
|
-
- scrolls/ffaker.rb
|
151
|
-
- scrolls/fixture_builder.rb
|
152
|
-
- scrolls/forgery.rb
|
153
141
|
- scrolls/git.rb
|
154
142
|
- scrolls/github.rb
|
155
|
-
- scrolls/
|
156
|
-
- scrolls/heroku.rb
|
157
|
-
- scrolls/hoptoad.rb
|
158
|
-
- scrolls/inherited_resources.rb
|
159
|
-
- scrolls/intercom.rb
|
160
|
-
- scrolls/jammit.rb
|
161
|
-
- scrolls/jasmine.rb
|
143
|
+
- scrolls/guard.rb
|
162
144
|
- scrolls/jquery.rb
|
163
|
-
- scrolls/mini_magick.rb
|
164
|
-
- scrolls/mongo_mapper.rb
|
165
|
-
- scrolls/mongohq.rb
|
166
|
-
- scrolls/mongoid.rb
|
167
|
-
- scrolls/mootools.rb
|
168
145
|
- scrolls/mysql.rb
|
169
|
-
- scrolls/newrelic.rb
|
170
|
-
- scrolls/nifty_generators.rb
|
171
|
-
- scrolls/oa_oauth.rb
|
172
|
-
- scrolls/omniauth.rb
|
173
|
-
- scrolls/paper_trail.rb
|
174
146
|
- scrolls/passenger.rb
|
175
|
-
- scrolls/
|
147
|
+
- scrolls/postgresql.rb
|
176
148
|
- scrolls/prototype.rb
|
177
149
|
- scrolls/puma.rb
|
178
|
-
- scrolls/rails_admin.rb
|
179
150
|
- scrolls/rails_basics.rb
|
180
|
-
- scrolls/rails_dev_tweaks.rb
|
181
|
-
- scrolls/rails_erd.rb
|
182
|
-
- scrolls/rails_footnotes.rb
|
183
|
-
- scrolls/ransack.rb
|
184
151
|
- scrolls/redis.rb
|
185
152
|
- scrolls/resque.rb
|
186
|
-
- scrolls/rmagick.rb
|
187
153
|
- scrolls/rspec.rb
|
188
|
-
- scrolls/sass.rb
|
189
|
-
- scrolls/sequel.rb
|
190
|
-
- scrolls/settingslogic.rb
|
191
|
-
- scrolls/shoulda_matchers.rb
|
192
|
-
- scrolls/sidekiq.rb
|
193
154
|
- scrolls/simple_form.rb
|
194
|
-
- scrolls/slim.rb
|
195
155
|
- scrolls/sqlite3.rb
|
196
156
|
- scrolls/test_unit.rb
|
197
157
|
- scrolls/thin.rb
|
198
|
-
- scrolls/thinking_sphinx.rb
|
199
158
|
- scrolls/twitter_bootstrap.rb
|
200
|
-
- scrolls/twitter_bootstrap_rails_v1.rb
|
201
159
|
- scrolls/unicorn.rb
|
160
|
+
- scrolls/zzz/activerecord.rb
|
161
|
+
- scrolls/zzz/cancan.rb
|
162
|
+
- scrolls/zzz/carrierwave.rb
|
163
|
+
- scrolls/zzz/carrierwave_direct.rb
|
164
|
+
- scrolls/zzz/cartographer.rb
|
165
|
+
- scrolls/zzz/devise.rb
|
166
|
+
- scrolls/zzz/devise_invitable.rb
|
167
|
+
- scrolls/zzz/event_calendar.rb
|
168
|
+
- scrolls/zzz/factory_girl.rb
|
169
|
+
- scrolls/zzz/ffaker.rb
|
170
|
+
- scrolls/zzz/fixture_builder.rb
|
171
|
+
- scrolls/zzz/forgery.rb
|
172
|
+
- scrolls/zzz/haml.rb
|
173
|
+
- scrolls/zzz/heroku.rb
|
174
|
+
- scrolls/zzz/hoptoad.rb
|
175
|
+
- scrolls/zzz/inherited_resources.rb
|
176
|
+
- scrolls/zzz/intercom.rb
|
177
|
+
- scrolls/zzz/jammit.rb
|
178
|
+
- scrolls/zzz/jasmine.rb
|
179
|
+
- scrolls/zzz/mini_magick.rb
|
180
|
+
- scrolls/zzz/mongo_mapper.rb
|
181
|
+
- scrolls/zzz/mongohq.rb
|
182
|
+
- scrolls/zzz/mongoid.rb
|
183
|
+
- scrolls/zzz/mootools.rb
|
184
|
+
- scrolls/zzz/newrelic.rb
|
185
|
+
- scrolls/zzz/nifty_generators.rb
|
186
|
+
- scrolls/zzz/oa_oauth.rb
|
187
|
+
- scrolls/zzz/omniauth.rb
|
188
|
+
- scrolls/zzz/paper_trail.rb
|
189
|
+
- scrolls/zzz/pow.rb
|
190
|
+
- scrolls/zzz/rails_admin.rb
|
191
|
+
- scrolls/zzz/rails_dev_tweaks.rb
|
192
|
+
- scrolls/zzz/rails_erd.rb
|
193
|
+
- scrolls/zzz/rails_footnotes.rb
|
194
|
+
- scrolls/zzz/ransack.rb
|
195
|
+
- scrolls/zzz/rmagick.rb
|
196
|
+
- scrolls/zzz/sass.rb
|
197
|
+
- scrolls/zzz/sequel.rb
|
198
|
+
- scrolls/zzz/settingslogic.rb
|
199
|
+
- scrolls/zzz/shoulda_matchers.rb
|
200
|
+
- scrolls/zzz/sidekiq.rb
|
201
|
+
- scrolls/zzz/slim.rb
|
202
|
+
- scrolls/zzz/thinking_sphinx.rb
|
202
203
|
- spec/rails_wizard/config_spec.rb
|
203
204
|
- spec/rails_wizard/recipe_spec.rb
|
204
205
|
- spec/rails_wizard/recipes/sanity_spec.rb
|
@@ -226,7 +227,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
226
227
|
version: '0'
|
227
228
|
segments:
|
228
229
|
- 0
|
229
|
-
hash:
|
230
|
+
hash: -1672131701213334566
|
230
231
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
231
232
|
none: false
|
232
233
|
requirements:
|
@@ -235,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
236
|
version: '0'
|
236
237
|
segments:
|
237
238
|
- 0
|
238
|
-
hash:
|
239
|
+
hash: -1672131701213334566
|
239
240
|
requirements: []
|
240
241
|
rubyforge_project:
|
241
242
|
rubygems_version: 1.8.17
|
data/scrolls/omniauth.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
gem 'omniauth', '~> 0.2.0'
|
2
|
-
|
3
|
-
after_bundler do
|
4
|
-
file 'app/controllers/sessions_controller.rb', "class SessionsController < ApplicationController\n def callback\n auth # Do what you want with the auth hash!\n end\n\n def auth; request.env['omniauth.auth'] end\nend"
|
5
|
-
route "match '/auth/:provider/callback', :to => 'sessions#callback'"
|
6
|
-
end
|
7
|
-
|
8
|
-
__END__
|
9
|
-
|
10
|
-
name: OmniAuth
|
11
|
-
description: "A basic setup of OmniAuth with a SessionsController to handle the request and callback phases."
|
12
|
-
author: mbleigh
|
13
|
-
|
14
|
-
exclusive: authentication
|
15
|
-
category: authentication
|
16
|
-
|
17
|
-
# TODO watch railscasts
|
@@ -1,144 +0,0 @@
|
|
1
|
-
gem 'twitter-bootstrap-rails', :git => 'https://github.com/jonochang/twitter-bootstrap-rails.git'
|
2
|
-
# TODO only in :group => :assets
|
3
|
-
# TODO if jruby, then use static assets
|
4
|
-
|
5
|
-
if config['use_simple_form']
|
6
|
-
after_everything do
|
7
|
-
gsub_file "config/initializers/simple_form.rb", '# config.label_text = lambda { |label, required| "#{required} #{label}" }', 'config.label_text = lambda { |label, required| "#{label} #{required}" }'
|
8
|
-
|
9
|
-
original_wrapper = <<-RB
|
10
|
-
config.wrappers :class => :input, :error_class => :field_with_errors do |b|
|
11
|
-
b.use :placeholder
|
12
|
-
b.use :label_input
|
13
|
-
b.use :hint, :tag => :span, :class => :hint
|
14
|
-
b.use :error, :tag => :span, :class => :error
|
15
|
-
end
|
16
|
-
RB
|
17
|
-
new_wrapper = <<-RB
|
18
|
-
|
19
|
-
config.wrappers :inline, :class => 'clearfix', :error_class => :error do |b|
|
20
|
-
b.use :placeholder
|
21
|
-
b.use :label
|
22
|
-
b.use :tag => 'div', :class => 'input' do |ba|
|
23
|
-
ba.use :input
|
24
|
-
ba.use :error, :tag => :span, :class => :'help-inline'
|
25
|
-
ba.use :hint, :tag => :span, :class => :'help-block'
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
config.wrappers :stacked, :class => "clearfix", :error_class => :error do |b|
|
30
|
-
b.use :placeholder
|
31
|
-
b.use :label
|
32
|
-
b.use :hint, :tag => :span, :class => :'help-block'
|
33
|
-
b.use :tag => 'div', :class => 'input' do |input|
|
34
|
-
input.use :input
|
35
|
-
input.use :error, :tag => :span, :class => :'help-inline'
|
36
|
-
end
|
37
|
-
end
|
38
|
-
RB
|
39
|
-
gsub_file "config/initializers/simple_form.rb", original_wrapper, new_wrapper
|
40
|
-
gsub_file "config/initializers/simple_form.rb", "# config.button_class = 'button'", "config.button_class = 'btn'"
|
41
|
-
|
42
|
-
application_layout_body = <<-ERB
|
43
|
-
<body>
|
44
|
-
|
45
|
-
<%= yield %>
|
46
|
-
|
47
|
-
</body>
|
48
|
-
ERB
|
49
|
-
|
50
|
-
application_layout_body_new = <<-ERB
|
51
|
-
<body>
|
52
|
-
<div class="topbar">
|
53
|
-
<div class="fill">
|
54
|
-
<div class="container">
|
55
|
-
|
56
|
-
<h3><%= link_to "TODO Logo", '/' %></h3>
|
57
|
-
|
58
|
-
<ul class="nav">
|
59
|
-
<li><%= link_to "Users", '/users' %></li>
|
60
|
-
</ul>
|
61
|
-
|
62
|
-
<% if not logged_in? %>
|
63
|
-
|
64
|
-
<ul class="nav secondary-nav">
|
65
|
-
</ul>
|
66
|
-
|
67
|
-
<% else %>
|
68
|
-
|
69
|
-
<ul class="nav secondary-nav">
|
70
|
-
<li class="menu">
|
71
|
-
<a class="menu" href="#">
|
72
|
-
<%= current_user.name %>
|
73
|
-
<i>(signed in with <%= current_user.provider.titleize %>)</i>
|
74
|
-
</a>
|
75
|
-
<ul class="menu-dropdown">
|
76
|
-
<li><%= link_to "My Questions", user_questions_path(current_user) %></li>
|
77
|
-
<li class="divider"></li>
|
78
|
-
<li><%= link_to "Sign out", signout_path %></li>
|
79
|
-
</ul>
|
80
|
-
</li>
|
81
|
-
</ul>
|
82
|
-
|
83
|
-
<% end %>
|
84
|
-
|
85
|
-
|
86
|
-
</div>
|
87
|
-
</div>
|
88
|
-
</div>
|
89
|
-
|
90
|
-
<div class="container">
|
91
|
-
<% if alert %>
|
92
|
-
<div class="alert-message error"><%= alert %></div>
|
93
|
-
<% end %>
|
94
|
-
|
95
|
-
<% if notice %>
|
96
|
-
<div class="alert-message info"><%= notice %></div>
|
97
|
-
<% end %>
|
98
|
-
|
99
|
-
<%= yield %>
|
100
|
-
</div>
|
101
|
-
|
102
|
-
</body>
|
103
|
-
|
104
|
-
ERB
|
105
|
-
|
106
|
-
gsub_file 'app/views/layouts/application.html.erb', application_layout_body, application_layout_body_new
|
107
|
-
|
108
|
-
end
|
109
|
-
|
110
|
-
create_file "app/assets/stylesheets/application.css.new", <<-CSS
|
111
|
-
/*
|
112
|
-
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
113
|
-
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
114
|
-
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
115
|
-
*= require_self
|
116
|
-
*= require_tree .
|
117
|
-
*= require bootstrap-1.3.0.min
|
118
|
-
*/
|
119
|
-
|
120
|
-
label {
|
121
|
-
margin-right: 20px;
|
122
|
-
}
|
123
|
-
CSS
|
124
|
-
|
125
|
-
run 'mv app/assets/stylesheets/application.css.new app/assets/stylesheets/application.css'
|
126
|
-
end
|
127
|
-
|
128
|
-
__END__
|
129
|
-
|
130
|
-
name: Twitter Bootstrap Rails
|
131
|
-
description: Add Twitter Bootstrap CSS to project
|
132
|
-
|
133
|
-
category: stylesheet
|
134
|
-
exclusive: stylesheet
|
135
|
-
tags: [css, stylesheet]
|
136
|
-
|
137
|
-
run_after: [simple_form]
|
138
|
-
config:
|
139
|
-
- use_simple_form:
|
140
|
-
type: boolean
|
141
|
-
prompt: "Using Simple Form?"
|
142
|
-
if_scroll: simple_form
|
143
|
-
|
144
|
-
|