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 +4 -4
- data/recipes/core.rb +1 -1
- data/recipes/learn_rails.rb +1 -0
- data/recipes/locale.rb +27 -0
- data/recipes/omniauth.rb +1 -1
- data/recipes/rails_bootstrap.rb +1 -0
- data/recipes/rails_devise.rb +1 -0
- data/recipes/rails_devise_pundit.rb +1 -0
- data/recipes/rails_foundation.rb +1 -0
- data/recipes/rails_omniauth.rb +1 -0
- data/recipes/rails_signup_download.rb +1 -0
- data/recipes/setup.rb +2 -1
- data/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b2a748dce85e690e1ee3164bade69e46268d243
|
4
|
+
data.tar.gz: be154e98680e3e326c866109275b4c408ec9c307
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11d264d6385c0a9a209b21136046d8cb9bbbbbb161a58df65ca8d8df4877d7c6d23ae6996753dc0e72848cef65b856b27b3031622892f39b653327f582061b80
|
7
|
+
data.tar.gz: d9d836e48707babe4b0cdccf632154fe5d9509357e03f0681c1af12c116d98ab98b728f46828d28516b85954eb097a3d1f7b6ebff212398320a3ed2cdd99da87
|
data/recipes/core.rb
CHANGED
data/recipes/learn_rails.rb
CHANGED
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
|
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
|
data/recipes/rails_bootstrap.rb
CHANGED
data/recipes/rails_devise.rb
CHANGED
data/recipes/rails_foundation.rb
CHANGED
data/recipes/rails_omniauth.rb
CHANGED
@@ -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"]
|
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
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.
|
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-
|
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
|