bakeware 1.1.7 → 1.1.8

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.
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  gemspec
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bakeware (1.1.7)
5
- bundler (>= 1.1)
4
+ bakeware (1.1.8)
5
+ bundler (>= 1.3)
6
6
  hub (~> 1.10.2)
7
7
  rails (>= 3.2.12)
8
8
 
9
9
  GEM
10
- remote: http://rubygems.org/
10
+ remote: https://rubygems.org/
11
11
  specs:
12
12
  actionmailer (3.2.12)
13
13
  actionpack (= 3.2.12)
@@ -42,25 +42,24 @@ GEM
42
42
  cucumber (>= 1.1.1)
43
43
  ffi (>= 1.0.11)
44
44
  rspec (>= 2.7.0)
45
- builder (3.0.0)
45
+ builder (3.0.4)
46
46
  childprocess (0.3.1)
47
47
  ffi (~> 1.0.6)
48
- cucumber (1.1.9)
48
+ cucumber (1.2.3)
49
49
  builder (>= 2.1.2)
50
- diff-lcs (>= 1.1.2)
51
- gherkin (~> 2.9.0)
52
- json (>= 1.4.6)
53
- term-ansicolor (>= 1.0.6)
50
+ diff-lcs (>= 1.1.3)
51
+ gherkin (~> 2.11.6)
52
+ multi_json (~> 1.3)
54
53
  diff-lcs (1.1.3)
55
54
  erubis (2.7.0)
56
55
  ffi (1.0.11)
57
- gherkin (2.9.3)
58
- json (>= 1.4.6)
56
+ gherkin (2.11.6)
57
+ json (>= 1.7.6)
59
58
  hike (1.2.1)
60
59
  hub (1.10.4)
61
60
  i18n (0.6.2)
62
61
  journey (1.0.4)
63
- json (1.6.6)
62
+ json (1.7.7)
64
63
  mail (2.4.4)
65
64
  i18n (>= 0.4.0)
66
65
  mime-types (~> 1.16)
@@ -106,7 +105,6 @@ GEM
106
105
  multi_json (~> 1.0)
107
106
  rack (~> 1.0)
108
107
  tilt (~> 1.1, != 1.3.0)
109
- term-ansicolor (1.0.7)
110
108
  thor (0.17.0)
111
109
  tilt (1.3.3)
112
110
  treetop (1.4.12)
@@ -120,4 +118,4 @@ PLATFORMS
120
118
  DEPENDENCIES
121
119
  aruba (~> 0.4.11)
122
120
  bakeware!
123
- cucumber (~> 1.1.9)
121
+ cucumber (~> 1.2.3)
data/README.md CHANGED
@@ -24,12 +24,13 @@ Lean Mode
24
24
 
25
25
  This is the default mode. Comes with
26
26
 
