rails_apps_composer 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0cb9fc80e191886f0e81c1c2ee7d1ae1d896f91d
4
- data.tar.gz: 137f77051b115e79f509246acc7c589aececa1b6
3
+ metadata.gz: 5b2a748dce85e690e1ee3164bade69e46268d243
4
+ data.tar.gz: be154e98680e3e326c866109275b4c408ec9c307
5
5
  SHA512:
6
- metadata.gz: 98ffa12022ad53b069d7b55710f0d4f0f9581658ae2063f3d21bd48754e3b5e7cc3adbdeaa546c81a4fd33b6f22e08c06e08d7158779defda050c64a7bdea9e6
7
- data.tar.gz: 7ce31d134260dd6cacf4e018f75da47f5d34bef4fc15f33821055fd1292e1650172adefc3481512ab7ed513ca8ef229c1f943788f1f57622ae2f3426f0111757
6
+ metadata.gz: 11d264d6385c0a9a209b21136046d8cb9bbbbbb161a58df65ca8d8df4877d7c6d23ae6996753dc0e72848cef65b856b27b3031622892f39b653327f582061b80
7
+ data.tar.gz: d9d836e48707babe4b0cdccf632154fe5d9509357e03f0681c1af12c116d98ab98b728f46828d28516b85954eb097a3d1f7b6ebff212398320a3ed2cdd99da87
data/recipes/core.rb CHANGED
@@ -18,7 +18,7 @@ requires: [git, railsapps,
18
18
  rails_devise,
19
19
  rails_devise_pundit,
20
20
  rails_signup_download,
21
- setup, readme, gems,
21
+ setup, locale, readme, gems,
22
22
  tests,
23
23
  email,
24
24
  devise, omniauth, roles,
@@ -25,6 +25,7 @@ if prefer :apps4, 'learn-rails'
25
25
  prefs[:templates] = 'erb'
26
26
  prefs[:tests] = false
27
27
  prefs[:pages] = 'none'
28
+ prefs[:locale] = 'none'
28
29
 
29
30
  # gems
30
31
  add_gem 'activerecord-tableless'
data/recipes/locale.rb ADDED
@@ -0,0 +1,27 @@
1
+ unless prefs[:locale]
2
+ prefs[:locale] = ask_wizard('Set a locale? Enter nothing for English, or es, de, etc:')
3
+ prefs[:locale] = 'none' unless prefs[:locale].present?
4
+ end
5
+
6
+ unless prefer :locale, 'none'
7
+ add_gem 'devise-i18n' if prefer :authentication, 'devise'
8
+ end
9
+
10
+ stage_two do
11
+ unless prefer :locale, 'none'
12
+ gsub_file 'config/application.rb', /# config.i18n.default_locale.*$/, "config.i18n.default_locale = :#{prefs[:locale]}"
13
+ locale_filename = "config/locales/#{prefs[:locale]}.yml"
14
+ create_file locale_filename
15
+ append_to_file locale_filename, "#{prefs[:locale]}:"
16
+ end
17
+ end
18
+
19
+ __END__
20
+
21
+ name: locale
22
+ description: "Set default locale"
23
+ author: hedgesky
24
+
25
+ category: other
26
+ requires: [setup]
27
+ run_after: [setup]
data/recipes/omniauth.rb CHANGED
@@ -7,7 +7,7 @@ stage_two do
7
7
  repo = 'https://raw.github.com/RailsApps/rails-omniauth/master/'
8
8
  copy_from_repo 'config/initializers/omniauth.rb', :repo => repo
9
9
  gsub_file 'config/initializers/omniauth.rb', /twitter/, prefs[:omniauth_provider] unless prefer :omniauth_provider, 'twitter'
10
- generate 'model User name:string email:string provider:string uid:string'
10
+ generate 'model User name:string provider:string uid:string'
11
11
  run 'bundle exec rake db:migrate'
12
12
  copy_from_repo 'app/models/user.rb', :repo => 'https://raw.github.com/RailsApps/rails-omniauth/master/'
13
13
  copy_from_repo 'app/controllers/application_controller.rb', :repo => repo
@@ -16,6 +16,7 @@ if prefer :apps4, 'rails-bootstrap'
16
16
  prefs[:pry] = false
17
17
  prefs[:quiet_assets] = true
18
18
  prefs[:pages] = 'about'
19
+ prefs[:locale] = 'none'
19
20
  end
20
21
 
21
22
  __END__
@@ -11,6 +11,7 @@ if prefer :apps4, 'rails-devise'
11
11
  prefs[:pry] = false
12
12
  prefs[:quiet_assets] = true
13
13
  prefs[:pages] = 'users'
14
+ prefs[:locale] = 'none'
14
15
  end
15
16
 
16
17
  __END__
@@ -11,6 +11,7 @@ if prefer :apps4, 'rails-devise-pundit'
11
11
  prefs[:pry] = false
12
12
  prefs[:quiet_assets] = true
13
13
  prefs[:pages] = 'users'
14
+ prefs[:locale] = 'none'
14
15
  end
15
16
 
16
17
  __END__
@@ -16,6 +16,7 @@ if prefer :apps4, 'rails-foundation'
16
16
  prefs[:pry] = false
17
17
  prefs[:quiet_assets] = true
18
18
  prefs[:pages] = 'about'
19
+ prefs[:locale] = 'none'
19
20
  end
20
21
 
21
22
  __END__
@@ -12,6 +12,7 @@ if prefer :apps4, 'rails-omniauth'
12
12
  prefs[:pry] = false
13
13
  prefs[:quiet_assets] = true
14
14
  prefs[:pages] = 'about+users'
15
+ prefs[:locale] = 'none'
15
16
  end
16
17
 
17
18
  __END__
@@ -13,6 +13,7 @@ if prefer :apps4, 'rails-signup-download'
13
13
  prefs[:pry] = false
14
14
  prefs[:quiet_assets] = true
15
15
  prefs[:pages] = 'users'
16
+ prefs[:locale] = 'none'
16
17
  stage_three do
17
18
  say_wizard "recipe stage three"
18
19
  repo = 'https://raw.github.com/RailsApps/rails-signup-download/master/'
data/recipes/setup.rb CHANGED
@@ -76,7 +76,8 @@ if (recipes.include? 'devise') || (recipes.include? 'omniauth')
76
76
  case prefs[:authentication]
77
77
  when 'devise'
78
78
  prefs[:devise_modules] = multiple_choice "Devise modules?", [["Devise with default modules","default"],
79
- ["Devise with Confirmable module","confirmable"]] unless prefs.has_key? :devise_modules
79
+ ["Devise with Confirmable module","confirmable"],
80
+ ["Devise with Confirmable and Invitable modules","invitable"]] unless prefs.has_key? :devise_modules
80
81
  when 'omniauth'
81
82
  prefs[:omniauth_provider] = multiple_choice "OmniAuth provider?", [["Facebook", "facebook"], ["Twitter", "twitter"], ["GitHub", "github"],
82
83
  ["LinkedIn", "linkedin"], ["Google-Oauth-2", "google_oauth2"], ["Tumblr", "tumblr"]] unless prefs.has_key? :omniauth_provider
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_apps_composer
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Kehoe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-20 00:00:00.000000000 Z
11
+ date: 2014-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -131,6 +131,7 @@ files:
131
131
  - recipes/git.rb
132
132
  - recipes/init.rb
133
133
  - recipes/learn_rails.rb
134
+ - recipes/locale.rb
134
135
  - recipes/omniauth.rb
135
136
  - recipes/pages.rb
136
137
  - recipes/rails_bootstrap.rb