This code works with the Firebase simple-auth interface. It depends on the following Gemfile:
gem 'ruby_motion_query', :git => 'git@github.com:infinitered/rmq.git'
gem 'motion-firebase'
'motion-firebase',
'motion-firebase-auth',
]
gem 'motion-map'
| module MotionModel | |
| module Watchable | |
| def self.included(base) | |
| # uncomment if private class methods | |
| # base.extend(PrivateClassMethods) | |
| base.extend(PublicClassMethods) | |
| # base.instance_eval do | |
| # Any instance specific code |
| # stylesheet | |
| def remember_me_label(st) | |
| st.frame = {bp: PADDING, l:MARGIN, h:HEIGHT, w: WIDTH / 2} | |
| st.text = 'remember me' | |
| end | |
| def remember_me_switch(st) | |
| st.frame = {rop: 10, h:HEIGHT, w:WIDTH / 2} # bp: -32, | |
| end |
This code works with the Firebase simple-auth interface. It depends on the following Gemfile:
gem 'ruby_motion_query', :git => 'git@github.com:infinitered/rmq.git'
gem 'motion-firebase'
'motion-firebase',
'motion-firebase-auth',
]
gem 'motion-map'
| module MotionModel | |
| module Model | |
| def self.included(base) | |
| base.extend(PublicClassMethods) | |
| end | |
| module PublicClassMethods | |
| def inherited(subclass) | |
| p "inherited from #{subclass}" | |
| end |
| source "https://rubygems.org" | |
| gem "rake" | |
| gem "motion-cocoapods", "1.3.0.rc1" | |
| gem 'bubble-wrap' |
| # -*- coding: utf-8 -*- | |
| $:.unshift("/Library/RubyMotion/lib") | |
| require 'motion/project' | |
| Motion::Project::App.setup do |app| | |
| # Use `rake config' to see complete project settings. | |
| app.name = 'foo' | |
| app.device_family = [:iphone, :ipad] | |
| interface_orientations = [:portrait, :landscape_left, :landscape_right, :portrait_upside_down] | |
| end |
backtrace
constraint.rb:112:in `from_sym:': Unknown symbol :topleft (RuntimeError)
from ui_view.rb:87:in `block in get_ns_constraints'
from ui_view.rb:82:in `get_ns_constraints'
from ui_view.rb:152:in `block in get_ns_constraints'
from ui_view.rb:151:in `get_ns_constraints'
from ui_view.rb:152:in `block in get_ns_constraints'
from ui_view.rb:151:in `get_ns_constraints'
| module SugarCube | |
| module DateParser | |
| # Parse a date string: E.g.: | |
| # | |
| # SugarCube::DateParser.parse_date "There is a date in here tomorrow at 9:00 AM" | |
| # | |
| # => 2013-02-20 09:00:00 -0800 | |
| def self.parse_date(date_string) | |
| detect(date_string).first.date | |
| end |
| module MotionModel | |
| module Model | |
| def save(*) | |
| puts "called MM#save" | |
| end | |
| end | |
| end | |
| module MotionModel | |
| module Paranoid |
| # See https://gist.github.com/4526905 for the code this tests | |
| describe "core helpers" do | |
| it "has a 'to_us_phone' method" do | |
| 'hello'.should.respond_to? :to_us_phone | |
| end | |
| describe "7-digit phone numbers" do | |
| it "formats string" do | |
| '1112222'.to_us_phone.should == '111-2222' |