rails_apps_composer 2.4.12 → 2.4.13

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: 004fa66d78dd32e045ff2368ec6354b029787cb2
4
- data.tar.gz: e78d06ee9655948a86376509a5b3291ca12a09b7
3
+ metadata.gz: 3184151973897b1c0e19e832f24a9728e968cf95
4
+ data.tar.gz: f12186da396c2f6b7cfbe4263a67ad7b1cc378ac
5
5
  SHA512:
6
- metadata.gz: 7ff0f9b2b6c0d4d57e3956fd37887869868581a0495f63ac035548a2602800bce61479c5eb90501963a2804612ed89e0be6c1ac3bc9a1d7abb0fcac23d828a78
7
- data.tar.gz: b39f0fb854fa1b64f00db509b05ff33d99666cd8e5fd195a64f42c39103988484dd8462090476b2254c832850f4467904a6f9d170f73ceb7bd4038e17cb3064a
6
+ metadata.gz: b05c9eaefa0ad3d39ac314e1be4efd1724a25e2c5c037ecbe4157cf5f53c50f88b95fbef217626a761f356225d1a8fb47ecc321493f24ef18df8d7ea71d7b5e0
7
+ data.tar.gz: 31b0a3b148e7d50d196381d8726a32f51f024c432581641905cfe877f75813ef4c2580add7e5ff8cc719c1b678fff50b1b2120151763d95ee64ac7a647f46081
@@ -67,7 +67,7 @@ module RailsWizard
67
67
  # Load defaults from a file; if a file specifies recipes, they'll be run *before*
68
68
  # any on the command line (or prompted for)..
69
69
  return [[], {}] unless options[:defaults]
70
- defaults = File.open(options[:defaults]) {|f| YAML.load(f) }
70
+ defaults = Kernel.open(options[:defaults]) {|f| YAML.load(f) }
71
71
  recipes = defaults.delete('recipes') { [] }
72
72
  [recipes, defaults]
73
73
  end
data/recipes/apps4.rb CHANGED
@@ -61,7 +61,8 @@ if prefer :apps4, 'learn-rails'
61
61
  copy_from_repo 'app/views/user_mailer/contact_email.html.erb', :repo => repo
62
62
  copy_from_repo 'app/views/user_mailer/contact_email.text.erb', :repo => repo
63
63
  copy_from_repo 'app/views/visitors/new.html.erb', :repo => repo
64
- copy_from_repo 'app/views/layouts/_navigation.html.erb', :repo => repo
64
+ # create navigation links using the rails_layout gem
65
+ generate 'navigation -f'
65
66
 
66
67
  # >-------------------------------[ Routes ]--------------------------------<
67
68
 
@@ -121,7 +122,8 @@ if prefer :apps4, 'rails-bootstrap'
121
122
 
122
123
  copy_from_repo 'app/views/pages/about.html.erb', :repo => repo
123
124
  copy_from_repo 'app/views/visitors/new.html.erb', :repo => repo
124
- copy_from_repo 'app/views/layouts/_navigation.html.erb', :repo => repo
125
+ # create navigation links using the rails_layout gem
126
+ generate 'navigation -f'
125
127
 
126
128
  # >-------------------------------[ Routes ]--------------------------------<
127
129
 
data/recipes/frontend.rb CHANGED
@@ -15,24 +15,29 @@ after_bundler do
15
15
  generate 'layout foundation4 -f'
16
16
  end
17
17
 
18
- # specialized navigation partials
19
- if prefer :authorization, 'cancan'
20
- case prefs[:authentication]
21
- when 'devise'
22
- copy_from_repo 'app/views/layouts/_navigation-cancan.html.erb', :prefs => 'cancan'
23
- when 'omniauth'
24
- copy_from 'https://raw.github.com/RailsApps/rails-composer/master/files/app/views/layouts/_navigation-cancan-omniauth.html.erb', 'app/views/layouts/_navigation.html.erb'
18
+ ### GIT ###
19
+ git :add => '-A' if prefer :git, true
20
+ git :commit => '-qm "rails_apps_composer: front-end framework"' if prefer :git, true
21
+ end # after_bundler
22
+
23
+ after_everything do
24
+ say_wizard "recipe running after everything"
25
+ # create navigation links using the rails_layout gem
26
+ generate 'navigation -f'
27
+ # replace with specialized navigation partials
28
+ if prefer :authentication, 'omniauth'
29
+ if prefer :authorization, 'cancan'
30
+ copy_from 'https://raw.github.com/RailsApps/rails-composer/master/files/app/views/layouts/_navigation-cancan-omniauth.html.erb', 'app/views/layouts/_navigation.html.erb'
31
+ else
32
+ copy_from_repo 'app/views/layouts/_navigation-omniauth.html.erb', :prefs => 'omniauth'
25
33
  end
26
- else
27
- copy_from_repo 'app/views/layouts/_navigation-devise.html.erb', :prefs => 'devise'
28
- copy_from_repo 'app/views/layouts/_navigation-omniauth.html.erb', :prefs => 'omniauth'
29
34
  end
30
35
  copy_from_repo 'app/views/layouts/_navigation-subdomains_app.html.erb', :prefs => 'subdomains_app'
31
36
 
32
37
  ### GIT ###
33
38
  git :add => '-A' if prefer :git, true
34
- git :commit => '-qm "rails_apps_composer: front-end framework"' if prefer :git, true
35
- end # after_bundler
39
+ git :commit => '-qm "rails_apps_composer: navigation links"' if prefer :git, true
40
+ end # after_everything
36
41
 
37
42
  __END__
38
43
 
data/recipes/git.rb CHANGED
@@ -9,6 +9,12 @@ if prefer :git, true
9
9
  git :init
10
10
  git :add => '-A'
11
11
  git :commit => '-qm "rails_apps_composer: initial commit"'
12
+ else
13
+ after_everything do
14
+ say_wizard "removing .gitignore and .gitkeep files"
15
+ git_files = Dir[File.join('**','.gitkeep')] + Dir[File.join('**','.gitignore')]
16
+ File.unlink git_files
17
+ end
12
18
  end
13
19
 
14
20
  __END__
data/recipes/models.rb CHANGED
@@ -12,7 +12,7 @@ after_bundler do
12
12
  generate 'devise user' # create the User model
13
13
  if prefer :orm, 'mongoid'
14
14
  ## DEVISE AND MONGOID
15
- copy_from_repo 'app/models/user.rb', :repo => 'https://raw.github.com/RailsApps/rails3-mongoid-devise/master/'
15
+ copy_from_repo 'app/models/user.rb', :repo => 'https://raw.github.com/RailsApps/rails3-mongoid-devise/master/' unless rails_4?
16
16
  if (prefer :devise_modules, 'confirmable') || (prefer :devise_modules, 'invitable')
17
17
  gsub_file 'app/models/user.rb', /:registerable,/, ":registerable, :confirmable,"
18
18
  gsub_file 'app/models/user.rb', /# field :confirmation_token/, "field :confirmation_token"
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "2.4.12"
2
+ VERSION = "2.4.13"
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.12
4
+ version: 2.4.13
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-11-03 00:00:00.000000000 Z
11
+ date: 2013-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  version: '0'
193
193
  requirements: []
194
194
  rubyforge_project: rails_apps_composer
195
- rubygems_version: 2.0.7
195
+ rubygems_version: 2.1.10
196
196
  signing_key:
197
197
  specification_version: 4
198
198
  summary: A version of the RailsWizard gem with custom recipes for Rails starter apps.