appscrolls 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +8 -0
- data/.rspec +2 -0
- data/.travis.yml +6 -0
- data/ChangeLog.md +63 -0
- data/Gemfile +3 -0
- data/Guardfile +18 -0
- data/MIT_LICENSE +20 -0
- data/README.md +154 -0
- data/Rakefile +78 -0
- data/appscrolls.gemspec +32 -0
- data/bin/appscrolls +7 -0
- data/features/step_definitions/common_steps.rb +211 -0
- data/features/support/common.rb +51 -0
- data/features/support/env.rb +18 -0
- data/lib/appscrolls.rb +10 -0
- data/lib/appscrolls/command.rb +85 -0
- data/lib/appscrolls/config.rb +86 -0
- data/lib/appscrolls/scroll.rb +106 -0
- data/lib/appscrolls/scrolls.rb +38 -0
- data/lib/appscrolls/template.rb +67 -0
- data/lib/rails/generators/.DS_Store +0 -0
- data/lib/rails/generators/run_template/USAGE +13 -0
- data/lib/rails/generators/run_template/run_template_generator.rb +13 -0
- data/sample.rb +75 -0
- data/scrolls/active_admin.rb +19 -0
- data/scrolls/capybara.rb +34 -0
- data/scrolls/cucumber.rb +21 -0
- data/scrolls/delayed_job.rb +94 -0
- data/scrolls/env_yaml.rb +53 -0
- data/scrolls/eycloud.rb +72 -0
- data/scrolls/eycloud_recipes_on_deploy.rb +20 -0
- data/scrolls/git.rb +17 -0
- data/scrolls/github.rb +38 -0
- data/scrolls/guard.rb +75 -0
- data/scrolls/jquery.rb +11 -0
- data/scrolls/mysql.rb +51 -0
- data/scrolls/passenger.rb +11 -0
- data/scrolls/postgresql.rb +54 -0
- data/scrolls/prototype.rb +21 -0
- data/scrolls/puma.rb +11 -0
- data/scrolls/rails_basics.rb +54 -0
- data/scrolls/redis.rb +19 -0
- data/scrolls/resque.rb +59 -0
- data/scrolls/rspec.rb +21 -0
- data/scrolls/simple_form.rb +19 -0
- data/scrolls/split.rb +35 -0
- data/scrolls/spork.rb +19 -0
- data/scrolls/sqlite3.rb +10 -0
- data/scrolls/test_unit.rb +11 -0
- data/scrolls/thin.rb +10 -0
- data/scrolls/twitter_bootstrap.rb +41 -0
- data/scrolls/unicorn.rb +10 -0
- data/scrolls/zzz/activerecord.rb +69 -0
- data/scrolls/zzz/cancan.rb +16 -0
- data/scrolls/zzz/carrierwave.rb +42 -0
- data/scrolls/zzz/carrierwave_direct.rb +13 -0
- data/scrolls/zzz/cartographer.rb +33 -0
- data/scrolls/zzz/devise.rb +52 -0
- data/scrolls/zzz/devise_invitable.rb +23 -0
- data/scrolls/zzz/event_calendar.rb +12 -0
- data/scrolls/zzz/factory_girl.rb +38 -0
- data/scrolls/zzz/ffaker.rb +22 -0
- data/scrolls/zzz/fixture_builder.rb +35 -0
- data/scrolls/zzz/forgery.rb +15 -0
- data/scrolls/zzz/haml.rb +11 -0
- data/scrolls/zzz/heroku.rb +58 -0
- data/scrolls/zzz/hoptoad.rb +34 -0
- data/scrolls/zzz/inherited_resources.rb +12 -0
- data/scrolls/zzz/intercom.rb +35 -0
- data/scrolls/zzz/jammit.rb +43 -0
- data/scrolls/zzz/jasmine.rb +12 -0
- data/scrolls/zzz/mini_magick.rb +13 -0
- data/scrolls/zzz/mongo_mapper.rb +20 -0
- data/scrolls/zzz/mongohq.rb +61 -0
- data/scrolls/zzz/mongoid.rb +20 -0
- data/scrolls/zzz/mootools.rb +23 -0
- data/scrolls/zzz/newrelic.rb +11 -0
- data/scrolls/zzz/nifty_generators.rb +21 -0
- data/scrolls/zzz/oa_oauth.rb +12 -0
- data/scrolls/zzz/omniauth.rb +55 -0
- data/scrolls/zzz/paper_trail.rb +17 -0
- data/scrolls/zzz/pow.rb +12 -0
- data/scrolls/zzz/rails_admin.rb +22 -0
- data/scrolls/zzz/rails_dev_tweaks.rb +10 -0
- data/scrolls/zzz/rails_erd.rb +9 -0
- data/scrolls/zzz/rails_footnotes.rb +14 -0
- data/scrolls/zzz/ransack.rb +32 -0
- data/scrolls/zzz/rmagick.rb +13 -0
- data/scrolls/zzz/sass.rb +13 -0
- data/scrolls/zzz/sequel.rb +13 -0
- data/scrolls/zzz/settingslogic.rb +43 -0
- data/scrolls/zzz/shoulda_matchers.rb +11 -0
- data/scrolls/zzz/sidekiq.rb +23 -0
- data/scrolls/zzz/slim.rb +11 -0
- data/scrolls/zzz/thinking_sphinx.rb +14 -0
- data/scrolls/zzz/vanity.rb +35 -0
- data/spec/appscrolls/config_spec.rb +99 -0
- data/spec/appscrolls/scroll_spec.rb +103 -0
- data/spec/appscrolls/scrolls/sanity_spec.rb +30 -0
- data/spec/appscrolls/scrolls_spec.rb +24 -0
- data/spec/appscrolls/template_spec.rb +57 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/support/rails_directory.rb +17 -0
- data/spec/support/template_runner.rb +28 -0
- data/templates/helpers.erb +45 -0
- data/templates/layout.erb +44 -0
- data/templates/new_scroll.erb +28 -0
- data/templates/scroll.erb +10 -0
- data/version.rb +3 -0
- metadata +297 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
gem 'ffaker'
|
2
|
+
|
3
|
+
after_bundler do
|
4
|
+
# TODO - necessary to add this? or will bundler do it?
|
5
|
+
inject_into_file "spec/spec_helper.rb", :after => "require 'rspec/rails'\n" do
|
6
|
+
"require 'ffaker'\n"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
__END__
|
11
|
+
|
12
|
+
name: ffaker
|
13
|
+
description: "Fast Faker: Faker refactored for speed"
|
14
|
+
author: lightyrs
|
15
|
+
|
16
|
+
# necessary?
|
17
|
+
requires: [rspec]
|
18
|
+
run_after: [rspec]
|
19
|
+
|
20
|
+
category: testing
|
21
|
+
exclusive: fake-data
|
22
|
+
tags: [fake-data]
|
@@ -0,0 +1,35 @@
|
|
1
|
+
gem 'fixture_builder', :group => [:test]
|
2
|
+
gem 'mocha', :group => [:test]
|
3
|
+
|
4
|
+
after_everything do
|
5
|
+
|
6
|
+
create_file "spec/support/fixture_builder.rb", <<-RUBY
|
7
|
+
FixtureBuilder.configure do |fbuilder|
|
8
|
+
# rebuild fixtures automatically when these files change:
|
9
|
+
fbuilder.files_to_check += Dir["spec/factories/*.rb", "spec/support/fixture_builder.rb"]
|
10
|
+
|
11
|
+
# now declare objects
|
12
|
+
fbuilder.factory do
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
RUBY
|
17
|
+
|
18
|
+
inject_into_file "spec/spec_helper.rb", :after => "require 'rspec/rails'\n" do
|
19
|
+
"require 'spec/support/fixture_builder.rb'\n"
|
20
|
+
end
|
21
|
+
|
22
|
+
gsub_file "spec/spec_helper.rb", "config.mock_with :rspec", "# config.mock_with :rspec"
|
23
|
+
gsub_file "spec/spec_helper.rb", "# config.mock_with :mocha", " config.mock_with :mocha"
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
__END__
|
28
|
+
|
29
|
+
name: FixtureBuilder
|
30
|
+
description: "Allows you to build file fixtures from an object mother factory."
|
31
|
+
author: lightyrs
|
32
|
+
|
33
|
+
category: testing
|
34
|
+
run_after: [rspec]
|
35
|
+
requires: [rspec]
|
@@ -0,0 +1,15 @@
|
|
1
|
+
gem 'forgery'
|
2
|
+
|
3
|
+
after_bundler do
|
4
|
+
generate "forgery"
|
5
|
+
end
|
6
|
+
|
7
|
+
__END__
|
8
|
+
|
9
|
+
name: Forgery
|
10
|
+
description: A fake data generator that provides not only a host of basics and a rememberable syntax, but a customizable library to boot.
|
11
|
+
|
12
|
+
category: testing
|
13
|
+
exclusive: fake-data
|
14
|
+
tags: [fake-data]
|
15
|
+
|
data/scrolls/zzz/haml.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
heroku_name = app_name.gsub('_','')
|
2
|
+
|
3
|
+
after_everything do
|
4
|
+
if config['create']
|
5
|
+
say_wizard "Creating Heroku app '#{heroku_name}.heroku.com'"
|
6
|
+
while !system("heroku create #{heroku_name}")
|
7
|
+
heroku_name = ask_wizard("What do you want to call your app? ")
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
if config['staging']
|
12
|
+
staging_name = "#{heroku_name}-staging"
|
13
|
+
say_wizard "Creating staging Heroku app '#{staging_name}.heroku.com'"
|
14
|
+
while !system("heroku create #{staging_name}")
|
15
|
+
staging_name = ask_wizard("What do you want to call your staging app?")
|
16
|
+
end
|
17
|
+
git :remote => "rm heroku"
|
18
|
+
git :remote => "add production git@heroku.com:#{heroku_name}.git"
|
19
|
+
git :remote => "add staging git@heroku.com:#{staging_name}.git"
|
20
|
+
say_wizard "Created branches 'production' and 'staging' for Heroku deploy."
|
21
|
+
end
|
22
|
+
|
23
|
+
unless config['domain'].blank?
|
24
|
+
run "heroku addons:add custom_domains"
|
25
|
+
run "heroku domains:add #{config['domain']}"
|
26
|
+
end
|
27
|
+
|
28
|
+
git :push => "#{config['staging'] ? 'staging' : 'heroku'} master" if config['deploy']
|
29
|
+
end
|
30
|
+
|
31
|
+
__END__
|
32
|
+
|
33
|
+
name: Heroku
|
34
|
+
description: Create Heroku application and instantly deploy.
|
35
|
+
author: mbleigh
|
36
|
+
|
37
|
+
requires: [git]
|
38
|
+
run_after: [git]
|
39
|
+
exclusive: deployment
|
40
|
+
category: deployment
|
41
|
+
tags: [provider]
|
42
|
+
|
43
|
+
config:
|
44
|
+
- create:
|
45
|
+
prompt: "Automatically create appname.heroku.com?"
|
46
|
+
type: boolean
|
47
|
+
- staging:
|
48
|
+
prompt: "Create staging app? (appname-staging.heroku.com)"
|
49
|
+
type: boolean
|
50
|
+
if: create
|
51
|
+
- domain:
|
52
|
+
prompt: "Specify custom domain (or leave blank):"
|
53
|
+
type: string
|
54
|
+
if: create
|
55
|
+
- deploy:
|
56
|
+
prompt: "Deploy immediately?"
|
57
|
+
type: boolean
|
58
|
+
if: create
|
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
gem 'hoptoad_notifier'
|
3
|
+
|
4
|
+
if config['use_heroku']
|
5
|
+
after_everything do
|
6
|
+
say_wizard "Adding hoptoad:basic Heroku addon (you can always upgrade later)"
|
7
|
+
run "heroku addons:add hoptoad:basic"
|
8
|
+
generate "hoptoad --heroku"
|
9
|
+
end
|
10
|
+
else
|
11
|
+
after_bundler do
|
12
|
+
generate "hoptoad --api-key #{config['api_key']}"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
__END__
|
17
|
+
|
18
|
+
name: Hoptoad
|
19
|
+
description: Add Hoptoad exception reporting to your application.
|
20
|
+
|
21
|
+
category: services
|
22
|
+
exclusive: exception_notification
|
23
|
+
tags: [exception_notification]
|
24
|
+
run_after: [heroku]
|
25
|
+
|
26
|
+
config:
|
27
|
+
- use_heroku:
|
28
|
+
type: boolean
|
29
|
+
prompt: "Use the Hoptoad Heroku addon?"
|
30
|
+
if_scroll: heroku
|
31
|
+
- api_key:
|
32
|
+
prompt: "Enter Hoptoad API Key:"
|
33
|
+
type: string
|
34
|
+
unless: use_heroku
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# gem 'intercom-ruby', :group => [:development] # for API communication
|
2
|
+
gem 'intercom-rails' # to generate the javascript in the layout
|
3
|
+
|
4
|
+
|
5
|
+
# during initial generation (after "rails new")
|
6
|
+
# signin to intercom.io, fetch token, or enter tokens
|
7
|
+
# create new intercom app and get metadata
|
8
|
+
|
9
|
+
|
10
|
+
after_bundler do
|
11
|
+
generate %Q|intercom:install #{config["intercom_app_id"]}|
|
12
|
+
end
|
13
|
+
|
14
|
+
after_everything do
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
__END__
|
19
|
+
|
20
|
+
name: Intercom
|
21
|
+
description: Install intercom.io
|
22
|
+
author: drnic
|
23
|
+
website: http://intercom.io
|
24
|
+
|
25
|
+
requires: []
|
26
|
+
run_after: []
|
27
|
+
run_before: []
|
28
|
+
|
29
|
+
category: other # authentication, testing, persistence, javascript, css, services, deployment, and templating
|
30
|
+
# exclusive:
|
31
|
+
|
32
|
+
config:
|
33
|
+
- intercom_app_id:
|
34
|
+
type: string
|
35
|
+
prompt: "What is your Intercom app id for this new, fantastic app?"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
gem 'jammit'
|
2
|
+
|
3
|
+
after_bundler do
|
4
|
+
if config['pre_commit']
|
5
|
+
say_wizard "Adding git pre-commit hook to compile assets..."
|
6
|
+
create_file ".git/hooks/pre-commit", <<-BASH
|
7
|
+
#!/bin/sh
|
8
|
+
|
9
|
+
echo "Packaging assets with Jammit..."
|
10
|
+
jammit
|
11
|
+
git add public/assets
|
12
|
+
BASH
|
13
|
+
run "chmod +x .git/hooks/pre-commit"
|
14
|
+
end
|
15
|
+
|
16
|
+
create_file "config/assets.yml", <<-YAML
|
17
|
+
javascripts:
|
18
|
+
app:
|
19
|
+
- public/javascripts/*.js
|
20
|
+
stylesheets:
|
21
|
+
app:
|
22
|
+
- public/stylesheets/*.css
|
23
|
+
YAML
|
24
|
+
|
25
|
+
gsub_file "app/views/layouts/application.html.erb", "<%= javascript_include_tag :defaults %>", "<%= include_javascripts :app %>"
|
26
|
+
gsub_file "app/views/layouts/application.html.erb", "<%= stylesheet_link_tag :all %>", "<%= include_stylesheets :app %>"
|
27
|
+
end
|
28
|
+
|
29
|
+
__END__
|
30
|
+
|
31
|
+
name: Jammit
|
32
|
+
description: "Use Jammit to package your application's assets."
|
33
|
+
author: mbleigh
|
34
|
+
# http://documentcloud.github.com/jammit/
|
35
|
+
|
36
|
+
exclusive: asset_packaging
|
37
|
+
category: assets
|
38
|
+
tags: [assets, asset_packaging, packaging]
|
39
|
+
|
40
|
+
config:
|
41
|
+
- pre_commit:
|
42
|
+
type: boolean
|
43
|
+
prompt: "Create a git pre-commit hook to locally generate assets?"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
gem 'bson_ext'
|
2
|
+
gem 'mongo_mapper', '>=0.9'
|
3
|
+
|
4
|
+
after_bundler do
|
5
|
+
generate 'mongo_mapper:config'
|
6
|
+
end
|
7
|
+
|
8
|
+
__END__
|
9
|
+
|
10
|
+
name: MongoMapper
|
11
|
+
description: "Use MongoDB with MongoMapper as your primary datastore."
|
12
|
+
author: mbleigh
|
13
|
+
|
14
|
+
exclusive: orm
|
15
|
+
category: persistence
|
16
|
+
tags: [mongodb, orm]
|
17
|
+
|
18
|
+
args: ["-O"]
|
19
|
+
|
20
|
+
# TODO eycloud
|
@@ -0,0 +1,61 @@
|
|
1
|
+
if config['use_heroku']
|
2
|
+
|
3
|
+
header = <<-YAML
|
4
|
+
<% if ENV['MONGOHQ_URL'] %>
|
5
|
+
<% mongohq = URI.parse(ENV['MONGOHQ_URL']) %>
|
6
|
+
mongohq:
|
7
|
+
host: <%= mongohq.host %>
|
8
|
+
port: <%= mongohq.port %>
|
9
|
+
database: <%= mongohq.path.sub '/', '' %>
|
10
|
+
username: <%= mongohq.user %>
|
11
|
+
password: <%= mongohq.password %>
|
12
|
+
<% end %>
|
13
|
+
YAML
|
14
|
+
|
15
|
+
after_everything do
|
16
|
+
say_wizard 'Adding mongohq:free addon (you can always upgrade later)'
|
17
|
+
system 'heroku addons:add mongohq:free'
|
18
|
+
end
|
19
|
+
else
|
20
|
+
mongohq = URI.parse(config['uri'])
|
21
|
+
|
22
|
+
header = <<-YAML
|
23
|
+
mongohq:
|
24
|
+
host: #{mongohq.host}
|
25
|
+
port: #{mongohq.port}
|
26
|
+
database: #{mongohq.path.sub '/',''}
|
27
|
+
username: #{mongohq.user}
|
28
|
+
password: #{mongohq.password}
|
29
|
+
YAML
|
30
|
+
end
|
31
|
+
|
32
|
+
after_bundler do
|
33
|
+
mongo_yml = "config/mongo#{'id' if scroll?('mongoid')}.yml"
|
34
|
+
|
35
|
+
prepend_file mongo_yml, header
|
36
|
+
inject_into_file mongo_yml, " <<: *mongohq\n", :after => "production:\n <<: *defaults\n"
|
37
|
+
end
|
38
|
+
|
39
|
+
__END__
|
40
|
+
|
41
|
+
name: MongoHQ
|
42
|
+
description: "Utilize MongoHQ as the production data host for your application."
|
43
|
+
author: mbleigh
|
44
|
+
|
45
|
+
requires_any: [mongo_mapper, mongoid]
|
46
|
+
run_after: [mongo_mapper, mongoid, heroku]
|
47
|
+
exclusive: mongodb_host
|
48
|
+
category: services
|
49
|
+
tags: [mongodb]
|
50
|
+
|
51
|
+
config:
|
52
|
+
- use_heroku:
|
53
|
+
type: boolean
|
54
|
+
prompt: "Use the MongoHQ Heroku addon?"
|
55
|
+
if_scroll: heroku
|
56
|
+
- uri:
|
57
|
+
type: string
|
58
|
+
prompt: "Enter your MongoHQ URI:"
|
59
|
+
unless: use_heroku
|
60
|
+
|
61
|
+
# TODO eycloud partners
|
@@ -0,0 +1,20 @@
|
|
1
|
+
gem 'bson_ext'
|
2
|
+
gem 'mongoid', '>= 2.0.1'
|
3
|
+
|
4
|
+
after_bundler do
|
5
|
+
generate 'mongoid:config'
|
6
|
+
end
|
7
|
+
|
8
|
+
__END__
|
9
|
+
|
10
|
+
name: Mongoid
|
11
|
+
description: "Utilize MongoDB with Mongoid as the ORM."
|
12
|
+
author: mbleigh
|
13
|
+
|
14
|
+
category: persistence
|
15
|
+
exclusive: orm
|
16
|
+
tags: [orm, mongodb]
|
17
|
+
|
18
|
+
args: ["-O"]
|
19
|
+
|
20
|
+
# TODO eycloud
|
@@ -0,0 +1,23 @@
|
|
1
|
+
inside "public/javascripts" do
|
2
|
+
get "https://github.com/kevinvaldek/mootools-ujs/raw/master/Source/rails.js", "rails.js"
|
3
|
+
get "http://ajax.googleapis.com/ajax/libs/mootools/1.3.1/mootools-yui-compressed.js", "mootools.min.js"
|
4
|
+
end
|
5
|
+
|
6
|
+
gsub_file "config/application.rb", /# JavaScript.*\n/, ""
|
7
|
+
gsub_file "config/application.rb", /# config\.action_view\.javascript.*\n/, ""
|
8
|
+
|
9
|
+
application do
|
10
|
+
"\n config.action_view.javascript_expansions[:defaults] = %w(mootools.min rails)\n"
|
11
|
+
end
|
12
|
+
|
13
|
+
__END__
|
14
|
+
|
15
|
+
name: MooTools
|
16
|
+
description: "Adds MooTools and MooTools-compatible UJS helpers."
|
17
|
+
author: mbleigh
|
18
|
+
|
19
|
+
exclusive: javascript_framework
|
20
|
+
category: assets
|
21
|
+
tags: [javascript, framework]
|
22
|
+
|
23
|
+
args: ["-J"]
|
@@ -0,0 +1,11 @@
|
|
1
|
+
gem 'newrelic_rpm'
|
2
|
+
|
3
|
+
__END__
|
4
|
+
|
5
|
+
name: New Relic RPM
|
6
|
+
description: Monitor applications with New Relic
|
7
|
+
author: drnic
|
8
|
+
website: https://support.cloud.engineyard.com/entries/21016493-monitor-applications-with-new-relic-on-engine-yard-cloud
|
9
|
+
|
10
|
+
category: deployment
|
11
|
+
exclusive: app-monitoring
|