frontend-helpers 0.0.1.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/Gemfile +18 -0
  2. data/Gemfile.lock +108 -0
  3. data/LICENSE.txt +20 -0
  4. data/MIT-LICENSE +20 -0
  5. data/README.md +97 -0
  6. data/Rakefile +53 -0
  7. data/config/services.yml +95 -0
  8. data/config/settings.yml +24 -0
  9. data/frontend-helpers.gemspec +117 -0
  10. data/lib/.DS_Store +0 -0
  11. data/lib/asset-helpers/rails.rb +4 -0
  12. data/lib/frontend-helpers/html5_helper.rb +19 -0
  13. data/lib/frontend-helpers/metatag_helper.rb +58 -0
  14. data/lib/frontend-helpers/services_helper.rb +89 -0
  15. data/lib/frontend-helpers.rb +16 -0
  16. data/lib/generators/frontend/install/install_generator.rb +27 -0
  17. data/lib/tasks/frontend-helpers_tasks.rake +4 -0
  18. data/script/rails +6 -0
  19. data/test/dummy/Rakefile +7 -0
  20. data/test/dummy/app/assets/javascripts/application.js +9 -0
  21. data/test/dummy/app/assets/stylesheets/application.css +7 -0
  22. data/test/dummy/app/controllers/application_controller.rb +3 -0
  23. data/test/dummy/app/helpers/application_helper.rb +2 -0
  24. data/test/dummy/app/mailers/.gitkeep +0 -0
  25. data/test/dummy/app/models/.gitkeep +0 -0
  26. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  27. data/test/dummy/config/application.rb +42 -0
  28. data/test/dummy/config/boot.rb +10 -0
  29. data/test/dummy/config/database.yml +25 -0
  30. data/test/dummy/config/environment.rb +5 -0
  31. data/test/dummy/config/environments/development.rb +27 -0
  32. data/test/dummy/config/environments/production.rb +54 -0
  33. data/test/dummy/config/environments/test.rb +39 -0
  34. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  35. data/test/dummy/config/initializers/inflections.rb +10 -0
  36. data/test/dummy/config/initializers/mime_types.rb +5 -0
  37. data/test/dummy/config/initializers/secret_token.rb +7 -0
  38. data/test/dummy/config/initializers/session_store.rb +8 -0
  39. data/test/dummy/config/initializers/wrap_parameters.rb +12 -0
  40. data/test/dummy/config/locales/en.yml +5 -0
  41. data/test/dummy/config/routes.rb +58 -0
  42. data/test/dummy/config.ru +4 -0
  43. data/test/dummy/log/.gitkeep +0 -0
  44. data/test/dummy/public/404.html +26 -0
  45. data/test/dummy/public/422.html +26 -0
  46. data/test/dummy/public/500.html +26 -0
  47. data/test/dummy/public/favicon.ico +0 -0
  48. data/test/dummy/script/rails +6 -0
  49. data/test/frontend-helpers_test.rb +11 -0
  50. data/test/test_helper.rb +10 -0
  51. data/vendor/assets/javascripts/backbone/backbone.js +1149 -0
  52. data/vendor/assets/javascripts/backbone/index.js +2 -0
  53. data/vendor/assets/javascripts/backbone/underscore.js +807 -0
  54. data/vendor/assets/javascripts/ie/dd_belatedpng.js +13 -0
  55. data/vendor/assets/javascripts/ie/index.js +2 -0
  56. data/vendor/assets/javascripts/ie/reverse_zindex.js +1 -0
  57. data/vendor/assets/javascripts/jquery.async.js +77 -0
  58. data/vendor/assets/javascripts/jquery.cookie.js +89 -0
  59. data/vendor/assets/javascripts/jquery.lifestream.js +1516 -0
  60. data/vendor/assets/javascripts/jquery.validate.js +1166 -0
  61. data/vendor/assets/javascripts/log.js +8 -0
  62. data/vendor/assets/javascripts/modernizr.js +1116 -0
  63. data/vendor/assets/javascripts/shortcut.js +223 -0
  64. data/vendor/assets/javascripts/swfobject.js +4 -0
  65. data/vendor/assets/stylesheets/reset.css.sass +183 -0
  66. data/vendor/assets/stylesheets/variables.css.sass +21 -0
  67. metadata +175 -0
