This file contains 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
use Rack::Static, :root => "public" | |
run lambda { |env| | |
[200, {'Content-Type' => 'text/html'}, | |
File.open('public/index.html', File::RDONLY) | |
] | |
} |
This file contains 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
require 'gosu' | |
class Window < Gosu::Window | |
def initialize | |
super(800, 600, true) # go fullscreen if possible | |
end | |
def button_down(button) | |
close if button == Gosu::KbEscape | |
end |
This file contains 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
feature "widget management" do | |
background do | |
@user = Fabricate(:user) | |
visit auth_login_path | |
fill_in "Username", with: @user.username | |
fill_in "Password", with: "password" | |
click_button "Log In" | |
end | |
This file contains 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
feature "widget management" do | |
include AuthenticationSteps | |
include WidgetSteps | |
background do | |
i_log_in_as_a_user | |
end | |
scenario "creating a new widget" do |
This file contains 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
Feature: Widget Management | |
Background: | |
Given I am logged in as a user | |
Scenario: Creating a new widget | |
When I create a widget | |
Then I should see "Widget was successfully created." |
This file contains 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
feature "Search for Models" do | |
let(:my_model){ FactoryGirl.create(:my_fancy_model) } | |
before do | |
ThinkingSphinx::Test.index | |
end | |
scenario "A user searches for models by title" do | |
visit "/models" |
This file contains 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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
actions: { | |
itemSelected(item) { | |
console.log("itemSelected", item); | |
this.get("itemCallback")(item); | |
} | |
} | |
}); |
This file contains 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
import Ember from 'ember'; | |
var camelize = Ember.String.camelize; | |
export default Ember.Mixin.create({ | |
// The following is mostly identical to the JSONAPISerializer implementation, | |
// with the exception of adding an attributes key to the payload. | |
// https://github.com/emberjs/data/blob/v2.5.2/addon/serializers/json-api.js#L471 | |
serializeHasMany(snapshot, json, relationship) { | |
var key = relationship.key; |
This file contains 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
$ motion --version | |
4.8 |
This file contains 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
$ motion create | |
Usage: | |
$ motion create APP-NAME | |
Create a new RubyMotion project from one of the following templates: android, gem, ios (default), ios-action-extension, ios-custom-keyboard, ios-document-picker, ios-file-provider, ios-framework, ios-photo-editing, ios-share-extension, ios-today-extension, ios-watch-app, ios-watch-extension, osx, tvos, redpotion-template. | |
Options: | |
--template=[NAME|URL] A built-in template or from a file/git URL |