rails_apps_composer 2.2.21 → 2.2.22

Sign up to get free protection for your applications and to get access to all the features.
data/recipes/email.rb CHANGED
@@ -55,6 +55,11 @@ RUBY
55
55
  TEXT
56
56
  inject_into_file 'config/environments/development.rb', gmail_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
57
57
  inject_into_file 'config/environments/production.rb', gmail_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
58
+ append_file 'config/local_env.example.yml' do <<-FILE
59
+ GMAIL_USERNAME: 'Your_Username'
60
+ GMAIL_PASSWORD: 'Your_Password'
61
+ FILE
62
+ end
58
63
  end
59
64
  ### SENDGRID ACCOUNT
60
65
  if prefer :email, 'sendgrid'
@@ -71,10 +76,15 @@ TEXT
71
76
  TEXT
72
77
  inject_into_file 'config/environments/development.rb', sendgrid_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
73
78
  inject_into_file 'config/environments/production.rb', sendgrid_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
79
+ append_file 'config/local_env.example.yml' do <<-FILE
80
+ SENDGRID_USERNAME: 'Your_Username'
81
+ SENDGRID_PASSWORD: 'Your_Password'
82
+ FILE
83
+ end
74
84
  end
75
- ### MANDRILL ACCOUNT
76
- if prefer :email, 'mandrill'
77
- mandrill_configuration_text = <<-TEXT
85
+ ### MANDRILL ACCOUNT
86
+ if prefer :email, 'mandrill'
87
+ mandrill_configuration_text = <<-TEXT
78
88
  \n
79
89
  config.action_mailer.smtp_settings = {
80
90
  :address => "smtp.mandrillapp.com",
@@ -83,12 +93,17 @@ TEXT
83
93
  :password => ENV["MANDRILL_API_KEY"]
84
94
  }
85
95
  TEXT
86
- inject_into_file 'config/environments/development.rb', mandrill_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
87
- inject_into_file 'config/environments/production.rb', mandrill_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
96
+ inject_into_file 'config/environments/development.rb', mandrill_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
97
+ inject_into_file 'config/environments/production.rb', mandrill_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
98
+ append_file 'config/local_env.example.yml' do <<-FILE
99
+ MANDRILL_USERNAME: 'Your_Username'
100
+ MANDRILL_API_KEY: 'Your_API_Key'
101
+ FILE
88
102
  end
89
- ### GIT
90
- git :add => '-A' if prefer :git, true
91
- git :commit => '-qm "rails_apps_composer: set email accounts"' if prefer :git, true
103
+ end
104
+ ### GIT
105
+ git :add => '-A' if prefer :git, true
106
+ git :commit => '-qm "rails_apps_composer: set email accounts"' if prefer :git, true
92
107
  end # after_bundler
93
108
 
94
109
  __END__
data/recipes/extras.rb CHANGED
@@ -10,13 +10,34 @@ if prefs[:quiet_assets]
10
10
  gem 'quiet_assets', '>= 1.0.1', :group => :development
11
11
  end
12
12
 
13
+ ## LOCAL_ENV.YML FILE
14
+ if config['local_env_file']
15
+ prefs[:local_env_file] = true
16
+ end
17
+ if prefs[:local_env_file]
18
+ say_wizard "recipe creating local_env.yml file for environment variables"
19
+ copy_from_repo 'config/local_env.example.yml'
20
+ inject_into_file 'config/application.rb', :after => "config.assets.version = '1.0'\n" do <<-RUBY
21
+
22
+ # Set local environment variables from a file /config/local_env.yml
23
+ # See http://railsapps.github.com/rails-environment-variables.html
24
+ config.before_configuration do
25
+ env_file = File.join(Rails.root, 'config', 'local_env.yml')
26
+ YAML.load(File.open(env_file)).each do |key, value|
27
+ ENV[key.to_s] = value
28
+ end if File.exists?(env_file)
29
+ end
30
+ RUBY
31
+ end
32
+ end
33
+
13
34
  ## BETTER ERRORS
14
35
  if config['better_errors']
15
36
  prefs[:better_errors] = true
16
37
  end
