html5-rails 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -3,3 +3,4 @@
3
3
  Gemfile.lock
4
4
  pkg/*
5
5
  test/tmp
6
+ vendor/bundle
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source 'http://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '3.2.1'
5
+ gem 'rails', '3.2.9'
6
6
 
7
7
  # Bundle edge Rails instead:
8
8
  # gem 'rails', :git => 'git://github.com/rails/rails.git'
@@ -27,6 +27,6 @@ gem 'haml-rails'
27
27
 
28
28
  group :test do
29
29
  # Pretty printed test output
30
- gem 'turn', '0.8.2', :require => false
30
+ gem 'turn', :require => false
31
31
  gem 'capybara'
32
32
  end
data/README.md CHANGED
@@ -9,7 +9,7 @@ by Paul Irish, Divya Manian and many other [fine folks](https://github.com/h5bp/
9
9
  Installation
10
10
  =========================
11
11
 
12
- In your Gemfile
12
+ ##### 1. In your Gemfile
13
13
 
14
14
  ```ruby
15
15
  group :assets do
@@ -26,22 +26,48 @@ gem 'jquery-rails'
26
26
  gem 'html5-rails'
27
27
  ```
28
28
 
29
- Install
29
+ ##### 2. Install your bundle
30
30
 
31
31
  ```
32
32
  $ bundle install
33
33
  ```
34
34
 
35
- Run generator
35
+ ##### 3. Run the generator
36
36
 
37
37
  ```
38
38
  $ rails generate html5:install
39
39
  ```
40
40
 
41
+ ##### (Here's what it does)
42
+
43
+ create config/compass.rb
44
+ create config/html5_rails.yml
45
+ create app/views/layouts/application.html.erb
46
+ create app/views/application
47
+ create app/views/application/_footer.html.erb
48
+ create app/views/application/_head.html.erb
49
+ create app/views/application/_header.html.erb
50
+ create app/views/application/_chromeframe.html.erb
51
+ insert app/assets/javascripts/application.js
52
+ gsub app/assets/javascripts/application.js
53
+ create app/assets/javascripts/polyfills.js
54
+ remove app/assets/stylesheets/application.css
55
+ create app/assets/stylesheets/_variables.css.scss
56
+ create app/assets/stylesheets/application.css.scss
57
+ create app/assets/stylesheets/application
58
+ create app/assets/stylesheets/application/chromeframe.css.scss
59
+ create app/assets/stylesheets/application/document.css.scss
60
+ create app/assets/stylesheets/application/media_queries.css.scss
61
+
62
+ ##### 4. And you're done!
63
+
64
+ rails server
65
+
66
+
41
67
  Options
42
68
  =========================
43
69
 
44
- To see other generators available:
70
+ To see other generators available run:
45
71
 
46
72
  ```
47
73
  $ rails generate html5:layout --help
@@ -56,7 +82,7 @@ Notes
56
82
  [1] The `compass-h5bp` gem is not a runtime dependency, but it does need to be
57
83
  included in your assets group for development and asset precompiling to work.
58
84
 
59
- [2] If you use `--template-engine=haml` (or `haml-rails`), the install
85
+ [2] If you use `--template-engine=haml` (or `haml-rails` gem), the install
60
86
  generator will remove your application.html.erb layout so that
61
87
  application.html.haml will be used instead.
62
88
 
@@ -1,3 +1,3 @@
1
- <%# Prompt IE 6 users to install Chrome Frame. Remove this if you support IE 6. %>
2
- <%# chromium.org/developers/how-tos/chrome-frame-getting-started %>
3
- <!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
1
+ <!--[if lt IE 7]>
2
+ <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
3
+ <![endif]-->
@@ -1,9 +1,9 @@
1
1
  <div id="flash">
2
2
  <% flash.each do |key, value| %>
3
3
  <div class="wrapper">
4
- <div title="<%= key.to_s.humanize %>" class="<%= key %>"></div>
4
+ <div title="<%= key.to_s.humanize %>" class="<%= key %>">
5
5
  <p><%= value %></p>
6
6
  </div>
7
7
  </div>
8
8
  <% end %>
9
- </div>
9
+ </div>
@@ -1,6 +1,6 @@
1
1
  <!DOCTYPE html>
2
2
  <%# http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither %>
3
- <%= html_tag :class => "no-js", :lang => "en" %>
3
+ <%= html_tag :class => "no-js" %>
4
4
  <%= render "head" %>
5
5
 
6
6
  <body class="pages">
@@ -14,11 +14,11 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.rubyforge_project = "html5-rails"
16
16
 
17
- s.add_dependency "jquery-rails", ">= 1.0.19"
17
+ s.add_dependency "jquery-rails", ">= 2.0"
18
18
  s.add_dependency "railties", "~> 3.1"
19
19
  s.add_dependency "thor", "~> 0.14"
20
20
 
21
- s.add_development_dependency "compass-h5bp", "~> 0.0.5"
21
+ s.add_development_dependency "compass-h5bp", "~> 0.1.0"
22
22
 
23
23
  s.files = `git ls-files`.split("\n")
24
24
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -10,13 +10,14 @@
10
10
  //-----------------------------------------
11
11
  // Imports
12
12
  //-----------------------------------------
13
- // @import "compass/css3"
13
+ // @import "compass/css3";
14
14
  @import "h5bp";
15
15
 
16
16
  //-----------------------------------------
17
17
  // Prepend includes
18
18
  //-----------------------------------------
19
19
  @include h5bp-normalize;
20
+ @include h5bp-main;
20
21
 
21
22
  //-----------------------------------------
22
23
  // Custom <%= file_path %> partials
@@ -3,7 +3,7 @@
3
3
  // Upgrade with: $ rails generate html5:install
4
4
 
5
5
  //-----------------------------------------
6
- // Chrome Frame prompt
6
+ // Chrome Frame override
7
7
  //-----------------------------------------
8
8
 
9
9
  .chromeframe {
@@ -1,25 +1,4 @@
1
- # This configuration file works with both the Compass command line tool and within Rails.
2
- require 'compass/h5bp'
3
-
4
1
  # Require any additional compass plugins here.
2
+ require 'compass/h5bp'
5
3
 
6
- project_type = :rails
7
-
8
- # Set this to the root of your project when deployed:
9
- http_path = "/"
10
-
11
- # You can select your preferred output style here (can be overridden via the command line):
12
- # output_style = :expanded or :nested or :compact or :compressed
13
-
14
- # To enable relative paths to assets via compass helper functions. Uncomment:
15
- # relative_assets = true
16
-
17
- # To disable debugging comments that display the original location of your selectors. Uncomment:
18
- # line_comments = false
19
-
20
-
21
- # If you prefer the indented syntax, you might want to regenerate this
22
- # project again passing --syntax sass, or you can uncomment this:
23
- # preferred_syntax = :sass
24
- # and then run:
25
- # sass-convert -R --from scss --to sass app/stylesheets scss && rm -rf sass && mv scss sass
4
+ project_type = :rails
@@ -1,9 +1,9 @@
1
1
  <!DOCTYPE html>
2
2
  <%%# http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither %>
3
- <%%= html_tag :class => "no-js", :lang => "en" %>
3
+ <%%= html_tag :class => "no-js" %>
4
4
  <%%= render "head" %>
5
5
 
6
- <body class="pages">
6
+ <body class="<%%= controller.controller_name %>">
7
7
  <%%= render "chromeframe" %>
8
8
  <%%= render "header" %>
9
9
 
@@ -1,6 +1,6 @@
1
1
  !!! 5
2
2
  -# http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither
3
- - html_tag :class => "no-js", :lang => "en" do
3
+ - html_tag :class => "no-js" do
4
4
  = render "head"
5
5
 
6
6
  %body{ :class => "#{ controller.controller_name }" }
@@ -1,3 +1,3 @@
1
- <%%# Prompt IE 6 users to install Chrome Frame. Remove this if you support IE 6. %>
2
- <%%# chromium.org/developers/how-tos/chrome-frame-getting-started %>
3
- <!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
1
+ <!--[if lt IE 7]>
2
+ <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
3
+ <![endif]-->
@@ -1,6 +1,4 @@
1
- -# Prompt IE 6 users to install Chrome Frame. Remove this if you support IE 6.
2
- -# chromium.org/developers/how-tos/chrome-frame-getting-started
3
1
  /[if lt IE 7 ]
4
2
  %p.chromeframe
5
- Your browser is <em>ancient!</em>
6
- <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.
3
+ You are using an <strong>outdated</strong> browser.
4
+ Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
@@ -1,9 +1,9 @@
1
1
  <div id="flash">
2
2
  <%% flash.each do |key, value| %>
3
3
  <div class="wrapper">
4
- <div title="<%%= key.to_s.humanize %>" class="<%%= key %>"></div>
4
+ <div title="<%%= key.to_s.humanize %>" class="<%%= key %>">
5
5
  <p><%%= value %></p>
6
6
  </div>
7
7
  </div>
8
8
  <%% end %>
9
- </div>
9
+ </div>
@@ -1,6 +1,6 @@
1
1
  module Html5
2
2
  module Rails
3
- VERSION = "0.0.5"
4
- COMPASS_H5BP_VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
+ COMPASS_H5BP_VERSION = "0.1.0"
5
5
  end
6
6
  end
@@ -10,4 +10,4 @@
10
10
  *
11
11
  *= require_self
12
12
  *= require_tree .
13
- */
13
+ */
@@ -1,6 +1,12 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
2
 
