This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # @news from news_controller#index | |
| collection @news | |
| attributes :id, :title, :excerpt, :content, :image, :source, :published_at, :created_at | |
| node :excerpt do |news| | |
| truncate(news.excerpt, :length => 100) | |
| end | |
| node :content do |news| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe Api::V1::DevicesController do | |
| render_views | |
| describe "GET" do | |
| let!(:device) { | |
| @time = Time.now | |
| FactoryGirl.create(:device, pinged_at: @time) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Zencoder::Job.create({ | |
| :input => video.video, | |
| :region => "europe", | |
| :test => !Rails.env.production?, | |
| :output => [ | |
| { | |
| :type => "segmented", | |
| :base_url => base_url, | |
| :filename => "#{video.id}_low.m3u8".downscore, | |
| :format => "ts", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # THIS WORKS | |
| # Videos Router | |
| class Etaxi.Routers.Videos extends Backbone.Router | |
| routes: | |
| '' : 'videos' | |
| 'videos' : 'videos' | |
| initialize: -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| item = $z(e.currentTarget) | |
| screen_center_x = $z(window).width() / 2 | |
| screen_center_y = $z(window).height() / 2 | |
| move_to_x = screen_center_x - item.data("screen-offset-x") | |
| move_to_y = screen_center_y - item.data("screen-offset-y") | |
| # Problem: This returns "true" or "false", instead of "-1000px" or "1000px" | |
| item_origin = (item.data("screen-offset-y") > screen_center_y) ? "-1000px" : "1000px" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| endSession: -> | |
| do restartSession = -> | |
| restartSessionTimer = setTimeout -> | |
| window.location.href = Etaxi.config.base_url | |
| , Etaxi.config.user_session_length | |
| do showRestartSessionAlert = -> | |
| showRestartSessionAlertTimer = setTimeout -> | |
| $z("#notification").animate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Rossauer Kaserne | |
| Josephinum | |
| Produktenbörse | |
| Chemisches Institut | |
| Postsparkasse | |
| Schubladkastenhaus | |
| Theresianum | |
| Hotel Imperial (Palais Württemberg) | |
| Schloss Belvedere | |
| Kammerspiele |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Rails.application.routes.url_helpers.notification_api_v1_zencoder_job_url | |
| ActionController::RoutingError: No route matches {:format=>"json", :action=>"notification", :controller=>"api/v1/zencoder_jobs"} | |
| from /Users/drale2k/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/routing/route_set.rb:503:in `raise_routing_error' | |
| from /Users/drale2k/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/routing/route_set.rb:499:in `rescue in generate' | |
| from /Users/drale2k/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/routing/route_set.rb:491:in `generate' | |
| from /Users/drale2k/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/routing/route_set.rb:532:in `generate' | |
| from /Users/drale2k/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/routing/route_set.rb:557:in `url_for' | |
| from /Users/drale2k/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/routing/route_set.rb:329:in `url_for' | |
| from /Users/drale2k/.rvm/gems/ruby-1.9.3-p0/g |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Error: invalid API key | |
| # lib/video_encoder.rb | |
| module VideoEncoder | |
| def self.encode(video = nil) | |
| response = Zencoder::Job.create({:input => "test.mp4"}) | |
| puts response.inspect | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Error: <class:Video>': undefined method `hello' for Zencodera:Module (NoMethodError) | |
| # lib/zencodera.rb | |
| module Zencodera | |
| def hello | |
| puts "Hello..." | |
| end | |
| end | |
| # models/video.rb |