rails_apps_composer 2.4.23 → 2.4.24

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: d8a85a29d6752662d6e530a798f6a7e1d6a00df4
4
- data.tar.gz: 5e1f4d69490f13fe8a372842af44667a68edf57b
3
+ metadata.gz: dc11acc4801ecb3ed6ce3773226ef3275eee4e8b
4
+ data.tar.gz: 9070dd6dccb53e371147935f6c3070a766515925
5
5
  SHA512:
6
- metadata.gz: fe32c44b8561b4324af85f4772852ae1c3f252ee26e11fd01361cc6990801e6c6a6469004851288e426c2971a49ac3fdd9976b32b327af24ad4b6a43b7396eca
7
- data.tar.gz: feb7574cc8424ad211fdcaef858344f12301ac60ff65a5087ef0abbe60a59ed78a7586046af95604b363cb7f425211c79e2a0ad859d2f4027c91f61fcddab59e
6
+ metadata.gz: b083e57012b616a2191f348b2f2542d41d83a19c9466a0e0459b53869f7baf3e14e81c715b38f3f35ab3703302bef3bca0ff3a532f4b7f125d4e70f1d62a2122
7
+ data.tar.gz: 658c2251d7c01202170e2c4e24dd174fba01c74845a2ca7580352b718520f3207ae992a3ceb2c03927c6925b0e1aab825aafa844c3dab667766f4369a26305c4
data/recipes/admin.rb CHANGED
@@ -10,12 +10,12 @@ end
10
10
 
11
11
  if prefer :admin, 'activeadmin'
12
12
  if rails_4?
13
- gem 'activeadmin', github: 'gregbell/active_admin'
13
+ add_gem 'activeadmin', github: 'gregbell/active_admin'
14
14
  else
15
- gem 'activeadmin'
15
+ add_gem 'activeadmin'
16
16
  end
17
17
  end
18
- gem 'rails_admin' if prefer :admin, 'rails_admin'
18
+ add_gem 'rails_admin' if prefer :admin, 'rails_admin'
19
19
 
20
20
  after_bundler do
21
21
  if prefer :admin, 'activeadmin'
data/recipes/email_dev.rb CHANGED
@@ -6,12 +6,12 @@ prefs[:mail_view] = true if config['mail_view']
6
6
 
7
7
  if prefs[:mailcatcher]
8
8
  if rails_4?
9
- gem 'mailcatcher', github: 'sj26/mailcatcher', group: :development
9
+ add_gem 'mailcatcher', github: 'sj26/mailcatcher', group: :development
10
10
  else
11
- gem 'mailcatcher', group: :development
11
+ add_gem 'mailcatcher', group: :development
12
12
  end
13
13
  end
14
- gem 'mail_view', group: :development if prefs[:mail_view]
14
+ add_gem 'mail_view', group: :development if prefs[:mail_view]
15
15
 
16
16
  after_bundler do
17
17
  if prefs[:mailcatcher]
data/recipes/gems.rb CHANGED
@@ -66,7 +66,7 @@ if prefer :unit_test, 'rspec'
66
66
  add_gem 'database_cleaner', '1.0.1', :group => :test
67
67
  if prefer :orm, 'mongoid'
68
68
  if rails_4?
69
- add_gem 'mongoid-rspec', '>= 1.6.0', github: 'evansagge/mongoid-rspec', :group => :test
69
+ add_gem 'mongoid-rspec', '>= 1.10.0', :group => :test
70
70
  else
71
71
  add_gem 'mongoid-rspec', :group => :test
72
72
  end
data/recipes/models.rb CHANGED
@@ -81,16 +81,9 @@ RUBY
81
81
  insert_into_file 'app/models/user.rb', " attr_accessible :role_ids, :as => :admin\n", :before => " attr_accessible"
82
82
  end
83
83
  unless prefer :orm, 'mongoid'
84
- generate 'rolify:role Role User'
84
+ generate 'rolify Role User'
85
85
  else
