da-suspenders 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,13 +1,13 @@
1
- <%%= semantic_form_for(@<%= singular_table_name %>) do |f| %>
2
- <%%= f.semantic_errors %>
3
-
4
- <%%= f.inputs do %>
5
- <% for attribute in attributes -%>
6
- <%%= f.input :<%= attribute.name %> %>
7
- <% end -%>
8
- <%% end %>
9
-
10
- <%%= f.buttons do %>
11
- <%%= f.commit_button %>
12
- <%% end %>
13
- <%% end %>
1
+ <%%= semantic_form_for(@<%= singular_table_name %>) do |f| %>
2
+ <%%= f.semantic_errors %>
3
+
4
+ <%%= f.inputs do %>
5
+ <% for attribute in attributes -%>
6
+ <%%= f.input :<%= attribute.name %> %>
7
+ <% end -%>
8
+ <%% end %>
9
+
10
+ <%%= f.buttons do %>
11
+ <%%= f.commit_button %>
12
+ <%% end %>
13
+ <%% end %>
@@ -1,169 +1,169 @@
1
- /**
2
- * Unobtrusive scripting adapter for jQuery
3
- *
4
- * Requires jQuery 1.4.3 or later.
5
- * https://github.com/rails/jquery-ujs
6
- */
7
-
8
- (function($) {
9
- // Make sure that every Ajax request sends the CSRF token
10
- function CSRFProtection(fn) {
11
- var token = $('meta[name="csrf-token"]').attr('content');
12
- if (token) fn(function(xhr) { xhr.setRequestHeader('X-CSRF-Token', token) });
13
- }
14
- if ($().jquery == '1.5') { // gruesome hack
15
- var factory = $.ajaxSettings.xhr;
16
- $.ajaxSettings.xhr = function() {
17
- var xhr = factory();
18
- CSRFProtection(function(setHeader) {
19
- var open = xhr.open;
20
- xhr.open = function() { open.apply(this, arguments); setHeader(this) };
21
- });
22
- return xhr;
23
- };
24
- }
25
- else $(document).ajaxSend(function(e, xhr) {
26
- CSRFProtection(function(setHeader) { setHeader(xhr) });
27
- });
28
-
29
- // Triggers an event on an element and returns the event result
30
- function fire(obj, name, data) {
31
- var event = new $.Event(name);
32
- obj.trigger(event, data);
33
- return event.result !== false;
34
- }
35
-
36
- // Submits "remote" forms and links with ajax
37
- function handleRemote(element) {
38
- var method, url, data,
39
- dataType = element.attr('data-type') || ($.ajaxSettings && $.ajaxSettings.dataType);
40
-
41
- if (element.is('form')) {
42
- method = element.attr('method');
43
- url = element.attr('action');
44
- data = element.serializeArray();
45
- // memoized value from clicked submit button
46
- var button = element.data('ujs:submit-button');
47
- if (button) {
48
- data.push(button);
49
- element.data('ujs:submit-button', null);
50
- }
51
- } else {
52
- method = element.attr('data-method');
53
- url = element.attr('href');
54
- data = null;
55
- }
56
-
57
- $.ajax({
58
- url: url, type: method || 'GET', data: data, dataType: dataType,
59
- // stopping the "ajax:beforeSend" event will cancel the ajax request
60
- beforeSend: function(xhr, settings) {
61
- if (settings.dataType === undefined) {
62
- xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
63
- }
64
- return fire(element, 'ajax:beforeSend', [xhr, settings]);
65
- },
66
- success: function(data, status, xhr) {
67
- element.trigger('ajax:success', [data, status, xhr]);
68
- },
69
- complete: function(xhr, status) {
70
- element.trigger('ajax:complete', [xhr, status]);
71
- },
72
- error: function(xhr, status, error) {
73
- element.trigger('ajax:error', [xhr, status, error]);
74
- }
75
- });
76
- }
77
-
78
- // Handles "data-method" on links such as:
79
- // <a href="/users/5" data-method="delete" rel="nofollow" data-confirm="Are you sure?">Delete</a>
80
- function handleMethod(link) {
81
- var href = link.attr('href'),
82
- method = link.attr('data-method'),
83
- csrf_token = $('meta[name=csrf-token]').attr('content'),
84
- csrf_param = $('meta[name=csrf-param]').attr('content'),
85
- form = $('<form method="post" action="' + href + '"></form>'),
86
- metadata_input = '<input name="_method" value="' + method + '" type="hidden" />';
87
-
88
- if (csrf_param !== undefined && csrf_token !== undefined) {
89
- metadata_input += '<input name="' + csrf_param + '" value="' + csrf_token + '" type="hidden" />';
90
- }
91
-
92
- form.hide().append(metadata_input).appendTo('body');
93
- form.submit();
94
- }
95
-
96
- function disableFormElements(form) {
97
- form.find('input[data-disable-with]').each(function() {
98
- var input = $(this);
99
- input.data('ujs:enable-with', input.val())
100
- .val(input.attr('data-disable-with'))
101
- .attr('disabled', 'disabled');
102
- });
103
- }
104
-
105
- function enableFormElements(form) {
106
- form.find('input[data-disable-with]').each(function() {
107
- var input = $(this);
108
- input.val(input.data('ujs:enable-with')).removeAttr('disabled');
109
- });
110
- }
111
-
112
- function allowAction(element) {
113
- var message = element.attr('data-confirm');
114
- return !message || (fire(element, 'confirm') && confirm(message));
115
- }
116
-
117
- function requiredValuesMissing(form) {
118
- var missing = false;
119
- form.find('input[name][required]').each(function() {
120
- if (!$(this).val()) missing = true;
121
- });
122
- return missing;
123
- }
124
-
125
- $('a[data-confirm], a[data-method], a[data-remote]').live('click.rails', function(e) {
126
- var link = $(this);
127
- if (!allowAction(link)) return false;
128
-
129
- if (link.attr('data-remote') != undefined) {
130
- handleRemote(link);
131
- return false;
132
- } else if (link.attr('data-method')) {
133
- handleMethod(link);
134
- return false;
135
- }
136
- });
137
-
138
- $('form').live('submit.rails', function(e) {
139
- var form = $(this), remote = form.attr('data-remote') != undefined;
140
- if (!allowAction(form)) return false;
141
-
142
- // skip other logic when required values are missing
143
- if (requiredValuesMissing(form)) return !remote;
144
-
145
- if (remote) {
146
- handleRemote(form);
147
- return false;
148
- } else {
149
- // slight timeout so that the submit button gets properly serialized
150
- setTimeout(function(){ disableFormElements(form) }, 13);
151
- }
152
- });
153
-
154
- $('form input[type=submit], form button[type=submit], form button:not([type])').live('click.rails', function() {
155
- var button = $(this);
156
- if (!allowAction(button)) return false;
157
- // register the pressed submit button
158
- var name = button.attr('name'), data = name ? {name:name, value:button.val()} : null;
159
- button.closest('form').data('ujs:submit-button', data);
160
- });
161
-
162
- $('form').live('ajax:beforeSend.rails', function(event) {
163
- if (this == event.target) disableFormElements($(this));
164
- });
165
-
166
- $('form').live('ajax:complete.rails', function(event) {
167
- if (this == event.target) enableFormElements($(this));
168
- });
169
- })( jQuery );
1
+ /**
2
+ * Unobtrusive scripting adapter for jQuery
3
+ *
4
+ * Requires jQuery 1.4.3 or later.
5
+ * https://github.com/rails/jquery-ujs
6
+ */
7
+
8
+ (function($) {
9
+ // Make sure that every Ajax request sends the CSRF token
10
+ function CSRFProtection(fn) {
11
+ var token = $('meta[name="csrf-token"]').attr('content');
12
+ if (token) fn(function(xhr) { xhr.setRequestHeader('X-CSRF-Token', token) });
13
+ }
14
+ if ($().jquery == '1.5') { // gruesome hack
15
+ var factory = $.ajaxSettings.xhr;
16
+ $.ajaxSettings.xhr = function() {
17
+ var xhr = factory();
18
+ CSRFProtection(function(setHeader) {
19
+ var open = xhr.open;
20
+ xhr.open = function() { open.apply(this, arguments); setHeader(this) };
21
+ });
22
+ return xhr;
23
+ };
24
+ }
25
+ else $(document).ajaxSend(function(e, xhr) {
26
+ CSRFProtection(function(setHeader) { setHeader(xhr) });
27
+ });
28
+
29
+ // Triggers an event on an element and returns the event result
30
+ function fire(obj, name, data) {
31
+ var event = new $.Event(name);
32
+ obj.trigger(event, data);
33
+ return event.result !== false;
34
+ }
35
+
36
+ // Submits "remote" forms and links with ajax
37
+ function handleRemote(element) {
38
+ var method, url, data,
39
+ dataType = element.attr('data-type') || ($.ajaxSettings && $.ajaxSettings.dataType);
40
+
41
+ if (element.is('form')) {
42
+ method = element.attr('method');
43
+ url = element.attr('action');
44
+ data = element.serializeArray();
45
+ // memoized value from clicked submit button
46
+ var button = element.data('ujs:submit-button');
47
+ if (button) {
48
+ data.push(button);
49
+ element.data('ujs:submit-button', null);
50
+ }
51
+ } else {
52
+ method = element.attr('data-method');
53
+ url = element.attr('href');
54
+ data = null;
55
+ }
56
+
57
+ $.ajax({
58
+ url: url, type: method || 'GET', data: data, dataType: dataType,
59
+ // stopping the "ajax:beforeSend" event will cancel the ajax request
60
+ beforeSend: function(xhr, settings) {
61
+ if (settings.dataType === undefined) {
62
+ xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
63
+ }
64
+ return fire(element, 'ajax:beforeSend', [xhr, settings]);
65
+ },
66
+ success: function(data, status, xhr) {
67
+ element.trigger('ajax:success', [data, status, xhr]);
68
+ },
69
+ complete: function(xhr, status) {
70
+ element.trigger('ajax:complete', [xhr, status]);
71
+ },
72
+ error: function(xhr, status, error) {
73
+ element.trigger('ajax:error', [xhr, status, error]);
74
+ }
75
+ });
76
+ }
77
+
78
+ // Handles "data-method" on links such as:
79
+ // <a href="/users/5" data-method="delete" rel="nofollow" data-confirm="Are you sure?">Delete</a>
80
+ function handleMethod(link) {
81
+ var href = link.attr('href'),
82
+ method = link.attr('data-method'),
83
+ csrf_token = $('meta[name=csrf-token]').attr('content'),
84
+ csrf_param = $('meta[name=csrf-param]').attr('content'),
85
+ form = $('<form method="post" action="' + href + '"></form>'),
86
+ metadata_input = '<input name="_method" value="' + method + '" type="hidden" />';
87
+
88
+ if (csrf_param !== undefined && csrf_token !== undefined) {
89
+ metadata_input += '<input name="' + csrf_param + '" value="' + csrf_token + '" type="hidden" />';
90
+ }
91
+
92
+ form.hide().append(metadata_input).appendTo('body');
93
+ form.submit();
94
+ }
95
+
96
+ function disableFormElements(form) {
97
+ form.find('input[data-disable-with]').each(function() {
98
+ var input = $(this);
99
+ input.data('ujs:enable-with', input.val())
100
+ .val(input.attr('data-disable-with'))
101
+ .attr('disabled', 'disabled');
102
+ });
103
+ }
104
+
105
+ function enableFormElements(form) {
106
+ form.find('input[data-disable-with]').each(function() {
107
+ var input = $(this);
108
+ input.val(input.data('ujs:enable-with')).removeAttr('disabled');
109
+ });
110
+ }
111
+
112
+ function allowAction(element) {
113
+ var message = element.attr('data-confirm');
114
+ return !message || (fire(element, 'confirm') && confirm(message));
115
+ }
116
+
117
+ function requiredValuesMissing(form) {
118
+ var missing = false;
119
+ form.find('input[name][required]').each(function() {
120
+ if (!$(this).val()) missing = true;
121
+ });
122
+ return missing;
123
+ }
124
+
125
+ $('a[data-confirm], a[data-method], a[data-remote]').live('click.rails', function(e) {
126
+ var link = $(this);
127
+ if (!allowAction(link)) return false;
128
+
129
+ if (link.attr('data-remote') != undefined) {
130
+ handleRemote(link);
131
+ return false;
132
+ } else if (link.attr('data-method')) {
133
+ handleMethod(link);
134
+ return false;
135
+ }
136
+ });
137
+
138
+ $('form').live('submit.rails', function(e) {
139
+ var form = $(this), remote = form.attr('data-remote') != undefined;
140
+ if (!allowAction(form)) return false;
141
+
142
+ // skip other logic when required values are missing
143
+ if (requiredValuesMissing(form)) return !remote;
144
+
145
+ if (remote) {
146
+ handleRemote(form);
147
+ return false;
148
+ } else {
149
+ // slight timeout so that the submit button gets properly serialized
150
+ setTimeout(function(){ disableFormElements(form) }, 13);
151
+ }
152
+ });
153
+
154
+ $('form input[type=submit], form button[type=submit], form button:not([type])').live('click.rails', function() {
155
+ var button = $(this);
156
+ if (!allowAction(button)) return false;
157
+ // register the pressed submit button
158
+ var name = button.attr('name'), data = name ? {name:name, value:button.val()} : null;
159
+ button.closest('form').data('ujs:submit-button', data);
160
+ });
161
+
162
+ $('form').live('ajax:beforeSend.rails', function(event) {
163
+ if (this == event.target) disableFormElements($(this));
164
+ });
165
+
166
+ $('form').live('ajax:complete.rails', function(event) {
167
+ if (this == event.target) enableFormElements($(this));
168
+ });
169
+ })( jQuery );
@@ -1,30 +1,30 @@
1
- /*
2
- * Modernizr v1.6
3
- * http://www.modernizr.com
4
- *
5
- * Developed by:
6
- * - Faruk Ates http://farukat.es/
7
- * - Paul Irish http://paulirish.com/
8
- *
9
- * Copyright (c) 2009-2010
10
- * Dual-licensed under the BSD or MIT licenses.
11
- * http://www.modernizr.com/license/
12
- */
13
- window.Modernizr=function(i,e,u){function s(a,b){return(""+a).indexOf(b)!==-1}function D(a,b){for(var c in a)if(j[a[c]]!==u&&(!b||b(a[c],E)))return true}function n(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);c=(a+" "+F.join(c+" ")+c).split(" ");return!!D(c,b)}function S(){f.input=function(a){for(var b=0,c=a.length;b<c;b++)L[a[b]]=!!(a[b]in h);return L}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));f.inputtypes=function(a){for(var b=0,c,k=a.length;b<
14
- k;b++){h.setAttribute("type",a[b]);if(c=h.type!=="text"){h.value=M;if(/^range$/.test(h.type)&&h.style.WebkitAppearance!==u){l.appendChild(h);c=e.defaultView;c=c.getComputedStyle&&c.getComputedStyle(h,null).WebkitAppearance!=="textfield"&&h.offsetHeight!==0;l.removeChild(h)}else/^(search|tel)$/.test(h.type)||(c=/^(url|email)$/.test(h.type)?h.checkValidity&&h.checkValidity()===false:h.value!=M)}N[a[b]]=!!c}return N}("search tel url email datetime date month week time datetime-local number range color".split(" "))}
15
- var f={},l=e.documentElement,E=e.createElement("modernizr"),j=E.style,h=e.createElement("input"),M=":)",O=Object.prototype.toString,q=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),F="Webkit Moz O ms Khtml".split(" "),v={svg:"http://www.w3.org/2000/svg"},d={},N={},L={},P=[],w,Q=function(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent=a+"{#modernizr{height:3px}}";(e.head||e.getElementsByTagName("head")[0]).appendChild(b);c.id="modernizr";l.appendChild(c);a=c.offsetHeight===
16
- 3;b.parentNode.removeChild(b);c.parentNode.removeChild(c);return!!a},o=function(){var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(b,c){c=c||document.createElement(a[b]||"div");b="on"+b;var k=b in c;if(!k){c.setAttribute||(c=document.createElement("div"));if(c.setAttribute&&c.removeAttribute){c.setAttribute(b,"");k=typeof c[b]=="function";if(typeof c[b]!="undefined")c[b]=u;c.removeAttribute(b)}}return k}}(),G={}.hasOwnProperty,R;R=
17
- typeof G!=="undefined"&&typeof G.call!=="undefined"?function(a,b){return G.call(a,b)}:function(a,b){return b in a&&typeof a.constructor.prototype[b]==="undefined"};d.flexbox=function(){var a=e.createElement("div"),b=e.createElement("div");(function(k,g,r,x){g+=":";k.style.cssText=(g+q.join(r+";"+g)).slice(0,-g.length)+(x||"")})(a,"display","box","width:42px;padding:0;");b.style.cssText=q.join("box-flex:1;")+"width:10px;";a.appendChild(b);l.appendChild(a);var c=b.offsetWidth===42;a.removeChild(b);
18
- l.removeChild(a);return c};d.canvas=function(){var a=e.createElement("canvas");return!!(a.getContext&&a.getContext("2d"))};d.canvastext=function(){return!!(f.canvas&&typeof e.createElement("canvas").getContext("2d").fillText=="function")};d.webgl=function(){var a=e.createElement("canvas");try{if(a.getContext("webgl"))return true}catch(b){}try{if(a.getContext("experimental-webgl"))return true}catch(c){}return false};d.touch=function(){return"ontouchstart"in i||Q("@media ("+q.join("touch-enabled),(")+
19
- "modernizr)")};d.geolocation=function(){return!!navigator.geolocation};d.postmessage=function(){return!!i.postMessage};d.websqldatabase=function(){return!!i.openDatabase};d.indexedDB=function(){for(var a=-1,b=F.length;++a<b;){var c=F[a].toLowerCase();if(i[c+"_indexedDB"]||i[c+"IndexedDB"])return true}return false};d.hashchange=function(){return o("hashchange",i)&&(document.documentMode===u||document.documentMode>7)};d.history=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return o("drag")&&
20
- o("dragstart")&&o("dragenter")&&o("dragover")&&o("dragleave")&&o("dragend")&&o("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){j.cssText="background-color:rgba(150,255,150,.5)";return s(j.backgroundColor,"rgba")};d.hsla=function(){j.cssText="background-color:hsla(120,40%,100%,.5)";return s(j.backgroundColor,"rgba")||s(j.backgroundColor,"hsla")};d.multiplebgs=function(){j.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(j.background)};d.backgroundsize=
21
- function(){return n("backgroundSize")};d.borderimage=function(){return n("borderImage")};d.borderradius=function(){return n("borderRadius","",function(a){return s(a,"orderRadius")})};d.boxshadow=function(){return n("boxShadow")};d.textshadow=function(){return e.createElement("div").style.textShadow===""};d.opacity=function(){var a=q.join("opacity:.5;")+"";j.cssText=a;return s(j.opacity,"0.5")};d.cssanimations=function(){return n("animationName")};d.csscolumns=function(){return n("columnCount")};d.cssgradients=
22
- function(){var a=("background-image:"+q.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+q.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);j.cssText=a;return s(j.backgroundImage,"gradient")};d.cssreflections=function(){return n("boxReflect")};d.csstransforms=function(){return!!D(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!D(["perspectiveProperty","WebkitPerspective",
23
- "MozPerspective","OPerspective","msPerspective"]);if(a)a=Q("@media ("+q.join("transform-3d),(")+"modernizr)");return a};d.csstransitions=function(){return n("transitionProperty")};d.fontface=function(){var a,b=e.head||e.getElementsByTagName("head")[0]||l,c=e.createElement("style"),k=e.implementation||{hasFeature:function(){return false}};c.type="text/css";b.insertBefore(c,b.firstChild);a=c.sheet||c.styleSheet;b=k.hasFeature("CSS2","")?function(g){if(!(a&&g))return false;var r=false;try{a.insertRule(g,
24
- 0);r=!/unknown/i.test(a.cssRules[0].cssText);a.deleteRule(a.cssRules.length-1)}catch(x){}return r}:function(g){if(!(a&&g))return false;a.cssText=g;return a.cssText.length!==0&&!/unknown/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(g.split(" ")[0])===0};f._fontfaceready=function(g){g(f.fontface)};return b('@font-face { font-family: "font"; src: "font.ttf"; }')};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');
25
- b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"')||a.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b};d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localstorage=function(){try{return"localStorage"in
26
- i&&i.localStorage!==null}catch(a){return false}};d.sessionstorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webWorkers=function(){return!!i.Worker};d.applicationcache=function(){return!!i.applicationCache};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS(v.svg,"svg").createSVGRect};d.inlinesvg=function(){var a=document.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==v.svg};d.smil=function(){return!!e.createElementNS&&
27
- /SVG/.test(O.call(e.createElementNS(v.svg,"animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(O.call(e.createElementNS(v.svg,"clipPath")))};for(var H in d)if(R(d,H)){w=H.toLowerCase();f[w]=d[H]();P.push((f[w]?"":"no-")+w)}f.input||S();f.crosswindowmessaging=f.postmessage;f.historymanagement=f.history;f.addTest=function(a,b){a=a.toLowerCase();if(!f[a]){b=!!b();l.className+=" "+(b?"":"no-")+a;f[a]=b;return f}};j.cssText="";E=h=null;i.attachEvent&&function(){var a=e.createElement("div");
28
- a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function c(p){for(var m=-1;++m<r;)p.createElement(g[m])}function k(p,m){for(var I=p.length,t=-1,y,J=[];++t<I;){y=p[t];m=y.media||m;J.push(k(y.imports,m));J.push(y.cssText)}return J.join("")}var g="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video".split("|"),r=g.length,x=RegExp("<(/*)(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)",
29
- "gi"),T=RegExp("\\b(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)\\b(?!.*[;}])","gi"),z=b.createDocumentFragment(),A=b.documentElement,K=A.firstChild,B=b.createElement("style"),C=b.createElement("body");B.media="all";c(b);c(z);a.attachEvent("onbeforeprint",function(){for(var p=-1;++p<r;)for(var m=b.getElementsByTagName(g[p]),I=m.length,t=-1;++t<I;)if(m[t].className.indexOf("iepp_")<0)m[t].className+=" iepp_"+
1
+ /*
2
+ * Modernizr v1.6
3
+ * http://www.modernizr.com
4
+ *
5
+ * Developed by:
6
+ * - Faruk Ates http://farukat.es/
7
+ * - Paul Irish http://paulirish.com/
8
+ *
9
+ * Copyright (c) 2009-2010
10
+ * Dual-licensed under the BSD or MIT licenses.
11
+ * http://www.modernizr.com/license/
12
+ */
13
+ window.Modernizr=function(i,e,u){function s(a,b){return(""+a).indexOf(b)!==-1}function D(a,b){for(var c in a)if(j[a[c]]!==u&&(!b||b(a[c],E)))return true}function n(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);c=(a+" "+F.join(c+" ")+c).split(" ");return!!D(c,b)}function S(){f.input=function(a){for(var b=0,c=a.length;b<c;b++)L[a[b]]=!!(a[b]in h);return L}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));f.inputtypes=function(a){for(var b=0,c,k=a.length;b<
14
+ k;b++){h.setAttribute("type",a[b]);if(c=h.type!=="text"){h.value=M;if(/^range$/.test(h.type)&&h.style.WebkitAppearance!==u){l.appendChild(h);c=e.defaultView;c=c.getComputedStyle&&c.getComputedStyle(h,null).WebkitAppearance!=="textfield"&&h.offsetHeight!==0;l.removeChild(h)}else/^(search|tel)$/.test(h.type)||(c=/^(url|email)$/.test(h.type)?h.checkValidity&&h.checkValidity()===false:h.value!=M)}N[a[b]]=!!c}return N}("search tel url email datetime date month week time datetime-local number range color".split(" "))}
15
+ var f={},l=e.documentElement,E=e.createElement("modernizr"),j=E.style,h=e.createElement("input"),M=":)",O=Object.prototype.toString,q=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),F="Webkit Moz O ms Khtml".split(" "),v={svg:"http://www.w3.org/2000/svg"},d={},N={},L={},P=[],w,Q=function(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent=a+"{#modernizr{height:3px}}";(e.head||e.getElementsByTagName("head")[0]).appendChild(b);c.id="modernizr";l.appendChild(c);a=c.offsetHeight===
16
+ 3;b.parentNode.removeChild(b);c.parentNode.removeChild(c);return!!a},o=function(){var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(b,c){c=c||document.createElement(a[b]||"div");b="on"+b;var k=b in c;if(!k){c.setAttribute||(c=document.createElement("div"));if(c.setAttribute&&c.removeAttribute){c.setAttribute(b,"");k=typeof c[b]=="function";if(typeof c[b]!="undefined")c[b]=u;c.removeAttribute(b)}}return k}}(),G={}.hasOwnProperty,R;R=
17
+ typeof G!=="undefined"&&typeof G.call!=="undefined"?function(a,b){return G.call(a,b)}:function(a,b){return b in a&&typeof a.constructor.prototype[b]==="undefined"};d.flexbox=function(){var a=e.createElement("div"),b=e.createElement("div");(function(k,g,r,x){g+=":";k.style.cssText=(g+q.join(r+";"+g)).slice(0,-g.length)+(x||"")})(a,"display","box","width:42px;padding:0;");b.style.cssText=q.join("box-flex:1;")+"width:10px;";a.appendChild(b);l.appendChild(a);var c=b.offsetWidth===42;a.removeChild(b);
18
+ l.removeChild(a);return c};d.canvas=function(){var a=e.createElement("canvas");return!!(a.getContext&&a.getContext("2d"))};d.canvastext=function(){return!!(f.canvas&&typeof e.createElement("canvas").getContext("2d").fillText=="function")};d.webgl=function(){var a=e.createElement("canvas");try{if(a.getContext("webgl"))return true}catch(b){}try{if(a.getContext("experimental-webgl"))return true}catch(c){}return false};d.touch=function(){return"ontouchstart"in i||Q("@media ("+q.join("touch-enabled),(")+
19
+ "modernizr)")};d.geolocation=function(){return!!navigator.geolocation};d.postmessage=function(){return!!i.postMessage};d.websqldatabase=function(){return!!i.openDatabase};d.indexedDB=function(){for(var a=-1,b=F.length;++a<b;){var c=F[a].toLowerCase();if(i[c+"_indexedDB"]||i[c+"IndexedDB"])return true}return false};d.hashchange=function(){return o("hashchange",i)&&(document.documentMode===u||document.documentMode>7)};d.history=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return o("drag")&&
20
+ o("dragstart")&&o("dragenter")&&o("dragover")&&o("dragleave")&&o("dragend")&&o("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){j.cssText="background-color:rgba(150,255,150,.5)";return s(j.backgroundColor,"rgba")};d.hsla=function(){j.cssText="background-color:hsla(120,40%,100%,.5)";return s(j.backgroundColor,"rgba")||s(j.backgroundColor,"hsla")};d.multiplebgs=function(){j.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(j.background)};d.backgroundsize=
21
+ function(){return n("backgroundSize")};d.borderimage=function(){return n("borderImage")};d.borderradius=function(){return n("borderRadius","",function(a){return s(a,"orderRadius")})};d.boxshadow=function(){return n("boxShadow")};d.textshadow=function(){return e.createElement("div").style.textShadow===""};d.opacity=function(){var a=q.join("opacity:.5;")+"";j.cssText=a;return s(j.opacity,"0.5")};d.cssanimations=function(){return n("animationName")};d.csscolumns=function(){return n("columnCount")};d.cssgradients=
22
+ function(){var a=("background-image:"+q.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+q.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);j.cssText=a;return s(j.backgroundImage,"gradient")};d.cssreflections=function(){return n("boxReflect")};d.csstransforms=function(){return!!D(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!D(["perspectiveProperty","WebkitPerspective",
23
+ "MozPerspective","OPerspective","msPerspective"]);if(a)a=Q("@media ("+q.join("transform-3d),(")+"modernizr)");return a};d.csstransitions=function(){return n("transitionProperty")};d.fontface=function(){var a,b=e.head||e.getElementsByTagName("head")[0]||l,c=e.createElement("style"),k=e.implementation||{hasFeature:function(){return false}};c.type="text/css";b.insertBefore(c,b.firstChild);a=c.sheet||c.styleSheet;b=k.hasFeature("CSS2","")?function(g){if(!(a&&g))return false;var r=false;try{a.insertRule(g,
24
+ 0);r=!/unknown/i.test(a.cssRules[0].cssText);a.deleteRule(a.cssRules.length-1)}catch(x){}return r}:function(g){if(!(a&&g))return false;a.cssText=g;return a.cssText.length!==0&&!/unknown/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(g.split(" ")[0])===0};f._fontfaceready=function(g){g(f.fontface)};return b('@font-face { font-family: "font"; src: "font.ttf"; }')};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');
25
+ b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"')||a.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b};d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localstorage=function(){try{return"localStorage"in
26
+ i&&i.localStorage!==null}catch(a){return false}};d.sessionstorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webWorkers=function(){return!!i.Worker};d.applicationcache=function(){return!!i.applicationCache};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS(v.svg,"svg").createSVGRect};d.inlinesvg=function(){var a=document.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==v.svg};d.smil=function(){return!!e.createElementNS&&
27
+ /SVG/.test(O.call(e.createElementNS(v.svg,"animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(O.call(e.createElementNS(v.svg,"clipPath")))};for(var H in d)if(R(d,H)){w=H.toLowerCase();f[w]=d[H]();P.push((f[w]?"":"no-")+w)}f.input||S();f.crosswindowmessaging=f.postmessage;f.historymanagement=f.history;f.addTest=function(a,b){a=a.toLowerCase();if(!f[a]){b=!!b();l.className+=" "+(b?"":"no-")+a;f[a]=b;return f}};j.cssText="";E=h=null;i.attachEvent&&function(){var a=e.createElement("div");
28
+ a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function c(p){for(var m=-1;++m<r;)p.createElement(g[m])}function k(p,m){for(var I=p.length,t=-1,y,J=[];++t<I;){y=p[t];m=y.media||m;J.push(k(y.imports,m));J.push(y.cssText)}return J.join("")}var g="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video".split("|"),r=g.length,x=RegExp("<(/*)(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)",
29
+ "gi"),T=RegExp("\\b(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)\\b(?!.*[;}])","gi"),z=b.createDocumentFragment(),A=b.documentElement,K=A.firstChild,B=b.createElement("style"),C=b.createElement("body");B.media="all";c(b);c(z);a.attachEvent("onbeforeprint",function(){for(var p=-1;++p<r;)for(var m=b.getElementsByTagName(g[p]),I=m.length,t=-1;++t<I;)if(m[t].className.indexOf("iepp_")<0)m[t].className+=" iepp_"+
30
30
  g[p];K.insertBefore(B,K.firstChild);B.styleSheet.cssText=k(b.styleSheets,"all").replace(T,".iepp_$1");z.appendChild(b.body);A.appendChild(C);C.innerHTML=z.firstChild.innerHTML.replace(x,"<$1bdo")});a.attachEvent("onafterprint",function(){C.innerHTML="";A.removeChild(C);K.removeChild(B);A.appendChild(z.firstChild)})}(this,document);f._enableHTML5=true;f._version="1.6";l.className=l.className.replace(/\bno-js\b/,"")+" js";l.className+=" "+P.join(" ");return f}(this,this.document);
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: da-suspenders
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease:
4
+ hash: 19
5
+ prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - thoughtbot
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-02-16 00:00:00 +01:00
19
+ date: 2011-06-10 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -101,6 +101,7 @@ files:
101
101
  - template/trout/app/views/layouts/application.html.erb
102
102
  - template/trout/app/views/shared/_flashes.html.erb
103
103
  - template/trout/config/initializers/errors.rb
104
+ - template/trout/config/initializers/will_paginate.rb
104
105
  - template/trout/config/locales/de.yml
105
106
  - template/trout/features/step_definitions/js_steps.rb
106
107
  - template/trout/lib/templates/erb/scaffold/_form.html.erb
@@ -138,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
139
  requirements: []
139
140
 
140
141
  rubyforge_project:
141
- rubygems_version: 1.5.0
142
+ rubygems_version: 1.3.7
142
143
  signing_key:
143
144
  specification_version: 3
144
145
  summary: Generate a Rails app using DIE ANTWORT's best practices.