corkboard 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.env.template +1 -0
- data/.gitignore +15 -0
- data/.rspec.template +2 -0
- data/.rvmrc.template +4 -0
- data/.wiprc +0 -0
- data/.yardopts +1 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +223 -0
- data/app/assets/images/corkboard/.gitkeep +0 -0
- data/corkboard.gemspec +41 -0
- data/lib/corkboard/version.rb +1 -1
- data/script/rails +8 -0
- data/spec/controllers/corkboard/application_controller_spec.rb +7 -0
- data/spec/controllers/corkboard/authorizations_controller_spec.rb +26 -0
- data/spec/controllers/corkboard/board_controller_spec.rb +29 -0
- data/spec/controllers/corkboard/posts_controller_spec.rb +7 -0
- data/spec/corkboard/client_spec.rb +52 -0
- data/spec/corkboard/clients/instagram_spec.rb +30 -0
- data/spec/corkboard/engine_spec.rb +11 -0
- data/spec/corkboard/provider_spec.rb +28 -0
- data/spec/corkboard/providers/instagram_spec.rb +44 -0
- data/spec/corkboard/publishers/mock_spec.rb +12 -0
- data/spec/corkboard/publishers/pusher_spec.rb +12 -0
- data/spec/corkboard/service/config_spec.rb +12 -0
- data/spec/corkboard_spec.rb +136 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +65 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/corkboard.rb +45 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/jasmine.rb +5 -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/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/db/.gitkeep +0 -0
- data/spec/dummy/db/migrate/20121212222912_create_corkboard_authorizations.corkboard.rb +18 -0
- data/spec/dummy/db/schema.rb +31 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/helpers/corkboard/application_helper_spec.rb +7 -0
- data/spec/javascripts/fixtures/board.html +3 -0
- data/spec/javascripts/helpers/jasmine-jquery.js +340 -0
- data/spec/javascripts/spec.css +3 -0
- data/spec/javascripts/spec.js +5 -0
- data/spec/javascripts/spec_helper.js +41 -0
- data/spec/javascripts/specs/corkboard/app/board_spec.js +68 -0
- data/spec/javascripts/specs/corkboard/base_spec.js +17 -0
- data/spec/javascripts/specs/corkboard/lib/publisher_spec.js +101 -0
- data/spec/javascripts/specs/corkboard/lib/weighted_randomizer_spec.js +23 -0
- data/spec/javascripts/specs/corkboard_spec.js +45 -0
- data/spec/javascripts/support/jasmine.yml +75 -0
- data/spec/javascripts/support/jasmine_config.rb +1 -0
- data/spec/models/corkboard/authorization_spec.rb +7 -0
- data/spec/models/corkboard/post_spec.rb +7 -0
- data/spec/models/corkboard/subscription_spec.rb +7 -0
- data/spec/requests/authorizations_spec.rb +39 -0
- data/spec/requests/board_spec.rb +70 -0
- data/spec/routing/authorizations_routing_spec.rb +25 -0
- data/spec/routing/board_routing_spec.rb +7 -0
- data/spec/routing/posts_routing_spec.rb +15 -0
- data/spec/spec_helper.rb +51 -0
- data/spec/support/helpers/config_helpers.rb +26 -0
- data/spec/support/helpers/controller_helpers.rb +12 -0
- data/spec/support/helpers/post_helpers.rb +119 -0
- data/vendor/assets/javascripts/jquery.masonry-extensions.js +203 -0
- data/vendor/assets/javascripts/jquery.masonry.js +499 -0
- data/vendor/assets/javascripts/modernizr.js +821 -0
- data/vendor/assets/javascripts/pusher.js +48 -0
- metadata +176 -11
@@ -0,0 +1,48 @@
|
|
1
|
+
/*!
|
2
|
+
* Pusher JavaScript Library v1.12.4
|
3
|
+
* http://pusherapp.com/
|
4
|
+
*
|
5
|
+
* Copyright 2011, Pusher
|
6
|
+
* Released under the MIT licence.
|
7
|
+
*/
|
8
|
+
|
9
|
+
(function(){if(Function.prototype.scopedTo===void 0)Function.prototype.scopedTo=function(a,b){var e=this;return function(){return e.apply(a,Array.prototype.slice.call(b||[]).concat(Array.prototype.slice.call(arguments)))}};var c=function(a,b){this.options=b||{};this.key=a;this.channels=new c.Channels;this.global_emitter=new c.EventsDispatcher;var e=this;this.checkAppKey();this.connection=new c.Connection(this.key,this.options);this.connection.bind("connected",function(){e.subscribeAll()}).bind("message",
|
10
|
+
function(b){var a=b.event.indexOf("pusher_internal:")===0;if(b.channel){var c;(c=e.channel(b.channel))&&c.emit(b.event,b.data)}a||e.global_emitter.emit(b.event,b.data)}).bind("disconnected",function(){e.channels.disconnect()}).bind("error",function(b){c.warn("Error",b)});c.instances.push(this);c.isReady&&e.connect()};c.instances=[];c.prototype={channel:function(a){return this.channels.find(a)},connect:function(){this.connection.connect()},disconnect:function(){this.connection.disconnect()},bind:function(a,
|
11
|
+
b){this.global_emitter.bind(a,b);return this},bind_all:function(a){this.global_emitter.bind_all(a);return this},subscribeAll:function(){for(channelName in this.channels.channels)this.channels.channels.hasOwnProperty(channelName)&&this.subscribe(channelName)},subscribe:function(a){var b=this,e=this.channels.add(a,this);this.connection.state==="connected"&&e.authorize(this.connection.socket_id,this.options,function(c,f){c?e.emit("pusher:subscription_error",f):b.send_event("pusher:subscribe",{channel:a,
|
12
|
+
auth:f.auth,channel_data:f.channel_data})});return e},unsubscribe:function(a){this.channels.remove(a);this.connection.state==="connected"&&this.send_event("pusher:unsubscribe",{channel:a})},send_event:function(a,b,e){return this.connection.send_event(a,b,e)},checkAppKey:function(){(this.key===null||this.key===void 0)&&c.warn("Warning","You must pass your app key when you instantiate Pusher.")}};c.Util={extend:function b(e,c){for(var f in c)e[f]=c[f]&&c[f].constructor&&c[f].constructor===Object?b(e[f]||
|
13
|
+
{},c[f]):c[f];return e},stringify:function(){for(var b=["Pusher"],e=0;e<arguments.length;e++)typeof arguments[e]==="string"?b.push(arguments[e]):window.JSON==void 0?b.push(arguments[e].toString()):b.push(JSON.stringify(arguments[e]));return b.join(" : ")},arrayIndexOf:function(b,e){var c=Array.prototype.indexOf;if(b==null)return-1;if(c&&b.indexOf===c)return b.indexOf(e);for(i=0,l=b.length;i<l;i++)if(b[i]===e)return i;return-1}};c.debug=function(){c.log&&c.log(c.Util.stringify.apply(this,arguments))};
|
14
|
+
c.warn=function(){window.console&&window.console.warn?window.console.warn(c.Util.stringify.apply(this,arguments)):c.log&&c.log(c.Util.stringify.apply(this,arguments))};c.VERSION="1.12.4";c.host="ws.pusherapp.com";c.ws_port=80;c.wss_port=443;c.sockjs_host="sockjs.pusher.com";c.sockjs_http_port=80;c.sockjs_https_port=443;c.sockjs_path="/pusher";c.channel_auth_endpoint="/pusher/auth";c.cdn_http="http://js.pusher.com/";c.cdn_https="https://d3dy5gmtp8yhk7.cloudfront.net/";c.dependency_suffix=".min";c.channel_auth_transport=
|
15
|
+
"ajax";c.activity_timeout=12E4;c.pong_timeout=3E4;c.isReady=!1;c.ready=function(){c.isReady=!0;for(var b=0,e=c.instances.length;b<e;b++)c.instances[b].connect()};this.Pusher=c}).call(this);
|
16
|
+
(function(){function c(){this._callbacks={}}function a(b){this.callbacks=new c;this.global_callbacks=[];this.failThrough=b}c.prototype.get=function(b){return this._callbacks[this._prefix(b)]};c.prototype.add=function(b,a){var c=this._prefix(b);this._callbacks[c]=this._callbacks[c]||[];this._callbacks[c].push(a)};c.prototype.remove=function(b,c){if(this.get(b)){var a=Pusher.Util.arrayIndexOf(this.get(b),c);this._callbacks[this._prefix(b)].splice(a,1)}};c.prototype._prefix=function(b){return"_"+b};
|
17
|
+
a.prototype.bind=function(b,c){this.callbacks.add(b,c);return this};a.prototype.unbind=function(b,c){this.callbacks.remove(b,c);return this};a.prototype.emit=function(b,c){for(var a=0;a<this.global_callbacks.length;a++)this.global_callbacks[a](b,c);var f=this.callbacks.get(b);if(f)for(a=0;a<f.length;a++)f[a](c);else this.failThrough&&this.failThrough(b,c);return this};a.prototype.bind_all=function(b){this.global_callbacks.push(b);return this};this.Pusher.EventsDispatcher=a}).call(this);
|
18
|
+
(function(){function c(b,c,a){if(c[b]!==void 0)c[b](a)}function a(c,a,f){b.EventsDispatcher.call(this);this.state=void 0;this.errors=[];this.stateActions=f;this.transitions=a;this.transition(c)}var b=this.Pusher;a.prototype.transition=function(a,g){var f=this.state,h=this.stateActions;if(f&&b.Util.arrayIndexOf(this.transitions[f],a)==-1)throw this.emit("invalid_transition_attempt",{oldState:f,newState:a}),Error("Invalid transition ["+f+" to "+a+"]");c(f+"Exit",h,g);c(f+"To"+(a.substr(0,1).toUpperCase()+
|
19
|
+
a.substr(1)),h,g);c(a+"Pre",h,g);this.state=a;this.emit("state_change",{oldState:f,newState:a});c(a+"Post",h,g)};a.prototype.is=function(b){return this.state===b};a.prototype.isNot=function(b){return this.state!==b};b.Util.extend(a.prototype,b.EventsDispatcher.prototype);this.Pusher.Machine=a}).call(this);
|
20
|
+
(function(){var c=function(){var a=this;Pusher.EventsDispatcher.call(this);window.addEventListener!==void 0&&(window.addEventListener("online",function(){a.emit("online",null)},!1),window.addEventListener("offline",function(){a.emit("offline",null)},!1))};c.prototype.isOnLine=function(){return window.navigator.onLine===void 0?!0:window.navigator.onLine};Pusher.Util.extend(c.prototype,Pusher.EventsDispatcher.prototype);this.Pusher.NetInfo=c}).call(this);
|
21
|
+
(function(){function c(a){a.connectionWait=0;a.openTimeout=b.TransportType==="native"?2E3:5E3;a.connectedTimeout=2E3;a.connectionSecure=a.compulsorySecure;a.connectionAttempts=0}function a(a,r){function k(){d.connectionWait<s&&(d.connectionWait+=g);d.openTimeout<t&&(d.openTimeout+=f);d.connectedTimeout<u&&(d.connectedTimeout+=h);if(d.compulsorySecure!==!0)d.connectionSecure=!d.connectionSecure;d.connectionAttempts++}function v(a){a=a||document.location.protocol==="https:";return(a?"wss://":"ws://")+
|
22
|
+
b.host+":"+(a?b.wss_port:b.ws_port)}function w(a){a=a||document.location.protocol==="https:";return(a?"https://":"http://")+b.sockjs_host+":"+(a?b.sockjs_https_port:b.sockjs_http_port)+b.sockjs_path}function m(){d._machine.transition("impermanentlyClosing")}function p(){d._activityTimer&&clearTimeout(d._activityTimer);if(d.ping)d._activityTimer=setTimeout(function(){d.send_event("pusher:ping",{});d._activityTimer=setTimeout(function(){d.socket.close()},d.options.pong_timeout||b.pong_timeout)},d.options.activity_timeout||
|
23
|
+
b.activity_timeout)}function x(){var b=d.connectionWait;if(b===0&&d.connectedAt){var a=(new Date).getTime()-d.connectedAt;a<1E3&&(b=1E3-a)}return b}function y(b){b=q(b);if(b!==void 0)if(b.event==="pusher:connection_established")d._machine.transition("connected",b.data.socket_id);else if(b.event==="pusher:error"){var a=b.data.code;d.emit("error",{type:"PusherError",data:{code:a,message:b.data.message}});a===4E3?(d.compulsorySecure=!0,d.connectionSecure=!0,d.options.encrypted=!0,m()):a<4100?d._machine.transition("permanentlyClosing"):
|
24
|
+
a<4200?(d.connectionWait=1E3,d._machine.transition("waiting")):a<4300?m():d._machine.transition("permanentlyClosing")}}function z(a){p();a=q(a);if(a!==void 0){b.debug("Event recd",a);switch(a.event){case "pusher:error":d.emit("error",{type:"PusherError",data:a.data});break;case "pusher:ping":d.send_event("pusher:pong",{})}d.emit("message",a)}}function q(b){try{var a=JSON.parse(b.data);if(typeof a.data==="string")try{a.data=JSON.parse(a.data)}catch(c){if(!(c instanceof SyntaxError))throw c;}return a}catch(e){d.emit("error",
|
25
|
+
{type:"MessageParseError",error:e,data:b.data})}}function n(){d._machine.transition("waiting")}function o(b){d.emit("error",{type:"WebSocketError",error:b})}function j(a,c){var e=d.state;d.state=a;e!==a&&(b.debug("State changed",e+" -> "+a),d.emit("state_change",{previous:e,current:a}),d.emit(a,c))}var d=this;b.EventsDispatcher.call(this);this.ping=!0;this.options=b.Util.extend({encrypted:!1},r);this.netInfo=new b.NetInfo;this.netInfo.bind("online",function(){d._machine.is("waiting")&&(d._machine.transition("connecting"),
|
26
|
+
j("connecting"))});this.netInfo.bind("offline",function(){if(d._machine.is("connected"))d.socket.onclose=void 0,d.socket.onmessage=void 0,d.socket.onerror=void 0,d.socket.onopen=void 0,d.socket.close(),d.socket=void 0,d._machine.transition("waiting")});this._machine=new b.Machine("initialized",e,{initializedPre:function(){d.compulsorySecure=d.options.encrypted;d.key=a;d.socket=null;d.socket_id=null;d.state="initialized"},waitingPre:function(){d.connectionWait>0&&d.emit("connecting_in",d.connectionWait);
|
27
|
+
d.netInfo.isOnLine()&&d.connectionAttempts<=4?j("connecting"):j("unavailable");if(d.netInfo.isOnLine())d._waitingTimer=setTimeout(function(){d._machine.transition("connecting")},x())},waitingExit:function(){clearTimeout(d._waitingTimer)},connectingPre:function(){if(d.netInfo.isOnLine()===!1)d._machine.transition("waiting"),j("unavailable");else{var a="/app/"+d.key+"?protocol=5&client=js&version="+b.VERSION+"&flash="+(b.TransportType==="flash"?"true":"false");if(b.TransportType==="sockjs"){b.debug("Connecting to sockjs",
|
28
|
+
b.sockjs);var c=w(d.connectionSecure);d.ping=!1;d.socket=new SockJS(c);d.socket.onopen=function(){d.socket.send(JSON.stringify({path:a}));d._machine.transition("open")}}else c=v(d.connectionSecure)+a,b.debug("Connecting",c),d.socket=new b.Transport(c),d.socket.onopen=function(){d._machine.transition("open")};d.socket.onclose=n;d.socket.onerror=o;d._connectingTimer=setTimeout(m,d.openTimeout)}},connectingExit:function(){clearTimeout(d._connectingTimer);d.socket.onopen=void 0},connectingToWaiting:function(){k()},
|
29
|
+
connectingToImpermanentlyClosing:function(){k()},openPre:function(){d.socket.onmessage=y;d.socket.onerror=o;d.socket.onclose=n;d._openTimer=setTimeout(m,d.connectedTimeout)},openExit:function(){clearTimeout(d._openTimer);d.socket.onmessage=void 0},openToWaiting:function(){k()},openToImpermanentlyClosing:function(){k()},connectedPre:function(b){d.socket_id=b;d.socket.onmessage=z;d.socket.onerror=o;d.socket.onclose=n;c(d);d.connectedAt=(new Date).getTime();p()},connectedPost:function(){j("connected")},
|
30
|
+
connectedExit:function(){d._activityTimer&&clearTimeout(d._activityTimer);j("disconnected")},impermanentlyClosingPost:function(){if(d.socket)d.socket.onclose=n,d.socket.close()},permanentlyClosingPost:function(){d.socket?(d.socket.onclose=function(){c(d);d._machine.transition("permanentlyClosed")},d.socket.close()):(c(d),d._machine.transition("permanentlyClosed"))},failedPre:function(){j("failed");b.debug("WebSockets are not available in this browser.")},permanentlyClosedPost:function(){j("disconnected")}})}
|
31
|
+
var b=this.Pusher,e={initialized:["waiting","failed"],waiting:["connecting","permanentlyClosed"],connecting:["open","permanentlyClosing","impermanentlyClosing","waiting"],open:["connected","permanentlyClosing","impermanentlyClosing","waiting"],connected:["permanentlyClosing","waiting"],impermanentlyClosing:["waiting","permanentlyClosing"],permanentlyClosing:["permanentlyClosed"],permanentlyClosed:["waiting","failed"],failed:["permanentlyClosed"]},g=2E3,f=2E3,h=2E3,s=5*g,t=5*f,u=5*h;a.prototype.connect=
|
32
|
+
function(){!this._machine.is("failed")&&!b.Transport?this._machine.transition("failed"):this._machine.is("initialized")?(c(this),this._machine.transition("waiting")):this._machine.is("waiting")&&this.netInfo.isOnLine()===!0?this._machine.transition("connecting"):this._machine.is("permanentlyClosed")&&(c(this),this._machine.transition("waiting"))};a.prototype.send=function(b){if(this._machine.is("connected")){var a=this;setTimeout(function(){a.socket.send(b)},0);return!0}else return!1};a.prototype.send_event=
|
33
|
+
function(a,c,e){a={event:a,data:c};e&&(a.channel=e);b.debug("Event sent",a);return this.send(JSON.stringify(a))};a.prototype.disconnect=function(){this._machine.is("permanentlyClosed")||(this._machine.is("waiting")||this._machine.is("failed")?this._machine.transition("permanentlyClosed"):this._machine.transition("permanentlyClosing"))};b.Util.extend(a.prototype,b.EventsDispatcher.prototype);this.Pusher.Connection=a}).call(this);
|
34
|
+
(function(){Pusher.Channels=function(){this.channels={}};Pusher.Channels.prototype={add:function(a,b){var c=this.find(a);c||(c=Pusher.Channel.factory(a,b),this.channels[a]=c);return c},find:function(a){return this.channels[a]},remove:function(a){delete this.channels[a]},disconnect:function(){for(var a in this.channels)this.channels[a].disconnect()}};Pusher.Channel=function(a,b){var c=this;Pusher.EventsDispatcher.call(this,function(b){Pusher.debug("No callbacks on "+a+" for "+b)});this.pusher=b;this.name=
|
35
|
+
a;this.subscribed=!1;this.bind("pusher_internal:subscription_succeeded",function(a){c.onSubscriptionSucceeded(a)})};Pusher.Channel.prototype={init:function(){},disconnect:function(){this.subscribed=!1;this.emit("pusher_internal:disconnected")},onSubscriptionSucceeded:function(){this.subscribed=!0;this.emit("pusher:subscription_succeeded")},authorize:function(a,b,c){return c(!1,{})},trigger:function(a,b){return this.pusher.send_event(a,b,this.name)}};Pusher.Util.extend(Pusher.Channel.prototype,Pusher.EventsDispatcher.prototype);
|
36
|
+
Pusher.Channel.PrivateChannel={authorize:function(a,b,c){var g=this;return(new Pusher.Channel.Authorizer(this,Pusher.channel_auth_transport,b)).authorize(a,function(a,b){a||g.emit("pusher_internal:authorized",b);c(a,b)})}};Pusher.Channel.PresenceChannel={init:function(){this.members=new c(this)},onSubscriptionSucceeded:function(){this.subscribed=!0}};var c=function(a){var b=this,c=function(){this._members_map={};this.count=0;this.me=null};c.call(this);a.bind("pusher_internal:authorized",function(c){var e=
|
37
|
+
JSON.parse(c.channel_data);a.bind("pusher_internal:subscription_succeeded",function(c){b._members_map=c.presence.hash;b.count=c.presence.count;b.me=b.get(e.user_id);a.emit("pusher:subscription_succeeded",b)})});a.bind("pusher_internal:member_added",function(c){b.get(c.user_id)===null&&b.count++;b._members_map[c.user_id]=c.user_info;a.emit("pusher:member_added",b.get(c.user_id))});a.bind("pusher_internal:member_removed",function(c){var e=b.get(c.user_id);e&&(delete b._members_map[c.user_id],b.count--,
|
38
|
+
a.emit("pusher:member_removed",e))});a.bind("pusher_internal:disconnected",function(){c.call(b)})};c.prototype={each:function(a){for(var b in this._members_map)a(this.get(b))},get:function(a){return this._members_map.hasOwnProperty(a)?{id:a,info:this._members_map[a]}:null}};Pusher.Channel.factory=function(a,b){var c=new Pusher.Channel(a,b);a.indexOf("private-")===0?Pusher.Util.extend(c,Pusher.Channel.PrivateChannel):a.indexOf("presence-")===0&&(Pusher.Util.extend(c,Pusher.Channel.PrivateChannel),
|
39
|
+
Pusher.Util.extend(c,Pusher.Channel.PresenceChannel));c.init();return c}}).call(this);
|
40
|
+
(function(){Pusher.Channel.Authorizer=function(c,a,b){this.channel=c;this.type=a;this.authOptions=(b||{}).auth||{}};Pusher.Channel.Authorizer.prototype={composeQuery:function(c){var c="&socket_id="+encodeURIComponent(c)+"&channel_name="+encodeURIComponent(this.channel.name),a;for(a in this.authOptions.params)c+="&"+encodeURIComponent(a)+"="+encodeURIComponent(this.authOptions.params[a]);return c},authorize:function(c,a){return Pusher.authorizers[this.type].call(this,c,a)}};Pusher.auth_callbacks={};
|
41
|
+
Pusher.authorizers={ajax:function(c,a){var b;b=Pusher.XHR?new Pusher.XHR:window.XMLHttpRequest?new window.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");b.open("POST",Pusher.channel_auth_endpoint,!0);b.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var e in this.authOptions.headers)b.setRequestHeader(e,this.authOptions.headers[e]);b.onreadystatechange=function(){if(b.readyState==4)if(b.status==200){var c,e=!1;try{c=JSON.parse(b.responseText),e=!0}catch(h){a(!0,"JSON returned from webapp was invalid, yet status code was 200. Data was: "+
|
42
|
+
b.responseText)}e&&a(!1,c)}else Pusher.warn("Couldn't get auth info from your webapp",b.status),a(!0,b.status)};b.send(this.composeQuery(c));return b},jsonp:function(c,a){this.authOptions.headers!==void 0&&Pusher.warn("Warn","To send headers with the auth request, you must use AJAX, rather than JSONP.");var b=document.createElement("script");Pusher.auth_callbacks[this.channel.name]=function(b){a(!1,b)};b.src=Pusher.channel_auth_endpoint+"?callback="+encodeURIComponent("Pusher.auth_callbacks['"+this.channel.name+
|
43
|
+
"']")+this.composeQuery(c);var e=document.getElementsByTagName("head")[0]||document.documentElement;e.insertBefore(b,e.firstChild)}}}).call(this);
|
44
|
+
var _require=function(){function c(a,c){document.addEventListener?a.addEventListener("load",c,!1):a.attachEvent("onreadystatechange",function(){(a.readyState=="loaded"||a.readyState=="complete")&&c()})}function a(a,e){var g=document.getElementsByTagName("head")[0],f=document.createElement("script");f.setAttribute("src",a);f.setAttribute("type","text/javascript");f.setAttribute("async",!0);c(f,function(){e()});g.appendChild(f)}return function(b,c){for(var g=0,f=0;f<b.length;f++)a(b[f],function(){b.length==
|
45
|
+
++g&&setTimeout(c,0)})}}();
|
46
|
+
(function(){!window.WebSocket&&window.MozWebSocket&&(window.WebSocket=window.MozWebSocket);if(window.WebSocket)Pusher.Transport=window.WebSocket,Pusher.TransportType="native";var c=(document.location.protocol=="http:"?Pusher.cdn_http:Pusher.cdn_https)+Pusher.VERSION,a=[];window.JSON||a.push(c+"/json2"+Pusher.dependency_suffix+".js");if(!window.WebSocket)window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION=!0,window.WEB_SOCKET_SUPPRESS_CROSS_DOMAIN_SWF_ERROR=!0,a.push(c+"/flashfallback"+Pusher.dependency_suffix+
|
47
|
+
".js");var b=function(){return window.WebSocket?function(){Pusher.ready()}:function(){window.WebSocket?(Pusher.Transport=window.WebSocket,Pusher.TransportType="flash",window.WEB_SOCKET_SWF_LOCATION=c+"/WebSocketMain.swf",WebSocket.__addTask(function(){Pusher.ready()}),WebSocket.__initialize()):(sockjsPath=c+"/sockjs"+Pusher.dependency_suffix+".js",_require([sockjsPath],function(){Pusher.Transport=SockJS;Pusher.TransportType="sockjs";Pusher.ready()}))}}(),e=function(a){var b=function(){document.body?
|
48
|
+
a():setTimeout(b,0)};b()},g=function(){e(b)};a.length>0?_require(a,g):g()})();
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: corkboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -338,12 +338,24 @@ executables: []
|
|
338
338
|
extensions: []
|
339
339
|
extra_rdoc_files: []
|
340
340
|
files:
|
341
|
+
- .env.template
|
342
|
+
- .gitignore
|
343
|
+
- .rspec.template
|
344
|
+
- .rvmrc.template
|
345
|
+
- .wiprc
|
346
|
+
- .yardopts
|
347
|
+
- Gemfile
|
348
|
+
- Gemfile.lock
|
349
|
+
- MIT-LICENSE
|
350
|
+
- README.md
|
351
|
+
- Rakefile
|
352
|
+
- app/assets/images/corkboard/.gitkeep
|
341
353
|
- app/assets/images/corkboard/image.png
|
354
|
+
- app/assets/javascripts/corkboard.js.erb
|
342
355
|
- app/assets/javascripts/corkboard/app/board.js
|
343
356
|
- app/assets/javascripts/corkboard/base.js
|
344
357
|
- app/assets/javascripts/corkboard/lib/publisher.js
|
345
358
|
- app/assets/javascripts/corkboard/lib/weighted_randomizer.js
|
346
|
-
- app/assets/javascripts/corkboard.js.erb
|
347
359
|
- app/assets/stylesheets/corkboard/application.css
|
348
360
|
- app/assets/stylesheets/corkboard/responsive.css
|
349
361
|
- app/controllers/corkboard/application_controller.rb
|
@@ -360,7 +372,9 @@ files:
|
|
360
372
|
- app/views/corkboard/board/show.html.erb
|
361
373
|
- app/views/layouts/corkboard/application.html.erb
|
362
374
|
- config/routes.rb
|
375
|
+
- corkboard.gemspec
|
363
376
|
- db/migrate/01_create_corkboard_authorizations.rb
|
377
|
+
- lib/corkboard.rb
|
364
378
|
- lib/corkboard/client.rb
|
365
379
|
- lib/corkboard/clients/instagram.rb
|
366
380
|
- lib/corkboard/engine.rb
|
@@ -370,14 +384,90 @@ files:
|
|
370
384
|
- lib/corkboard/publishers/pusher.rb
|
371
385
|
- lib/corkboard/service/config.rb
|
372
386
|
- lib/corkboard/version.rb
|
373
|
-
- lib/corkboard.rb
|
374
387
|
- lib/generators/corkboard/install_generator.rb
|
375
|
-
- lib/generators/corkboard/templates/initializer.rb
|
376
388
|
- lib/generators/corkboard/templates/README
|
389
|
+
- lib/generators/corkboard/templates/initializer.rb
|
377
390
|
- lib/tasks/corkboard_tasks.rake
|
378
|
-
-
|
379
|
-
-
|
380
|
-
-
|
391
|
+
- script/rails
|
392
|
+
- spec/controllers/corkboard/application_controller_spec.rb
|
393
|
+
- spec/controllers/corkboard/authorizations_controller_spec.rb
|
394
|
+
- spec/controllers/corkboard/board_controller_spec.rb
|
395
|
+
- spec/controllers/corkboard/posts_controller_spec.rb
|
396
|
+
- spec/corkboard/client_spec.rb
|
397
|
+
- spec/corkboard/clients/instagram_spec.rb
|
398
|
+
- spec/corkboard/engine_spec.rb
|
399
|
+
- spec/corkboard/provider_spec.rb
|
400
|
+
- spec/corkboard/providers/instagram_spec.rb
|
401
|
+
- spec/corkboard/publishers/mock_spec.rb
|
402
|
+
- spec/corkboard/publishers/pusher_spec.rb
|
403
|
+
- spec/corkboard/service/config_spec.rb
|
404
|
+
- spec/corkboard_spec.rb
|
405
|
+
- spec/dummy/README.rdoc
|
406
|
+
- spec/dummy/Rakefile
|
407
|
+
- spec/dummy/app/assets/javascripts/application.js
|
408
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
409
|
+
- spec/dummy/app/controllers/application_controller.rb
|
410
|
+
- spec/dummy/app/helpers/application_helper.rb
|
411
|
+
- spec/dummy/app/mailers/.gitkeep
|
412
|
+
- spec/dummy/app/models/.gitkeep
|
413
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
414
|
+
- spec/dummy/config.ru
|
415
|
+
- spec/dummy/config/application.rb
|
416
|
+
- spec/dummy/config/boot.rb
|
417
|
+
- spec/dummy/config/database.yml
|
418
|
+
- spec/dummy/config/environment.rb
|
419
|
+
- spec/dummy/config/environments/development.rb
|
420
|
+
- spec/dummy/config/environments/production.rb
|
421
|
+
- spec/dummy/config/environments/test.rb
|
422
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
423
|
+
- spec/dummy/config/initializers/corkboard.rb
|
424
|
+
- spec/dummy/config/initializers/inflections.rb
|
425
|
+
- spec/dummy/config/initializers/jasmine.rb
|
426
|
+
- spec/dummy/config/initializers/mime_types.rb
|
427
|
+
- spec/dummy/config/initializers/secret_token.rb
|
428
|
+
- spec/dummy/config/initializers/session_store.rb
|
429
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
430
|
+
- spec/dummy/config/locales/en.yml
|
431
|
+
- spec/dummy/config/routes.rb
|
432
|
+
- spec/dummy/db/.gitkeep
|
433
|
+
- spec/dummy/db/migrate/20121212222912_create_corkboard_authorizations.corkboard.rb
|
434
|
+
- spec/dummy/db/schema.rb
|
435
|
+
- spec/dummy/lib/assets/.gitkeep
|
436
|
+
- spec/dummy/log/.gitkeep
|
437
|
+
- spec/dummy/public/404.html
|
438
|
+
- spec/dummy/public/422.html
|
439
|
+
- spec/dummy/public/500.html
|
440
|
+
- spec/dummy/public/favicon.ico
|
441
|
+
- spec/dummy/script/rails
|
442
|
+
- spec/helpers/corkboard/application_helper_spec.rb
|
443
|
+
- spec/javascripts/fixtures/board.html
|
444
|
+
- spec/javascripts/helpers/jasmine-jquery.js
|
445
|
+
- spec/javascripts/spec.css
|
446
|
+
- spec/javascripts/spec.js
|
447
|
+
- spec/javascripts/spec_helper.js
|
448
|
+
- spec/javascripts/specs/corkboard/app/board_spec.js
|
449
|
+
- spec/javascripts/specs/corkboard/base_spec.js
|
450
|
+
- spec/javascripts/specs/corkboard/lib/publisher_spec.js
|
451
|
+
- spec/javascripts/specs/corkboard/lib/weighted_randomizer_spec.js
|
452
|
+
- spec/javascripts/specs/corkboard_spec.js
|
453
|
+
- spec/javascripts/support/jasmine.yml
|
454
|
+
- spec/javascripts/support/jasmine_config.rb
|
455
|
+
- spec/models/corkboard/authorization_spec.rb
|
456
|
+
- spec/models/corkboard/post_spec.rb
|
457
|
+
- spec/models/corkboard/subscription_spec.rb
|
458
|
+
- spec/requests/authorizations_spec.rb
|
459
|
+
- spec/requests/board_spec.rb
|
460
|
+
- spec/routing/authorizations_routing_spec.rb
|
461
|
+
- spec/routing/board_routing_spec.rb
|
462
|
+
- spec/routing/posts_routing_spec.rb
|
463
|
+
- spec/spec_helper.rb
|
464
|
+
- spec/support/helpers/config_helpers.rb
|
465
|
+
- spec/support/helpers/controller_helpers.rb
|
466
|
+
- spec/support/helpers/post_helpers.rb
|
467
|
+
- vendor/assets/javascripts/jquery.masonry-extensions.js
|
468
|
+
- vendor/assets/javascripts/jquery.masonry.js
|
469
|
+
- vendor/assets/javascripts/modernizr.js
|
470
|
+
- vendor/assets/javascripts/pusher.js
|
381
471
|
homepage: https://github.com/fullandby/corkboard
|
382
472
|
licenses: []
|
383
473
|
post_install_message:
|
@@ -392,7 +482,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
392
482
|
version: '0'
|
393
483
|
segments:
|
394
484
|
- 0
|
395
|
-
hash:
|
485
|
+
hash: -199404499608100052
|
396
486
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
397
487
|
none: false
|
398
488
|
requirements:
|
@@ -401,12 +491,87 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
401
491
|
version: '0'
|
402
492
|
segments:
|
403
493
|
- 0
|
404
|
-
hash:
|
494
|
+
hash: -199404499608100052
|
405
495
|
requirements: []
|
406
496
|
rubyforge_project:
|
407
497
|
rubygems_version: 1.8.24
|
408
498
|
signing_key:
|
409
499
|
specification_version: 3
|
410
500
|
summary: Dashboard composed of social network posts.
|
411
|
-
test_files:
|
501
|
+
test_files:
|
502
|
+
- spec/controllers/corkboard/application_controller_spec.rb
|
503
|
+
- spec/controllers/corkboard/authorizations_controller_spec.rb
|
504
|
+
- spec/controllers/corkboard/board_controller_spec.rb
|
505
|
+
- spec/controllers/corkboard/posts_controller_spec.rb
|
506
|
+
- spec/corkboard/client_spec.rb
|
507
|
+
- spec/corkboard/clients/instagram_spec.rb
|
508
|
+
- spec/corkboard/engine_spec.rb
|
509
|
+
- spec/corkboard/provider_spec.rb
|
510
|
+
- spec/corkboard/providers/instagram_spec.rb
|
511
|
+
- spec/corkboard/publishers/mock_spec.rb
|
512
|
+
- spec/corkboard/publishers/pusher_spec.rb
|
513
|
+
- spec/corkboard/service/config_spec.rb
|
514
|
+
- spec/corkboard_spec.rb
|
515
|
+
- spec/dummy/README.rdoc
|
516
|
+
- spec/dummy/Rakefile
|
517
|
+
- spec/dummy/app/assets/javascripts/application.js
|
518
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
519
|
+
- spec/dummy/app/controllers/application_controller.rb
|
520
|
+
- spec/dummy/app/helpers/application_helper.rb
|
521
|
+
- spec/dummy/app/mailers/.gitkeep
|
522
|
+
- spec/dummy/app/models/.gitkeep
|
523
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
524
|
+
- spec/dummy/config.ru
|
525
|
+
- spec/dummy/config/application.rb
|
526
|
+
- spec/dummy/config/boot.rb
|
527
|
+
- spec/dummy/config/database.yml
|
528
|
+
- spec/dummy/config/environment.rb
|
529
|
+
- spec/dummy/config/environments/development.rb
|
530
|
+
- spec/dummy/config/environments/production.rb
|
531
|
+
- spec/dummy/config/environments/test.rb
|
532
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
533
|
+
- spec/dummy/config/initializers/corkboard.rb
|
534
|
+
- spec/dummy/config/initializers/inflections.rb
|
535
|
+
- spec/dummy/config/initializers/jasmine.rb
|
536
|
+
- spec/dummy/config/initializers/mime_types.rb
|
537
|
+
- spec/dummy/config/initializers/secret_token.rb
|
538
|
+
- spec/dummy/config/initializers/session_store.rb
|
539
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
540
|
+
- spec/dummy/config/locales/en.yml
|
541
|
+
- spec/dummy/config/routes.rb
|
542
|
+
- spec/dummy/db/.gitkeep
|
543
|
+
- spec/dummy/db/migrate/20121212222912_create_corkboard_authorizations.corkboard.rb
|
544
|
+
- spec/dummy/db/schema.rb
|
545
|
+
- spec/dummy/lib/assets/.gitkeep
|
546
|
+
- spec/dummy/log/.gitkeep
|
547
|
+
- spec/dummy/public/404.html
|
548
|
+
- spec/dummy/public/422.html
|
549
|
+
- spec/dummy/public/500.html
|
550
|
+
- spec/dummy/public/favicon.ico
|
551
|
+
- spec/dummy/script/rails
|
552
|
+
- spec/helpers/corkboard/application_helper_spec.rb
|
553
|
+
- spec/javascripts/fixtures/board.html
|
554
|
+
- spec/javascripts/helpers/jasmine-jquery.js
|
555
|
+
- spec/javascripts/spec.css
|
556
|
+
- spec/javascripts/spec.js
|
557
|
+
- spec/javascripts/spec_helper.js
|
558
|
+
- spec/javascripts/specs/corkboard/app/board_spec.js
|
559
|
+
- spec/javascripts/specs/corkboard/base_spec.js
|
560
|
+
- spec/javascripts/specs/corkboard/lib/publisher_spec.js
|
561
|
+
- spec/javascripts/specs/corkboard/lib/weighted_randomizer_spec.js
|
562
|
+
- spec/javascripts/specs/corkboard_spec.js
|
563
|
+
- spec/javascripts/support/jasmine.yml
|
564
|
+
- spec/javascripts/support/jasmine_config.rb
|
565
|
+
- spec/models/corkboard/authorization_spec.rb
|
566
|
+
- spec/models/corkboard/post_spec.rb
|
567
|
+
- spec/models/corkboard/subscription_spec.rb
|
568
|
+
- spec/requests/authorizations_spec.rb
|
569
|
+
- spec/requests/board_spec.rb
|
570
|
+
- spec/routing/authorizations_routing_spec.rb
|
571
|
+
- spec/routing/board_routing_spec.rb
|
572
|
+
- spec/routing/posts_routing_spec.rb
|
573
|
+
- spec/spec_helper.rb
|
574
|
+
- spec/support/helpers/config_helpers.rb
|
575
|
+
- spec/support/helpers/controller_helpers.rb
|
576
|
+
- spec/support/helpers/post_helpers.rb
|
412
577
|
has_rdoc:
|