86
- generate 'rolify:role Role User mongoid'
87
- # correct the generation of rolify 3.1 with mongoid
88
- # the call to `rolify` should be *after* the inclusion of mongoid
89
- # (see https://github.com/EppO/rolify/issues/61)
90
- # This isn't needed for rolify>=3.2.0.beta4, but should cause no harm
91
- gsub_file 'app/models/user.rb',
92
- /^\s*(rolify.*?)$\s*(include Mongoid::Document.*?)$/,
93
- " \\2\n extend Rolify\n \\1\n"
86
+ generate 'rolify Role User --orm=mongoid'
94
87
  end
95
88
  end
96
89
  ### GIT ###
data/recipes/readme.rb CHANGED
@@ -14,67 +14,71 @@ after_everything do
14
14
  # add placeholder READMEs and humans.txt file
15
15
  copy_from_repo 'public/humans.txt'
16
16
  copy_from_repo 'README'
17
- copy_from_repo 'README.textile'
17
+ copy_from_repo 'README.md'
18
18
  gsub_file "README", /App_Name/, "#{app_name.humanize.titleize}"
19
- gsub_file "README.textile", /App_Name/, "#{app_name.humanize.titleize}"
19
+ gsub_file "README.md", /App_Name/, "#{app_name.humanize.titleize}"
20
20
 
21
21
  # Diagnostics
22
- gsub_file "README.textile", /recipes that are known/, "recipes that are NOT known" if diagnostics[:recipes] == 'fail'
23
- gsub_file "README.textile", /preferences that are known/, "preferences that are NOT known" if diagnostics[:prefs] == 'fail'
22
+ gsub_file "README.md", /recipes that are known/, "recipes that are NOT known" if diagnostics[:recipes] == 'fail'
23
+ gsub_file "README.md", /preferences that are known/, "preferences that are NOT known" if diagnostics[:prefs] == 'fail'
24
24
  print_recipes = recipes.sort.map { |r| "\n* #{r}" }.join('')
25
25
  print_preferences = prefs.map { |k, v| "\n* #{k}: #{v}" }.join('')
26
- gsub_file "README.textile", /RECIPES/, print_recipes
27
- gsub_file "README.textile", /PREFERENCES/, print_preferences
26
+ gsub_file "README.md", /RECIPES/, print_recipes
27
+ gsub_file "README.md", /PREFERENCES/, print_preferences
28
28
  gsub_file "README", /RECIPES/, print_recipes
29
29
  gsub_file "README", /PREFERENCES/, print_preferences
30
30
 
31
31
  # Ruby on Rails
32
- gsub_file "README.textile", /\* Ruby/, "* Ruby version #{RUBY_VERSION}"
33
- gsub_file "README.textile", /\* Rails/, "* Rails version #{Rails::VERSION::STRING}"
32
+ gsub_file "README.md", /\* Ruby/, "* Ruby version #{RUBY_VERSION}"
33
+ gsub_file "README.md", /\* Rails/, "* Rails version #{Rails::VERSION::STRING}"
34
34
 
35
35
  # Database
36
- gsub_file "README.textile", /SQLite/, "PostgreSQL" if prefer :database, 'postgresql'
37
- gsub_file "README.textile", /SQLite/, "MySQL" if prefer :database, 'mysql'
38
- gsub_file "README.textile", /SQLite/, "MongoDB" if prefer :database, 'mongodb'
39
- gsub_file "README.textile", /ActiveRecord/, "the Mongoid ORM" if prefer :orm, 'mongoid'
36
+ gsub_file "README.md", /SQLite/, "PostgreSQL" if prefer :database, 'postgresql'
37
+ gsub_file "README.md", /SQLite/, "MySQL" if prefer :database, 'mysql'
38
+ gsub_file "README.md", /SQLite/, "MongoDB" if prefer :database, 'mongodb'
39
+ gsub_file "README.md", /ActiveRecord/, "the Mongoid ORM" if prefer :orm, 'mongoid'
40
40
 
41
41
  # Template Engine
