rail_pass 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/generators/rail_pass/install_generator.rb +2 -2
- data/lib/generators/templates/app/assets/javascripts/application.js +2 -0
- data/lib/generators/templates/app/assets/stylesheets/base/_defaults.scss +1 -0
- data/lib/generators/templates/app/helpers/application_helper.rb +7 -0
- data/lib/generators/templates/app/views/layouts/application.html.haml +15 -14
- data/lib/generators/templates/public/404.html +54 -0
- data/lib/generators/templates/public/422.html +1 -1
- data/lib/generators/templates/vendor/assets/javascripts/jquery.cookie.js +72 -0
- data/lib/generators/templates/vendor/assets/javascripts/outdated-browser.js.coffee +9 -0
- data/lib/generators/templates/vendor/assets/javascripts/polyfills/selectivizr.js +9 -6
- data/lib/rail_pass/version.rb +1 -1
- metadata +5 -2
@@ -5,7 +5,7 @@ module RailPass
|
|
5
5
|
module Generators
|
6
6
|
class InstallGenerator < Rails::Generators::Base
|
7
7
|
DIRECTORIES = %w(app public spec vendor)
|
8
|
-
FILES_TO_REMOVE = %w(README.rdoc public/index.html public/500.html public/422.html app/assets/images/rails.png app/assets/javascripts/application.js app/assets/javascripts/application.js.coffee app/assets/stylesheets/application.css app/assets/stylesheets/application.css.scss app/views/layouts/application.html.erb app/helpers/application_helper.rb test/ vendor/plugins/)
|
8
|
+
FILES_TO_REMOVE = %w(README.rdoc public/index.html public/500.html public/404.html public/422.html app/assets/images/rails.png app/assets/javascripts/application.js app/assets/javascripts/application.js.coffee app/assets/stylesheets/application.css app/assets/stylesheets/application.css.scss app/views/layouts/application.html.erb app/helpers/application_helper.rb test/ vendor/plugins/)
|
9
9
|
|
10
10
|
source_root File.join(File.dirname(__FILE__), '../templates')
|
11
11
|
|
@@ -139,7 +139,7 @@ module RailPass
|
|
139
139
|
"config.assets.precompile += %w( responsive.js html5.js polyfills.js )"
|
140
140
|
end
|
141
141
|
%w(config/initializers/dev_environment.rb .powder).each do |ignored|
|
142
|
-
append_file ".gitignore", ignored
|
142
|
+
append_file ".gitignore", ignored + "\n"
|
143
143
|
end
|
144
144
|
end
|
145
145
|
|
@@ -1,6 +1,8 @@
|
|
1
1
|
!!! 5
|
2
|
-
|
3
|
-
|
2
|
+
/[if lt IE 9] <html class="ie8" lang="en">
|
3
|
+
<!--[if gte IE 9]><!-->
|
4
|
+
%html{ lang: "en" }
|
5
|
+
<!--<![endif]-->
|
4
6
|
|
5
7
|
/
|
6
8
|
_
|
@@ -70,24 +72,23 @@
|
|
70
72
|
|
71
73
|
%body
|
72
74
|
/[if lt IE 9]
|
73
|
-
.
|
74
|
-
%
|
75
|
-
%
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
to improve your experience.
|
75
|
+
#outdated-browser.outdated-browser
|
76
|
+
%p
|
77
|
+
%a.close-btn{ href: "#", data: {behavior: "close:outdatedBrowser"} } x
|
78
|
+
You are using an outdated browser. Please
|
79
|
+
%a{ href: "http://browsehappy.com/", target: '_blank' } upgrade your browser
|
80
|
+
or
|
81
|
+
%a{ href: "http://www.google.com/chromeframe/?redirect=true", target: '_blank' } activate Google Chrome Frame
|
82
|
+
to improve your experience.
|
82
83
|
|
83
84
|
|
84
|
-
%header
|
85
|
+
%header#grid-header
|
85
86
|
|
86
87
|
|
87
88
|
= yield
|
88
89
|
|
89
90
|
|
90
|
-
%footer
|
91
|
+
%footer#grid-footer
|
91
92
|
|
92
93
|
|
93
94
|
|
@@ -121,4 +122,4 @@
|
|
121
122
|
- if Rails.env.development?
|
122
123
|
#lacroixdesign-browserwidth{style: "position:fixed; bottom:0; left:0; background:#555; color:#CCC; font-size:0.75em; padding:0.25em; text-shadow: 0 -1px 1px rgba(0,0,0,0.9); font-weight:normal;"}
|
123
124
|
:javascript
|
124
|
-
function showWidth(){var w = $(window).width();$('#
|
125
|
+
function showWidth(){var w = $(window).width();$('#lacroixdesign-browserwidth').text(w);}showWidth();$(window).resize(function(){showWidth();});
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<meta content='initial-scale=1.0, width=device-width, user-scalable=no, maximum-scale=1.0' name='viewport'>
|
6
|
+
|
7
|
+
<style type="text/css">
|
8
|
+
|
9
|
+
html body{
|
10
|
+
/* <<< For IE >>> */
|
11
|
+
padding-left: 0;
|
12
|
+
padding-right: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
body {
|
16
|
+
color: #999;
|
17
|
+
background-color: #EFF0F2;
|
18
|
+
font-size: 100%;
|
19
|
+
text-align: center;
|
20
|
+
font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
21
|
+
text-shadow: 1px 1px 1px white;
|
22
|
+
-webkit-font-smoothing: antialiased !important;
|
23
|
+
}
|
24
|
+
|
25
|
+
div.dialog {
|
26
|
+
max-width: 25em;
|
27
|
+
padding: 0.5em 2em;
|
28
|
+
margin: 4em auto 0 auto;
|
29
|
+
background: #F8F8F8;
|
30
|
+
border: 1px solid #E9E9E9;
|
31
|
+
border-bottom-color: #D5D5D5;
|
32
|
+
}
|
33
|
+
h1 {
|
34
|
+
color: #F27390;
|
35
|
+
font-size: 1em;
|
36
|
+
font-weight: normal;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
p {
|
41
|
+
font-size: 0.8125em;
|
42
|
+
line-height: 1.3;
|
43
|
+
}
|
44
|
+
</style>
|
45
|
+
</head>
|
46
|
+
|
47
|
+
<body>
|
48
|
+
<!-- This file lives in public/404.html -->
|
49
|
+
<div class="dialog">
|
50
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
51
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
52
|
+
</div>
|
53
|
+
</body>
|
54
|
+
</html>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
<title>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
5
|
<meta content='initial-scale=1.0, width=device-width, user-scalable=no, maximum-scale=1.0' name='viewport'>
|
6
6
|
|
7
7
|
<style type="text/css">
|
@@ -0,0 +1,72 @@
|
|
1
|
+
/*!
|
2
|
+
* jQuery Cookie Plugin v1.3
|
3
|
+
* https://github.com/carhartl/jquery-cookie
|
4
|
+
*
|
5
|
+
* Copyright 2011, Klaus Hartl
|
6
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
7
|
+
* http://www.opensource.org/licenses/mit-license.php
|
8
|
+
* http://www.opensource.org/licenses/GPL-2.0
|
9
|
+
*/
|
10
|
+
(function ($, document, undefined) {
|
11
|
+
|
12
|
+
var pluses = /\+/g;
|
13
|
+
|
14
|
+
function raw(s) {
|
15
|
+
return s;
|
16
|
+
}
|
17
|
+
|
18
|
+
function decoded(s) {
|
19
|
+
return decodeURIComponent(s.replace(pluses, ' '));
|
20
|
+
}
|
21
|
+
|
22
|
+
var config = $.cookie = function (key, value, options) {
|
23
|
+
|
24
|
+
// write
|
25
|
+
if (value !== undefined) {
|
26
|
+
options = $.extend({}, config.defaults, options);
|
27
|
+
|
28
|
+
if (value === null) {
|
29
|
+
options.expires = -1;
|
30
|
+
}
|
31
|
+
|
32
|
+
if (typeof options.expires === 'number') {
|
33
|
+
var days = options.expires, t = options.expires = new Date();
|
34
|
+
t.setDate(t.getDate() + days);
|
35
|
+
}
|
36
|
+
|
37
|
+
value = config.json ? JSON.stringify(value) : String(value);
|
38
|
+
|
39
|
+
return (document.cookie = [
|
40
|
+
encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value),
|
41
|
+
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
42
|
+
options.path ? '; path=' + options.path : '',
|
43
|
+
options.domain ? '; domain=' + options.domain : '',
|
44
|
+
options.secure ? '; secure' : ''
|
45
|
+
].join(''));
|
46
|
+
}
|
47
|
+
|
48
|
+
// read
|
49
|
+
var decode = config.raw ? raw : decoded;
|
50
|
+
var cookies = document.cookie.split('; ');
|
51
|
+
for (var i = 0, l = cookies.length; i < l; i++) {
|
52
|
+
var parts = cookies[i].split('=');
|
53
|
+
if (decode(parts.shift()) === key) {
|
54
|
+
var cookie = decode(parts.join('='));
|
55
|
+
return config.json ? JSON.parse(cookie) : cookie;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
return null;
|
60
|
+
};
|
61
|
+
|
62
|
+
config.defaults = {};
|
63
|
+
|
64
|
+
$.removeCookie = function (key, options) {
|
65
|
+
if ($.cookie(key) !== null) {
|
66
|
+
$.cookie(key, null, options);
|
67
|
+
return true;
|
68
|
+
}
|
69
|
+
return false;
|
70
|
+
};
|
71
|
+
|
72
|
+
})(jQuery, document);
|
@@ -0,0 +1,9 @@
|
|
1
|
+
$(document).on 'click', '[data-behavior="close:outdatedBrowser"]', (event)->
|
2
|
+
event.preventDefault()
|
3
|
+
$('#outdated-browser').fadeOut(200)
|
4
|
+
$.cookie('outdated_browser', 'dismissed', { expires: 1, path: '/' })
|
5
|
+
|
6
|
+
|
7
|
+
jQuery ->
|
8
|
+
if $.cookie('outdated_browser')
|
9
|
+
$('#outdated-browser').hide()
|
@@ -26,18 +26,21 @@ References:
|
|
26
26
|
|
27
27
|
(function(win) {
|
28
28
|
|
29
|
-
//
|
30
|
-
// being loaded by non IE browsers because the
|
31
|
-
// conditional comments.
|
32
|
-
|
29
|
+
// Determine IE version and stop execution if browser isn't IE. This
|
30
|
+
// handles the script being loaded by non IE browsers because the
|
31
|
+
// developer didn't use conditional comments.
|
32
|
+
var ieUserAgent = navigator.userAgent.match(/MSIE (\d+)/);
|
33
|
+
if (!ieUserAgent) {
|
34
|
+
return false;
|
35
|
+
}
|
33
36
|
|
34
37
|
// =========================== Init Objects ============================
|
35
38
|
|
36
39
|
var doc = document;
|
37
40
|
var root = doc.documentElement;
|
38
41
|
var xhr = getXHRObject();
|
39
|
-
var ieVersion =
|
40
|
-
|
42
|
+
var ieVersion = ieUserAgent[1];
|
43
|
+
|
41
44
|
// If were not in standards mode, IE is too old / new or we can't create
|
42
45
|
// an XMLHttpRequest object then we should get out now.
|
43
46
|
if (doc.compatMode != 'CSS1Compat' || ieVersion<6 || ieVersion>8 || !xhr) {
|
data/lib/rail_pass/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rail_pass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-01-
|
13
|
+
date: 2013-01-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- lib/generators/templates/config/recipes/utilities.rb
|
96
96
|
- lib/generators/templates/config/unicorn.rb
|
97
97
|
- lib/generators/templates/Procfile
|
98
|
+
- lib/generators/templates/public/404.html
|
98
99
|
- lib/generators/templates/public/422.html
|
99
100
|
- lib/generators/templates/public/500.html
|
100
101
|
- lib/generators/templates/spec/spec_helper.rb
|
@@ -105,7 +106,9 @@ files:
|
|
105
106
|
- lib/generators/templates/vendor/assets/fonts/icomoon/icomoon.svg
|
106
107
|
- lib/generators/templates/vendor/assets/fonts/icomoon/icomoon.ttf
|
107
108
|
- lib/generators/templates/vendor/assets/fonts/icomoon/icomoon.woff
|
109
|
+
- lib/generators/templates/vendor/assets/javascripts/jquery.cookie.js
|
108
110
|
- lib/generators/templates/vendor/assets/javascripts/jquery.ui.touch-punch.min.js
|
111
|
+
- lib/generators/templates/vendor/assets/javascripts/outdated-browser.js.coffee
|
109
112
|
- lib/generators/templates/vendor/assets/javascripts/polyfills/html5shim.js
|
110
113
|
- lib/generators/templates/vendor/assets/javascripts/polyfills/modernizr.js
|
111
114
|
- lib/generators/templates/vendor/assets/javascripts/polyfills/respond.js
|