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
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
We love pull requests. Here's a quick guide:
|
2
|
+
|
3
|
+
1. Fork the repo.
|
4
|
+
|
5
|
+
2. Run the tests. We only take pull requests with passing tests, and it's great
|
6
|
+
to know that you have a clean slate: `bundle && rake`
|
7
|
+
|
8
|
+
3. Add a test for your change. Only refactoring and documentation changes
|
9
|
+
require no new tests. If you are adding functionality or fixing a bug, we need
|
10
|
+
a test!
|
11
|
+
|
12
|
+
4. Make the test pass.
|
13
|
+
|
14
|
+
5. Push to your fork and submit a pull request.
|
15
|
+
|
16
|
+
|
17
|
+
At this point you're waiting on us. We like to at least comment on, if not
|
18
|
+
accept, pull requests within three business days (and, typically, one business
|
19
|
+
day). We may suggest some changes or improvements or alternatives.
|
20
|
+
|
21
|
+
Some things that will increase the chance that your pull request is accepted,
|
22
|
+
taken straight from the Ruby on Rails guide:
|
23
|
+
|
24
|
+
* Use Rails idioms and helpers
|
25
|
+
* Include tests that fail without your code, and pass with it
|
26
|
+
* Update the documentation, the surrounding one, examples elsewhere, guides,
|
27
|
+
whatever is affected by your contribution
|
28
|
+
|
29
|
+
Syntax:
|
30
|
+
|
31
|
+
* Two spaces, no tabs.
|
32
|
+
* No trailing whitespace. Blank lines should not have any space.
|
33
|
+
* Prefer &&/|| over and/or.
|
34
|
+
* my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
35
|
+
* a = b and not a=b.
|
36
|
+
* Follow the conventions you see used in the source already.
|
37
|
+
|
38
|
+
And in case we didn't emphasize it enough: we love tests!
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
bakeware (1.1.5)
|
5
|
+
bundler (>= 1.1)
|
6
|
+
hub (~> 1.10.2)
|
7
|
+
rails (= 3.2.10)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actionmailer (3.2.8)
|
13
|
+
actionpack (= 3.2.8)
|
14
|
+
mail (~> 2.4.4)
|
15
|
+
actionpack (3.2.8)
|
16
|
+
activemodel (= 3.2.8)
|
17
|
+
activesupport (= 3.2.8)
|
18
|
+
builder (~> 3.0.0)
|
19
|
+
erubis (~> 2.7.0)
|
20
|
+
journey (~> 1.0.4)
|
21
|
+
rack (~> 1.4.0)
|
22
|
+
rack-cache (~> 1.2)
|
23
|
+
rack-test (~> 0.6.1)
|
24
|
+
sprockets (~> 2.1.3)
|
25
|
+
activemodel (3.2.8)
|
26
|
+
activesupport (= 3.2.8)
|
27
|
+
builder (~> 3.0.0)
|
28
|
+
activerecord (3.2.8)
|
29
|
+
activemodel (= 3.2.8)
|
30
|
+
activesupport (= 3.2.8)
|
31
|
+
arel (~> 3.0.2)
|
32
|
+
tzinfo (~> 0.3.29)
|
33
|
+
activeresource (3.2.8)
|
34
|
+
activemodel (= 3.2.8)
|
35
|
+
activesupport (= 3.2.8)
|
36
|
+
activesupport (3.2.8)
|
37
|
+
i18n (~> 0.6)
|
38
|
+
multi_json (~> 1.0)
|
39
|
+
arel (3.0.2)
|
40
|
+
aruba (0.4.11)
|
41
|
+
childprocess (>= 0.2.3)
|
42
|
+
cucumber (>= 1.1.1)
|
43
|
+
ffi (>= 1.0.11)
|
44
|
+
rspec (>= 2.7.0)
|
45
|
+
builder (3.0.0)
|
46
|
+
childprocess (0.3.1)
|
47
|
+
ffi (~> 1.0.6)
|
48
|
+
cucumber (1.1.9)
|
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)
|
54
|
+
diff-lcs (1.1.3)
|
55
|
+
erubis (2.7.0)
|
56
|
+
ffi (1.0.11)
|
57
|
+
gherkin (2.9.3)
|
58
|
+
json (>= 1.4.6)
|
59
|
+
hike (1.2.1)
|
60
|
+
hub (1.10.2)
|
61
|
+
i18n (0.6.1)
|
62
|
+
journey (1.0.4)
|
63
|
+
json (1.6.6)
|
64
|
+
mail (2.4.4)
|
65
|
+
i18n (>= 0.4.0)
|
66
|
+
mime-types (~> 1.16)
|
67
|
+
treetop (~> 1.4.8)
|
68
|
+
mime-types (1.19)
|
69
|
+
multi_json (1.3.6)
|
70
|
+
polyglot (0.3.3)
|
71
|
+
rack (1.4.1)
|
72
|
+
rack-cache (1.2)
|
73
|
+
rack (>= 0.4)
|
74
|
+
rack-ssl (1.3.2)
|
75
|
+
rack
|
76
|
+
rack-test (0.6.1)
|
77
|
+
rack (>= 1.0)
|
78
|
+
rails (3.2.8)
|
79
|
+
actionmailer (= 3.2.8)
|
80
|
+
actionpack (= 3.2.8)
|
81
|
+
activerecord (= 3.2.8)
|
82
|
+
activeresource (= 3.2.8)
|
83
|
+
activesupport (= 3.2.8)
|
84
|
+
bundler (~> 1.0)
|
85
|
+
railties (= 3.2.8)
|
86
|
+
railties (3.2.8)
|
87
|
+
actionpack (= 3.2.8)
|
88
|
+
activesupport (= 3.2.8)
|
89
|
+
rack-ssl (~> 1.3.2)
|
90
|
+
rake (>= 0.8.7)
|
91
|
+
rdoc (~> 3.4)
|
92
|
+
thor (>= 0.14.6, < 2.0)
|
93
|
+
rake (0.9.2.2)
|
94
|
+
rdoc (3.12)
|
95
|
+
json (~> 1.4)
|
96
|
+
sprockets (2.1.3)
|
97
|
+
hike (~> 1.2)
|
98
|
+
rack (~> 1.0)
|
99
|
+
tilt (~> 1.1, != 1.3.0)
|
100
|
+
term-ansicolor (1.0.7)
|
101
|
+
thor (0.16.0)
|
102
|
+
tilt (1.3.3)
|
103
|
+
treetop (1.4.10)
|
104
|
+
polyglot
|
105
|
+
polyglot (>= 0.3.1)
|
106
|
+
tzinfo (0.3.33)
|
107
|
+
|
108
|
+
PLATFORMS
|
109
|
+
ruby
|
110
|
+
|
111
|
+
DEPENDENCIES
|
112
|
+
aruba (~> 0.4.11)
|
113
|
+
cucumber (~> 1.1.9)
|
114
|
+
backware!
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2010-2012 Court Simas and Oven Bits
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,146 @@
|
|
1
|
+
# Bakeware [](http://travis-ci.org/courtsimas/bakeware)
|
2
|
+
|
3
|
+
Bakeware is the base Rails application (usually) used at [ovenbits](http://ovenbits.com).
|
4
|
+
|
5
|
+
Installation
|
6
|
+
------------
|
7
|
+
|
8
|
+
First install the bakeware gem:
|
9
|
+
|
10
|
+
gem install bakeware
|
11
|
+
|
12
|
+
Then run:
|
13
|
+
|
14
|
+
bakeware projectname
|
15
|
+
|
16
|
+
This will create a Rails 3.2 app in `projectname`. This script creates a
|
17
|
+
new git repository. It can also optionally create 2 new heroku apps.
|
18
|
+
It is not meant to be used against an existing repo.
|
19
|
+
Bakeware comes in two modes: lean, and meaty.
|
20
|
+
|
21
|
+
|
22
|
+
Lean Mode
|
23
|
+
---------
|
24
|
+
|
25
|
+
This is the default mode. Comes with
|
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
|
31
|
+
|
32
|
+
Meaty Mode
|
33
|
+
---------
|
34
|
+
|
35
|
+
You can optionally opt for Meaty mode:
|
36
|
+
|
37
|
+
bakeware projectname --meaty true
|
38
|
+
|
39
|
+
This comes with:
|
40
|
+
|
41
|
+
* [Airbrake](/airbrake/airbrake) for exception notification
|
42
|
+
* [asset_sync](/rumblelabs/asset_sync) syncing assets between rails and s3
|
43
|
+
* [aws-sdk](/aws/aws-sdk-ruby) for the amazon sdk
|
44
|
+
* [challah](/ovenbits/challah) for simple and effective authentication
|
45
|
+
* [challah-facebook](/jdtornow/challah-facebook) extends Challah for FB authentication
|
46
|
+
* [Compass](/chriseppstein/compass) for Sass mixins and standardization
|
47
|
+
* [haml](/haml/haml) for haml - because we all should use it
|
48
|
+
* [newrelic_rpm](/newrelic/rpm) for analytics about the performance of your app
|
49
|
+
* [Paperclip](/thoughtbot/paperclip) for file uploads
|
50
|
+
* [pg](/ged/ruby-pg) for PostgreSQL
|
51
|
+
* [redis](/antirez/redis) for redis
|
52
|
+
* [resque](/defunkt/resque) for resque background processing
|
53
|
+
* [Unicorn](/defunkt/unicorn) for a better http server
|
54
|
+
|
55
|
+
|
56
|
+
Testing
|
57
|
+
----------
|
58
|
+
|
59
|
+
Bakeware also comes with testing gems, including (but not limited to):
|
60
|
+
|
61
|
+
* [Factory Girl](/thoughtbot/factory_girl) for test data
|
62
|
+
* [simplecov](/colszowka/simplecov) for testing coverage analytics
|
63
|
+
* [Timecop](/jtrupiano/timecop) for testing time
|
64
|
+
|
65
|
+
We don't use RSpec often, and even less often do we use minitest. So manually include those if you want.
|
66
|
+
|
67
|
+
|
68
|
+
Other goodies
|
69
|
+
-------------
|
70
|
+
|
71
|
+
Bakeware also comes with:
|
72
|
+
|
73
|
+
* Override recipient emails in staging environment.
|
74
|
+
* Rails' flashes set up and in application layout.
|
75
|
+
* [Heroku-recommended asset pipeline
|
76
|
+
settings](https://devcenter.heroku.com/articles/rails3x-asset-pipeline-cedar/).
|
77
|
+
|
78
|
+
Heroku
|
79
|
+
------
|
80
|
+
|
81
|
+
You can optionally create Heroku staging and production apps:
|
82
|
+
|
83
|
+
bakeware projectname --heroku true
|
84
|
+
|
85
|
+
This has the same effect as running:
|
86
|
+
|
87
|
+
heroku create projectname-staging --remote staging
|
88
|
+
heroku create projectname-production --remote production
|
89
|
+
|
90
|
+
Github
|
91
|
+
------
|
92
|
+
|
93
|
+
You can optionally create a Github repository:
|
94
|
+
|
95
|
+
bakeware projectname --github organization/project
|
96
|
+
|
97
|
+
This has the same effect as running:
|
98
|
+
|
99
|
+
hub create organization/project
|
100
|
+
|
101
|
+
|
102
|
+
Test::Unit
|
103
|
+
----------
|
104
|
+
|
105
|
+
You can optionally skip Test::Unit files:
|
106
|
+
|
107
|
+
bakeware projectname --skip_test_unit true
|
108
|
+
|
109
|
+
Dependencies
|
110
|
+
------------
|
111
|
+
|
112
|
+
Some gems included in Bakeware have native extensions. You should have GCC installed on your
|
113
|
+
machine before generating an app with Bakeware.
|
114
|
+
|
115
|
+
Use [OS X GCC Installer](/kennethreitz/osx-gcc-installer/) for Snow Leopard
|
116
|
+
(OS X 10.6).
|
117
|
+
|
118
|
+
Use [Command Line Tools for XCode](https://developer.apple.com/downloads/index.action)
|
119
|
+
for Lion (OS X 10.7) or Mountain Lion (OS X 10.8).
|
120
|
+
|
121
|
+
PostgreSQL needs to be installed and running for the `db:create` rake task.
|
122
|
+
|
123
|
+
Issues
|
124
|
+
------
|
125
|
+
|
126
|
+
If you have problems, please create a [Github Issue](/courtsimas/bakeware/issues).
|
127
|
+
|
128
|
+
Contributing
|
129
|
+
------------
|
130
|
+
|
131
|
+
Please see CONTRIBUTING.md for details.
|
132
|
+
|
133
|
+
Credits
|
134
|
+
-------
|
135
|
+
|
136
|
+

|
137
|
+
|
138
|
+
Bakeware is maintained and funded by [Oven Bits](http://ovenbits.com)
|
139
|
+
|
140
|
+
The names and logos for Oven Bits are trademarks of Oven Bits
|
141
|
+
|
142
|
+
License
|
143
|
+
-------
|
144
|
+
|
145
|
+
Bakeware is Copyright © 2013 Oven Bits. It is free software, and may be
|
146
|
+
redistributed under the terms specified in the LICENSE file.
|
data/Rakefile
ADDED
data/bakeware.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "bakeware/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = 'bakeware'
|
7
|
+
s.version = Bakeware::VERSION
|
8
|
+
s.date = Date.today.strftime('%Y-%m-%d')
|
9
|
+
s.authors = ["courtsimas"]
|
10
|
+
s.email = 'courtsimas@gmail.com'
|
11
|
+
s.homepage = 'http://github.com/courtsimas/bakeware'
|
12
|
+
|
13
|
+
s.summary = "Generate a Rails app using Oven Bits' favorite flavors and ingredients."
|
14
|
+
s.description = <<-DOLLADOLLABILLSYALL
|
15
|
+
Bakeware is a base Rails project that you can upgrade. It comes in two flavors - lean or meaty.
|
16
|
+
We use it at Oven Bits for most of our apps. YMMV, but we get decent mileage out of it ;)
|
17
|
+
DOLLADOLLABILLSYALL
|
18
|
+
|
19
|
+
s.files = `git ls-files`.split("\n").
|
20
|
+
reject { |file| file =~ /^\./ }.
|
21
|
+
reject { |file| file =~ /^(rdoc|pkg)/ }
|
22
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
23
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
24
|
+
s.require_paths = ["lib"]
|
25
|
+
|
26
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
27
|
+
s.extra_rdoc_files = %w[README.md LICENSE]
|
28
|
+
|
29
|
+
s.add_dependency 'rails', '>= 3.2.8'
|
30
|
+
s.add_dependency 'bundler', '>= 1.1'
|
31
|
+
s.add_dependency 'hub', '~> 1.10.2'
|
32
|
+
|
33
|
+
s.add_development_dependency 'cucumber', '~> 1.1.9'
|
34
|
+
s.add_development_dependency 'aruba', '~> 0.4.11'
|
35
|
+
end
|
data/bin/bakeware
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require File.expand_path(File.join('..', 'lib', 'bakeware', 'generators', 'app_generator'), File.dirname(__FILE__))
|
4
|
+
require File.expand_path(File.join('..', 'lib', 'bakeware', 'actions'), File.dirname(__FILE__))
|
5
|
+
require File.expand_path(File.join('..', 'lib', 'bakeware', 'app_builder'), File.dirname(__FILE__))
|
6
|
+
|
7
|
+
templates_root = File.expand_path(File.join("..", "templates"), File.dirname(__FILE__))
|
8
|
+
Bakeware::AppGenerator.source_root templates_root
|
9
|
+
Bakeware::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root << templates_root
|
10
|
+
|
11
|
+
Bakeware::AppGenerator.start
|
@@ -0,0 +1,10 @@
|
|
1
|
+
@disable-bundler
|
2
|
+
Feature: Skipping Clearance
|
3
|
+
|
4
|
+
Scenario: --clearance=false
|
5
|
+
When I bake a project called "test_project" with:
|
6
|
+
| argument | value |
|
7
|
+
| --clearance | false |
|
8
|
+
And I cd to the "test_project" root
|
9
|
+
Then "clearance" should not be installed
|
10
|
+
And I can cleanly rake the project
|
@@ -0,0 +1,8 @@
|
|
1
|
+
@disable-bundler
|
2
|
+
Feature: Creating a Github repo
|
3
|
+
|
4
|
+
Scenario: --github=organization/project
|
5
|
+
When I bake a project called "test_project" with:
|
6
|
+
| argument | value |
|
7
|
+
| --github | organization/project |
|
8
|
+
Then the "organization/project" Github repo should exist
|
@@ -0,0 +1,9 @@
|
|
1
|
+
@disable-bundler
|
2
|
+
Feature: Creating a Heroku app
|
3
|
+
|
4
|
+
Scenario: --heroku=true
|
5
|
+
When I bake a project called "test_project" with:
|
6
|
+
| argument | value |
|
7
|
+
| --heroku | true |
|
8
|
+
Then the "test_project-staging" Heroku app should exist
|
9
|
+
And the "test_project-production" Heroku app should exist
|
@@ -0,0 +1,15 @@
|
|
1
|
+
@disable-bundler
|
2
|
+
Feature: Rake works in the baked project
|
3
|
+
Background:
|
4
|
+
Given I ensure no databases exist for "test_project"
|
5
|
+
|
6
|
+
Scenario: Running rake in the baked project
|
7
|
+
When I bake a project called "test_project"
|
8
|
+
And I cd to the "test_project" root
|
9
|
+
Then I can cleanly rake the project
|
10
|
+
|
11
|
+
Scenario: Making a test then running rake
|
12
|
+
When I bake a project called "test_project"
|
13
|
+
And I cd to the "test_project" root
|
14
|
+
And I generate "model post title:string"
|
15
|
+
Then I can cleanly rake the project
|
@@ -0,0 +1,79 @@
|
|
1
|
+
require 'aruba/cucumber'
|
2
|
+
|
3
|
+
When 'I run rake' do
|
4
|
+
in_current_dir do
|
5
|
+
run 'bundle exec rake'
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
When 'I run the rake task "$task_name"' do |task_name|
|
10
|
+
in_current_dir do
|
11
|
+
run "bundle exec rake #{task_name}"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
When 'I generate "$generator_with_args"' do |generator_with_args|
|
16
|
+
in_current_dir do
|
17
|
+
run "bundle exec rails generate #{generator_with_args}"
|
18
|
+
end
|
19
|
+
end
|
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
|
32
|
+
end
|
33
|
+
|
34
|
+
When 'I bake a project called "$project_name"' do |project_name|
|
35
|
+
bakeware_bin = File.expand_path(File.join('..', '..', 'bin', 'bakeware'), File.dirname(__FILE__))
|
36
|
+
run "#{bakeware_bin} #{project_name}"
|
37
|
+
assert_exit_status(0)
|
38
|
+
end
|
39
|
+
|
40
|
+
When /^I bake a project called "([^"]*)" with:$/ do |project_name, arguments_table|
|
41
|
+
bakeware_bin = File.expand_path(File.join('..', '..', 'bin', 'bakeware'), File.dirname(__FILE__))
|
42
|
+
arguments = arguments_table.hashes.inject([]) do |accum, argument|
|
43
|
+
accum << "#{argument['argument']}=#{argument['value']}"
|
44
|
+
end.join
|
45
|
+
run "#{bakeware_bin} #{project_name} #{arguments}"
|
46
|
+
assert_exit_status(0)
|
47
|
+
end
|
48
|
+
|
49
|
+
When 'I cd to the "$test_project" root' do |dirname|
|
50
|
+
cd dirname
|
51
|
+
end
|
52
|
+
|
53
|
+
Then 'I can cleanly rake the project' do
|
54
|
+
steps %{
|
55
|
+
And I run the rake task "db:create"
|
56
|
+
And I run the rake task "db:migrate"
|
57
|
+
And I run the rake task "db:test:prepare"
|
58
|
+
And I run the rake task "cucumber"
|
59
|
+
Then I see a successful response in the shell
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
Then /^"(.*)" should not be installed$/ do |gem_name|
|
64
|
+
in_current_dir do
|
65
|
+
system("bundle show #{gem_name} 2>&1 > /dev/null").should be_false
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
Then /^"(.*)" should not be included in "(.*)"$/ do |content, file_path|
|
70
|
+
check_file_content file_path, content, false
|
71
|
+
end
|
72
|
+
|
73
|
+
Then /^the "([^"]*)" Heroku app should exist$/ do |app_name|
|
74
|
+
FakeHeroku.should have_created_app(app_name)
|
75
|
+
end
|
76
|
+
|
77
|
+
Then /^the "([^"]*)" Github repo should exist$/ do |repo_name|
|
78
|
+
FakeGithub.should have_created_repo(repo_name)
|
79
|
+
end
|