rails_apps_composer 3.0.44 → 3.1.0

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: 718f377c5d050afbcb767313267222d0370372df
4
- data.tar.gz: 0f7b0962cd227ccf9ea1fd6c7bae57c234f12d15
3
+ metadata.gz: bf78c37dfa3c7d4ba9e1f68e7e793e86e664b94b
4
+ data.tar.gz: 037e41e8e5bd732009228ee3fdd10ea09d5fc6fd
5
5
  SHA512:
6
- metadata.gz: cb1080f5e6725ed19df99cf8aa904de6e0ea1d5aed3a740b5d6ccc35b90aac13f08e4aa28cf3a3f1335dc7d9017444e24f9a31ee6e3bab6e3d033b78f696c99a
7
- data.tar.gz: 262b1b5067d66b3a41c1ba70babd83ffcf26a6d9cd0bc19316fbe2b1c9f7e30b2efea38ebde1ca2a094c9f98a6cba915147907a51b43ef7d7bc4b5bf531b5f40
6
+ metadata.gz: 70111e1f1dd2be2b9b14835b0f8ae7e9fda87dfce62f787a833009050aa604c6ec7bdfb24433219ed4aca101275fa1740b13c51c1157003557847fdff0fe6a53
7
+ data.tar.gz: 1ccdcb48cb67b1358c15cfb26992d5f963b8c5a7710ee7b9bc7c2f26c250e6c439682e96f1ea719c4aafff746157fe855e626e9a881e18ae016b4781f5480c61
data/recipes/admin.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # Application template recipe for the rails_apps_composer. Change the recipe here:
2
2
  # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/admin.rb
3
3
 
4
- prefs[:admin] = config['admin'] unless config['admin'] == 'none'
4
+ prefs[:admin] = config['admin'] unless (config['admin'] == 'none')
5
5
 
6
6
  if prefer :admin, 'activeadmin'
7
7
  add_gem 'activeadmin', '~> 1.0.0.pre2'
data/recipes/extras.rb CHANGED
@@ -73,11 +73,11 @@ if prefs[:quiet_assets]
73
73
  end
74
74
 
75
75
  ## LOCAL_ENV.YML FILE
76
- prefs[:local_env_file] = config['local_env_file'] unless config['local_env_file'] = 'none'
76
+ prefs[:local_env_file] = config['local_env_file'] unless (config['local_env_file'] == 'none')
77
77
 
78
78
  if prefer :local_env_file, 'figaro'
79
79
  say_wizard "recipe creating application.yml file for environment variables with figaro"
80
- add_gem 'figaro', '>= 1.0.0.rc1'
80
+ add_gem 'figaro'
81
81
  elsif prefer :local_env_file, 'foreman'
82
82
  say_wizard "recipe creating .env file for development environment variables with foreman"
83
83
  add_gem 'foreman', :group => :development
@@ -158,8 +158,8 @@ case RbConfig::CONFIG['host_os']
158
158
  end
159
159
  end
160
160
 
161
- stage_three do
162
- say_wizard "recipe stage three"
161
+ stage_four do
162
+ say_wizard "recipe stage four"
163
163
  say_wizard "recipe removing unnecessary files and whitespace"