17
38
  if prefs[:better_errors]
18
39
  say_wizard "recipe adding better_errors gem"
19
- gem 'better_errors', '>= 0.0.8', :group => :development
40
+ gem 'better_errors', '>= 0.2.0', :group => :development
20
41
  gem 'binding_of_caller', '>= 0.6.8', :group => :development
21
42
  end
22
43
 
@@ -66,7 +87,6 @@ if prefs[:rvmrc]
66
87
  end
67
88
  say_wizard "creating RVM gemset '#{app_name}'"
68
89
  RVM.gemset_create app_name
69
- run "rvm rvmrc trust"
70
90
  say_wizard "switching to gemset '#{app_name}'"
71
91
  # RVM.gemset_use! requires rvm version 1.11.3.5 or newer
72
92
  rvm_spec =
@@ -147,6 +167,9 @@ config:
147
167
  - quiet_assets:
148
168
  type: boolean
149
169
  prompt: Reduce assets logger noise during development?
170
+ - local_env_file:
171
+ type: boolean
172
+ prompt: Use a local_env.yml file for environment variables?
150
173
  - better_errors:
151
174
  type: boolean
152
175
  prompt: Improve error reporting with 'better_errors' during development?
data/recipes/gems.rb CHANGED
@@ -80,7 +80,7 @@ gem 'compass-rails', '>= 1.0.3', :group => :assets if prefer :frontend, 'foundat
80
80
  gem 'zurb-foundation', '>= 3.2.3', :group => :assets if prefer :frontend, 'foundation'
81
81
  if prefer :bootstrap, 'less'
82
82
  gem 'less-rails', '>= 2.2.6', :group => :assets
83
- gem 'twitter-bootstrap-rails', '>= 2.1.7', :group => :assets
83
+ gem 'twitter-bootstrap-rails', '>= 2.1.8', :group => :assets
84
84
  # install gem 'therubyracer' to use Less
85
85
  gem 'therubyracer', '>= 0.11.0', :group => :assets, :platform => :ruby
86
86
  end
data/recipes/models.rb CHANGED
@@ -53,6 +53,11 @@ RUBY
53
53
  ### OMNIAUTH ###
54
54
  if prefer :authentication, 'omniauth'
55
55
  repo = 'https://raw.github.com/RailsApps/rails3-mongoid-omniauth/master/'
56
+ append_file 'config/local_env.example.yml' do <<-FILE
57
+ OMNIAUTH_PROVIDER_KEY: 'Your_OmniAuth_Provider_Key'
58
+ OMNIAUTH_PROVIDER_SECRET: 'Your_OmniAuth_Provider_Secret'
59
+ FILE
60
+ end
56
61
  copy_from_repo 'config/initializers/omniauth.rb', :repo => repo
57
62
  gsub_file 'config/initializers/omniauth.rb', /twitter/, prefs[:omniauth_provider] unless prefer :omniauth_provider, 'twitter'
58
63
  generate 'model User name:string email:string provider:string uid:string' unless prefer :orm, 'mongoid'
data/recipes/railsapps.rb CHANGED
@@ -27,6 +27,7 @@ case prefs[:railsapps]
27
27
  prefs[:starter_app] = 'admin_app'
28
28
  prefs[:form_builder] = 'simple_form'
29
29
  prefs[:quiet_assets] = true
30
+ prefs[:local_env_file] = true
30
31
  prefs[:better_errors] = true
31
32
  when 'rails-prelaunch-signup'
32
33
  prefs[:git] = true
@@ -43,6 +44,7 @@ case prefs[:railsapps]
43
44
  prefs[:starter_app] = 'admin_app'
44
45
  prefs[:form_builder] = 'simple_form'
45
46
  prefs[:quiet_assets] = true
47
+ prefs[:local_env_file] = true
46
48
  prefs[:better_errors] = true
47
49
  if prefer :git, true
48
50
  prefs[:prelaunch_branch] = multiple_choice "Git branch for the prelaunch app?", [["wip (work-in-progress)", "wip"], ["master", "master"], ["prelaunch", "prelaunch"], ["staging", "staging"]]
