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
next_hour = begin | |
Time.mktime( Time.now.year, Time.now.month, Time.now.day, Time.now.hour+1 ) | |
rescue ArgumentError | |
# this will keep it from failing when run between 11pm and midnight :\ | |
Time.mktime( Time.now.year, Time.now.month, Time.now.day+1, Time.now.hour+1 ) | |
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
# >> Video 1 | |
# => #<Video ...> | |
def method_missing msg, *args, &block | |
model = begin; | |
Object.const_get msg | |
rescue NameError | |
end | |
if model and model.descends_from_active_record? | |
model.find args.first |
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
Given /^(the|a|another) user sets his (activity|videos|subscriptions|subscribers) to (public|private)/ do |pronoun, privacy_type, setting| | |
bool = if setting == 'private' | |
false | |
elsif setting == 'public' | |
true | |
end | |
@user2.send((privacy_type + '_public=').to_sym, bool) | |
@user2.save | |
@user2.reload |
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
@cred.each do |c| | |
error = proc { |d,e| error e.inspect } | |
start = proc { |d| info "Fetching feed for #{c['name']}" } | |
finish = proc { |d| info "Fetch of #{c['name']} complete" } | |
# procs = { :error => error, :start => start, :progress => progress, :finish => finish } | |
dl = download "https://#{c['username']}:#{c['password']}@mail.google.com/mail/feed/atom" do |d| | |
flow do | |
info d.response.body.inspect |
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
@cred.each do |c| | |
error = proc { |d,e| error e.inspect } | |
start = proc { |d| info "Fetching feed for #{c['name']}" } | |
finish = proc { |d| info "Fetch of #{c['name']} complete" } | |
# procs = { :error => error, :start => start, :progress => progress, :finish => finish } | |
dl = download "https://#{c['username']}:#{c['password']}@mail.google.com/mail/feed/atom" do |d| | |
flow do | |
info d.response.body.inspect |
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
@cred.each do |c| | |
error = proc { |d,e| error e.inspect } | |
start = proc { |d| info "Fetching feed for #{c['name']}" } | |
finish = proc { |d| info "Fetch of #{c['name']} complete" } | |
procs = { :error => error, :start => start, :progress => progress, :finish => finish } | |
download "https://#{c['username']}:#{c['password']}@mail.google.com/mail/feed/atom", procs do |d| | |
flow do | |
info d.response.body.inspect |
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
require File.dirname(__FILE__) + "/../../test_helper" | |
require "action_view/test_case" | |
class ActionViewHelpersTest < ActionView::TestCase | |
context "FormHelper extensions" do | |
setup do | |
@user = User.new | |
@form = ActionView::Helpers::FormBuilder.new(:user, @user, self, {}, nil) | |
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
diff --git a/lib/shoes/log.rb b/lib/shoes/log.rb | |
index 97380f3..b0ee3a6 100644 | |
--- a/lib/shoes/log.rb | |
+++ b/lib/shoes/log.rb | |
@@ -10,37 +10,42 @@ module Shoes::LogWindow | |
Shoes.log.clear | |
end | |
end | |
- @log, @hash = stack, nil | |
+ @log = stack :scroll => true, :height => 1.0, :width => 1.0 |
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
Shoes.app do | |
flicker_every = 3 | |
animate 1 do |i| | |
if i % flicker_every == 0 | |
background black | |
else | |
background white | |
end | |
end | |
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
Date/Time: 2008-09-30 22:41:39.561 -0400 | |
OS Version: 10.4.11 (Build 8S2167) | |
Report Version: 4 | |
Command: shoes-bin | |
Path: ./shoes-bin | |
Parent: bash [17299] | |
Version: 0.r1009 (???) | |
Build Version: 1 |