42
- gsub_file "README.textile", /ERB/, "Haml" if prefer :templates, 'haml'
43
- gsub_file "README.textile", /ERB/, "Slim" if prefer :templates, 'slim'
42
+ gsub_file "README.md", /ERB/, "Haml" if prefer :templates, 'haml'
43
+ gsub_file "README.md", /ERB/, "Slim" if prefer :templates, 'slim'
44
44
 
45
45
  # Testing Framework
46
- gsub_file "README.textile", /Test::Unit/, "RSpec" if prefer :unit_test, 'rspec'
47
- gsub_file "README.textile", /RSpec/, "RSpec and Cucumber" if prefer :integration, 'cucumber'
48
- gsub_file "README.textile", /RSpec/, "RSpec and Factory Girl" if prefer :fixtures, 'factory_girl'
49
- gsub_file "README.textile", /RSpec/, "RSpec and Machinist" if prefer :fixtures, 'machinist'
46
+ gsub_file "README.md", /Test::Unit/, "RSpec" if prefer :unit_test, 'rspec'
47
+ gsub_file "README.md", /RSpec/, "RSpec and Cucumber" if prefer :integration, 'cucumber'
48
+ gsub_file "README.md", /RSpec/, "RSpec and Factory Girl" if prefer :fixtures, 'factory_girl'
49
+ gsub_file "README.md", /RSpec/, "RSpec and Machinist" if prefer :fixtures, 'machinist'
50
50
 
51
51
  # Front-end Framework
52
- gsub_file "README.textile", /Front-end Framework: None/, "Front-end Framework: Twitter Bootstrap 2.3 (Sass)" if prefer :frontend, 'bootstrap2'
53
- gsub_file "README.textile", /Front-end Framework: None/, "Front-end Framework: Twitter Bootstrap 3.0 (Sass)" if prefer :frontend, 'bootstrap3'
54
- gsub_file "README.textile", /Front-end Framework: None/, "Front-end Framework: Zurb Foundation 4" if prefer :frontend, 'foundation4'
55
- gsub_file "README.textile", /Front-end Framework: None/, "Front-end Framework: Zurb Foundation 5" if prefer :frontend, 'foundation5'
52
+ gsub_file "README.md", /Front-end Framework: None/, "Front-end Framework: Twitter Bootstrap 2.3 (Sass)" if prefer :frontend, 'bootstrap2'
53
+ gsub_file "README.md", /Front-end Framework: None/, "Front-end Framework: Twitter Bootstrap 3.0 (Sass)" if prefer :frontend, 'bootstrap3'
54
+ gsub_file "README.md", /Front-end Framework: None/, "Front-end Framework: Zurb Foundation 4" if prefer :frontend, 'foundation4'
55
+ gsub_file "README.md", /Front-end Framework: None/, "Front-end Framework: Zurb Foundation 5" if prefer :frontend, 'foundation5'
56
56
 
57
57
  # Form Builder
58
- gsub_file "README.textile", /Form Builder: None/, "Form Builder: SimpleForm" if prefer :form_builder, 'simple_form'
58
+ gsub_file "README.md", /Form Builder: None/, "Form Builder: SimpleForm" if prefer :form_builder, 'simple_form'
59
59
 
60
60
  # Email
61
61
  unless prefer :email, 'none'
62
- gsub_file "README.textile", /Gmail/, "SMTP" if prefer :email, 'smtp'
63
- gsub_file "README.textile", /Gmail/, "SendGrid" if prefer :email, 'sendgrid'
64
- gsub_file "README.textile", /Gmail/, "Mandrill" if prefer :email, 'mandrill'
62
+ gsub_file "README.md", /Gmail/, "SMTP" if prefer :email, 'smtp'
63
+ gsub_file "README.md", /Gmail/, "SendGrid" if prefer :email, 'sendgrid'
64
+ gsub_file "README.md", /Gmail/, "Mandrill" if prefer :email, 'mandrill'
65
+ gsub_file "README.md", /Email delivery is disabled in development./, "Email delivery is configured via MailCatcher in development." if prefer :mailcatcher, true
66
+ insert_into_file 'README.md', "\nEmail rendering in development enabled via MailView.", :after => /Email delivery is.*\n/ if prefer :mail_view, true
65
67
  else
