boilerplate_engine 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +13 -0
- data/LICENSE.txt +20 -0
- data/README.md +73 -0
- data/Rakefile +52 -0
- data/VERSION +1 -0
- data/app/controllers/home_controller.rb +2 -0
- data/app/helpers/boilerplate_engine_helper.rb +19 -0
- data/app/views/boilerplate/_asynch_javascript.html.erb +18 -0
- data/app/views/boilerplate/_asynch_javascript_addons.html.erb +0 -0
- data/app/views/boilerplate/_body.html.erb +1 -0
- data/app/views/boilerplate/_css.html.erb +10 -0
- data/app/views/boilerplate/_css_addons.html.erb +0 -0
- data/app/views/boilerplate/_doctype.html.erb +1 -0
- data/app/views/boilerplate/_flash.html.erb +2 -0
- data/app/views/boilerplate/_head_javascript.html.erb +4 -0
- data/app/views/boilerplate/_head_javascript_addons.html.erb +0 -0
- data/app/views/boilerplate/_html_tag_browser_hacks.html.erb +4 -0
- data/app/views/boilerplate/_icons.html.erb +3 -0
- data/app/views/boilerplate/_layout.html.erb +1 -0
- data/app/views/boilerplate/_meta_tags.html.erb +5 -0
- data/app/views/boilerplate/_meta_tags_addons.html.erb +0 -0
- data/app/views/boilerplate/_title_tag.html.erb +1 -0
- data/app/views/home/index.html.erb +1 -0
- data/app/views/layouts/application.html.erb +20 -0
- data/boilerplate_engine.gemspec +102 -0
- data/config/routes.rb +3 -0
- data/lib/boilerplate_engine.rb +4 -0
- data/lib/boilerplate_engine/engine.rb +10 -0
- data/lib/boilerplate_engine/railties/tasks.rake +0 -0
- data/lib/generators/boilerplate_engine/install/USAGE +0 -0
- data/lib/generators/boilerplate_engine/install/install_generator.rb +44 -0
- data/lib/generators/boilerplate_engine/install/templates/apple-touch-icon-114x114-precomposed.png +0 -0
- data/lib/generators/boilerplate_engine/install/templates/apple-touch-icon-57x57-precomposed.png +0 -0
- data/lib/generators/boilerplate_engine/install/templates/apple-touch-icon-72x72-precomposed.png +0 -0
- data/lib/generators/boilerplate_engine/install/templates/apple-touch-icon-precomposed.png +0 -0
- data/lib/generators/boilerplate_engine/install/templates/apple-touch-icon.png +0 -0
- data/lib/generators/boilerplate_engine/install/templates/crossdomain.xml +25 -0
- data/lib/generators/boilerplate_engine/install/templates/humans.txt +43 -0
- data/lib/generators/boilerplate_engine/install/templates/javascripts/libs/dd_belatedpng.js +13 -0
- data/lib/generators/boilerplate_engine/install/templates/javascripts/libs/jquery-1.5.2.js +8374 -0
- data/lib/generators/boilerplate_engine/install/templates/javascripts/libs/jquery-1.5.2.min.js +16 -0
- data/lib/generators/boilerplate_engine/install/templates/javascripts/libs/modernizr-1.7.min.js +2 -0
- data/lib/generators/boilerplate_engine/install/templates/javascripts/plugins.js +16 -0
- data/lib/generators/boilerplate_engine/install/templates/robots.txt +5 -0
- data/lib/generators/boilerplate_engine/install/templates/stylesheets/handheld.css +8 -0
- data/lib/generators/boilerplate_engine/install/templates/stylesheets/style.css +262 -0
- data/lib/generators/boilerplate_engine/install/templates/yettings/boilerplate.yml +19 -0
- metadata +193 -0
data/Gemfile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
gem "shoulda", ">= 0"
|
10
|
+
gem "bundler", "~> 1.0.0"
|
11
|
+
gem "jeweler", "~> 1.5.1"
|
12
|
+
gem "rcov", ">= 0"
|
13
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 cowboycoded
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
## This repo is currently being used by the Charlotte Ruby Meetup group. This gem is not intended for production use at this time. It will be released to gemcutter after the group determines that it is stable.
|
2
|
+
|
3
|
+
# boilerplate_engine
|
4
|
+
|
5
|
+
boilerplate_engine is used to kick-start your Rails 3 app views. It uses HTML5 Boilerplate assets and index page as a basis for the views. The goal of this project is to give you a good starting point and remove some of the mundane tasks involved in setting up a new Rails app.
|
6
|
+
|
7
|
+
## Info for CLT Ruby
|
8
|
+
|
9
|
+
If you want to contribute to this project, then fork the repo on github and take a look at the source and see how you can improve or add more functionality. Take a look at https://github.com/paulirish/html5-boilerplate. The application layout file is based on this project. If you are not familiar with Rails 3 Engines, do some research on them as well.
|
10
|
+
|
11
|
+
All of the tests are in the "test_app" directory. Instead of using a dummy app, I found it easier to simply add a new blank rails app and bootstrap it with rspec and cucumber. The initial commit contains only cucumber tests (some of which need to be refactored).
|
12
|
+
|
13
|
+
This project also uses the Yettings gem, which gives you a YAML settings file that contains key/value pairs. These can be used as site-wide variables in the Engine and the containing Rails app. boilerplate_engine uses Yettings to allow the user to configure the Engine with things like Google Analytics API key, default title and meta description,etc..
|
14
|
+
|
15
|
+
Rails Generators are used to install the static assets, views, and delete index.html from the public directory. A controller, view and route are included in the engine for the index page. This maps to "home#index". The generator will create a view for the index page, so you can add your own code:
|
16
|
+
|
17
|
+
/app/views/home/index.html.erb
|
18
|
+
|
19
|
+
The generator also gives you a new view directory
|
20
|
+
|
21
|
+
/app/views/boilerplate/
|
22
|
+
|
23
|
+
This directory contains partials where you can insert extra javascript, css, meta tags, etc.. It also contains a partial named _layout.html.erb. This file contains the call to "yield". This partial is sandwiched between the opening "body" tag and the asynchronous javascript at the bottom of the layout. This is the appropriate file to code anything shared in your layout... like headers, nav bars, etc. All of the generator code is in:
|
24
|
+
|
25
|
+
/lib/generators/boilerplate_engine/install/install_generator.rb
|
26
|
+
|
27
|
+
The generator templates are in this directory
|
28
|
+
|
29
|
+
/lib/generators/boilerplate_engine/install/templates/
|
30
|
+
|
31
|
+
For more info about coding generators, see http://guides.rubyonrails.org/generators.html
|
32
|
+
|
33
|
+
## Install
|
34
|
+
|
35
|
+
To install in your Rails 3 app, place this in your Gemfile and run "bundle install"
|
36
|
+
|
37
|
+
gem "boilerplate_engine", :git=>"git@github.com:charlotte-ruby/boilerplate_engine.git"
|
38
|
+
|
39
|
+
This will install the gem directly from github.
|
40
|
+
|
41
|
+
You can also install it using a local path, if you have cloned the repository locally:
|
42
|
+
|
43
|
+
gem "boilerplate_engine", :git=>"/path/to/boilerplate_engine"
|
44
|
+
|
45
|
+
Next, you need to run the generator to install views and assets into the parent Rails app:
|
46
|
+
|
47
|
+
rails g boilerplate_engine:install
|
48
|
+
|
49
|
+
Then you can configure the boilerplate by editing /config/yettings/boilerplate.yml. You will probably want to change the default title, meta description and author. You can also exclude things like jquery and analytics.
|
50
|
+
|
51
|
+
The final step is to add your code to the views in:
|
52
|
+
|
53
|
+
/app/views/boilerplate
|
54
|
+
|
55
|
+
This is where you want to add any extra javascript, css, or meta tags. You will also use _layout.html.erb for your template code like nav, headers, footers, etc..
|
56
|
+
|
57
|
+
You can override the default title and meta description for individual views with helpers:
|
58
|
+
|
59
|
+
<% head_title "Custom Title Here" %>
|
60
|
+
<% meta_description "Custom Meta Description" %>
|
61
|
+
|
62
|
+
## Testing
|
63
|
+
|
64
|
+
If you clone the repository locally, you can fire off the tests by doing this:
|
65
|
+
|
66
|
+
cd /path/to/boilerplate_engine/test_app
|
67
|
+
bundle exec cucumber features/
|
68
|
+
|
69
|
+
|
70
|
+
## TODO List
|
71
|
+
1. Convert views from haml to erb. Not everyone uses haml, so this should not be the default.
|
72
|
+
2. Create a flexible template system (and css) that allows you to easily skin your app.
|
73
|
+
3. Better tests
|
data/Rakefile
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'rake'
|
11
|
+
|
12
|
+
require 'jeweler'
|
13
|
+
Jeweler::Tasks.new do |gem|
|
14
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
15
|
+
gem.name = "boilerplate_engine"
|
16
|
+
gem.homepage = "http://github.com/charlotte-ruby/boilerplate_engine"
|
17
|
+
gem.license = "MIT"
|
18
|
+
gem.summary = %Q{Alpha: boilerplate engine for your rails views}
|
19
|
+
gem.description = %Q{Alpha: HTML5 boilerplate translated to a configurable rails engine}
|
20
|
+
gem.email = "john.mcaliley@gmail.com"
|
21
|
+
gem.authors = ["cowboycoded"]
|
22
|
+
gem.add_runtime_dependency 'yettings'
|
23
|
+
gem.add_runtime_dependency 'haml'
|
24
|
+
gem.files.exclude "test_app"
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
require 'rcov/rcovtask'
|
36
|
+
Rcov::RcovTask.new do |test|
|
37
|
+
test.libs << 'test'
|
38
|
+
test.pattern = 'test/**/test_*.rb'
|
39
|
+
test.verbose = true
|
40
|
+
end
|
41
|
+
|
42
|
+
task :default => :test
|
43
|
+
|
44
|
+
require 'rake/rdoctask'
|
45
|
+
Rake::RDocTask.new do |rdoc|
|
46
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
47
|
+
|
48
|
+
rdoc.rdoc_dir = 'rdoc'
|
49
|
+
rdoc.title = "boilerplate_engine #{version}"
|
50
|
+
rdoc.rdoc_files.include('README*')
|
51
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
52
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module BoilerplateEngineHelper
|
2
|
+
def head_title(title = nil)
|
3
|
+
content_for(:head_title) { title } and return if title
|
4
|
+
content_for?(:head_title) ? content_for(:head_title) : BoilerplateYetting.default_head_title
|
5
|
+
end
|
6
|
+
|
7
|
+
def meta_description(meta_description = nil)
|
8
|
+
content_for(:meta_description) { meta_description } and return if meta_description
|
9
|
+
content_for?(:meta_description) ? content_for(:meta_description) : BoilerplateYetting.default_meta_description
|
10
|
+
end
|
11
|
+
|
12
|
+
def notice
|
13
|
+
flash[:notice] rescue ""
|
14
|
+
end
|
15
|
+
|
16
|
+
def alert
|
17
|
+
flash[:alert] rescue ""
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% if BoilerplateYetting.jquery %>
|
2
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
|
3
|
+
<script>window.jQuery || document.write("<script src='/boilerplate_engine/javascripts/libs/jquery-1.5.1.min.js'>\x3C/script>")</script>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<!--[if lt IE 7 ]>
|
7
|
+
<script src="/boilerplate_engine/javascripts/libs/dd_belatedpng.js"></script>
|
8
|
+
<script>DD_belatedPNG.fix("img, .png_bg"); // Fix any <img> or .png_bg bg-images. Also, please read goo.gl/mZiyb </script>
|
9
|
+
<![endif]-->
|
10
|
+
|
11
|
+
<% if BoilerplateYetting.google_analytics_key %>
|
12
|
+
<script>
|
13
|
+
var _gaq=[["_setAccount","UA-XXXXX-X"],["_trackPageview"]];
|
14
|
+
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
|
15
|
+
g.src=("https:"==location.protocol?"//ssl":"//www")+".google-analytics.com/ga.js";
|
16
|
+
s.parentNode.insertBefore(g,s)}(document,"script"));
|
17
|
+
</script>
|
18
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<body>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<!-- CSS: implied media="all" -->
|
2
|
+
<%= stylesheet_link_tag("/boilerplate_engine/stylesheets/style.css") %>
|
3
|
+
|
4
|
+
<% if BoilerplateYetting.handheld_stylesheet %>
|
5
|
+
<%= stylesheet_link_tag("/boilerplate_engine/stylesheets/handheld.css") %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<% if BoilerplateYetting.load_all_stylesheets %>
|
9
|
+
<%= stylesheet_link_tag :all %>
|
10
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<!DOCTYPE html>
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= yield %>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<meta charset="utf-8">
|
2
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
3
|
+
<meta name="description" content="<%= meta_description %>">
|
4
|
+
<meta name="author" content="<%= BoilerplateYetting.author %>">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<title><%= head_title %></title>
|
@@ -0,0 +1 @@
|
|
1
|
+
Index Page
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<%= render "boilerplate/doctype" %>
|
2
|
+
<%= render "boilerplate/html_tag_browser_hacks" %>
|
3
|
+
<head>
|
4
|
+
<%= render "boilerplate/meta_tags" %>
|
5
|
+
<%= render "boilerplate/meta_tags_addons" %>
|
6
|
+
<%= render "boilerplate/title_tag" %>
|
7
|
+
<%= render "boilerplate/icons" %>
|
8
|
+
<%= render "boilerplate/css" %>
|
9
|
+
<%= render "boilerplate/css_addons" %>
|
10
|
+
<%= render "boilerplate/head_javascript" %>
|
11
|
+
<%= render "boilerplate/head_javascript_addons" %>
|
12
|
+
<%= csrf_meta_tag %>
|
13
|
+
</head>
|
14
|
+
<body>
|
15
|
+
<%= render "boilerplate/flash" %>
|
16
|
+
<%= render "boilerplate/layout" %>
|
17
|
+
<%= render "boilerplate/asynch_javascript" %>
|
18
|
+
<%= render "boilerplate/asynch_javascript_addons" %>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{boilerplate_engine}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["cowboycoded"]
|
12
|
+
s.date = %q{2011-05-23}
|
13
|
+
s.description = %q{Alpha: HTML5 boilerplate translated to a configurable rails engine}
|
14
|
+
s.email = %q{john.mcaliley@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
"Gemfile",
|
21
|
+
"LICENSE.txt",
|
22
|
+
"README.md",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"app/controllers/home_controller.rb",
|
26
|
+
"app/helpers/boilerplate_engine_helper.rb",
|
27
|
+
"app/views/boilerplate/_asynch_javascript.html.erb",
|
28
|
+
"app/views/boilerplate/_asynch_javascript_addons.html.erb",
|
29
|
+
"app/views/boilerplate/_body.html.erb",
|
30
|
+
"app/views/boilerplate/_css.html.erb",
|
31
|
+
"app/views/boilerplate/_css_addons.html.erb",
|
32
|
+
"app/views/boilerplate/_doctype.html.erb",
|
33
|
+
"app/views/boilerplate/_flash.html.erb",
|
34
|
+
"app/views/boilerplate/_head_javascript.html.erb",
|
35
|
+
"app/views/boilerplate/_head_javascript_addons.html.erb",
|
36
|
+
"app/views/boilerplate/_html_tag_browser_hacks.html.erb",
|
37
|
+
"app/views/boilerplate/_icons.html.erb",
|
38
|
+
"app/views/boilerplate/_layout.html.erb",
|
39
|
+
"app/views/boilerplate/_meta_tags.html.erb",
|
40
|
+
"app/views/boilerplate/_meta_tags_addons.html.erb",
|
41
|
+
"app/views/boilerplate/_title_tag.html.erb",
|
42
|
+
"app/views/home/index.html.erb",
|
43
|
+
"app/views/layouts/application.html.erb",
|
44
|
+
"boilerplate_engine.gemspec",
|
45
|
+
"config/routes.rb",
|
46
|
+
"lib/boilerplate_engine.rb",
|
47
|
+
"lib/boilerplate_engine/engine.rb",
|
48
|
+
"lib/boilerplate_engine/railties/tasks.rake",
|
49
|
+
"lib/generators/boilerplate_engine/install/USAGE",
|
50
|
+
"lib/generators/boilerplate_engine/install/install_generator.rb",
|
51
|
+
"lib/generators/boilerplate_engine/install/templates/apple-touch-icon-114x114-precomposed.png",
|
52
|
+
"lib/generators/boilerplate_engine/install/templates/apple-touch-icon-57x57-precomposed.png",
|
53
|
+
"lib/generators/boilerplate_engine/install/templates/apple-touch-icon-72x72-precomposed.png",
|
54
|
+
"lib/generators/boilerplate_engine/install/templates/apple-touch-icon-precomposed.png",
|
55
|
+
"lib/generators/boilerplate_engine/install/templates/apple-touch-icon.png",
|
56
|
+
"lib/generators/boilerplate_engine/install/templates/crossdomain.xml",
|
57
|
+
"lib/generators/boilerplate_engine/install/templates/humans.txt",
|
58
|
+
"lib/generators/boilerplate_engine/install/templates/javascripts/libs/dd_belatedpng.js",
|
59
|
+
"lib/generators/boilerplate_engine/install/templates/javascripts/libs/jquery-1.5.2.js",
|
60
|
+
"lib/generators/boilerplate_engine/install/templates/javascripts/libs/jquery-1.5.2.min.js",
|
61
|
+
"lib/generators/boilerplate_engine/install/templates/javascripts/libs/modernizr-1.7.min.js",
|
62
|
+
"lib/generators/boilerplate_engine/install/templates/javascripts/plugins.js",
|
63
|
+
"lib/generators/boilerplate_engine/install/templates/robots.txt",
|
64
|
+
"lib/generators/boilerplate_engine/install/templates/stylesheets/handheld.css",
|
65
|
+
"lib/generators/boilerplate_engine/install/templates/stylesheets/style.css",
|
66
|
+
"lib/generators/boilerplate_engine/install/templates/yettings/boilerplate.yml"
|
67
|
+
]
|
68
|
+
s.homepage = %q{http://github.com/charlotte-ruby/boilerplate_engine}
|
69
|
+
s.licenses = ["MIT"]
|
70
|
+
s.require_paths = ["lib"]
|
71
|
+
s.rubygems_version = %q{1.3.7}
|
72
|
+
s.summary = %q{Alpha: boilerplate engine for your rails views}
|
73
|
+
|
74
|
+
if s.respond_to? :specification_version then
|
75
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
76
|
+
s.specification_version = 3
|
77
|
+
|
78
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
79
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
80
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
81
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
|
82
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
83
|
+
s.add_runtime_dependency(%q<yettings>, [">= 0"])
|
84
|
+
s.add_runtime_dependency(%q<haml>, [">= 0"])
|
85
|
+
else
|
86
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
87
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
88
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
|
89
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
90
|
+
s.add_dependency(%q<yettings>, [">= 0"])
|
91
|
+
s.add_dependency(%q<haml>, [">= 0"])
|
92
|
+
end
|
93
|
+
else
|
94
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
95
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
96
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
|
97
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
98
|
+
s.add_dependency(%q<yettings>, [">= 0"])
|
99
|
+
s.add_dependency(%q<haml>, [">= 0"])
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
data/config/routes.rb
ADDED
File without changes
|
File without changes
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
require 'rails/generators/migration'
|
3
|
+
|
4
|
+
module BoilerplateEngine
|
5
|
+
class InstallGenerator < Rails::Generators::Base
|
6
|
+
source_root File.join(File.dirname(__FILE__), 'templates')
|
7
|
+
|
8
|
+
def create_static_assets
|
9
|
+
copy_file "apple-touch-icon-114x114-precomposed.png", "public/apple-touch-icon-114x114-precomposed.png"
|
10
|
+
copy_file "apple-touch-icon-72x72-precomposed.png", "public/apple-touch-icon-72x72-precomposed.png"
|
11
|
+
copy_file "apple-touch-icon.png", "public/apple-touch-icon.png"
|
12
|
+
copy_file "apple-touch-icon-57x57-precomposed.png", "public/apple-touch-icon-57x57-precomposed.png"
|
13
|
+
copy_file "apple-touch-icon-precomposed.png", "public/apple-touch-icon-precomposed.png"
|
14
|
+
copy_file "crossdomain.xml", "public/crossdomain.xml"
|
15
|
+
copy_file "robots.txt", "public/robots.txt"
|
16
|
+
copy_file "humans.txt", "public/humans.txt"
|
17
|
+
copy_file "javascripts/libs/dd_belatedpng.js", "public/boilerplate_engine/javascripts/libs/dd_belatedpng.js"
|
18
|
+
copy_file "javascripts/libs/jquery-1.5.2.js", "public/boilerplate_engine/javascripts/libs/jquery-1.5.2.js"
|
19
|
+
copy_file "javascripts/libs/jquery-1.5.2.min.js", "public/boilerplate_engine/javascripts/libs/jquery-1.5.2.min.js"
|
20
|
+
copy_file "javascripts/libs/modernizr-1.7.min.js", "public/boilerplate_engine/javascripts/libs/modernizr-1.7.min.js"
|
21
|
+
copy_file "javascripts/plugins.js", "public/boilerplate_engine/javascripts/plugins.js"
|
22
|
+
copy_file "stylesheets/style.css", "public/boilerplate_engine/stylesheets/style.css"
|
23
|
+
copy_file "stylesheets/handheld.css", "public/boilerplate_engine/stylesheets/handheld.css"
|
24
|
+
end
|
25
|
+
|
26
|
+
def create_view_overrides
|
27
|
+
create_file "app/views/boilerplate/_css_addons.html.erb"
|
28
|
+
create_file "app/views/boilerplate/_head_javascript_addons.html.erb"
|
29
|
+
create_file "app/views/boilerplate/_asynch_javascript_addons.html.erb"
|
30
|
+
create_file "app/views/boilerplate/_meta_tags_addons.html.erb"
|
31
|
+
create_file "app/views/boilerplate/_layout.html.erb", "<%= yield %>"
|
32
|
+
copy_file "../../../../../app/views/layouts/application.html.erb", "app/views/layouts/application.html.erb"
|
33
|
+
copy_file "../../../../../app/views/home/index.html.erb", "app/views/home/index.html.erb"
|
34
|
+
end
|
35
|
+
|
36
|
+
def create_yettings
|
37
|
+
copy_file "yettings/boilerplate.yml", "config/yettings/boilerplate.yml"
|
38
|
+
end
|
39
|
+
|
40
|
+
def delete_index_html
|
41
|
+
remove_file "public/index.html"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|