rails_apps_composer 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/recipes/apps4.rb +99 -0
- data/recipes/railsapps.rb +69 -9
- data/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62f9f67ee95bc277e3ac6e5497556c3961226024
|
4
|
+
data.tar.gz: 6f90fe93491f23b20d9878f7b105831f3a2fa268
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be17d2854b3ee536dc00d47fff447144d35fda168e10363df4f23c94e0e78d5fc501b6a10f785d343bc6d97a50e843443426b311a97554b0ad08727152915b1e
|
7
|
+
data.tar.gz: a3fb11ec39d08fd3c3c78522839c1e9bdef2d286bb7326e726bd872f4ffb4ef098147c6867c871129010d3c69cb16bd309d85f4a9284dd0776a47e9d13baae84
|
data/recipes/apps4.rb
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
# Application template recipe for the rails_apps_composer. Change the recipe here:
|
2
|
+
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/apps4.rb
|
3
|
+
|
4
|
+
if prefer :apps4, 'simple-test'
|
5
|
+
after_everything do
|
6
|
+
say_wizard "recipe running after 'bundle install'"
|
7
|
+
end # after_bundler
|
8
|
+
end # simple-test
|
9
|
+
|
10
|
+
if prefer :apps4, 'learn-rails'
|
11
|
+
|
12
|
+
after_everything do
|
13
|
+
say_wizard "recipe running after 'bundle install'"
|
14
|
+
repo = 'https://raw.github.com/RailsApps/learn-rails/master/'
|
15
|
+
|
16
|
+
# >-------------------------------[ Clean up starter app ]--------------------------------<
|
17
|
+
|
18
|
+
gsub_file 'Gemfile', /gem 'sdoc'/, "# gem 'sdoc'"
|
19
|
+
# remove commented lines and multiple blank lines from Gemfile
|
20
|
+
# thanks to https://github.com/perfectline/template-bucket/blob/master/cleanup.rb
|
21
|
+
gsub_file 'Gemfile', /#.*\n/, "\n"
|
22
|
+
gsub_file 'Gemfile', /\n^\s*\n/, "\n"
|
23
|
+
# remove commented lines and multiple blank lines from config/routes.rb
|
24
|
+
gsub_file 'config/routes.rb', / #.*\n/, "\n"
|
25
|
+
gsub_file 'config/routes.rb', /\n^\s*\n/, "\n"
|
26
|
+
# GIT
|
27
|
+
git :add => '-A' if prefer :git, true
|
28
|
+
git :commit => '-qm "rails_apps_composer: clean up starter app"' if prefer :git, true
|
29
|
+
|
30
|
+
# >-------------------------------[ Gems ]--------------------------------<
|
31
|
+
|
32
|
+
add_gem 'activerecord-tableless'
|
33
|
+
add_gem 'high_voltage'
|
34
|
+
add_gem 'gibbon'
|
35
|
+
gsub_file 'Gemfile', /gem 'sqlite3'\n/, ''
|
36
|
+
add_gem 'sqlite3', :group => :development
|
37
|
+
add_gem 'pg', :group => :production
|
38
|
+
add_gem 'thin', :group => :production
|
39
|
+
add_gem 'rails_on_heroku', :group => :production
|
40
|
+
|
41
|
+
# >-------------------------------[ Models ]--------------------------------<
|
42
|
+
|
43
|
+
copy_from_repo 'app/models/contact.rb', :repo => repo
|
44
|
+
copy_from_repo 'app/models/visitor.rb', :repo => repo
|
45
|
+
|
46
|
+
# >-------------------------------[ Init ]--------------------------------<
|
47
|
+
copy_from_repo 'config/application.yml', :repo => repo
|
48
|
+
remove_file 'config/application.example.yml'
|
49
|
+
copy_file destination_root + '/config/application.yml', destination_root + '/config/application.example.yml'
|
50
|
+
|
51
|
+
# >-------------------------------[ Controllers ]--------------------------------<
|
52
|
+
|
53
|
+
copy_from_repo 'app/controllers/contacts_controller.rb', :repo => repo
|
54
|
+
copy_from_repo 'app/controllers/visitors_controller.rb', :repo => repo
|
55
|
+
|
56
|
+
# >-------------------------------[ Mailers ]--------------------------------<
|
57
|
+
|
58
|
+
generate 'mailer UserMailer'
|
59
|
+
copy_from_repo 'app/mailers/user_mailer.rb', :repo => repo
|
60
|
+
|
61
|
+
# >-------------------------------[ Views ]--------------------------------<
|
62
|
+
|
63
|
+
copy_from_repo 'app/views/contacts/new.html.erb', :repo => repo
|
64
|
+
copy_from_repo 'app/views/layouts/_messages.html.erb', :repo => repo
|
65
|
+
copy_from_repo 'app/views/layouts/_navigation.html.erb', :repo => repo
|
66
|
+
copy_from_repo 'app/views/layouts/application.html.erb', :repo => repo
|
67
|
+
copy_from_repo 'app/views/pages/about.html.erb', :repo => repo
|
68
|
+
copy_from_repo 'app/views/user_mailer/contact_email.html.erb', :repo => repo
|
69
|
+
copy_from_repo 'app/views/user_mailer/contact_email.text.erb', :repo => repo
|
70
|
+
copy_from_repo 'app/views/visitors/new.html.erb', :repo => repo
|
71
|
+
|
72
|
+
# >-------------------------------[ Routes ]--------------------------------<
|
73
|
+
|
74
|
+
copy_from_repo 'config/routes.rb', :repo => repo
|
75
|
+
### CORRECT APPLICATION NAME ###
|
76
|
+
gsub_file 'config/routes.rb', /^.*.routes.draw do/, "#{app_const}.routes.draw do"
|
77
|
+
|
78
|
+
# >-------------------------------[ Assets ]--------------------------------<
|
79
|
+
|
80
|
+
copy_from_repo 'app/assets/javascripts/application.js', :repo => repo
|
81
|
+
copy_from_repo 'app/assets/javascripts/segmentio.js', :repo => repo
|
82
|
+
copy_from_repo 'app/assets/stylesheets/application.css.scss', :repo => repo
|
83
|
+
copy_from_repo 'app/assets/stylesheets/bootstrap_and_overrides.css.scss', :repo => repo
|
84
|
+
|
85
|
+
### GIT ###
|
86
|
+
git :add => '-A' if prefer :git, true
|
87
|
+
git :commit => '-qm "rails_apps_composer: learn-rails app"' if prefer :git, true
|
88
|
+
end # after_bundler
|
89
|
+
end # learn-rails
|
90
|
+
|
91
|
+
__END__
|
92
|
+
|
93
|
+
name: apps4
|
94
|
+
description: "Install RailsApps starter applications for Rails 4.0."
|
95
|
+
author: RailsApps
|
96
|
+
|
97
|
+
requires: [core]
|
98
|
+
run_after: [setup, gems]
|
99
|
+
category: apps
|
data/recipes/railsapps.rb
CHANGED
@@ -1,15 +1,75 @@
|
|
1
1
|
# Application template recipe for the rails_apps_composer. Change the recipe here:
|
2
2
|
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/railsapps.rb
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
["
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
4
|
+
case Rails::VERSION::MAJOR.to_s
|
5
|
+
when "3"
|
6
|
+
prefs[:railsapps] = multiple_choice "Install an example application for Rails 3.2?",
|
7
|
+
[["I want to build my own application", "none"],
|
8
|
+
["membership/subscription/saas", "saas"],
|
9
|
+
["rails-prelaunch-signup", "rails-prelaunch-signup"],
|
10
|
+
["rails3-bootstrap-devise-cancan", "rails3-bootstrap-devise-cancan"],
|
11
|
+
["rails3-devise-rspec-cucumber", "rails3-devise-rspec-cucumber"],
|
12
|
+
["rails3-mongoid-devise", "rails3-mongoid-devise"],
|
13
|
+
["rails3-mongoid-omniauth", "rails3-mongoid-omniauth"],
|
14
|
+
["rails3-subdomains", "rails3-subdomains"]] unless prefs.has_key? :railsapps
|
15
|
+
when "4"
|
16
|
+
prefs[:apps4] = multiple_choice "Install an example application for Rails 4.0?",
|
17
|
+
[["simple-test", "simple-test"],
|
18
|
+
["I want to build my own application", "none"],
|
19
|
+
["Build a RailsApps starter application", "railsapps"],
|
20
|
+
["Build a contributed application", "contributed_app"]] unless prefs.has_key? :apps4
|
21
|
+
case prefs[:apps4]
|
22
|
+
when 'railsapps'
|
23
|
+
prefs[:apps4] = multiple_choice "Only one starter app is currently available.",
|
24
|
+
[["learn-rails", "learn-rails"]]
|
25
|
+
when 'contributed_app'
|
26
|
+
prefs[:apps4] = multiple_choice "No contributed applications are available.",
|
27
|
+
[["continue", "none"]]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
case prefs[:apps4]
|
32
|
+
when 'simple-test'
|
33
|
+
prefs[:dev_webserver] = 'webrick'
|
34
|
+
prefs[:prod_webserver] = 'same'
|
35
|
+
prefs[:templates] = 'erb'
|
36
|
+
prefs[:git] = false
|
37
|
+
prefs[:github] = false
|
38
|
+
prefs[:database] = 'sqlite'
|
39
|
+
prefs[:unit_test] = false
|
40
|
+
prefs[:integration] = false
|
41
|
+
prefs[:fixtures] = false
|
42
|
+
prefs[:frontend] = false
|
43
|
+
prefs[:bootstrap] = false
|
44
|
+
prefs[:email] = false
|
45
|
+
prefs[:authentication] = false
|
46
|
+
prefs[:devise_modules] = false
|
47
|
+
prefs[:authorization] = false
|
48
|
+
prefs[:starter_app] = false
|
49
|
+
prefs[:form_builder] = false
|
50
|
+
prefs[:quiet_assets] = false
|
51
|
+
prefs[:local_env_file] = false
|
52
|
+
prefs[:better_errors] = false
|
53
|
+
prefs[:ban_spiders] = false
|
54
|
+
prefs[:continuous_testing] = false
|
55
|
+
when 'learn-rails'
|
56
|
+
prefs[:git] = true
|
57
|
+
prefs[:database] = 'sqlite'
|
58
|
+
prefs[:unit_test] = false
|
59
|
+
prefs[:integration] = false
|
60
|
+
prefs[:fixtures] = false
|
61
|
+
prefs[:frontend] = 'bootstrap'
|
62
|
+
prefs[:bootstrap] = 'sass'
|
63
|
+
prefs[:email] = 'gmail'
|
64
|
+
prefs[:authentication] = false
|
65
|
+
prefs[:devise_modules] = false
|
66
|
+
prefs[:authorization] = false
|
67
|
+
prefs[:starter_app] = false
|
68
|
+
prefs[:form_builder] = 'simple_form'
|
69
|
+
prefs[:quiet_assets] = true
|
70
|
+
prefs[:local_env_file] = true
|
71
|
+
prefs[:better_errors] = true
|
72
|
+
end
|
13
73
|
|
14
74
|
case prefs[:railsapps]
|
15
75
|
when 'saas'
|
data/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_apps_composer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Kehoe
|
@@ -138,6 +138,7 @@ files:
|
|
138
138
|
- lib/rails_wizard/recipes.rb
|
139
139
|
- lib/rails_wizard/template.rb
|
140
140
|
- lib/rails_wizard.rb
|
141
|
+
- recipes/apps4.rb
|
141
142
|
- recipes/controllers.rb
|
142
143
|
- recipes/core.rb
|
143
144
|
- recipes/email.rb
|