66
- gsub_file "README.textile", /h2. Email/, ""
67
- gsub_file "README.textile", /The application is configured to send email using a Gmail account./, ""
68
+ gsub_file "README.md", /Email/, ""
69
+ gsub_file "README.md", /-----/, ""
70
+ gsub_file "README.md", /The application is configured to send email using a Gmail account./, ""
71
+ gsub_file "README.md", /Email delivery is disabled in development./, ""
68
72
  end
69
73
 
70
74
  # Authentication and Authorization
71
- gsub_file "README.textile", /Authentication: None/, "Authentication: Devise" if prefer :authentication, 'devise'
72
- gsub_file "README.textile", /Authentication: None/, "Authentication: OmniAuth" if prefer :authentication, 'omniauth'
73
- gsub_file "README.textile", /Authorization: None/, "Authorization: CanCan" if prefer :authorization, 'cancan'
75
+ gsub_file "README.md", /Authentication: None/, "Authentication: Devise" if prefer :authentication, 'devise'
76
+ gsub_file "README.md", /Authentication: None/, "Authentication: OmniAuth" if prefer :authentication, 'omniauth'
77
+ gsub_file "README.md", /Authorization: None/, "Authorization: CanCan" if prefer :authorization, 'cancan'
74
78
 
75
79
  # Admin
76
- append_file "README.textile", "\nh2. Admin\n\n Admin: ActiveAdmin" if prefer :admin, 'activeadmin'
77
- append_file "README.textile", "\nh2. Admin\n\n Admin: RailsAdmin" if prefer :admin, 'rails_admin'
80
+ gsub_file "README.md", /Admin: None/, "Admin: ActiveAdmin" if prefer :admin, 'activeadmin'
81
+ gsub_file "README.md", /Admin: None/, "Admin: RailsAdmin" if prefer :admin, 'rails_admin'
78
82
 
79
83
  git :add => '-A' if prefer :git, true
80
84
  git :commit => '-qm "rails_apps_composer: add README files"' if prefer :git, true
data/templates/layout.erb CHANGED
@@ -210,23 +210,7 @@ say_wizard "Running 'after everything' callbacks."
210
210
  @after_everything_blocks.each{|b| config = @configs[b[0]] || {}; @current_recipe = b[0]; puts @current_recipe; b[1].call}
211
211
 
212
212
  @current_recipe = nil
213
- if diagnostics[:recipes] == 'success'
214
- say_wizard("WOOT! The recipes you've selected are known to work together.")
215
- say_wizard("If they don't, open an issue for rails_apps_composer on GitHub.")
216
- else
217
- say_wizard("\033[1m\033[36m" + "WARNING! The recipes you've selected might not work together." + "\033[0m")
218
- say_wizard("Help us out by reporting whether this combination works or fails.")
219
- say_wizard("Please open an issue for rails_apps_composer on GitHub.")
220
- say_wizard("Your new application will contain diagnostics in its README file.")
221
- end
222
- if diagnostics[:prefs] == 'success'
223
- say_wizard("WOOT! The preferences you've selected are known to work together.")
224
- say_wizard("If they don't, open an issue for rails_apps_composer on GitHub.")
225
- else
226
- say_wizard("\033[1m\033[36m" + "WARNING! The preferences you've selected might not work together." + "\033[0m")
227
- say_wizard("Help us out by reporting whether this combination works or fails.")
228
- say_wizard("Please open an issue for rails_apps_composer on GitHub.")
229
- say_wizard("Your new application will contain diagnostics in its README file.")
230
- end
213
+ say_wizard("Your new application will contain diagnostics in its README file.")
214
+ say_wizard("When reporting an issue on GitHub, include the README diagnostics.")
231
215
  say_wizard "Finished running the rails_apps_composer app template."
232
216
  say_wizard "Your new Rails app is ready. Time to run 'bundle install'."
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "2.4.23"
2
+ VERSION = "2.4.24"
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.23
4
+ version: 2.4.24
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-01-30 00:00:00.000000000 Z
11
+ date: 2014-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n