merryh5bp 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +37 -0
- data/app/views/layouts/application.html.erb +85 -0
- data/lib/merryh5bp.rb +1 -0
- data/lib/merryh5bp/engine.rb +9 -0
- data/lib/merryh5bp/railties/merryh5bp_tasks.rake +36 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/config/application.rb +45 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +26 -0
- data/spec/dummy/config/environments/production.rb +49 -0
- data/spec/dummy/config/environments/test.rb +35 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/routes.rb +58 -0
- data/spec/integration/navigation_spec.rb +9 -0
- data/spec/lib/generators/merryh5bp/install_generator_spec.rb +31 -0
- data/spec/merryh5bp_spec.rb +7 -0
- data/spec/spec_helper.rb +33 -0
- metadata +189 -0
data/README.rdoc
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
= Merryh5bp
|
2
|
+
|
3
|
+
This gem provides several default files for html5 development on rails. We use html5-boilerplate project files and make them works in a rails environment.
|
4
|
+
|
5
|
+
Check html5-boilerplate for more detail on this project : http://html5boilerplate.com/
|
6
|
+
|
7
|
+
gem 'merryh5bp'
|
8
|
+
bundle install
|
9
|
+
rake merryh5bp:setup
|
10
|
+
|
11
|
+
|
12
|
+
The setup rake task :
|
13
|
+
- remove javascripts protypes files
|
14
|
+
- replace the content of rails default layout application.html.erb by the content of index.html from html5-boilerplate. Add several rails stuffs (csrf_meta_tag, yield in the main div, yield(:head) in the <head>, yield(:foot) at the bottom). Replace the css and js folder name of H5BP by the Rails naming style : stylesheets/ and javascripts/
|
15
|
+
- copy H5BP css and js assets in the public directory (keeping application.js instead of script.js).
|
16
|
+
|
17
|
+
|
18
|
+
== About JQuery
|
19
|
+
|
20
|
+
H5BP try to catch the current version of jquery from Google CDN and fallback to javascripts/libs/jquery-XXX.min.js if not available. We keep it that way even to stay consistent with H5BP philosophy even if we use jquery-rails gem in our projects.
|
21
|
+
|
22
|
+
What we do :
|
23
|
+
gem 'jquery-rails'
|
24
|
+
bundle install
|
25
|
+
rails generate jquery:install
|
26
|
+
then edit application.js to replace libs/jquery-XXX.min.js by jquery.min.js
|
27
|
+
|
28
|
+
|
29
|
+
== VERSION
|
30
|
+
|
31
|
+
H5BP : 1.1
|
32
|
+
jquery : 1.5.1
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
This project uses MIT-LICENSE.
|
@@ -0,0 +1,85 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
|
3
|
+
<!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]-->
|
4
|
+
<!--[if IE 7 ]> <html class="no-js ie7" lang="en"> <![endif]-->
|
5
|
+
<!--[if IE 8 ]> <html class="no-js ie8" lang="en"> <![endif]-->
|
6
|
+
<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
|
7
|
+
<head>
|
8
|
+
<meta charset="utf-8">
|
9
|
+
|
10
|
+
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
|
11
|
+
Remove this if you use the .htaccess -->
|
12
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
13
|
+
|
14
|
+
<title></title>
|
15
|
+
<meta name="description" content="">
|
16
|
+
<meta name="author" content="">
|
17
|
+
|
18
|
+
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
|
19
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
20
|
+
|
21
|
+
<!-- Place favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
|
22
|
+
<link rel="shortcut icon" href="/favicon.ico">
|
23
|
+
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
24
|
+
|
25
|
+
|
26
|
+
<!-- CSS: implied media="all" -->
|
27
|
+
<link rel="stylesheet" href="stylesheets/style.css">
|
28
|
+
|
29
|
+
<!-- Uncomment if you are specifically targeting less enabled mobile browsers
|
30
|
+
<link rel="stylesheet" media="handheld" href="stylesheets/handheld.css"> -->
|
31
|
+
|
32
|
+
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
|
33
|
+
<script src="javascripts/libs/modernizr-1.7.min.js"></script>
|
34
|
+
|
35
|
+
<%= csrf_meta_tag %>
|
36
|
+
|
37
|
+
<%= yield(:head) %>
|
38
|
+
|
39
|
+
</head>
|
40
|
+
|
41
|
+
<body>
|
42
|
+
|
43
|
+
<div id="container">
|
44
|
+
<header>
|
45
|
+
|
46
|
+
</header>
|
47
|
+
<div id="main" role="main">
|
48
|
+
<%= yield %>
|
49
|
+
</div>
|
50
|
+
<footer>
|
51
|
+
|
52
|
+
</footer>
|
53
|
+
</div> <!--! end of #container -->
|
54
|
+
|
55
|
+
|
56
|
+
<!-- JavaScript at the bottom for fast page loading -->
|
57
|
+
|
58
|
+
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
|
59
|
+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
|
60
|
+
<script>window.jQuery || document.write("<script src='javascripts/libs/jquery-1.5.1.min.js'>\x3C/script>")</script>
|
61
|
+
|
62
|
+
|
63
|
+
<!-- scripts concatenated and minified via ant build script-->
|
64
|
+
<script src="javascripts/application.js"></script>
|
65
|
+
<!-- end scripts-->
|
66
|
+
|
67
|
+
|
68
|
+
<!--[if lt IE 7 ]>
|
69
|
+
<script src="javascripts/libs/dd_belatedpng.js"></script>
|
70
|
+
<script>DD_belatedPNG.fix("img, .png_bg"); // Fix any <img> or .png_bg bg-images. Also, please read goo.gl/mZiyb </script>
|
71
|
+
<![endif]-->
|
72
|
+
|
73
|
+
|
74
|
+
<!-- mathiasbynens.be/notes/async-analytics-snippet Change UA-XXXXX-X to be your site's ID -->
|
75
|
+
<script>
|
76
|
+
var _gaq=[["_setAccount","UA-XXXXX-X"],["_trackPageview"]];
|
77
|
+
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
|
78
|
+
g.src=("https:"==location.protocol?"//ssl":"//www")+".google-analytics.com/ga.js";
|
79
|
+
s.parentNode.insertBefore(g,s)}(document,"script"));
|
80
|
+
</script>
|
81
|
+
|
82
|
+
<%= yield(:foot) %>
|
83
|
+
|
84
|
+
</body>
|
85
|
+
</html>
|
data/lib/merryh5bp.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'merryh5bp/engine' if defined?(Rails) && Rails::VERSION::MAJOR == 3
|
@@ -0,0 +1,36 @@
|
|
1
|
+
namespace :merryh5bp do
|
2
|
+
|
3
|
+
desc "install H5BP files in app, remove protypes files"
|
4
|
+
task :setup => :environment do
|
5
|
+
|
6
|
+
cleaning_not_used_javascripts_file
|
7
|
+
|
8
|
+
Rake::Task['merryh5bp:import_default_layout'].invoke
|
9
|
+
Rake::Task['merryh5bp:import_assets'].invoke
|
10
|
+
end
|
11
|
+
|
12
|
+
desc "Copy application.html.erb"
|
13
|
+
task :import_default_layout => :environment do
|
14
|
+
assets = File.expand_path(File.join(File.dirname(__FILE__), '../../../app/views/layouts/application.html.erb'))
|
15
|
+
command = "cp -R #{assets} #{Rails.root}/app/views/layouts/application.html.erb"
|
16
|
+
puts command
|
17
|
+
system(command)
|
18
|
+
end
|
19
|
+
|
20
|
+
desc "Copies all merrycms assets to public/ directory"
|
21
|
+
task :import_assets => :environment do
|
22
|
+
assets = File.expand_path(File.join(File.dirname(__FILE__), '../../../public/'))
|
23
|
+
command = "cp -R #{assets} #{Rails.root}/"
|
24
|
+
puts command
|
25
|
+
system(command)
|
26
|
+
end
|
27
|
+
|
28
|
+
def cleaning_not_used_javascripts_file
|
29
|
+
system('rm public/javascripts/controls.js')
|
30
|
+
system('rm public/javascripts/dragdrop.js')
|
31
|
+
system('rm public/javascripts/effects.js')
|
32
|
+
system('rm public/javascripts/prototype.js')
|
33
|
+
system('rm public/javascripts/rails.js')
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require "active_model/railtie"
|
4
|
+
require "active_record/railtie"
|
5
|
+
require "action_controller/railtie"
|
6
|
+
require "action_view/railtie"
|
7
|
+
require "action_mailer/railtie"
|
8
|
+
|
9
|
+
Bundler.require
|
10
|
+
require "merryh5bp"
|
11
|
+
|
12
|
+
module Dummy
|
13
|
+
class Application < Rails::Application
|
14
|
+
# Settings in config/environments/* take precedence over those specified here.
|
15
|
+
# Application configuration should go into files in config/initializers
|
16
|
+
# -- all .rb files in that directory are automatically loaded.
|
17
|
+
|
18
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
19
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
20
|
+
|
21
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
22
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
23
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
24
|
+
|
25
|
+
# Activate observers that should always be running.
|
26
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
27
|
+
|
28
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
29
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
30
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
31
|
+
|
32
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
33
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
34
|
+
# config.i18n.default_locale = :de
|
35
|
+
|
36
|
+
# JavaScript files you want as :defaults (application.js is always included).
|
37
|
+
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
38
|
+
|
39
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
40
|
+
config.encoding = "utf-8"
|
41
|
+
|
42
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
43
|
+
config.filter_parameters += [:password]
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the webserver when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_view.debug_rjs = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Don't care if the mailer can't send
|
18
|
+
config.action_mailer.raise_delivery_errors = false
|
19
|
+
|
20
|
+
# Print deprecation notices to the Rails logger
|
21
|
+
config.active_support.deprecation = :log
|
22
|
+
|
23
|
+
# Only use best-standards-support built into browsers
|
24
|
+
config.action_dispatch.best_standards_support = :builtin
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The production environment is meant for finished, "live" apps.
|
5
|
+
# Code is not reloaded between requests
|
6
|
+
config.cache_classes = true
|
7
|
+
|
8
|
+
# Full error reports are disabled and caching is turned on
|
9
|
+
config.consider_all_requests_local = false
|
10
|
+
config.action_controller.perform_caching = true
|
11
|
+
|
12
|
+
# Specifies the header that your server uses for sending files
|
13
|
+
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
14
|
+
|
15
|
+
# For nginx:
|
16
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
17
|
+
|
18
|
+
# If you have no front-end server that supports something like X-Sendfile,
|
19
|
+
# just comment this out and Rails will serve the files
|
20
|
+
|
21
|
+
# See everything in the log (default is :info)
|
22
|
+
# config.log_level = :debug
|
23
|
+
|
24
|
+
# Use a different logger for distributed setups
|
25
|
+
# config.logger = SyslogLogger.new
|
26
|
+
|
27
|
+
# Use a different cache store in production
|
28
|
+
# config.cache_store = :mem_cache_store
|
29
|
+
|
30
|
+
# Disable Rails's static asset server
|
31
|
+
# In production, Apache or nginx will already do this
|
32
|
+
config.serve_static_assets = false
|
33
|
+
|
34
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
35
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
36
|
+
|
37
|
+
# Disable delivery errors, bad email addresses will be ignored
|
38
|
+
# config.action_mailer.raise_delivery_errors = false
|
39
|
+
|
40
|
+
# Enable threaded mode
|
41
|
+
# config.threadsafe!
|
42
|
+
|
43
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
44
|
+
# the I18n.default_locale when a translation can not be found)
|
45
|
+
config.i18n.fallbacks = true
|
46
|
+
|
47
|
+
# Send deprecation notices to registered listeners
|
48
|
+
config.active_support.deprecation = :notify
|
49
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Log error messages when you accidentally call methods on nil.
|
11
|
+
config.whiny_nils = true
|
12
|
+
|
13
|
+
# Show full error reports and disable caching
|
14
|
+
config.consider_all_requests_local = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Raise exceptions instead of rendering exception templates
|
18
|
+
config.action_dispatch.show_exceptions = false
|
19
|
+
|
20
|
+
# Disable request forgery protection in test environment
|
21
|
+
config.action_controller.allow_forgery_protection = false
|
22
|
+
|
23
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
24
|
+
# The :test delivery method accumulates sent emails in the
|
25
|
+
# ActionMailer::Base.deliveries array.
|
26
|
+
config.action_mailer.delivery_method = :test
|
27
|
+
|
28
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
29
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
30
|
+
# like if you have constraints or database-specific column types
|
31
|
+
# config.active_record.schema_format = :sql
|
32
|
+
|
33
|
+
# Print deprecation notices to the stderr
|
34
|
+
config.active_support.deprecation = :stderr
|
35
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = 'cf39136291ff227ddcb1c26f9d79cdfa38145a69167d1a4d1af69c28df433ce18263a4d60159c2b337b91717c73adbce5e13936f5962f8553ecb7209aee82794'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,58 @@
|
|
1
|
+
Dummy::Application.routes.draw do
|
2
|
+
# The priority is based upon order of creation:
|
3
|
+
# first created -> highest priority.
|
4
|
+
|
5
|
+
# Sample of regular route:
|
6
|
+
# match 'products/:id' => 'catalog#view'
|
7
|
+
# Keep in mind you can assign values other than :controller and :action
|
8
|
+
|
9
|
+
# Sample of named route:
|
10
|
+
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
|
11
|
+
# This route can be invoked with purchase_url(:id => product.id)
|
12
|
+
|
13
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
14
|
+
# resources :products
|
15
|
+
|
16
|
+
# Sample resource route with options:
|
17
|
+
# resources :products do
|
18
|
+
# member do
|
19
|
+
# get 'short'
|
20
|
+
# post 'toggle'
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
# collection do
|
24
|
+
# get 'sold'
|
25
|
+
# end
|
26
|
+
# end
|
27
|
+
|
28
|
+
# Sample resource route with sub-resources:
|
29
|
+
# resources :products do
|
30
|
+
# resources :comments, :sales
|
31
|
+
# resource :seller
|
32
|
+
# end
|
33
|
+
|
34
|
+
# Sample resource route with more complex sub-resources
|
35
|
+
# resources :products do
|
36
|
+
# resources :comments
|
37
|
+
# resources :sales do
|
38
|
+
# get 'recent', :on => :collection
|
39
|
+
# end
|
40
|
+
# end
|
41
|
+
|
42
|
+
# Sample resource route within a namespace:
|
43
|
+
# namespace :admin do
|
44
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
45
|
+
# # (app/controllers/admin/products_controller.rb)
|
46
|
+
# resources :products
|
47
|
+
# end
|
48
|
+
|
49
|
+
# You can have the root of your site routed with "root"
|
50
|
+
# just remember to delete public/index.html.
|
51
|
+
# root :to => "welcome#index"
|
52
|
+
|
53
|
+
# See how all your routes lay out with "rake routes"
|
54
|
+
|
55
|
+
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
56
|
+
# Note: This route will make all actions in every controller accessible via GET requests.
|
57
|
+
# match ':controller(/:action(/:id(.:format)))'
|
58
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require "generator_spec/test_case"
|
3
|
+
require 'generators/merryh5bp/install_generator'
|
4
|
+
|
5
|
+
describe Merryh5bp::Generators::InstallGenerator do
|
6
|
+
include GeneratorSpec::TestCase
|
7
|
+
destination File.expand_path("../../tmp", __FILE__)
|
8
|
+
tests Merryh5bp::Generators::InstallGenerator
|
9
|
+
arguments %w(something)
|
10
|
+
|
11
|
+
before(:all) do
|
12
|
+
prepare_destination
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should remove the default application.html" do
|
16
|
+
run_generator
|
17
|
+
#puts File.expand_path("../../../../dummy", __FILE__)
|
18
|
+
assert_file "app/views/layouts/application.html.erb" do |layout|
|
19
|
+
assert_no_match /stylesheet_link_tag/, index
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
# it "should remove previously generated files"
|
25
|
+
# it "should install the new application.html"
|
26
|
+
# it "should install style.css stylesheet"
|
27
|
+
# it "should install the grids"
|
28
|
+
# it "should install libs/dd_belatedpng.js script"
|
29
|
+
# it "should install libs/modernizr.js script v1.7"
|
30
|
+
|
31
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# Configure Rails Envinronment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
|
+
require "rails/test_help"
|
6
|
+
require "rspec/rails"
|
7
|
+
|
8
|
+
ActionMailer::Base.delivery_method = :test
|
9
|
+
ActionMailer::Base.perform_deliveries = true
|
10
|
+
ActionMailer::Base.default_url_options[:host] = "test.com"
|
11
|
+
|
12
|
+
Rails.backtrace_cleaner.remove_silencers!
|
13
|
+
|
14
|
+
# Configure capybara for integration testing
|
15
|
+
require "capybara/rails"
|
16
|
+
Capybara.default_driver = :rack_test
|
17
|
+
Capybara.default_selector = :css
|
18
|
+
|
19
|
+
# Run any available migration
|
20
|
+
ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
|
21
|
+
|
22
|
+
# Load support files
|
23
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
24
|
+
|
25
|
+
RSpec.configure do |config|
|
26
|
+
# Remove this line if you don't want RSpec's should and should_not
|
27
|
+
# methods or matchers
|
28
|
+
require 'rspec/expectations'
|
29
|
+
config.include RSpec::Matchers
|
30
|
+
|
31
|
+
# == Mock Framework
|
32
|
+
config.mock_with :rspec
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,189 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: merryh5bp
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Franck D'agostini
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2011-05-04 00:00:00 +02:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: rails
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 3
|
30
|
+
- 0
|
31
|
+
- 4
|
32
|
+
version: 3.0.4
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: capybara
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
- 4
|
46
|
+
- 0
|
47
|
+
version: 0.4.0
|
48
|
+
type: :runtime
|
49
|
+
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: sqlite3
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
61
|
+
type: :runtime
|
62
|
+
version_requirements: *id003
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: jquery-rails
|
65
|
+
prerelease: false
|
66
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
version: "0"
|
74
|
+
type: :runtime
|
75
|
+
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: rspec-rails
|
78
|
+
prerelease: false
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
segments:
|
85
|
+
- 2
|
86
|
+
- 0
|
87
|
+
- 0
|
88
|
+
- beta
|
89
|
+
version: 2.0.0.beta
|
90
|
+
type: :runtime
|
91
|
+
version_requirements: *id005
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: jquery-rails
|
94
|
+
prerelease: false
|
95
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
segments:
|
101
|
+
- 0
|
102
|
+
- 2
|
103
|
+
- 6
|
104
|
+
version: 0.2.6
|
105
|
+
type: :runtime
|
106
|
+
version_requirements: *id006
|
107
|
+
description: Use HTML5 Boilerplate in Rails apps
|
108
|
+
email: franck.dagostini@gmail.com
|
109
|
+
executables: []
|
110
|
+
|
111
|
+
extensions: []
|
112
|
+
|
113
|
+
extra_rdoc_files:
|
114
|
+
- README.rdoc
|
115
|
+
files:
|
116
|
+
- app/views/layouts/application.html.erb
|
117
|
+
- lib/merryh5bp.rb
|
118
|
+
- lib/merryh5bp/engine.rb
|
119
|
+
- lib/merryh5bp/railties/merryh5bp_tasks.rake
|
120
|
+
- README.rdoc
|
121
|
+
- spec/dummy/app/controllers/application_controller.rb
|
122
|
+
- spec/dummy/app/helpers/application_helper.rb
|
123
|
+
- spec/dummy/config/application.rb
|
124
|
+
- spec/dummy/config/boot.rb
|
125
|
+
- spec/dummy/config/environment.rb
|
126
|
+
- spec/dummy/config/environments/development.rb
|
127
|
+
- spec/dummy/config/environments/production.rb
|
128
|
+
- spec/dummy/config/environments/test.rb
|
129
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
130
|
+
- spec/dummy/config/initializers/inflections.rb
|
131
|
+
- spec/dummy/config/initializers/mime_types.rb
|
132
|
+
- spec/dummy/config/initializers/secret_token.rb
|
133
|
+
- spec/dummy/config/initializers/session_store.rb
|
134
|
+
- spec/dummy/config/routes.rb
|
135
|
+
- spec/integration/navigation_spec.rb
|
136
|
+
- spec/lib/generators/merryh5bp/install_generator_spec.rb
|
137
|
+
- spec/merryh5bp_spec.rb
|
138
|
+
- spec/spec_helper.rb
|
139
|
+
has_rdoc: true
|
140
|
+
homepage: https://github.com/franck/merryh5bp
|
141
|
+
licenses: []
|
142
|
+
|
143
|
+
post_install_message:
|
144
|
+
rdoc_options: []
|
145
|
+
|
146
|
+
require_paths:
|
147
|
+
- lib
|
148
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
+
none: false
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
segments:
|
154
|
+
- 0
|
155
|
+
version: "0"
|
156
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
|
+
none: false
|
158
|
+
requirements:
|
159
|
+
- - ">="
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
segments:
|
162
|
+
- 0
|
163
|
+
version: "0"
|
164
|
+
requirements: []
|
165
|
+
|
166
|
+
rubyforge_project:
|
167
|
+
rubygems_version: 1.3.7
|
168
|
+
signing_key:
|
169
|
+
specification_version: 3
|
170
|
+
summary: HTML5 Boilerplate implementation in Rails apps
|
171
|
+
test_files:
|
172
|
+
- spec/dummy/app/controllers/application_controller.rb
|
173
|
+
- spec/dummy/app/helpers/application_helper.rb
|
174
|
+
- spec/dummy/config/application.rb
|
175
|
+
- spec/dummy/config/boot.rb
|
176
|
+
- spec/dummy/config/environment.rb
|
177
|
+
- spec/dummy/config/environments/development.rb
|
178
|
+
- spec/dummy/config/environments/production.rb
|
179
|
+
- spec/dummy/config/environments/test.rb
|
180
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
181
|
+
- spec/dummy/config/initializers/inflections.rb
|
182
|
+
- spec/dummy/config/initializers/mime_types.rb
|
183
|
+
- spec/dummy/config/initializers/secret_token.rb
|
184
|
+
- spec/dummy/config/initializers/session_store.rb
|
185
|
+
- spec/dummy/config/routes.rb
|
186
|
+
- spec/integration/navigation_spec.rb
|
187
|
+
- spec/lib/generators/merryh5bp/install_generator_spec.rb
|
188
|
+
- spec/merryh5bp_spec.rb
|
189
|
+
- spec/spec_helper.rb
|