apple_cart 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +82 -0
- data/LICENSE +22 -0
- data/README.md +1 -0
- data/Rakefile +2 -0
- data/apple_cart.gemspec +40 -0
- data/bin/apple_cart +103 -0
- data/lib/apple_cart.rb +3 -0
- data/lib/apple_cart/helpers.rb +17 -0
- data/lib/apple_cart/version.rb +3 -0
- data/source/.autotest +23 -0
- data/source/.gitignore +36 -0
- data/source/.rspec +2 -0
- data/source/.rvmrc.erb +1 -0
- data/source/Capfile +5 -0
- data/source/Gemfile +87 -0
- data/source/app/helpers/body_class_helper.rb +7 -0
- data/source/app/views/layouts/application.html.erb.erb +14 -0
- data/source/app/views/pages/maintenance.html.erb.erb +37 -0
- data/source/app/views/shared/_flashes.html.erb +5 -0
- data/source/app/views/shared/_javascript.html.erb +7 -0
- data/source/autotest/discover.rb +2 -0
- data/source/config/cucumber.yml +13 -0
- data/source/config/database.yml.example +14 -0
- data/source/config/deploy.rb.erb +23 -0
- data/source/config/initializers/actionmailer.rb.erb +12 -0
- data/source/config/initializers/constants.rb +1 -0
- data/source/config/initializers/core_ext.rb +1 -0
- data/source/config/initializers/date_and_time_formats.rb +9 -0
- data/source/db/samplize.rb +58 -0
- data/source/db/seed.rb +27 -0
- data/source/features/step_definitions/form_steps.rb +16 -0
- data/source/features/step_definitions/object_creation_steps.rb +34 -0
- data/source/features/step_definitions/third_person_web_steps.rb +94 -0
- data/source/features/support/factory_girl.rb +1 -0
- data/source/features/support/regex.rb +3 -0
- data/source/features/support/seed_data.rb +6 -0
- data/source/lib/formats.rb +5 -0
- data/source/lib/recipes/kompanee-recipes.rb +2 -0
- data/source/lib/tasks/db.rake +38 -0
- data/source/lib/tasks/seed.rake +33 -0
- data/source/public/humans.txt +49 -0
- data/source/public/stylesheets/sass/fonts.scss +38 -0
- data/source/public/stylesheets/sass/grids.scss +14 -0
- data/source/public/stylesheets/sass/reset.scss +98 -0
- data/source/public/stylesheets/sass/template.scss +63 -0
- data/source/spec/factories/users.rb +12 -0
- data/source/spec/support/color.rb +3 -0
- data/source/spec/support/devise.rb +3 -0
- data/source/spec/support/focused.rb +6 -0
- data/source/spec/support/matchers/paperclip_matchers.rb +5 -0
- data/source/spec/support/pending.rb +5 -0
- data/source/template.rb +309 -0
- metadata +169 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
namespace :db do
|
2
|
+
desc "Reset the database and load seed data"
|
3
|
+
task :reset_and_seed => ['db:reset', 'db:seed']
|
4
|
+
|
5
|
+
desc "Remigrate the database and load seed data"
|
6
|
+
task :remigrate_and_seed => ['db:migrate:reset', 'db:seed']
|
7
|
+
|
8
|
+
desc 'Provide a base load of randomly generated (but valid) data for development.'
|
9
|
+
task :seed => :prepare do
|
10
|
+
Rake::Task['db:seed:base'].invoke
|
11
|
+
Rake::Task['db:seed:sample'].invoke unless Rails.env.production? || Rails.env.test?
|
12
|
+
end
|
13
|
+
|
14
|
+
namespace :seed do
|
15
|
+
task :test => "db:test:prepare" do
|
16
|
+
Rails.env = 'test'
|
17
|
+
Rake::Task['db:seed'].invoke
|
18
|
+
end
|
19
|
+
|
20
|
+
task :base => :prepare do
|
21
|
+
DB::Seed.all
|
22
|
+
end
|
23
|
+
|
24
|
+
task :sample => :prepare do
|
25
|
+
DB::Samplize.all
|
26
|
+
end
|
27
|
+
|
28
|
+
task :prepare => :environment do
|
29
|
+
require File.join(Rails.root, "db", "samplize")
|
30
|
+
require File.join(Rails.root, "db", "seed")
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
development:
|
2
|
+
scripting languages:
|
3
|
+
server side: Ruby
|
4
|
+
client side: Javascript
|
5
|
+
frameworks: Rails
|
6
|
+
source control: Git
|
7
|
+
ide: Vim
|
8
|
+
|
9
|
+
company:
|
10
|
+
name: The Kompanee
|
11
|
+
address 1: 115 Penn Warren Drive
|
12
|
+
address 2: Suite 300-141
|
13
|
+
city: Brentwood
|
14
|
+
state or province: Tennessee
|
15
|
+
country: United States
|
16
|
+
twitter: @thekompanee
|
17
|
+
homepage: http://www.thekompanee.com
|
18
|
+
|
19
|
+
team member:
|
20
|
+
name: Jeff Felchner
|
21
|
+
title: Grand Poobah
|
22
|
+
|
23
|
+
email: poobah [at] thekompanee [the dot] com
|
24
|
+
twitter: @jeff_felchner
|
25
|
+
homepage: http://www.jefffelchner.com
|
26
|
+
|
27
|
+
preferred contact: email
|
28
|
+
|
29
|
+
from: Nashville, Tennessee, United States
|
30
|
+
languages: English, French
|
31
|
+
|
32
|
+
site:
|
33
|
+
launch: 2011-01-29
|
34
|
+
language: English
|
35
|
+
|
36
|
+
compatibility:
|
37
|
+
html: 5
|
38
|
+
css: 3
|
39
|
+
|
40
|
+
browsers:
|
41
|
+
internet explorer: >= 8
|
42
|
+
firefox: >= 3.6
|
43
|
+
chrome: >= 5
|
44
|
+
safari: >= 5
|
45
|
+
opera: >= 10
|
46
|
+
|
47
|
+
display: 1024x768
|
48
|
+
|
49
|
+
mobile version: no
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
|
3
|
+
Code licensed under the BSD License:
|
4
|
+
http://developer.yahoo.com/yui/license.html
|
5
|
+
version: 3.3.0
|
6
|
+
build: 3167
|
7
|
+
*/
|
8
|
+
|
9
|
+
/**
|
10
|
+
* Nudge down to get to 13px equivalent for these form elements
|
11
|
+
*/
|
12
|
+
select,
|
13
|
+
input,
|
14
|
+
button,
|
15
|
+
textarea {
|
16
|
+
font:99%;
|
17
|
+
}
|
18
|
+
|
19
|
+
/**
|
20
|
+
* To help tables remember to inherit
|
21
|
+
*/
|
22
|
+
table {
|
23
|
+
font-size:inherit;
|
24
|
+
font:100%;
|
25
|
+
}
|
26
|
+
|
27
|
+
/**
|
28
|
+
* Bump up IE to get to 13px equivalent for these fixed-width elements
|
29
|
+
*/
|
30
|
+
pre,
|
31
|
+
code,
|
32
|
+
kbd,
|
33
|
+
samp,
|
34
|
+
tt {
|
35
|
+
font-family:monospace;
|
36
|
+
*font-size:108%;
|
37
|
+
line-height:100%;
|
38
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
.line:after,.lastUnit:after{clear:both;display:block;visibility:hidden;overflow:hidden;height:0 !important;line-height:0;font-size:xx-large;content:" x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x ";}
|
2
|
+
.line{*zoom:1;}
|
3
|
+
.unit{float:left;}
|
4
|
+
.size1of1{float:none;}
|
5
|
+
.size1of2{width:50%;}
|
6
|
+
.size1of3{width:33.33333%;}
|
7
|
+
.size2of3{width:66.66666%;}
|
8
|
+
.size1of4{width:25%;}
|
9
|
+
.size3of4{width:75%;}
|
10
|
+
.size1of5{width:20%;}
|
11
|
+
.size2of5{width:40%;}
|
12
|
+
.size3of5{width:60%;}
|
13
|
+
.size4of5{width:80%;}
|
14
|
+
.lastUnit{display:table-cell;float:none;width:auto;*display:block;*zoom:1;_position:relative;_left:-3px;_margin-right:-3px;}
|
@@ -0,0 +1,98 @@
|
|
1
|
+
/* http://meyerweb.com/eric/tools/css/reset/ */
|
2
|
+
/* v1.0 | 20080212 */
|
3
|
+
|
4
|
+
* {
|
5
|
+
margin: 0;
|
6
|
+
padding: 0;
|
7
|
+
border: none;
|
8
|
+
text-decoration: none;
|
9
|
+
font-size: 100%;
|
10
|
+
font-weight: normal;
|
11
|
+
text-align: left;
|
12
|
+
vertical-align: baseline;
|
13
|
+
background: transparent;
|
14
|
+
outline: none; }
|
15
|
+
|
16
|
+
code, kbd, samp, pre, tt, var, textarea, input, select, isindex, listing,
|
17
|
+
xmp, plaintext {
|
18
|
+
font: inherit;
|
19
|
+
font-size: 1em;
|
20
|
+
white-space: normal; }
|
21
|
+
|
22
|
+
dfn, i, cite, var, address, em {
|
23
|
+
font-style: normal; }
|
24
|
+
|
25
|
+
th, b, strong, h1, h2, h3, h4, h5, h6 {
|
26
|
+
font-weight: normal; }
|
27
|
+
|
28
|
+
/* tables still need 'cellspacing="0"' in the markup */
|
29
|
+
table {
|
30
|
+
border-collapse: collapse;
|
31
|
+
border-spacing: 0; }
|
32
|
+
|
33
|
+
caption, th, td, center {
|
34
|
+
text-align: left;
|
35
|
+
vertical-align: top; }
|
36
|
+
|
37
|
+
body {
|
38
|
+
line-height: 1;
|
39
|
+
background: white;
|
40
|
+
color: black; }
|
41
|
+
|
42
|
+
blockquote,
|
43
|
+
q {
|
44
|
+
quotes: none; }
|
45
|
+
|
46
|
+
blockquote:before,
|
47
|
+
blockquote:after,
|
48
|
+
q:before,
|
49
|
+
q:after {
|
50
|
+
content: '';
|
51
|
+
content: none;
|
52
|
+
}
|
53
|
+
|
54
|
+
ul, ol, dir, menu {
|
55
|
+
list-style: none; }
|
56
|
+
|
57
|
+
sub, sup {
|
58
|
+
vertical-align: baseline; }
|
59
|
+
|
60
|
+
a {
|
61
|
+
color: inherit; }
|
62
|
+
|
63
|
+
hr {
|
64
|
+
display: none; } /* we don't need a visual hr in layout */
|
65
|
+
|
66
|
+
font {
|
67
|
+
color: inherit !important;
|
68
|
+
font: inherit !important;
|
69
|
+
color: inherit !important; } /* disables some nasty font attributes in standard browsers */
|
70
|
+
|
71
|
+
marquee {
|
72
|
+
overflow: inherit !important;
|
73
|
+
-moz-binding: none; }
|
74
|
+
|
75
|
+
blink {
|
76
|
+
text-decoration: none; }
|
77
|
+
|
78
|
+
nobr {
|
79
|
+
white-space: normal; }
|
80
|
+
|
81
|
+
html,
|
82
|
+
body {
|
83
|
+
width: 100%;
|
84
|
+
height: 100%;
|
85
|
+
}
|
86
|
+
|
87
|
+
/* remember to define focus styles! */
|
88
|
+
:focus {
|
89
|
+
outline: 0;
|
90
|
+
}
|
91
|
+
|
92
|
+
/* remember to highlight inserts somehow! */
|
93
|
+
ins {
|
94
|
+
text-decoration: none;
|
95
|
+
}
|
96
|
+
del {
|
97
|
+
text-decoration: line-through;
|
98
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
body {
|
2
|
+
/* IE5.5 */
|
3
|
+
_text-align: center;
|
4
|
+
}
|
5
|
+
|
6
|
+
.main {
|
7
|
+
display: table-cell;
|
8
|
+
*display: block;
|
9
|
+
width: auto;
|
10
|
+
}
|
11
|
+
|
12
|
+
.body,
|
13
|
+
.main {
|
14
|
+
*zoom: 1;
|
15
|
+
}
|
16
|
+
|
17
|
+
.body:after,
|
18
|
+
.main:after {
|
19
|
+
clear: both;
|
20
|
+
display: block;
|
21
|
+
visibility: hidden;
|
22
|
+
overflow: hidden;
|
23
|
+
height: 0 !important;
|
24
|
+
line-height: 0;
|
25
|
+
font-size: xx-large;
|
26
|
+
content: " x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x ";
|
27
|
+
}
|
28
|
+
|
29
|
+
/* wraps other template elems to set width */
|
30
|
+
.page {
|
31
|
+
margin: 0 auto;
|
32
|
+
width: 950px;
|
33
|
+
|
34
|
+
/* text-align IE5.5 */
|
35
|
+
_text-align: left;
|
36
|
+
}
|
37
|
+
|
38
|
+
/* "old school" and "liquid" extend page to allow for different page widths */
|
39
|
+
.oldSchool {
|
40
|
+
width: 750px;
|
41
|
+
}
|
42
|
+
|
43
|
+
.gs960 {
|
44
|
+
width: 960px;
|
45
|
+
}
|
46
|
+
|
47
|
+
.liquid {
|
48
|
+
width: auto;
|
49
|
+
margin: 0;
|
50
|
+
}
|
51
|
+
|
52
|
+
/* ====== Columns ====== */
|
53
|
+
.leftCol {
|
54
|
+
float: left;
|
55
|
+
width: 250px;
|
56
|
+
_margin-right: -3px;
|
57
|
+
}
|
58
|
+
|
59
|
+
.rightCol {
|
60
|
+
float: right;
|
61
|
+
width: 300px;
|
62
|
+
_margin-left: -3px;
|
63
|
+
}
|
data/source/template.rb
ADDED
@@ -0,0 +1,309 @@
|
|
1
|
+
require File.expand_path(File.join(__FILE__, "..", "..", "lib", "apple_cart", "helpers"))
|
2
|
+
|
3
|
+
@source_root = File.dirname(__FILE__)
|
4
|
+
@source_paths << @source_root
|
5
|
+
|
6
|
+
@app_class = app_name.camelize
|
7
|
+
@app_domain = app_name.gsub!(/_/, '')
|
8
|
+
|
9
|
+
def configure_session_storage
|
10
|
+
ar_session_store = yes? " Would you like to use ActiveRecord sessions for this project?"
|
11
|
+
|
12
|
+
if ar_session_store
|
13
|
+
comment_lines "config/initializers/session_store.rb", "cookie_store"
|
14
|
+
uncomment_lines "config/initializers/session_store.rb", "active_record_store"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def git_commit(message)
|
19
|
+
git :add => "."
|
20
|
+
git :commit => "\-a \-q \-m '#{message}'"
|
21
|
+
end
|
22
|
+
|
23
|
+
PREFERRED_GENERATORS = <<-GENERATORS
|
24
|
+
config.generators do |generator|
|
25
|
+
generator.orm :active_record
|
26
|
+
generator.test_framework :rspec,
|
27
|
+
:fixture => false
|
28
|
+
end
|
29
|
+
|
30
|
+
GENERATORS
|
31
|
+
|
32
|
+
JAVASCRIPT_EXPANSIONS = <<-EXPANSIONS
|
33
|
+
config.action_view.javascript_expansions[:defaults] = %w{head jquery rails}
|
34
|
+
config.action_view.javascript_expansions[:ui] = %w{jquery-ui}
|
35
|
+
EXPANSIONS
|
36
|
+
|
37
|
+
STYLESHEET_EXPANSIONS = <<-EXPANSIONS
|
38
|
+
|
39
|
+
# Stylesheet files you want as :defaults.
|
40
|
+
config.action_view.stylesheet_expansions[:defaults] = %w(reset fonts base)
|
41
|
+
EXPANSIONS
|
42
|
+
|
43
|
+
|
44
|
+
talk "Git Configuration"
|
45
|
+
|
46
|
+
say "Initializing Git repository..."
|
47
|
+
git :init
|
48
|
+
git_commit "Initial Commit"
|
49
|
+
|
50
|
+
say "Fixing .gitignore to include the proper files..."
|
51
|
+
copy_source_file ".gitignore"
|
52
|
+
|
53
|
+
say "Making sure these empty directories are added to the repo..."
|
54
|
+
empty_directory_with_gitkeep "app/models"
|
55
|
+
empty_directory_with_gitkeep "app/views/pages"
|
56
|
+
empty_directory_with_gitkeep "db/migrate"
|
57
|
+
empty_directory_with_gitkeep "log"
|
58
|
+
|
59
|
+
git_commit "Configure Git"
|
60
|
+
|
61
|
+
|
62
|
+
talk "We certainly don't need any of this..."
|
63
|
+
|
64
|
+
remove_file "public/favicon.ico"
|
65
|
+
remove_file "public/index.html"
|
66
|
+
remove_file "public/images/rails.png"
|
67
|
+
remove_file "public/stylesheets/application.css"
|
68
|
+
remove_file "public/javascripts/application.js"
|
69
|
+
remove_file "db/seeds.rb"
|
70
|
+
|
71
|
+
git_commit "Remove unneeded files"
|
72
|
+
|
73
|
+
|
74
|
+
talk "Create standard images structure..."
|
75
|
+
|
76
|
+
empty_directory_with_gitkeep "public/images/backgrounds"
|
77
|
+
empty_directory_with_gitkeep "public/images/buttons"
|
78
|
+
empty_directory_with_gitkeep "public/images/buttons/image"
|
79
|
+
empty_directory_with_gitkeep "public/images/buttons/text"
|
80
|
+
empty_directory_with_gitkeep "public/images/decorations"
|
81
|
+
empty_directory_with_gitkeep "public/images/icons"
|
82
|
+
empty_directory_with_gitkeep "public/images/logos"
|
83
|
+
|
84
|
+
git_commit "Create standard images structure"
|
85
|
+
|
86
|
+
|
87
|
+
talk "Create humans.txt file..."
|
88
|
+
|
89
|
+
copy_source_file "public/humans.txt"
|
90
|
+
|
91
|
+
git_commit "Create humans.txt file"
|
92
|
+
|
93
|
+
|
94
|
+
talk "Add Base Stylesheets"
|
95
|
+
|
96
|
+
empty_directory "public/stylesheets/sass"
|
97
|
+
copy_source_file "public/stylesheets/sass/reset.scss"
|
98
|
+
copy_source_file "public/stylesheets/sass/fonts.scss"
|
99
|
+
copy_source_file "public/stylesheets/sass/grids.scss"
|
100
|
+
copy_source_file "public/stylesheets/sass/template.scss"
|
101
|
+
|
102
|
+
git_commit "Add Base Stylesheets"
|
103
|
+
|
104
|
+
|
105
|
+
talk "Update Javascript Customizations"
|
106
|
+
|
107
|
+
say "Enable Rails To Use jQuery"
|
108
|
+
get "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js", "public/javascripts/jquery.js"
|
109
|
+
get "https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.js", "public/javascripts/jquery-ui.js"
|
110
|
+
get "https://github.com/rails/jquery-ujs/raw/master/src/rails.js", "public/javascripts/rails.js"
|
111
|
+
|
112
|
+
get "https://github.com/headjs/headjs/raw/master/dist/head.js", "public/javascripts/head.js"
|
113
|
+
|
114
|
+
git_commit "Update Javascript Customizations"
|
115
|
+
|
116
|
+
|
117
|
+
talk "Configure Ruby Version Manager"
|
118
|
+
|
119
|
+
template ".rvmrc.erb", ".rvmrc"
|
120
|
+
|
121
|
+
git_commit "Configure Ruby Version Manager"
|
122
|
+
|
123
|
+
|
124
|
+
talk "Configure application.rb"
|
125
|
+
|
126
|
+
say "Setting up preferred Rails generators..."
|
127
|
+
inject_into_class "config/application.rb", "Application", PREFERRED_GENERATORS
|
128
|
+
empty_directory_with_gitkeep "spec/factories"
|
129
|
+
|
130
|
+
say "Autoloading /lib files on startup..."
|
131
|
+
gsub_file "config/application.rb", /#\s*config\.autoload.*$/, 'config.autoload_paths += %W(#{config.root}/lib)'
|
132
|
+
|
133
|
+
say "Setting up the default time zone..."
|
134
|
+
gsub_file "config/application.rb", /#\s*config\.time_zone.*$/, 'config.time_zone = "Central Time (US & Canada)"'
|
135
|
+
|
136
|
+
say "Creating default javascript expansions..."
|
137
|
+
gsub_file "config/application.rb", /^\s*config\.action_view\.javascript_expansions.*$/, JAVASCRIPT_EXPANSIONS
|
138
|
+
|
139
|
+
say "Creating default stylesheet expansions..."
|
140
|
+
gsub_file "config/application.rb", STYLESHEET_EXPANSIONS, :after => "= %w{jquery-ui}\n"
|
141
|
+
|
142
|
+
git_commit "Configuration"
|
143
|
+
|
144
|
+
|
145
|
+
talk "Configure Initializers"
|
146
|
+
|
147
|
+
say "Setting up application constants..."
|
148
|
+
empty_directory_with_gitkeep "app/constants"
|
149
|
+
copy_source_file "config/initializers/constants.rb"
|
150
|
+
|
151
|
+
say "Configuring ActionMailer hosts..."
|
152
|
+
template "config/initializers/actionmailer.rb.erb", "config/initializers/actionmailer.rb"
|
153
|
+
|
154
|
+
say "Setting up core extensions..."
|
155
|
+
empty_directory_with_gitkeep "lib/core_ext"
|
156
|
+
copy_source_file "config/initializers/core_ext.rb"
|
157
|
+
|
158
|
+
say "Configuring Session storage method..."
|
159
|
+
configure_session_storage
|
160
|
+
|
161
|
+
say "Formatting Dates and Times..."
|
162
|
+
copy_source_file "config/initializers/date_and_time_formats.rb"
|
163
|
+
|
164
|
+
git_commit "Configure Initializers"
|
165
|
+
|
166
|
+
|
167
|
+
talk "Configure Routes"
|
168
|
+
|
169
|
+
say "Removing route comments..."
|
170
|
+
gsub_file "config/routes.rb", /\s+#.*/, ""
|
171
|
+
gsub_file "config/routes.rb", /\n\n/, "\n"
|
172
|
+
|
173
|
+
say "Configuring default route..."
|
174
|
+
route "root :to => 'devise/sessions#new'"
|
175
|
+
|
176
|
+
git_commit "Configure Routes"
|
177
|
+
|
178
|
+
|
179
|
+
talk "Setup Database"
|
180
|
+
|
181
|
+
remove_file "config/database.yml"
|
182
|
+
copy_source_file "config/database.yml.example"
|
183
|
+
link_file "config/database.yml.example", "config/database.yml"
|
184
|
+
|
185
|
+
rake "db:create"
|
186
|
+
|
187
|
+
git_commit "Setup Database"
|
188
|
+
|
189
|
+
|
190
|
+
talk "Setup Database Seeding"
|
191
|
+
|
192
|
+
copy_source_file "db/seed.rb"
|
193
|
+
copy_source_file "db/samplize.rb"
|
194
|
+
|
195
|
+
git_commit "Setup Database Seeding"
|
196
|
+
|
197
|
+
|
198
|
+
talk "Configure Staging Environment"
|
199
|
+
|
200
|
+
copy_file File.expand_path("config/environments/production.rb"), "config/environments/staging.rb"
|
201
|
+
|
202
|
+
git_commit "Configure For Staging"
|
203
|
+
|
204
|
+
|
205
|
+
talk "Bundler FTW!"
|
206
|
+
|
207
|
+
copy_file "Gemfile.temp", "Gemfile"
|
208
|
+
|
209
|
+
say "Preparing RVM environment..."
|
210
|
+
say "If Ruby 1.9.2-HEAD was not previously installed, you may want to grab some popcorn..."
|
211
|
+
run "rvm use ruby-1.9.2-head@#{app_name}"
|
212
|
+
|
213
|
+
say "Installing your requested gems..."
|
214
|
+
run "bundle install"
|
215
|
+
|
216
|
+
git_commit "Bundler FTW!"
|
217
|
+
|
218
|
+
|
219
|
+
talk "Set Up Gems"
|
220
|
+
|
221
|
+
say "Installing RSpec..."
|
222
|
+
generate "rspec:install"
|
223
|
+
copy_source_file ".rspec", :force => true
|
224
|
+
directory "spec/support"
|
225
|
+
|
226
|
+
say "Installing Cucumber..."
|
227
|
+
generate "cucumber:install", "--rspec --capybara"
|
228
|
+
copy_source_file "config/cucumber.yml", :force => true
|
229
|
+
directory "features/support"
|
230
|
+
directory "features/step_definitions"
|
231
|
+
|
232
|
+
say "Installing SimpleForm..."
|
233
|
+
generate "simple_form:install"
|
234
|
+
|
235
|
+
say "Installing Devise..."
|
236
|
+
generate "devise:install"
|
237
|
+
|
238
|
+
say "Creating Devise views..."
|
239
|
+
generate "devise:views"
|
240
|
+
|
241
|
+
say "Creating Devise User..."
|
242
|
+
generate "devise User"
|
243
|
+
|
244
|
+
say "Installing simple factory for User..."
|
245
|
+
copy_source_file "spec/factories/users.rb"
|
246
|
+
|
247
|
+
git_commit "Set Up Gems"
|
248
|
+
|
249
|
+
|
250
|
+
talk "Install Common Rake Tasks"
|
251
|
+
|
252
|
+
directory "lib/tasks"
|
253
|
+
|
254
|
+
git_commit "Install Common Rake Tasks"
|
255
|
+
|
256
|
+
|
257
|
+
talk "Miscellaneous"
|
258
|
+
|
259
|
+
say "Installing formats file..."
|
260
|
+
copy_source_file "lib/formats.rb"
|
261
|
+
|
262
|
+
git_commit "Install formats file"
|
263
|
+
|
264
|
+
|
265
|
+
talk "Configure Autotest"
|
266
|
+
|
267
|
+
say "Creating Autotest Directives..."
|
268
|
+
directory "autotest"
|
269
|
+
|
270
|
+
say "Creating Autotest default configuration..."
|
271
|
+
copy_source_file ".autotest"
|
272
|
+
|
273
|
+
git_commit "Configure Autotest"
|
274
|
+
|
275
|
+
|
276
|
+
talk "Configure Capistrano"
|
277
|
+
|
278
|
+
say "Installing common deploy file..."
|
279
|
+
template "config/deploy.rb.erb", "config/deploy.rb"
|
280
|
+
|
281
|
+
say "Creating recipes directory with default recipes..."
|
282
|
+
directory "lib/recipes"
|
283
|
+
|
284
|
+
say "Capifying project..."
|
285
|
+
copy_source_file "Capfile"
|
286
|
+
|
287
|
+
git_commit "Configure Capistrano"
|
288
|
+
|
289
|
+
|
290
|
+
talk "Install View Files"
|
291
|
+
|
292
|
+
say "Installing view helpers..."
|
293
|
+
directory "app/views/shared"
|
294
|
+
copy_source_file "app/helpers/body_class_helper.rb"
|
295
|
+
|
296
|
+
say "Replacing application.html.erb with our custom version..."
|
297
|
+
template "app/views/layouts/application.html.erb.erb", "app/views/layouts/application.html.erb", :force => true
|
298
|
+
|
299
|
+
say "Creating a temporary maintenance page..."
|
300
|
+
template "app/views/pages/maintenance.html.erb.erb", "app/views/pages/maintenance.html.erb"
|
301
|
+
|
302
|
+
git_commit "Install View Files"
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
puts
|
307
|
+
talk "Congratulations"
|
308
|
+
say "You just upset the apple cart! Enjoy those apples!"
|
309
|
+
say "Remember to run 'rails generate hoptoad' with your API key."
|