3
- require 'rails/all'
3
+ # Pick the frameworks you want:
4
+ require "active_record/railtie"
5
+ require "action_controller/railtie"
6
+ require "action_mailer/railtie"
7
+ require "active_resource/railtie"
8
+ require "sprockets/railtie"
9
+ # require "rails/test_unit/railtie"
4
10
 
5
11
  if defined?(Bundler)
6
12
  # If you precompile assets before deploying to production, use this line
@@ -41,6 +47,9 @@ module Dummy
41
47
  # Configure sensitive parameters which will be filtered from the log file.
42
48
  config.filter_parameters += [:password]
43
49
 
50
+ # Enable escaping HTML in JSON.
51
+ config.active_support.escape_html_entities_in_json = true
52
+
44
53
  # Use SQL instead of Active Record's schema dumper when creating the database.
45
54
  # This is necessary if your schema can't be completely dumped by the schema dumper,
46
55
  # like if you have constraints or database-specific column types
@@ -50,7 +59,7 @@ module Dummy
50
59
  # This will create an empty whitelist of attributes available for mass-assignment for all models
51
60
  # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
52
61
  # parameters by using an attr_accessible or attr_protected declaration.
53
- # config.active_record.whitelist_attributes = true
62
+ config.active_record.whitelist_attributes = true
54
63
 
