appleseed 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +55 -3
- data/VERSION +1 -1
- data/appleseed.gemspec +2 -2
- data/lib/appleseed/generator.rb +4 -4
- data/templates/root_controller.rb +82 -2
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -9,6 +9,11 @@ high-volume web shops. A graphic designer can create a site, push the code to G
|
|
9
9
|
the site to Heroku without the assistance of a developer. Then a developer can easily join the
|
10
10
|
project to build out the back-end and assist the graphic designer with the front-end.
|
11
11
|
|
12
|
+
Here is an {example GitHub project}[http://github.com/endymion/generated-by-appleseed] that
|
13
|
+
Appleseed generated, and here is the
|
14
|
+
{Heroku web application}[http://generated-by-appleseed.heroku.com/] for that example project.
|
15
|
+
Note the example layout, default home page, and Blueprint styling provided by Compass.
|
16
|
+
|
12
17
|
= Usage
|
13
18
|
|
14
19
|
== Step 1: Install Appleseed
|
@@ -73,13 +78,23 @@ but do NOT push to Heroku:
|
|
73
78
|
git commit -m "Conflict."
|
74
79
|
git push github master
|
75
80
|
|
81
|
+
== Step 5: Deploy Your Changes
|
82
|
+
|
83
|
+
Deploying your web site after you make changes is really easy. Just push to the "heroku" remote:
|
84
|
+
|
85
|
+
git push heroku master
|
86
|
+
|
87
|
+
== Step 6: Goto Step 4
|
88
|
+
|
89
|
+
Repeat until the money runs out.
|
90
|
+
|
76
91
|
= Final Product
|
77
92
|
|
78
93
|
Appleseed generates a web application that's more than just the default generated Rails 3 template.
|
79
94
|
Instead of just a default working Rails application, you also get a default ("root") controller
|
80
95
|
and a root route to a home page. You get a layout based on HAML, and the Blueprint CSS framework
|
81
96
|
provided by Compass. You get the RSpec and Cucumber testing frameworks and sample tests. The
|
82
|
-
final product is ready for new HTML/CSS files from graphic designers.
|
97
|
+
final product is ready for new HTML/CSS files and images from graphic designers.
|
83
98
|
|
84
99
|
The final product does NOT contain any database models, or an administrative back-end. It only
|
85
100
|
includes a default controller so that graphic designers can easily add HTML files.
|
@@ -106,6 +121,43 @@ A simple way to customize the Rails template that Appleseed uses is to fork the
|
|
106
121
|
on GitHub and then edit the lib/appleseed/generator.rb file to use your forked project's
|
107
122
|
default template URL instead of http://github.com/endymion/appleseed/raw/master/templates/default.rb
|
108
123
|
|
109
|
-
|
124
|
+
= Prerequisites
|
125
|
+
|
126
|
+
== Tools
|
127
|
+
|
128
|
+
* Git (installed on Snow Leopard)
|
129
|
+
* Ruby 1.8.7 (installed on Snow Leopard)
|
130
|
+
* RubyGems (installed on Snow Leopard)
|
131
|
+
|
132
|
+
== Ruby Gems
|
133
|
+
|
134
|
+
* Rails ("gem install rails")
|
135
|
+
* Heroku ("gem install heroku")
|
136
|
+
|
137
|
+
== GitHub Account
|
138
|
+
|
139
|
+
You will need an account at GitHub[http://www.github.com]. {Set up}[http://help.github.com/git-email-settings/] your GitHub name and email
|
140
|
+
on your local computer. Then also {set up}[http://github.com/blog/180-local-github-config]
|
141
|
+
your GitHub user and API token on your local computer. Then make sure that you
|
142
|
+
have an {SSH key}[http://help.github.com/mac-key-setup/] set up and added to your
|
143
|
+
GitHub account.
|
144
|
+
|
145
|
+
== Heroku Account
|
146
|
+
|
147
|
+
You will also need an account at Heroku[http://docs.heroku.com/heroku-command]. Install
|
148
|
+
the Heroku gem and then use "heroku keys:add" to link your local computer to your Heroku
|
149
|
+
account.
|
150
|
+
|
151
|
+
== Appleseed
|
152
|
+
|
153
|
+
Once you have the above prerequisites, install Appleseed with "gem install appleseed". Now
|
154
|
+
you're ready to generate web sites!
|
155
|
+
|
156
|
+
= Inspiration
|
157
|
+
|
158
|
+
* Jeweler[http://github.com/technicalpickles/jeweler]
|
159
|
+
* {Johnny Appleseed}[http://en.wikipedia.org/wiki/Johnny_Appleseed]
|
160
|
+
|
161
|
+
= Copyright
|
110
162
|
|
111
|
-
Copyright (c) 2010 Ryan Alyn Porter. See LICENSE for details.
|
163
|
+
Copyright (c) 2010 Ryan Alyn Porter. See LICENSE for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/appleseed.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{appleseed}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ryan Alyn Porter"]
|
12
|
-
s.date = %q{2010-08-
|
12
|
+
s.date = %q{2010-08-30}
|
13
13
|
s.default_executable = %q{appleseed}
|
14
14
|
s.description = %q{Generator for a Rails 3 app that will also push the project to GitHub and Heroku.}
|
15
15
|
s.executables = ["appleseed"]
|
data/lib/appleseed/generator.rb
CHANGED
@@ -50,11 +50,11 @@ class Appleseed
|
|
50
50
|
|
51
51
|
self.target_dir = self.project_name
|
52
52
|
|
53
|
-
self.summary = options[:summary] || 'TODO: one-line summary of your
|
54
|
-
self.description = options[:description] || 'TODO: longer description of your
|
53
|
+
self.summary = options[:summary] || 'TODO: one-line summary of your web site'
|
54
|
+
self.description = options[:description] || 'TODO: longer description of your web site'
|
55
55
|
|
56
|
-
|
57
|
-
self.template_url = options[:template_url] || 'http://localhost/projects/appleseed/templates/default.rb'
|
56
|
+
self.template_url = options[:template_url] || 'http://github.com/endymion/appleseed/raw/master/templates/default.rb'
|
57
|
+
# self.template_url = options[:template_url] || 'http://localhost/projects/appleseed/templates/default.rb'
|
58
58
|
|
59
59
|
self.user_name = options[:user_name]
|
60
60
|
self.user_email = options[:user_email]
|
@@ -4,8 +4,88 @@ run 'rm public/images/rails.png'
|
|
4
4
|
generate :controller, 'root', 'root'
|
5
5
|
route "root :to => 'root#root'"
|
6
6
|
|
7
|
+
append_file 'app/stylesheets/screen.scss', <<-END
|
8
|
+
|
9
|
+
// Added by Appleseed to make the default sections more visible. You should probably remove this.
|
10
|
+
body.two-col {
|
11
|
+
#container {
|
12
|
+
@include showgrid
|
13
|
+
}
|
14
|
+
#header, #footer {
|
15
|
+
background-color: #DDD;
|
16
|
+
margin-top: 1em;
|
17
|
+
margin-bottom: 1em;
|
18
|
+
}
|
19
|
+
#content {
|
20
|
+
background-color: #EEE;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
END
|
24
|
+
|
25
|
+
run 'compass compile'
|
26
|
+
|
27
|
+
run 'rm app/views/layouts/application.html.haml'
|
28
|
+
file 'app/views/layouts/application.html.haml', <<-END
|
29
|
+
!!!
|
30
|
+
%html
|
31
|
+
%head
|
32
|
+
%title [INSERT TITLE HERE]
|
33
|
+
= stylesheet_link_tag 'compiled/screen.css', :media => 'screen, projection'
|
34
|
+
= stylesheet_link_tag 'compiled/print.css', :media => 'print'
|
35
|
+
/[if lt IE 8]
|
36
|
+
= stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'
|
37
|
+
= javascript_include_tag :defaults
|
38
|
+
= csrf_meta_tag
|
39
|
+
%body.bp.two-col
|
40
|
+
#container
|
41
|
+
#header
|
42
|
+
This header is in the layout template in app/views/layouts/application.html.haml
|
43
|
+
= yield
|
44
|
+
#footer
|
45
|
+
This footer is in the layout template in app/views/layouts/application.html.haml
|
46
|
+
END
|
47
|
+
|
7
48
|
run 'rm app/views/root/root.html.haml'
|
8
49
|
file 'app/views/root/root.html.haml', <<-END
|
9
|
-
#
|
10
|
-
|
50
|
+
#sidebar
|
51
|
+
%p
|
52
|
+
This sidebar is in the root action template, in the root controller, in app/views/root/root.html.html
|
53
|
+
%p
|
54
|
+
%ul
|
55
|
+
%li navigation
|
56
|
+
%li home
|
57
|
+
%li contact
|
58
|
+
%li etc
|
59
|
+
#content
|
60
|
+
%h1
|
61
|
+
Welcome to your new web site!
|
62
|
+
%p
|
63
|
+
This web site is powered by a Rails 3 web application. Lots of documentation is available
|
64
|
+
for Rails. Start
|
65
|
+
%a{:href => 'http://weblog.rubyonrails.org/2010/8/28/rails-has-great-documentation'} here.
|
66
|
+
%p
|
67
|
+
The contents of this page are in the root action template, in the root controller,
|
68
|
+
in app/views/root/root.html.haml. The template files for this web application project are
|
69
|
+
in
|
70
|
+
%a{:src => 'http://haml-lang.com/docs.html'} HAML
|
71
|
+
, which is a powerful shorthand notation for quickly writing HTML that coordinates
|
72
|
+
beautifully with SCSS for styling the page. The HAML documentation is
|
73
|
+
%a{:src => 'http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html'} here.
|
74
|
+
%p
|
75
|
+
This page is styled using
|
76
|
+
%a{:href => 'http://www.blueprintcss.org/'} Blueprint.
|
77
|
+
You can see
|
78
|
+
demos of what Blueprint can provide,
|
79
|
+
%a{:src => 'http://www.blueprintcss.org/tests/'} here.
|
80
|
+
This project uses the Compass implementation of Blueprint in SCSS, documented
|
81
|
+
%a{:src => 'http://compass-style.org/docs/reference/blueprint/'} here.
|
82
|
+
%p
|
83
|
+
The CSS styling for this page was generated from the SCSS file in
|
84
|
+
app/stylesheets/screen.scss. There is a section at the bottom of the file that activates
|
85
|
+
the grid and the background colors on the various page sections provided by the Blueprint
|
86
|
+
styles directly above it. You probably want to start your web site project by locating
|
87
|
+
that file and removing the grid and background colors. That file is where you should
|
88
|
+
start adding your custom styles.
|
89
|
+
%p
|
90
|
+
Place your images into public/images.
|
11
91
|
END
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appleseed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Alyn Porter
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-30 00:00:00 -04:00
|
19
19
|
default_executable: appleseed
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|