@@ -0,0 +1,223 @@
1
+ /**
2
+ * http://www.openjs.com/scripts/events/keyboard_shortcuts/
3
+ * Version : 2.01.B
4
+ * By Binny V A
5
+ * License : BSD
6
+ */
7
+ shortcut = {
8
+ 'all_shortcuts':{},//All the shortcuts are stored in this array
9
+ 'add': function(shortcut_combination,callback,opt) {
10
+ //Provide a set of default options
11
+ var default_options = {
12
+ 'type':'keydown',
13
+ 'propagate':false,
14
+ 'disable_in_input':false,
15
+ 'target':document,
16
+ 'keycode':false
17
+ }
18
+ if(!opt) opt = default_options;
19
+ else {
20
+ for(var dfo in default_options) {
21
+ if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo];
22
+ }
23
+ }
24
+
25
+ var ele = opt.target;
26
+ if(typeof opt.target == 'string') ele = document.getElementById(opt.target);
27
+ var ths = this;
28
+ shortcut_combination = shortcut_combination.toLowerCase();
29
+
30
+ //The function to be called at keypress
31
+ var func = function(e) {
32
+ e = e || window.event;
33
+
34
+ if(opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields
35
+ var element;
36
+ if(e.target) element=e.target;
37
+ else if(e.srcElement) element=e.srcElement;
38
+ if(element.nodeType==3) element=element.parentNode;
39
+
40
+ if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return;
41
+ }
42
+
43
+ //Find Which key is pressed
44
+ if (e.keyCode) code = e.keyCode;
45
+ else if (e.which) code = e.which;
46
+ var character = String.fromCharCode(code).toLowerCase();
47
+
48
+ if(code == 188) character=","; //If the user presses , when the type is onkeydown
49
+ if(code == 190) character="."; //If the user presses , when the type is onkeydown
50
+
51
+ var keys = shortcut_combination.split("+");
52
+ //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked
53
+ var kp = 0;
54
+
55
+ //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken
56
+ var shift_nums = {
57
+ "`":"~",
58
+ "1":"!",
59
+ "2":"@",
60
+ "3":"#",
61
+ "4":"$",
62
+ "5":"%",
63
+ "6":"^",
64
+ "7":"&",
65
+ "8":"*",
66
+ "9":"(",
67
+ "0":")",
68
+ "-":"_",
69
+ "=":"+",
70
+ ";":":",
71
+ "'":"\"",
72
+ ",":"<",
73
+ ".":">",
74
+ "/":"?",
75
+ "\\":"|"
76
+ }
77
+ //Special Keys - and their codes
78
+ var special_keys = {
79
+ 'esc':27,
80
+ 'escape':27,
81
+ 'tab':9,
82
+ 'space':32,
83
+ 'return':13,
84
+ 'enter':13,
85
+ 'backspace':8,
86
+
87
+ 'scrolllock':145,
88
+ 'scroll_lock':145,
89
+ 'scroll':145,
90
+ 'capslock':20,
91
+ 'caps_lock':20,
92
+ 'caps':20,
93
+ 'numlock':144,
94
+ 'num_lock':144,
95
+ 'num':144,
96
+
97
+ 'pause':19,
98
+ 'break':19,
99
+
100
+ 'insert':45,
101
+ 'home':36,
102
+ 'delete':46,
103
+ 'end':35,
104
+
105
+ 'pageup':33,
106
+ 'page_up':33,
107
+ 'pu':33,
108
+
109
+ 'pagedown':34,
110
+ 'page_down':34,
111
+ 'pd':34,
112
+
113
+ 'left':37,
114
+ 'up':38,
115
+ 'right':39,
116
+ 'down':40,
117
+
118
+ 'f1':112,
119
+ 'f2':113,
120
+ 'f3':114,
121
+ 'f4':115,
122
+ 'f5':116,
123
+ 'f6':117,
124
+ 'f7':118,
125
+ 'f8':119,
126
+ 'f9':120,
127
+ 'f10':121,
128
+ 'f11':122,
129
+ 'f12':123
130
+ }
131
+
132
+ var modifiers = {
133
+ shift: { wanted:false, pressed:false},
134
+ ctrl : { wanted:false, pressed:false},
135
+ alt : { wanted:false, pressed:false},
136
+ meta : { wanted:false, pressed:false} //Meta is Mac specific
137
+ };
138
+
139
+ if(e.ctrlKey) modifiers.ctrl.pressed = true;
140
+ if(e.shiftKey) modifiers.shift.pressed = true;
141
+ if(e.altKey) modifiers.alt.pressed = true;
142
+ if(e.metaKey) modifiers.meta.pressed = true;
143
+
144
+ for(var i=0; k=keys[i],i<keys.length; i++) {
145
+ //Modifiers
146
+ if(k == 'ctrl' || k == 'control') {
147
+ kp++;
148
+ modifiers.ctrl.wanted = true;
149
+
150
+ } else if(k == 'shift') {
151
+ kp++;
152
+ modifiers.shift.wanted = true;
153
+
154
+ } else if(k == 'alt') {
155
+ kp++;
156
+ modifiers.alt.wanted = true;
157
+ } else if(k == 'meta') {
158
+ kp++;
159
+ modifiers.meta.wanted = true;
160
+ } else if(k.length > 1) { //If it is a special key
161
+ if(special_keys[k] == code) kp++;
162
+
163
+ } else if(opt['keycode']) {
164
+ if(opt['keycode'] == code) kp++;
165
+
166
+ } else { //The special keys did not match
167
+ if(character == k) kp++;
168
+ else {
169
+ if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase
170
+ character = shift_nums[character];
171
+ if(character == k) kp++;
172
+ }
173
+ }
174
+ }
175
+ }
176
+
177
+ if(kp == keys.length &&
178
+ modifiers.ctrl.pressed == modifiers.ctrl.wanted &&
179
+ modifiers.shift.pressed == modifiers.shift.wanted &&
180
+ modifiers.alt.pressed == modifiers.alt.wanted &&
181
+ modifiers.meta.pressed == modifiers.meta.wanted) {
182
+ callback(e);
183
+
184
+ if(!opt['propagate']) { //Stop the event
185
+ //e.cancelBubble is supported by IE - this will kill the bubbling process.
186
+ e.cancelBubble = true;
187
+ e.returnValue = false;
188
+
189
+ //e.stopPropagation works in Firefox.
190
+ if (e.stopPropagation) {
191
+ e.stopPropagation();
192
+ e.preventDefault();
193
+ }
194
+ return false;
195
+ }
196
+ }
197
+ }
198
+ this.all_shortcuts[shortcut_combination] = {
199
+ 'callback':func,
200
+ 'target':ele,
201
+ 'event': opt['type']
202
+ };
203
+ //Attach the function with the event
204
+ if(ele.addEventListener) ele.addEventListener(opt['type'], func, false);
205
+ else if(ele.attachEvent) ele.attachEvent('on'+opt['type'], func);
206
+ else ele['on'+opt['type']] = func;
207
+ },
208
+
209
+ //Remove the shortcut - just specify the shortcut and I will remove the binding
210
+ 'remove':function(shortcut_combination) {
211
+ shortcut_combination = shortcut_combination.toLowerCase();
212
+ var binding = this.all_shortcuts[shortcut_combination];
213
+ delete(this.all_shortcuts[shortcut_combination])
214
+ if(!binding) return;
215
+ var type = binding['event'];
216
+ var ele = binding['target'];
217
+ var callback = binding['callback'];
218
+
219
+ if(ele.detachEvent) ele.detachEvent('on'+type, callback);
220
+ else if(ele.removeEventListener) ele.removeEventListener(type, callback, false);
221
+ else ele['on'+type] = false;
222
+ }
223
+ }
@@ -0,0 +1,4 @@
1
+ /* SWFObject v2.2 <http://code.google.com/p/swfobject/>
2
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
3
+ */
4
+ var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
@@ -0,0 +1,183 @@
1
+ html, body, div, span, object, iframe,
2
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3
+ abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
4
+ small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
5
+ fieldset, form, label, legend,
6
+ table, caption, tbody, tfoot, thead, tr, th, td,
7
+ article, aside, canvas, details, figcaption, figure,
8
+ footer, header, hgroup, menu, nav, section, summary,
9
+ time, mark, audio, video
10
+ margin: 0
11
+ padding: 0
12
+ border: 0
13
+ font-size: 100%
14
+ font: inherit
15
+ vertical-align: baseline
16
+
17
+ article, aside, details, figcaption, figure,
18
+ footer, header, hgroup, menu, nav, section
19
+ display: block
20
+
21
+ blockquote, q
22
+ quotes: none
23
+
24
+ blockquote:before, blockquote:after,
25
+ q:before, q:after
26
+ content: ""
27
+ content: none
28
+
29
+ ins
30
+ background-color: #ff9
31
+ color: #000
32
+ text-decoration: none
33
+
34
+ mark
35
+ background-color: #ff9
36
+ color: #000
37
+ font-style: italic
38
+ font-weight: bold
39
+
40
+ del
41
+ text-decoration: line-through
42
+
43
+ abbr[title], dfn[title]
44
+ border-bottom: 1px dotted
45
+ cursor: help
46
+
47
+ table
48
+ border-collapse: collapse
49
+ border-spacing: 0
50
+
51
+ hr
52
+ display: block
53
+ height: 1px
54
+ border: 0
55
+ border-top: 1px solid #ccc
56
+ margin: 1em 0
57
+ padding: 0
58
+
59
+ input, select
60
+ vertical-align: middle
61
+
62
+ body
63
+ font-family: $primary-font-family
64
+ font-size: $base-font-size
65
+ line-height: $base-line-height
66
+
67
+ select, input, textarea, button
68
+ font-family: $primary-font-family
69
+ font-size: 99%
70
+
71
+ pre, code, kbd, samp
72
+ font-family: monospace, sans-serif
73
+
74
+ html
75
+ overflow-y: scroll
76
+
77
+ a:hover, a:active
78
+ outline: none
79
+
80
+ ul, ol
81
+ margin-left: 2em
82
+
83
+ ol
84
+ list-style-type: decimal
85
+
86
+ nav ul, nav li
87
+ margin: 0
88
+ list-style: none
89
+ list-style-image: none
90
+
91
+ small
92
+ font-size: 85%
93
+
94
+ strong, th
95
+ font-weight: bold
96
+
97
+ td
98
+ vertical-align: top
99
+
100
+ sub, sup
101
+ font-size: 75%
102
+ line-height: 0
103
+ position: relative
104
+
105
+ sup
106
+ top: -0.5em
107
+
108
+ sub
109
+ bottom: -0.25em
110
+
111
+ pre
112
+ white-space: pre
113
+ white-space: pre-wrap
114
+ word-wrap: break-word
115
+ padding: 15px
116
+
117
+ textarea
118
+ overflow: auto
119
+
120
+ .ie6 legend, .ie7 legend
121
+ margin-left: -7px
122
+
123
+ input[type="radio"]
124
+ vertical-align: text-bottom
125
+
126
+ input[type="checkbox"]
127
+ vertical-align: bottom
128
+
129
+ .ie7 input[type="checkbox"]
130
+ vertical-align: baseline
131
+
132
+ .ie6 input
133
+ vertical-align: text-bottom
134
+
135
+ label, input[type="button"], input[type="submit"], input[type="image"], button
136
+ cursor: pointer
137
+
138
+ button, input, select, textarea
139
+ margin: 0
140
+
141
+ input:valid, textarea:valid
142
+
143
+ input:invalid, textarea:invalid
144
+ border-radius: 1px
145
+ -moz-box-shadow: 0px 0px 5px $invalid
146
+ -webkit-box-shadow: 0px 0px 5px $invalid
147
+ box-shadow: 0px 0px 5px $invalid
148
+
149
+ .no-boxshadow input:invalid, .no-boxshadow textarea:invalid
150
+ background-color: $invalid
151
+
152
+
153
+ ::-moz-selection
154
+ background: $primary-color
155
+ color: $lightest
156
+ text-shadow: none
157
+
158
+ ::selection
159
+ background: $primary-color
160
+ color: $lightest
161
+ text-shadow: none
162
+
163
+ a:link
164
+ -webkit-tap-highlight-color: $primary-color
165
+
166
+ button
167
+ width: auto
168
+ overflow: visible
169
+
170
+ .ie7 img
171
+ -ms-interpolation-mode: bicubic
172
+
173
+ body, select, input, textarea
174
+ color: $tertiary-color
175
+
176
+ h1, h2, h3, h4, h5, h6
177
+ font-weight: bold
178
+
179
+ a, a:active, a:visited
180
+ color: $secondary-color
181
+
182
+ a:hover
183
+ color: $secondary-darker
@@ -0,0 +1,21 @@
1
+ $primary-color: #ee4c9b
2
+ $primary-darker: #b8337a
3
+
4
+ $secondary-color: #25aae1
5
+ $secondary-darker: #0e76bc
6
+
7
+ $tertiary-color: #6d6e71
8
+ $tertiary-darker: #404041
9
+
10
+ $invalid: #f0dddd
11
+
12
+ $darkest: #000
13
+ $lightest: #fff
14
+
15
+ $spacing: 10px
16
+
17
+ $base-font-size: 13px
18
+ $base-line-height: 1.231
19
+
20
+ $primary-font-family: unquote("Helvetica, Arial, sans-serif")
21
+ $secodary-font-family: unquote("Georgia, Times, serif")
metadata ADDED
@@ -0,0 +1,175 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: frontend-helpers
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1.beta.1
5
+ prerelease: 6
6
+ platform: ruby
7
+ authors:
8
+ - Christopher Hein
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-07-10 00:00:00.000000000 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rails
17
+ requirement: &2160497800 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: 3.1.0.rc4
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *2160497800
26
+ - !ruby/object:Gem::Dependency
27
+ name: haml-rails
28
+ requirement: &2160496080 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 0.3.4
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: *2160496080
37
+ - !ruby/object:Gem::Dependency
38
+ name: sass-rails
39
+ requirement: &2160495040 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: 3.1.0.rc
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: *2160495040
48
+ - !ruby/object:Gem::Dependency
49
+ name: sprockets
50
+ requirement: &2160494400 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ version: 2.0.0.beta.10
56
+ type: :runtime
57
+ prerelease: false
58
+ version_requirements: *2160494400
59
+ - !ruby/object:Gem::Dependency
60
+ name: jeweler
61
+ requirement: &2160493260 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ~>
65
+ - !ruby/object:Gem::Version
66
+ version: 1.6.4
67
+ type: :development
68
+ prerelease: false
69
+ version_requirements: *2160493260
70
+ description: Large collection of useful Rails 3.1 helpers for SEO, Metatags, Facebook
71
+ OG tags, integration for analytics services like google, woopra, olark, mixpanel
72
+ and much much more...
73
+ email: me@christopherhein.com
74
+ executables: []
75
+ extensions: []
76
+ extra_rdoc_files:
77
+ - LICENSE.txt
78
+ - README.md
79
+ files:
80
+ - Gemfile
81
+ - Gemfile.lock
82
+ - LICENSE.txt
83
+ - MIT-LICENSE
84
+ - README.md
85
+ - Rakefile
86
+ - config/services.yml
87
+ - config/settings.yml
88
+ - frontend-helpers.gemspec
89
+ - lib/.DS_Store
90
+ - lib/asset-helpers/rails.rb
91
+ - lib/frontend-helpers.rb
92
+ - lib/frontend-helpers/html5_helper.rb
93
+ - lib/frontend-helpers/metatag_helper.rb
94
+ - lib/frontend-helpers/services_helper.rb
95
+ - lib/generators/frontend/install/install_generator.rb
96
+ - lib/tasks/frontend-helpers_tasks.rake
97
+ - script/rails
98
+ - test/dummy/Rakefile
99
+ - test/dummy/app/assets/javascripts/application.js
100
+ - test/dummy/app/assets/stylesheets/application.css
101
+ - test/dummy/app/controllers/application_controller.rb
102
+ - test/dummy/app/helpers/application_helper.rb
103
+ - test/dummy/app/mailers/.gitkeep
104
+ - test/dummy/app/models/.gitkeep
105
+ - test/dummy/app/views/layouts/application.html.erb
106
+ - test/dummy/config.ru
107
+ - test/dummy/config/application.rb
108
+ - test/dummy/config/boot.rb
109
+ - test/dummy/config/database.yml
110
+ - test/dummy/config/environment.rb
111
+ - test/dummy/config/environments/development.rb
112
+ - test/dummy/config/environments/production.rb
113
+ - test/dummy/config/environments/test.rb
114
+ - test/dummy/config/initializers/backtrace_silencers.rb
115
+ - test/dummy/config/initializers/inflections.rb
116
+ - test/dummy/config/initializers/mime_types.rb
117
+ - test/dummy/config/initializers/secret_token.rb
118
+ - test/dummy/config/initializers/session_store.rb
119
+ - test/dummy/config/initializers/wrap_parameters.rb
120
+ - test/dummy/config/locales/en.yml
121
+ - test/dummy/config/routes.rb
122
+ - test/dummy/log/.gitkeep
123
+ - test/dummy/public/404.html
124
+ - test/dummy/public/422.html
125
+ - test/dummy/public/500.html
126
+ - test/dummy/public/favicon.ico
127
+ - test/dummy/script/rails
128
+ - test/frontend-helpers_test.rb
129
+ - test/test_helper.rb
130
+ - vendor/assets/javascripts/backbone/backbone.js
131
+ - vendor/assets/javascripts/backbone/index.js
132
+ - vendor/assets/javascripts/backbone/underscore.js
133
+ - vendor/assets/javascripts/ie/dd_belatedpng.js
134
+ - vendor/assets/javascripts/ie/index.js
135
+ - vendor/assets/javascripts/ie/reverse_zindex.js
136
+ - vendor/assets/javascripts/jquery.async.js
137
+ - vendor/assets/javascripts/jquery.cookie.js
138
+ - vendor/assets/javascripts/jquery.lifestream.js
139
+ - vendor/assets/javascripts/jquery.validate.js
140
+ - vendor/assets/javascripts/log.js
141
+ - vendor/assets/javascripts/modernizr.js
142
+ - vendor/assets/javascripts/shortcut.js
143
+ - vendor/assets/javascripts/swfobject.js
144
+ - vendor/assets/stylesheets/reset.css.sass
145
+ - vendor/assets/stylesheets/variables.css.sass
146
+ has_rdoc: true
147
+ homepage: http://github.com/christopherhein/frontend-helpers
148
+ licenses:
149
+ - MIT
150
+ post_install_message:
151
+ rdoc_options: []
152
+ require_paths:
153
+ - lib
154
+ required_ruby_version: !ruby/object:Gem::Requirement
155
+ none: false
156
+ requirements:
157
+ - - ! '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ segments:
161
+ - 0
162
+ hash: 3543253954648120841
163
+ required_rubygems_version: !ruby/object:Gem::Requirement
164
+ none: false
165
+ requirements:
166
+ - - ! '>'
167
+ - !ruby/object:Gem::Version
168
+ version: 1.3.1
169
+ requirements: []
170
+ rubyforge_project:
171
+ rubygems_version: 1.6.2
172
+ signing_key:
173
+ specification_version: 3
174
+ summary: Collection of useful frontend helpers for Rails 3.1 applications.
175
+ test_files: []