bakeware 1.1.5
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/CONTRIBUTING.md +38 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +114 -0
- data/LICENSE +21 -0
- data/README.md +146 -0
- data/Rakefile +8 -0
- data/bakeware.gemspec +35 -0
- data/bin/bakeware +11 -0
- data/features/clearance_false.feature +10 -0
- data/features/github_repo.feature +8 -0
- data/features/heroku_true.feature +9 -0
- data/features/rake_clean.feature +15 -0
- data/features/step_definitions/bakeware_steps.rb +79 -0
- data/features/support/bin/heroku +5 -0
- data/features/support/bin/hub +5 -0
- data/features/support/env.rb +10 -0
- data/features/support/fake_github.rb +21 -0
- data/features/support/fake_heroku.rb +21 -0
- data/lib/bakeware/actions.rb +35 -0
- data/lib/bakeware/app_builder.rb +215 -0
- data/lib/bakeware/generators/app_generator.rb +194 -0
- data/lib/bakeware/version.rb +3 -0
- data/templates/Gemfile_additions +25 -0
- data/templates/Gemfile_extra_meat +9 -0
- data/templates/Guardfile +9 -0
- data/templates/Procfile +1 -0
- data/templates/README.md.erb +8 -0
- data/templates/_flashes.html.erb +5 -0
- data/templates/_javascript.html.erb +9 -0
- data/templates/bakeware_gitignore +10 -0
- data/templates/bakeware_layout.html.erb.erb +22 -0
- data/templates/config_locales_en.yml +11 -0
- data/templates/email_validator.rb +7 -0
- data/templates/errors.rb +28 -0
- data/templates/import_scss_styles +1 -0
- data/templates/javascripts/prefilled_input.js +62 -0
- data/templates/override_recipient_smtp.rb +38 -0
- data/templates/postgresql_database.yml.erb +11 -0
- data/templates/sample.env +2 -0
- data/templates/script_setup +8 -0
- data/templates/simplecov_init.rb +2 -0
- data/templates/time_formats.rb +0 -0
- data/templates/unicorn_config +33 -0
- metadata +183 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
gem 'airbrake'
|
2
|
+
gem 'thin'
|
3
|
+
gem 'pg'
|
4
|
+
gem 'haml'
|
5
|
+
|
6
|
+
group :development do
|
7
|
+
gem 'foreman'
|
8
|
+
end
|
9
|
+
|
10
|
+
group :development, :test do
|
11
|
+
gem 'guard'
|
12
|
+
gem 'guard-spork'
|
13
|
+
gem 'sham_rack'
|
14
|
+
end
|
15
|
+
|
16
|
+
group :test do
|
17
|
+
gem 'factory_girl_rails'
|
18
|
+
gem 'database_cleaner'
|
19
|
+
gem 'simplecov', require: false
|
20
|
+
gem 'timecop'
|
21
|
+
end
|
22
|
+
|
23
|
+
group :staging, :production do
|
24
|
+
gem 'newrelic_rpm'
|
25
|
+
end
|
data/templates/Guardfile
ADDED
data/templates/Procfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
web: bundle exec rails server thin -p $PORT
|
@@ -0,0 +1,8 @@
|
|
1
|
+
Bakeware: it's radilicious
|
2
|
+
============================
|
3
|
+
|
4
|
+
Use the following guides for getting things done, programming well, and
|
5
|
+
programming in style.
|
6
|
+
|
7
|
+
* [Best Practices](https://github.com/ovenbits/cookbook/blob/master/setup/standard_config.md)
|
8
|
+
* [Style](https://github.com/styleguide)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta name="ROBOTS" content="NOODP" />
|
6
|
+
<title><%%= page_title %></title>
|
7
|
+
<%%= stylesheet_link_tag :application, :media => 'all' %>
|
8
|
+
<%%= csrf_meta_tags %>
|
9
|
+
</head>
|
10
|
+
<body class="<%%= body_class %>">
|
11
|
+
<header>
|
12
|
+
<%% if signed_in? -%>
|
13
|
+
<%%= link_to "Sign out", sign_out_path, :method => :delete %>
|
14
|
+
<%% else -%>
|
15
|
+
<%%= link_to "Sign in", sign_in_path %>
|
16
|
+
<%% end -%>
|
17
|
+
</header>
|
18
|
+
<%%= render 'flashes' -%>
|
19
|
+
<%%= yield %>
|
20
|
+
<%%= render 'javascript' %>
|
21
|
+
</body>
|
22
|
+
</html>
|
data/templates/errors.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'net/smtp'
|
3
|
+
|
4
|
+
# Example:
|
5
|
+
# begin
|
6
|
+
# some http call
|
7
|
+
# rescue *HTTP_ERRORS => error
|
8
|
+
# notify_hoptoad error
|
9
|
+
# end
|
10
|
+
|
11
|
+
HTTP_ERRORS = [Timeout::Error,
|
12
|
+
Errno::EINVAL,
|
13
|
+
Errno::ECONNRESET,
|
14
|
+
EOFError,
|
15
|
+
Net::HTTPBadResponse,
|
16
|
+
Net::HTTPHeaderSyntaxError,
|
17
|
+
Net::ProtocolError]
|
18
|
+
|
19
|
+
SMTP_SERVER_ERRORS = [TimeoutError,
|
20
|
+
IOError,
|
21
|
+
Net::SMTPUnknownError,
|
22
|
+
Net::SMTPServerBusy,
|
23
|
+
Net::SMTPAuthenticationError]
|
24
|
+
|
25
|
+
SMTP_CLIENT_ERRORS = [Net::SMTPFatalError,
|
26
|
+
Net::SMTPSyntaxError]
|
27
|
+
|
28
|
+
SMTP_ERRORS = SMTP_SERVER_ERRORS + SMTP_CLIENT_ERRORS
|
@@ -0,0 +1 @@
|
|
1
|
+
@import 'compass';
|
@@ -0,0 +1,62 @@
|
|
1
|
+
//TODO: get some more standardized Oven Bits javascript in here
|
2
|
+
|
3
|
+
|
4
|
+
// clear inputs with starter values
|
5
|
+
new function($) {
|
6
|
+
$.fn.prefilledInput = function() {
|
7
|
+
|
8
|
+
var focus = function () {
|
9
|
+
$(this).removeClass('prefilled');
|
10
|
+
if (this.value == this.prefilledValue) {
|
11
|
+
this.value = '';
|
12
|
+
}
|
13
|
+
};
|
14
|
+
|
15
|
+
var blur = function () {
|
16
|
+
if (this.value == '') {
|
17
|
+
$(this).addClass('prefilled').val(this.prefilledValue);
|
18
|
+
} else if (this.value != this.prefilledValue) {
|
19
|
+
$(this).removeClass('prefilled');
|
20
|
+
}
|
21
|
+
};
|
22
|
+
|
23
|
+
var extractPrefilledValue = function () {
|
24
|
+
if (this.title) {
|
25
|
+
this.prefilledValue = this.title;
|
26
|
+
this.title = '';
|
27
|
+
} else if (this.id) {
|
28
|
+
this.prefilledValue = $('label[for=' + this.id + ']').hide().text();
|
29
|
+
}
|
30
|
+
if (this.prefilledValue) {
|
31
|
+
this.prefilledValue = this.prefilledValue.replace(/\*$/, '');
|
32
|
+
}
|
33
|
+
};
|
34
|
+
|
35
|
+
var initialize = function (index) {
|
36
|
+
if (!this.prefilledValue) {
|
37
|
+
this.extractPrefilledValue = extractPrefilledValue;
|
38
|
+
this.extractPrefilledValue();
|
39
|
+
$(this).trigger('blur');
|
40
|
+
}
|
41
|
+
};
|
42
|
+
|
43
|
+
return this.filter(":input").
|
44
|
+
focus(focus).
|
45
|
+
blur(blur).
|
46
|
+
each(initialize);
|
47
|
+
};
|
48
|
+
|
49
|
+
var clearPrefilledInputs = function () {
|
50
|
+
var form = this.form || this;
|
51
|
+
$(form).find("input.prefilled, textarea.prefilled").val("");
|
52
|
+
};
|
53
|
+
|
54
|
+
var prefilledSetup = function () {
|
55
|
+
$('input.prefilled, textarea.prefilled').prefilledInput();
|
56
|
+
$('form').submit(clearPrefilledInputs);
|
57
|
+
$('input:submit, button:submit').click(clearPrefilledInputs);
|
58
|
+
};
|
59
|
+
|
60
|
+
$(document).ready(prefilledSetup);
|
61
|
+
$(document).ajaxComplete(prefilledSetup);
|
62
|
+
}(jQuery);
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Mail
|
2
|
+
# == Sending Email with Override Recipient SMTP
|
3
|
+
#
|
4
|
+
# Use the OverrideRecipientSMTP delivery method when you don't want your app
|
5
|
+
# to accidentally send emails to addresses other than the overridden recipient
|
6
|
+
# which you configure.
|
7
|
+
#
|
8
|
+
# A typical use case is in your app's staging environment, your development
|
9
|
+
# team will receive all staging emails without accidentally emailing users with
|
10
|
+
# active email addresses in the database.
|
11
|
+
#
|
12
|
+
# === Sending via OverrideRecipientSMTP
|
13
|
+
#
|
14
|
+
# config.action_mailer.delivery_method = :override_recipient_smtp,
|
15
|
+
# to: 'staging@example.com'
|
16
|
+
#
|
17
|
+
# === Sending to multiple email addresses
|
18
|
+
#
|
19
|
+
# config.action_mailer.delivery_method = :override_recipient_smtp,
|
20
|
+
# to: ['court@ovenbits.com', 'jt@ovenbits.com']
|
21
|
+
class OverrideRecipientSMTP < Mail::SMTP
|
22
|
+
def initialize(values)
|
23
|
+
unless values[:to]
|
24
|
+
raise ArgumentError.new('A :to option is required when using :override_recipient_smtp')
|
25
|
+
end
|
26
|
+
|
27
|
+
super(values)
|
28
|
+
end
|
29
|
+
|
30
|
+
def deliver!(mail)
|
31
|
+
mail.to = settings[:to]
|
32
|
+
mail.cc = nil
|
33
|
+
mail.bcc = nil
|
34
|
+
|
35
|
+
super(mail)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
File without changes
|
@@ -0,0 +1,33 @@
|
|
1
|
+
worker_processes 2
|
2
|
+
timeout 30
|
3
|
+
preload_app true
|
4
|
+
|
5
|
+
before_fork do |server, worker|
|
6
|
+
# Replace with MongoDB or whatever
|
7
|
+
if defined?(ActiveRecord::Base)
|
8
|
+
ActiveRecord::Base.connection.disconnect!
|
9
|
+
Rails.logger.info('Disconnected from ActiveRecord')
|
10
|
+
end
|
11
|
+
|
12
|
+
# If you are using Redis but not Resque, change this
|
13
|
+
if defined?(Resque)
|
14
|
+
Resque.redis.quit
|
15
|
+
Rails.logger.info('Disconnected from Redis')
|
16
|
+
end
|
17
|
+
|
18
|
+
sleep 1
|
19
|
+
end
|
20
|
+
|
21
|
+
after_fork do |server, worker|
|
22
|
+
# Replace with MongoDB or whatever
|
23
|
+
if defined?(ActiveRecord::Base)
|
24
|
+
ActiveRecord::Base.establish_connection
|
25
|
+
Rails.logger.info('Connected to ActiveRecord')
|
26
|
+
end
|
27
|
+
|
28
|
+
# If you are using Redis but not Resque, change this
|
29
|
+
if defined?(Resque)
|
30
|
+
Resque.redis = ENV["REDISTOGO_URL"]
|
31
|
+
Rails.logger.info('Connected to Redis')
|
32
|
+
end
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,183 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bakeware
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.5
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- courtsimas
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-01-08 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rails
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.2.8
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.2.8
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: bundler
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1.1'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.1'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: hub
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.10.2
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.10.2
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: cucumber
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 1.1.9
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.1.9
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: aruba
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ~>
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 0.4.11
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 0.4.11
|
94
|
+
description: ! "Bakeware is a base Rails project that you can upgrade. It comes in
|
95
|
+
two flavors - lean or meaty. \nWe use it at Oven Bits for most of our apps. YMMV,
|
96
|
+
but we get decent mileage out of it ;)\n"
|
97
|
+
email: courtsimas@gmail.com
|
98
|
+
executables:
|
99
|
+
- bakeware
|
100
|
+
extensions: []
|
101
|
+
extra_rdoc_files:
|
102
|
+
- README.md
|
103
|
+
- LICENSE
|
104
|
+
files:
|
105
|
+
- CONTRIBUTING.md
|
106
|
+
- Gemfile
|
107
|
+
- Gemfile.lock
|
108
|
+
- LICENSE
|
109
|
+
- README.md
|
110
|
+
- Rakefile
|
111
|
+
- bakeware.gemspec
|
112
|
+
- bin/bakeware
|
113
|
+
- features/clearance_false.feature
|
114
|
+
- features/github_repo.feature
|
115
|
+
- features/heroku_true.feature
|
116
|
+
- features/rake_clean.feature
|
117
|
+
- features/step_definitions/bakeware_steps.rb
|
118
|
+
- features/support/bin/heroku
|
119
|
+
- features/support/bin/hub
|
120
|
+
- features/support/env.rb
|
121
|
+
- features/support/fake_github.rb
|
122
|
+
- features/support/fake_heroku.rb
|
123
|
+
- lib/bakeware/actions.rb
|
124
|
+
- lib/bakeware/app_builder.rb
|
125
|
+
- lib/bakeware/generators/app_generator.rb
|
126
|
+
- lib/bakeware/version.rb
|
127
|
+
- templates/Gemfile_additions
|
128
|
+
- templates/Gemfile_extra_meat
|
129
|
+
- templates/Guardfile
|
130
|
+
- templates/Procfile
|
131
|
+
- templates/README.md.erb
|
132
|
+
- templates/_flashes.html.erb
|
133
|
+
- templates/_javascript.html.erb
|
134
|
+
- templates/bakeware_gitignore
|
135
|
+
- templates/bakeware_layout.html.erb.erb
|
136
|
+
- templates/config_locales_en.yml
|
137
|
+
- templates/email_validator.rb
|
138
|
+
- templates/errors.rb
|
139
|
+
- templates/import_scss_styles
|
140
|
+
- templates/javascripts/prefilled_input.js
|
141
|
+
- templates/override_recipient_smtp.rb
|
142
|
+
- templates/postgresql_database.yml.erb
|
143
|
+
- templates/sample.env
|
144
|
+
- templates/script_setup
|
145
|
+
- templates/simplecov_init.rb
|
146
|
+
- templates/time_formats.rb
|
147
|
+
- templates/unicorn_config
|
148
|
+
homepage: http://github.com/courtsimas/bakeware
|
149
|
+
licenses: []
|
150
|
+
post_install_message:
|
151
|
+
rdoc_options:
|
152
|
+
- --charset=UTF-8
|
153
|
+
require_paths:
|
154
|
+
- lib
|
155
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
156
|
+
none: false
|
157
|
+
requirements:
|
158
|
+
- - ! '>='
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
|
+
none: false
|
163
|
+
requirements:
|
164
|
+
- - ! '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
requirements: []
|
168
|
+
rubyforge_project:
|
169
|
+
rubygems_version: 1.8.24
|
170
|
+
signing_key:
|
171
|
+
specification_version: 3
|
172
|
+
summary: Generate a Rails app using Oven Bits' favorite flavors and ingredients.
|
173
|
+
test_files:
|
174
|
+
- features/clearance_false.feature
|
175
|
+
- features/github_repo.feature
|
176
|
+
- features/heroku_true.feature
|
177
|
+
- features/rake_clean.feature
|
178
|
+
- features/step_definitions/bakeware_steps.rb
|
179
|
+
- features/support/bin/heroku
|
180
|
+
- features/support/bin/hub
|
181
|
+
- features/support/env.rb
|
182
|
+
- features/support/fake_github.rb
|
183
|
+
- features/support/fake_heroku.rb
|