27
- * [Airbrake](/airbrake/airbrake) for exception notification
28
- * [haml](/haml/haml) for haml - because we should all use it
29
- * [newrelic_rpm](/newrelic/rpm) for analytics about the performance of your app
30
- * [pg](/ged/ruby-pg) for PostgreSQL
27
+ * [Airbrake](https://github.com/airbrake/airbrake) for exception notification
28
+ * [haml](https://github.com/haml/haml) for haml - because we should all use it
29
+ * [newrelic_rpm](https://github.com/newrelic/rpm) for analytics about the performance of your app
30
+ * [pg](https://github.com/ged/ruby-pg) for PostgreSQL
31
+ * [rack-timeout](https://github.com/kch/rack-timeout) for killing a zombie process
31
32
 
32
- As well as some other development tools (like pry-rails).
33
+ As well as some other development tools (like pry-rails, better_errors, binding_of_caller).
33
34
 
34
35
  Meaty Mode
35
36
  ---------
@@ -40,21 +41,21 @@ You can optionally opt for Meaty mode:
40
41
 
41
42
  This comes with:
42
43
 
43
- * [Airbrake](/airbrake/airbrake) for exception notification
44
- * [asset_sync](/rumblelabs/asset_sync) syncing assets between rails and s3
45
- * [aws-sdk](/aws/aws-sdk-ruby) for the amazon sdk
46
- * [challah](/ovenbits/challah) for simple and effective authentication
47
- * [challah-facebook](/jdtornow/challah-facebook) extends Challah for FB authentication
48
- * [Compass](/chriseppstein/compass) for Sass mixins and standardization
49
- * [haml](/haml/haml) for haml - because we all should use it
50
- * [hirefireapp](/meskyanichi/hirefireapp) for auto scaling dynos on heroku
51
- * [newrelic_rpm](/newrelic/rpm) for analytics about the performance of your app
52
- * [Paperclip](/thoughtbot/paperclip) for file uploads
53
- * [pg](/ged/ruby-pg) for PostgreSQL
54
- * [rack-timeout](/kch/rack-timeout) for killing your app's hung processes before heroku times out (set to 29 seconds)
55
- * [redis](/antirez/redis) for redis
56
- * [resque](/defunkt/resque) for resque background processing
57
- * [Unicorn](/defunkt/unicorn) for a better http server
44
+ * [Airbrake](https://github.com/airbrake/airbrake) for exception notification
45
+ * [asset_sync](https://github.com/rumblelabs/asset_sync) syncing assets between rails and s3
46
+ * [aws-sdk](https://github.com/aws/aws-sdk-ruby) for the amazon sdk
47
+ * [challah](https://github.com/ovenbits/challah) for simple and effective authentication
48
+ * [challah-facebook](https://github.com/jdtornow/challah-facebook) extends Challah for FB authentication
49
+ * [Compass](https://github.com/chriseppstein/compass) for Sass mixins and standardization
50
+ * [haml](https://github.com/haml/haml) for haml - because we all should use it
51
+ * [hirefireapp](https://github.com/meskyanichi/hirefireapp) for auto scaling dynos on heroku
52
+ * [newrelic_rpm](https://github.com/newrelic/rpm) for analytics about the performance of your app
53
+ * [Paperclip](https://github.com/thoughtbot/paperclip) for file uploads
54
+ * [pg](https://github.com/ged/ruby-pg) for PostgreSQL
55
+ * [rack-timeout](https://github.com/kch/rack-timeout) for killing your app's hung processes before heroku times out (set to 29 seconds)
56
+ * [redis](https://github.com/antirez/redis) for redis
57
+ * [resque](https://github.com/defunkt/resque) for resque background processing
58
+ * [Unicorn](https://github.com/defunkt/unicorn) for a better http server
58
59
 
59
60
 
60
61
  Testing
@@ -62,11 +63,11 @@ Testing
62
63
 
63
64
  Bakeware also comes with testing gems, including (but not limited to):
64
65
 
65
- * [Factory Girl](/thoughtbot/factory_girl) for test data
66
- * [mocha](/freerange/mocha) for mocking and stubbing
67
- * [simplecov](/colszowka/simplecov) for testing coverage analytics
68
- * [Timecop](/jtrupiano/timecop) for testing time
69
- * [turn](/TwP/turn) for better test reporting
66
+ * [Factory Girl](https://github.com/thoughtbot/factory_girl) for test data
67
+ * [mocha](https://github.com/freerange/mocha) for mocking and stubbing
68
+ * [simplecov](https://github.com/colszowka/simplecov) for testing coverage analytics
69
+ * [Timecop](https://github.com/jtrupiano/timecop) for testing time
70
+ * [turn](https://github.com/TwP/turn) for better test reporting
70
71
 
71
72
  We don't use RSpec often, and even less often do we use minitest. So manually include those if you want.
72
73
 
@@ -118,7 +119,7 @@ Dependencies
118
119
  Some gems included in Bakeware have native extensions. You should have GCC installed on your
119
120
  machine before generating an app with Bakeware.
120
121
 
121
- Use [OS X GCC Installer](/kennethreitz/osx-gcc-installer/) for Snow Leopard
122
+ Use [OS X GCC Installer](https://github.com/kennethreitz/osx-gcc-installer/) for Snow Leopard
122
123
  (OS X 10.6).
123
124
 
124
125
  Use [Command Line Tools for XCode](https://developer.apple.com/downloads/index.action)
@@ -129,7 +130,7 @@ PostgreSQL needs to be installed and running for the `db:create` rake task.
129
130
  Issues
130
131
  ------
131
132
 
132
- If you have problems, please create a [Github Issue](/courtsimas/bakeware/issues).
133
+ If you have problems, please create a [Github Issue](https://github.com/courtsimas/bakeware/issues).
133
134
 
134
135
  Contributing
135
136
  ------------
@@ -1,6 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
- require "bakeware/version"
3
+ require 'bakeware/version'
4
+ require 'date'
4
5
 
5
6
  Gem::Specification.new do |s|
6
7
  s.name = 'bakeware'
@@ -27,9 +28,9 @@ We use it at Oven Bits for most of our apps. YMMV, but we get decent mileage out
27
28
  s.extra_rdoc_files = %w[README.md LICENSE]
28
29
 
29
30
  s.add_dependency 'rails', '>= 3.2.12'
30
- s.add_dependency 'bundler', '>= 1.1'
31
+ s.add_dependency 'bundler', '>= 1.3'
31
32
  s.add_dependency 'hub', '~> 1.10.2'
32
33
 
33
- s.add_development_dependency 'cucumber', '~> 1.1.9'
34
+ s.add_development_dependency 'cucumber', '~> 1.2.3'
34
35
  s.add_development_dependency 'aruba', '~> 0.4.11'
35
36
  end
@@ -2,39 +2,30 @@ require 'aruba/cucumber'
2
2
 
3
3
  When 'I run rake' do
4
4
  in_current_dir do
5
- run 'bundle exec rake'
5
+ run_simple 'bundle exec rake'
6
6
  end
7
7
  end
8
8
 
9
9
  When 'I run the rake task "$task_name"' do |task_name|
10
10
  in_current_dir do
11
- run "bundle exec rake #{task_name}"
11
+ run_simple "bundle exec rake #{task_name}"
12
12
  end
13
13
  end
14
14
 
15
15
  When 'I generate "$generator_with_args"' do |generator_with_args|
16
16
  in_current_dir do
17
- run "bundle exec rails generate #{generator_with_args}"
17
+ run_simple "bundle exec rails generate #{generator_with_args}"
18
18
  end
19
19
  end
20
20
 
21
- Then 'I see a successful response in the shell' do
22
- assert_exit_status(0)
23
- end
24
-
25
- When 'I drop and create the required databases' do
26
- in_current_dir do
27
- run 'bundle exec rake db:drop RAILS_ENV=test'
28
- run 'bundle exec rake db:drop'
29
- run 'bundle exec rake db:create RAILS_ENV=test'
30
- run 'bundle exec rake db:create'
31
- end
21
+ Given 'I ensure no databases exist for the "$project_name"' do |project_name|
22
+ run "dropdb #{project_name}_development"
23
+ run "dropdb #{project_name}_test"
32
24
  end
33
25
 
34
26
  When 'I bake a project called "$project_name"' do |project_name|
35
27
  bakeware_bin = File.expand_path(File.join('..', '..', 'bin', 'bakeware'), File.dirname(__FILE__))
36
- run "#{bakeware_bin} #{project_name}"
37
- assert_exit_status(0)
28
+ run_simple "#{bakeware_bin} #{project_name}"
38
29
  end
39
30
 
40
31
  When /^I bake a project called "([^"]*)" with:$/ do |project_name, arguments_table|
@@ -42,8 +33,7 @@ When /^I bake a project called "([^"]*)" with:$/ do |project_name, arguments_tab
42
33
  arguments = arguments_table.hashes.inject([]) do |accum, argument|
43
34
  accum << "#{argument['argument']}=#{argument['value']}"
44
35
  end.join
45
- run "#{bakeware_bin} #{project_name} #{arguments}"
46
- assert_exit_status(0)
36
+ run_simple "#{bakeware_bin} #{project_name} #{arguments}"
47
37
  end
48
38
 
49
39
  When 'I cd to the "$test_project" root' do |dirname|
@@ -56,20 +46,19 @@ Then 'I can cleanly rake the project' do
56
46
  And I run the rake task "db:migrate"
57
47
  And I run the rake task "db:test:prepare"
58
48
  And I run the rake task "cucumber"
59
- Then I see a successful response in the shell
60
49
  }
61
50
  end
62
51
 
52
+ Then /^"(.*)" should not be installed$/ do |gem_name|
53
+ in_current_dir do
54
+ system("bundle show #{gem_name} 2>&1 > /dev/null").should be_false
55
+ end
56
+ end
57
+
63
58
  Then /^the "([^"]*)" Heroku app should exist$/ do |app_name|
64
59
  FakeHeroku.should have_created_app(app_name)
65
60
  end
66
61
 
67
62
  Then /^the "([^"]*)" Github repo should exist$/ do |repo_name|
68
63
  FakeGithub.should have_created_repo(repo_name)
69
- end
70
-
71
- Then 'unicorn should be installed' do
72
- in_current_dir do
73
- system("bundle show unicorn 2>&1 > /dev/null").should be_true
74
- end
75
- end
64
+ end
@@ -20,8 +20,8 @@ module Bakeware
20
20
  end
21
21
 
22
22
  def provide_setup_script
23
- copy_file 'script_setup', 'script/setup'
24
- run 'chmod a+x script/setup'
23
+ copy_file 'bin_setup', 'bin/setup'
24
+ run 'chmod a+x bin/setup'
25
25
  end
26
26
 
27
27
  def setup_staging_environment
@@ -99,25 +99,32 @@ module Bakeware
99
99
  copy_file 'asset_sync', 'config/initializers/asset_sync.rb'
100
100
  copy_file 'timeout', 'config/initializers/timeout.rb'
101
101
  copy_file 'Procfile', 'Procfile'
102
- concat_file 'import_scss_styles', 'app/assets/stylesheets/application.css.scss'
103
102
  inject_into_file 'Procfile', "worker: env QUEUE=* bundle exec rake resque:work",
104
103
  :after => "\n"
105
104
  replace_in_file 'Procfile',
106
105
  'web: bundle exec rails server thin -p $PORT','web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb'
107
106
  end
108
107
 
108
+ def enable_database_cleaner
109
+ copy_file 'database_cleaner_rspec.rb', 'spec/support/database_cleaner.rb'
110
+ end
111
+
109
112
  def configure_time_zone
110
- time_zone_config = <<-RUBY
113
+ config = <<-RUBY
111
114
  config.active_record.default_timezone = :utc
112
115
  RUBY
113
- inject_into_class "config/application.rb", "Application", time_zone_config
116
+ inject_into_class "config/application.rb", "Application", config
114
117
  end
115
118
 
116
119
  def configure_time_formats
117
120
  remove_file 'config/locales/en.yml'
118
121
  copy_file 'config_locales_en.yml', 'config/locales/en.yml'
119
122
  end
120
-
123
+
124
+ def configure_rack_timeout
125
+ copy_file 'rack_timeout.rb', 'config/initializers/rack_timeout.rb'
126
+ end
127
+
121
128
  def configure_action_mailer
122
129
  action_mailer_host 'development', "#{app_name}.local"
123
130
  action_mailer_host 'test', 'www.example.com'
@@ -130,13 +137,14 @@ module Bakeware
130
137
  end
131
138
 
132
139
  def setup_foreman
133
- copy_file 'sample.env', 'sample.env'
140
+ copy_file 'sample.env', '.sample.env'
134
141
  end
135
142
 
136
143
  def setup_stylesheets
137
144
  copy_file 'app/assets/stylesheets/application.css',
138
145
  'app/assets/stylesheets/application.css.scss'
139
146
  remove_file 'app/assets/stylesheets/application.css'
147
+ concat_file 'import_scss_styles', 'app/assets/stylesheets/application.css.scss'
140
148
  create_file 'app/assets/stylesheets/_screen.scss'
141
149
  end
142
150
 
@@ -161,6 +169,7 @@ module Bakeware
161
169
  path_addition = override_path_for_tests
162
170
  run "#{path_addition} heroku create #{app_name} --remote=production"
163
171
  run "#{path_addition} heroku create #{app_name}-staging --remote=staging"
172
+ run "#{path_addition} heroku config:add RACK_ENV=staging RAILS_ENV=staging --remote=staging"
164
173
  end
165
174
 
166
175
  def create_github_repo(repo_name)
@@ -200,6 +209,10 @@ module Bakeware
200
209
  def add_email_validator
201
210
  copy_file 'email_validator.rb', 'app/validators/email_validator.rb'
202
211
  end
212
+
213
+ def disable_xml_params
214
+ copy_file 'disable_xml_params.rb', 'config/initializers/disable_xml_params.rb'
215
+ end
203
216
 
204
217
  def setup_default_rake_task
205
218
  # append_file 'Rakefile' do
@@ -58,7 +58,11 @@ module Bakeware
58
58
 
59
59
  def setup_test_environment
60
60
  say 'Setting up the test environment'
61
- #still need some database cleaners in here
61
+ # build :enable_factory_girl_syntax
62
+ # build :test_factories_first
63
+ # build :generate_rspec
64
+ # build :configure_rspec
65
+ build :enable_database_cleaner
62
66
  build :setup_guard_spork
63
67
  end
64
68
 
@@ -114,6 +118,9 @@ module Bakeware
114
118
  build :configure_action_mailer
115
119
  build :configure_time_zone
116
120
  build :configure_time_formats
121
+ build :configure_rack_timeout
122
+
123
+ build :disable_xml_params
117
124
 
118
125
  build :add_email_validator
119
126
  build :setup_default_rake_task
@@ -1,3 +1,3 @@
1
1
  module Bakeware
2
- VERSION = '1.1.7'
2
+ VERSION = '1.1.8'
3
3
  end
@@ -2,20 +2,29 @@ gem 'airbrake'
2
2
  gem 'thin'
3
3
  gem 'pg'
4
4
  gem 'haml'
5
+ gem 'rack-timeout'
5
6
 
6
7
  group :development do
7
8
  gem 'foreman'
8
9
  gem 'mailcatcher'
9
10
  gem 'pry-rails'
11
+ gem 'better_errors'
12
+ gem 'binding_of_caller'
13
+ end
14
+
15
+ group :assets do
16
+ gem 'coffee-rails'
17
+ gem 'uglifier'
10
18
  end
11
19
 
12
20
  group :development, :test do
21
+ gem 'factory_girl_rails'
13
22
  gem 'guard'
14
23
  gem 'guard-spork'
15
24
  end
16
25
 
17
26
  group :test do
18
- gem 'factory_girl_rails'
27
+ gem 'cane'
19
28
  gem 'mocha', :require => false
20
29
  gem 'shoulda-context'
21
30
  gem 'shoulda-matchers'
@@ -1 +1 @@
1
- web: bundle exec rails server thin -p $PORT
1
+ web: bundle exec rails server thin -p $PORT -e $RACK_ENV
@@ -5,4 +5,7 @@
5
5
 
6
6
  bundle install --binstubs=bin/stubs
7
7
  bundle exec rake db:setup
8
- cp sample.env .env
8
+
9
+ if [ ! -f .env ]; then
10
+ cp .sample.env .env
11
+ fi
@@ -0,0 +1,21 @@
1
+ RSpec.configure do |config|
2
+ config.before(:suite) do
3
+ DatabaseCleaner.clean_with(:deletion)
4
+ end
5
+
6
+ config.before(:each) do
7
+ DatabaseCleaner.strategy = :transaction
8
+ end
9
+
10
+ config.before(:each, :js => true) do
11
+ DatabaseCleaner.strategy = :deletion
12
+ end
13
+
14
+ config.before(:each) do
15
+ DatabaseCleaner.start
16
+ end
17
+
18
+ config.after(:each) do
19
+ DatabaseCleaner.clean
20
+ end
21
+ end
@@ -0,0 +1,3 @@
1
+ # Protect against injection attacks
2
+ # http://www.kb.cert.org/vuls/id/380039
3
+ ActionDispatch::ParamsParser::DEFAULT_PARSERS.delete(Mime::XML)
@@ -0,0 +1 @@
1
+ Rack::Timeout.timeout = (ENV['TIMEOUT_IN_SECONDS'] || 20).to_i
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bakeware
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-26 00:00:00.000000000 Z
12
+ date: 2013-04-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ! '>='
36
36
  - !ruby/object:Gem::Version
37
- version: '1.1'
37
+ version: '1.3'
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
- version: '1.1'
45
+ version: '1.3'
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: hub
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -66,7 +66,7 @@ dependencies:
66
66
  requirements:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: 1.1.9
69
+ version: 1.2.3
70
70
  type: :development
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,7 +74,7 @@ dependencies:
74
74
  requirements:
75
75
  - - ~>
76
76
  - !ruby/object:Gem::Version
77
- version: 1.1.9
77
+ version: 1.2.3
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: aruba
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -134,7 +134,10 @@ files:
134
134
  - templates/asset_sync
135
135
  - templates/bakeware_gitignore
136
136
  - templates/bakeware_layout.html.erb.erb
137
+ - templates/bin_setup
137
138
  - templates/config_locales_en.yml
139
+ - templates/database_cleaner_rspec.rb
140
+ - templates/disable_xml_params.rb
138
141
  - templates/email_validator.rb
139
142
  - templates/errors.rb
140
143
  - templates/import_scss_styles
@@ -142,9 +145,9 @@ files:
142
145
  - templates/newrelic_config
143
146
  - templates/override_recipient_smtp.rb
144
147
  - templates/postgresql_database.yml.erb
148
+ - templates/rack_timeout.rb
145
149
  - templates/s3yml
146
150
  - templates/sample.env
147
- - templates/script_setup
148
151
  - templates/simplecov_init.rb
149
152
  - templates/time_formats.rb
150
153
  - templates/timeout