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
var Comments = Backbone.Collection.extend({ | |
url: function() { | |
return this.baseUrl + '/comments'; | |
}, | |
initialize: function(bootstrapData, options) { | |
this.baseUrl = options.baseUrl; | |
} | |
}), | |
Posts = Backbone.Collection.extend({ |
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
@corner_group.props.rotation = [ { "z-axis" => [ 0.0, [ 960, 540 ] ] } ] | |
add_timer(0.1) do | |
@logo_start.animate(duration: 800, opacity: 0).on_complete do | |
@corner_lt.animate(duration: 700, left: 850, top: 427) | |
@corner_rt.animate(duration: 700, right: 792, top: 427) | |
@corner_lb.animate(duration: 700, left: 850, bottom: 370) | |
@corner_rb.animate(duration: 700, right: 792, bottom: 370).on_complete do | |
@corner_group.animate(duration: 800, rotation_angle_z: -180.0).on_complete do | |
@corner_lt.animate(duration: 700, left: 25, top: 27) | |
@corner_rt.animate(duration: 700, right: -33, top: 27) |
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 Telemarker::Aplplication do | |
include_context :telemarker_app | |
let(:channels_api_controller) { app.controller('api/controller') } | |
let(:channels_view) { app.view('channels') } | |
describe "Channels View Controller" do | |
it "should get all channels" do | |
channels_controller = Telemarker::Controllers::View::VideosController.new(channels_view, channels_api_controller) |
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
class View::ChannelsController < CS::Base::Controller | |
def initialize(view, api_controller) | |
@view = view | |
@api_controller = api_controller | |
end | |
def show_channels_list | |
api_controller.all_channels.on_complete do |models| | |
@view.show_channels(models) |
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
class Api::ChannelsController < CS::Base::Controller | |
def all_channels | |
SFK::Http.get(channels_url, options).transform do |data| | |
parse_data(models) | |
end | |
end | |
def parse_data(data) | |
models = [] |
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 "Channels Api Controller" do | |
it "should get all channels from api" do | |
stub_requested = stub_request(:get, channels_api_url). | |
with(body: { credentials: credentials }). | |
to_return(status: 200, body: load_fixture('channels.json'), headers: {}) | |
channels_api_controller = app.controller('api/channels_controller') | |
channels_api_controller.all_channels.on_complete do |models| |
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
class Channel | |
include Virtus | |
atribute :id, Integer | |
attribute :name, String | |
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
class Channels < Clutter::Group | |
dsl do |o| | |
# some markup here | |
end | |
def show_channels(channels) | |
# some actions with dom here | |
end | |
end |
OlderNewer