164
164
  %w{
165
165
  public/index.html
@@ -179,7 +179,6 @@ stage_three do
179
179
  gsub_file 'Gemfile', /#.*\n/, "\n"
180
180
  gsub_file 'Gemfile', /\n^\s*\n/, "\n"
181
181
  remove_file 'Gemfile.lock'
182
- run 'bundle install --without production'
183
182
  # remove commented lines and multiple blank lines from config/routes.rb
184
183
  gsub_file 'config/routes.rb', / #.*\n/, "\n"
185
184
  gsub_file 'config/routes.rb', /\n^\s*\n/, "\n"
data/recipes/gems.rb CHANGED
@@ -127,7 +127,7 @@ add_gem 'simple_form' if prefer :form_builder, 'simple_form'
127
127
 
128
128
  ## Gems from a defaults file or added interactively
129
129
  gems.each do |g|
130
- gem(*g)
130
+ add_gem(*g)
131
131
  end
132
132
 
133
133
  ## Git
data/recipes/pages.rb CHANGED
@@ -25,6 +25,61 @@ stage_two do
25
25
  git :commit => '-qm "rails_apps_composer: add pages"' if prefer :git, true
26
26
  end
27
27
 
28
+ stage_four do
29
+ say_wizard "recipe stage four"
30
+ case prefs[:layouts]
31
+ when 'bare'
32
+ generate 'theme:bare -f'
33
+ when 'blog_home'
34
+ generate 'theme:blog_home -f'
35
+ when 'business_casual'
36
+ generate 'theme:business_casual -f'
37
+ when 'business_frontpage'
38
+ generate 'theme:business_frontpage -f'
39
+ when 'clean_blog'
40
+ generate 'theme:clean_blog -f'
41
+ when 'four_col_portfolio'
42
+ generate 'theme:four_col_portfolio -f'
43
+ when 'full_width_pics'
44
+ generate 'theme:full_width_pics -f'
45
+ when 'heroic_features'
46
+ generate 'theme:heroic_features -f'
47
+ when 'landing_page'
48
+ generate 'theme:landing_page -f'
49
+ when 'modern_business'
50
+ generate 'theme:modern_business -f'
51
+ when 'one_col_portfolio'
52
+ generate 'theme:one_col_portfolio -f'
53
+ when 'one_page_wonder'
54
+ generate 'theme:one_page_wonder -f'
55
+ when 'portfolio_item'
56
+ generate 'theme:portfolio_item -f'
57
+ when 'round_about'
58
+ generate 'theme:round_about -f'
59
+ when 'shop_homepage'
60
+ generate 'theme:shop_homepage -f'
61
+ when 'shop_item'
62
+ generate 'theme:shop_item -f'
63
+ when 'simple_sidebar'
64
+ generate 'theme:simple_sidebar -f'
65
+ when 'small_business'
66
+ generate 'theme:small_business -f'
67
+ when 'stylish_portfolio'
68
+ generate 'theme:stylish_portfolio -f'
69
+ when 'the_big_picture'
70
+ generate 'theme:the_big_picture -f'
71
+ when 'three_col_portfolio'
72
+ generate 'theme:three_col_portfolio -f'
73
+ when 'thumbnail_gallery'
74
+ generate 'theme:thumbnail_gallery -f'
75
+ when 'two_col_portfolio'
76
+ generate 'theme:two_col_portfolio -f'
77
+ end
78
+ ### GIT ###
79
+ git :add => '-A' if prefer :git, true
80
+ git :commit => '-qm "rails_apps_composer: add Bootstrap page layouts"' if prefer :git, true
81
+ end
82
+
28
83
  __END__
29
84
 
30
85
  name: pages
data/recipes/readme.rb CHANGED
@@ -14,8 +14,7 @@ stage_three do
14
14
  # add diagnostics to README
15
15
  create_file 'README', "#{app_name.humanize.titleize}\n================\n\n"
16
16
  append_to_file 'README' do <<-TEXT
17
- Rails Composer, open source, supported by subscribers.
18
- Please join RailsApps to support development of Rails Composer.
17
+ Rails Composer is supported by developers who purchase our RailsApps tutorials.
19
18
  Need help? Ask on Stack Overflow with the tag 'railsapps.'
20
19
  Problems? Submit an issue: https://github.com/RailsApps/rails_apps_composer/issues
21
20
  Your application contains diagnostics in this README file.
@@ -117,7 +116,7 @@ TEXT
117
116
  This application was generated with the [rails_apps_composer](https://github.com/RailsApps/rails_apps_composer) gem
118
117
  provided by the [RailsApps Project](http://railsapps.github.io/).
119
118
 
120
- Rails Composer is open source and supported by subscribers. Please join RailsApps to support development of Rails Composer.
119
+ Rails Composer is supported by developers who purchase our RailsApps tutorials.
121
120
 
122
121
  Problems? Issues?
123
122
  -----------
data/recipes/setup.rb CHANGED
@@ -89,6 +89,37 @@ if recipes.include? 'pages'
89
89
  ["Home, About, and Users", "about+users"]] unless prefs.has_key? :pages
90
90
  end
91
91
 
92
+ ## Bootstrap Page Templates
93
+ if recipes.include? 'pages'
94
+ if prefs[:frontend] == 'bootstrap3'
95
+ say_wizard "Which Bootstrap page template? Visit startbootstrap.com."
96
+ prefs[:layouts] = multiple_choice "Add Bootstrap page templates?", [["None", "none"],
97
+ ["1 Col Portfolio", "one_col_portfolio"],
98
+ ["2 Col Portfolio", "two_col_portfolio"],
99
+ ["3 Col Portfolio", "three_col_portfolio"],
100
+ ["4 Col Portfolio", "four_col_portfolio"],
101
+ ["Bare", "bare"],
102
+ ["Blog Home", "blog_home"],
103
+ ["Business Casual", "business_casual"],
104
+ ["Business Frontpage", "business_frontpage"],
105
+ ["Clean Blog", "clean_blog"],
106
+ ["Full Width Pics", "full_width_pics"],
107
+ ["Heroic Features", "heroic_features"],
108
+ ["Landing Page", "landing_page"],
109
+ ["Modern Business", "modern_business"],
110
+ ["One Page Wonder", "one_page_wonder"],
111
+ ["Portfolio Item", "portfolio_item"],
112
+ ["Round About", "round_about"],
113
+ ["Shop Homepage", "shop_homepage"],
114
+ ["Shop Item", "shop_item"],
115
+ ["Simple Sidebar", "simple_sidebar"],
116
+ ["Small Business", "small_business"],
117
+ ["Stylish Portfolio", "stylish_portfolio"],
118
+ ["The Big Picture", "the_big_picture"],
119
+ ["Thumbnail Gallery", "thumbnail_gallery"]] unless prefs.has_key? :layouts
120
+ end
121
+ end
122
+
92
123
  # save configuration before anything can fail
93
124
  create_file 'config/railscomposer.yml', "# This application was generated with Rails Composer\n\n"
94
125
  append_to_file 'config/railscomposer.yml' do <<-TEXT
@@ -108,6 +139,7 @@ omniauth_provider: [#{prefs[:omniauth_provider]}]
108
139
  authorization: [#{prefs[:authorization]}]
109
140
  form_builder: [#{prefs[:form_builder]}]
110
141
  pages: [#{prefs[:pages]}]
142
+ layouts: [#{prefs[:layouts]}]
111
143
  locale: [#{prefs[:locale]}]
112
144
  analytics: [#{prefs[:analytics]}]
113
145
  deployment: [#{prefs[:deployment]}]
@@ -51,6 +51,8 @@ end
51
51
  def stage_two(&block); @after_blocks << [@current_recipe, block]; end
52
52
  @stage_three_blocks = []
53
53
  def stage_three(&block); @stage_three_blocks << [@current_recipe, block]; end
54
+ @stage_four_blocks = []
55
+ def stage_four(&block); @stage_four_blocks << [@current_recipe, block]; end
54
56
  @before_configs = {}
55
57
  def before_config(&block); @before_configs[@current_recipe] = block; end
56
58
 
data/templates/layout.erb CHANGED
@@ -115,8 +115,8 @@ say_wizard("\033[1m\033[36m" + "|_| \\_\\__,_|_|_|___/_/ \\_\\ .__/| .__/|__
115
115
  say_wizard("\033[1m\033[36m" + " \| \| \| \|" + "\033[0m")
116
116
  say_wizard("\033[1m\033[36m" + " \| \| \| \|" + "\033[0m")
117
117
  say_wizard("\033[1m\033[36m" + '' + "\033[0m")
118
- say_wizard("\033[1m\033[36m" + "Rails Composer, open source, supported by subscribers." + "\033[0m")
119
- say_wizard("\033[1m\033[36m" + "Please join RailsApps to support development of Rails Composer." + "\033[0m")
118
+ say_wizard("\033[1m\033[36m" + "Rails Composer, open source, supported by purchases of RailsApps tutorials." + "\033[0m")
119
+ say_wizard("\033[1m\033[36m" + "Please purchase the tutorials to support development of Rails Composer." + "\033[0m")
120
120
  say_wizard("Need help? Ask on Stack Overflow with the tag \'railsapps.\'")
121
121
  say_wizard("Your new application will contain diagnostics in its README file.")
122
122
 
@@ -218,6 +218,12 @@ end
218
218
  say_wizard "Stage Three (running recipe 'stage_three' callbacks)."
219
219
  @stage_three_blocks.each{|b| config = @configs[b[0]] || {}; @current_recipe = b[0]; puts @current_recipe; b[1].call}
220
220
 
221
+ # >-----------------------------[ Run 'stage_four' Callbacks ]-------------------------------<
222
+
223
+ @current_recipe = nil
224
+ say_wizard "Stage Four (running recipe 'stage_four' callbacks)."
225
+ @stage_four_blocks.each{|b| config = @configs[b[0]] || {}; @current_recipe = b[0]; puts @current_recipe; b[1].call}
226
+
221
227
  @current_recipe = nil
222
228
  say_wizard("Your new application will contain diagnostics in its README file.")
223
229
  say_wizard("When reporting an issue on GitHub, include the README diagnostics.")
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "3.0.44"
2
+ VERSION = "3.1.0"
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.44
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Kehoe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-26 00:00:00.000000000 Z
11
+ date: 2015-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n