55
64
  # Enable the asset pipeline
56
65
  config.assets.enabled = true
@@ -2,7 +2,7 @@ Dummy::Application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb
3
3
 
4
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
5
+ # every request. This slows down response time but is perfect for development
6
6
  # since you don't have to restart the web server when you make code changes.
7
7
  config.cache_classes = false
8
8
 
@@ -20,7 +20,7 @@ Dummy::Application.configure do
20
20
  # Generate digests for assets URLs
21
21
  config.assets.digest = true
22
22
 
23
- # Defaults to Rails.root.join("public/assets")
23
+ # Defaults to nil and saved in location specified by config.assets.prefix
24
24
  # config.assets.manifest = YOUR_PATH
25
25
 
26
26
  # Specifies the header that your server uses for sending files
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html5-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,23 +9,27 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-26 00:00:00.000000000 -08:00
13
- default_executable:
12
+ date: 2012-11-29 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: jquery-rails
17
- requirement: &2169835220 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ! '>='
21
20
  - !ruby/object:Gem::Version
22
- version: 1.0.19
21
+ version: '2.0'
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *2169835220
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '2.0'
26
30
  - !ruby/object:Gem::Dependency
27
31
  name: railties
28
- requirement: &2169834720 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
29
33
  none: false
30
34
  requirements:
