rails_apps_composer 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 703f1e12b7cfe4cf6d49748ba045d22573ec9b80
4
- data.tar.gz: 3cb586ef0b76e4fe8b5ab0bd5f6bcb27c055f4f3
3
+ metadata.gz: afa7e560f9d46675402d03f151f99b9ac763d899
4
+ data.tar.gz: 711fd8d0db12360b98ec837f91eb65e36ebb10bc
5
5
  SHA512:
6
- metadata.gz: 961e8aeef87c3190ead0d24aa6bdb17ec9b32e1f54b403c3c59a9e63af8054a49f7d45ec92506cfb6d5d6c64bcaaff03b5eaea16965de64367c851b8288964ff
7
- data.tar.gz: 0439cbed49d83a38c75d670bd8ae5d79d4668e483745bc176db812f5ead8de035b85a59dfabc2e5278847763d169016de7538d2e03870651b22f34149dd007ca
6
+ metadata.gz: f19f26a8f78fa8d7003100aac9cee3931f31c53af04eba285b9e27a84c75297265ca4097f9eea2340eda6ce888410450bca2fb26a9e517cb96669b01dff830cc
7
+ data.tar.gz: 5b3984449f4dbee95cbb0b7099caca02ea13371667f24467ab4cd00bc66b76be860f6352a2580446e4d34ac4df28e17a1a8046df37c7c1c898d8860f836e0fce
data/recipes/gems.rb CHANGED
@@ -20,6 +20,9 @@ else
20
20
  add_gem 'puma', :group => :production if prefer :prod_webserver, 'puma'
21
21
  end
22
22
 
23
+ ## Rails 4.0 attr_accessible Compatibility
24
+ add_gem 'protected_attributes' if Rails::VERSION::MAJOR.to_s == "4"
25
+
23
26
  ## Database Adapter
24
27
  gsub_file 'Gemfile', /gem 'sqlite3'\n/, '' unless prefer :database, 'sqlite'
25
28
  add_gem 'mongoid' if prefer :orm, 'mongoid'
@@ -111,7 +114,11 @@ if prefer :authorization, 'cancan'
111
114
  end
112
115
 
113
116
  ## Form Builder
114
- add_gem 'simple_form' if prefer :form_builder, 'simple_form'
117
+ if Rails::VERSION::MAJOR.to_s == "4"
118
+ add_gem 'simple_form', '~> 3.0.0.rc' if prefer :form_builder, 'simple_form'
119
+ else
120
+ add_gem 'simple_form' if prefer :form_builder, 'simple_form'
121
+ end
115
122
 
116
123
  ## Membership App
117
124
  if prefer :railsapps, 'rails-stripe-membership-saas'
data/recipes/init.rb CHANGED
@@ -61,6 +61,8 @@ YAML.load(ENV['ROLES']).each do |role|
61
61
  end
62
62
  FILE
63
63
  end
64
+ ## Fix db seed for Rails 4.0
65
+ gsub_file 'db/seeds.rb', /{ :name => role }/, 'role' if Rails::VERSION::MAJOR.to_s == "4"
64
66
  else
65
67
  append_file 'db/seeds.rb' do <<-FILE
66
68
  puts 'ROLES'
data/recipes/routes.rb CHANGED
@@ -11,7 +11,11 @@ after_bundler do
11
11
  ### USER_ACCOUNTS ###
12
12
  if ['users_app','admin_app'].include? prefs[:starter_app]
13
13
  ## DEVISE
14
- copy_from_repo 'config/routes.rb', :repo => 'https://raw.github.com/RailsApps/rails3-devise-rspec-cucumber/master/' if prefer :authentication, 'devise'
14
+ if prefer :authentication, 'devise'
15
+ copy_from_repo 'config/routes.rb', :repo => 'https://raw.github.com/RailsApps/rails3-devise-rspec-cucumber/master/'
16
+ ## Rails 4.0 doesn't allow two 'root' routes
17
+ gsub_file 'config/routes.rb', /authenticated :user do\n.*\n.*\n /, '' if Rails::VERSION::MAJOR.to_s == "4"
18
+ end
15
19
  ## OMNIAUTH
16
20
  copy_from_repo 'config/routes.rb', :repo => 'https://raw.github.com/RailsApps/rails3-mongoid-omniauth/master/' if prefer :authentication, 'omniauth'
17
21
  end
data/templates/layout.erb CHANGED
@@ -196,7 +196,8 @@ if prefs.has_key? :bundle_path
196
196
  else
197
197
  run 'bundle install --without production'
198
198
  end
199
-
199
+ say_wizard "Updating gem paths."
200
+ Gem.clear_paths
200
201
  # >-----------------------------[ Run 'After Bundler' Callbacks ]-------------------------------<
201
202
 
202
203
  say_wizard "Running 'after bundler' callbacks."
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "2.4.0"
2
+ VERSION = "2.4.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: 2.4.0
4
+ version: 2.4.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: 2013-06-25 00:00:00.000000000 Z
11
+ date: 2013-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n