@@ -67,6 +69,7 @@ case prefs[:railsapps]
67
69
  prefs[:starter_app] = 'admin_app'
68
70
  prefs[:form_builder] = 'simple_form'
69
71
  prefs[:quiet_assets] = true
72
+ prefs[:local_env_file] = true
70
73
  prefs[:better_errors] = true
71
74
  when 'rails3-devise-rspec-cucumber'
72
75
  prefs[:git] = true
@@ -82,6 +85,7 @@ case prefs[:railsapps]
82
85
  prefs[:starter_app] = 'users_app'
83
86
  prefs[:form_builder] = 'none'
84
87
  prefs[:quiet_assets] = true
88
+ prefs[:local_env_file] = true
85
89
  prefs[:better_errors] = true
86
90
  when 'rails3-devise-rspec-cucumber-fabrication'
87
91
  prefs[:git] = true
@@ -97,6 +101,7 @@ case prefs[:railsapps]
97
101
  prefs[:starter_app] = 'users_app'
98
102
  prefs[:form_builder] = 'none'
99
103
  prefs[:quiet_assets] = true
104
+ prefs[:local_env_file] = true
100
105
  prefs[:better_errors] = true
101
106
  when 'rails3-mongoid-devise'
102
107
  prefs[:git] = true
@@ -113,6 +118,7 @@ case prefs[:railsapps]
113
118
  prefs[:starter_app] = 'users_app'
114
119
  prefs[:form_builder] = 'none'
115
120
  prefs[:quiet_assets] = true
121
+ prefs[:local_env_file] = true
116
122
  prefs[:better_errors] = true
117
123
  when 'rails3-mongoid-omniauth'
118
124
  prefs[:git] = true
@@ -129,6 +135,7 @@ case prefs[:railsapps]
129
135
  prefs[:starter_app] = 'users_app'
130
136
  prefs[:form_builder] = 'none'
131
137
  prefs[:quiet_assets] = true
138
+ prefs[:local_env_file] = true
132
139
  prefs[:better_errors] = true
133
140
  when 'rails3-subdomains'
134
141
  prefs[:git] = true
@@ -145,6 +152,7 @@ case prefs[:railsapps]
145
152
  prefs[:starter_app] = 'subdomains_app'
146
153
  prefs[:form_builder] = 'none'
147
154
  prefs[:quiet_assets] = true
155
+ prefs[:local_env_file] = true
148
156
  prefs[:better_errors] = true
149
157
  end
150
158
 
data/recipes/saas.rb CHANGED
@@ -93,6 +93,13 @@ if prefer :railsapps, 'rails-stripe-membership-saas'
93
93
  copy_from_repo 'spec/mailers/user_mailer_spec.rb', :repo => repo
94
94
  copy_from_repo 'spec/stripe/stripe_config_spec.rb', :repo => repo
95
95
 
96
+ # >-------------------------------[ Extras ]--------------------------------<
97
+ append_file 'config/local_env.example.yml' do <<-FILE
98
+ STRIPE_API_KEY: 'Your_Stripe_API_key'
99
+ STRIPE_PUBLIC_KEY: 'Your_Stripe_Public_Key'
100
+ FILE
101
+ end
102
+
96
103
  ### GIT ###
97
104
  git :add => '-A' if prefer :git, true
98
105
  git :commit => '-qm "rails_apps_composer: membership app"' if prefer :git, true
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "2.2.21"
2
+ VERSION = "2.2.22"
3
3
  end
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.2.21
4
+ version: 2.2.22
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: 2012-12-10 00:00:00.000000000 Z
12
+ date: 2012-12-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
@@ -202,7 +202,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
202
202
  version: '0'
203
203
  segments:
204
204
  - 0
205
- hash: -428806813449652761
205
+ hash: -385559942607412805
206
206
  required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  none: false
208
208
  requirements:
@@ -211,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
211
  version: '0'
212
212
  segments:
213
213
  - 0
214
- hash: -428806813449652761
214
+ hash: -385559942607412805
215
215
  requirements: []
216
216
  rubyforge_project: rails_apps_composer
217
217
  rubygems_version: 1.8.24