31
35
  - - ~>
@@ -33,10 +37,15 @@ dependencies:
33
37
  version: '3.1'
34
38
  type: :runtime
35
39
  prerelease: false
36
- version_requirements: *2169834720
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '3.1'
37
46
  - !ruby/object:Gem::Dependency
38
47
  name: thor
39
- requirement: &2169834260 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
40
49
  none: false
41
50
  requirements:
42
51
  - - ~>
@@ -44,18 +53,28 @@ dependencies:
44
53
  version: '0.14'
45
54
  type: :runtime
46
55
  prerelease: false
47
- version_requirements: *2169834260
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '0.14'
48
62
  - !ruby/object:Gem::Dependency
49
63
  name: compass-h5bp
50
- requirement: &2169833800 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
51
65
  none: false
52
66
  requirements:
53
67
  - - ~>
54
68
  - !ruby/object:Gem::Version
55
- version: 0.0.5
69
+ version: 0.1.0
56
70
  type: :development
57
71
  prerelease: false
58
- version_requirements: *2169833800
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 0.1.0
59
78
  description: ''
60
79
  email:
61
80
  - gumeson@gmail.com
@@ -160,6 +179,7 @@ files:
160
179
  - test/dummy/public/favicon.ico
161
180
  - test/dummy/public/robots.txt
162
181
  - test/dummy/script/rails
182
+ - test/dummy/vendor/assets/javascripts/.gitkeep
163
183
  - test/dummy/vendor/assets/stylesheets/.gitkeep
164
184
  - test/dummy/vendor/plugins/.gitkeep
165
185
  - test/generators/assets_generator_test.rb
@@ -174,7 +194,6 @@ files:
174
194
  - vendor/assets/javascripts/h5bp/index.js
175
195
  - vendor/assets/javascripts/h5bp/plugins.js
176
196
  - vendor/assets/javascripts/modernizr.min.js
177
- has_rdoc: true
178
197
  homepage: http://rubygems.org/gems/html5-rails
179
198
  licenses: []
180
199
  post_install_message:
@@ -187,15 +206,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
187
206
  - - ! '>='
188
207
  - !ruby/object:Gem::Version
189
208
  version: '0'
209
+ segments:
210
+ - 0
211
+ hash: -3740377307747398142
190
212
  required_rubygems_version: !ruby/object:Gem::Requirement
191
213
  none: false
192
214
  requirements:
193
215
  - - ! '>='
194
216
  - !ruby/object:Gem::Version
195
217
  version: '0'
218
+ segments:
219
+ - 0
220
+ hash: -3740377307747398142
196
221
  requirements: []
197
222
  rubyforge_project: html5-rails
198
- rubygems_version: 1.6.2
223
+ rubygems_version: 1.8.23
199
224
  signing_key:
200
225
  specification_version: 3
201
226
  summary: Rails support for the compass-h5bp gem
@@ -241,6 +266,7 @@ test_files:
241
266
  - test/dummy/public/favicon.ico
242
267
  - test/dummy/public/robots.txt
243
268
  - test/dummy/script/rails
269
+ - test/dummy/vendor/assets/javascripts/.gitkeep
244
270
  - test/dummy/vendor/assets/stylesheets/.gitkeep
245
271
  - test/dummy/vendor/plugins/.gitkeep
246
272
  - test/generators/assets_generator_test.rb