Error
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.

gem

Virtapay1
Tuesday, 18 October 2011 02:44
//


// Setup instructions for Ruby on Rails:

Do not forget to set your site token after testing!

Get the gem:
gem install madvertise

Add
require 'madvertise'

to app/controllers/application.rb, or to any specific controller as needed and / or
provide the necessary default settings in your environment.rb file, e.g.
require 'madvertise'
Madvertise::config do |c|
c.site_token = 'TestTokn'
end

Place a request in the view, e.g.
<%= Madvertiese.get_ad(request) %>

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/YQlttDck3p4/13711

 
Bentley: Sparkling
Monday, 05 September 2011 21:00

To shine or glisten with little gleams of light, as a brilliant gem.

Read more: http://suicidegirls.com/girls/Bentley/photos/+Sparkling++/

 
Acceptance Testing for Rails
Friday, 25 March 2011 15:23
Make sure you have following gems in your Gemfile:


gem "rspec", "2.0.1"
gem "rspec-rails", "2.0.1"
gem "capybara", ">= 0.4.1.1"
gem "database_cleaner", ">= 0.6.6"


Add spec/support/acceptance_example_group.rb:

require 'action_dispatch'
require 'capybara/rails'
require 'capybara/rspec'
require 'capybara/dsl'

module AcceptanceExampleGroup
extend ActiveSupport::Concern

include RSpec::Rails::RequestExampleGroup
include Rack::Test::Methods

included do
metadata[:type] = :acceptance
end
end

RSpec.configure do |config|
config.include AcceptanceExampleGroup,
:example_group => { :file_path => /\bspec\/acceptance\// }

config.use_transactional_fixtures = false

config.before(:suite) do
DatabaseCleaner.strategy = :deletion
DatabaseCleaner.clean_with :truncation
end

config.before(:each) do
if example.metadata[:js]
Capybara.current_driver = :selenium
DatabaseCleaner.strategy = :truncation
else
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.start
end
end

config.after(:each) do
Capybara.use_default_driver if example.metadata[:js]
DatabaseCleaner.clean
end
end


Delete line from spec/spec_helper.rb

config.use_transactional_fixtures = true


Create spec/acceptance/some_acceptance_spec.rb

require 'spec_helper'

describe "some feature", :js => true do

it "..." do
visit "/"
end
end


No you may create your acceptance tests.

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/yT_8_7RbP8s/13057

 
The New iPhone SMS Ringtones [Video]
Tuesday, 12 October 2010 21:52
While looking for new features and hidden secrets within iOS 4.2 Beta 3, we found a gem: New SMS ringtones! Have a listen. More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/BfU8YBXR90A/the-new-iphone-sms-ringtones

 
Read a Twitter stream using eventmachine and the twitter-stream gem
Saturday, 10 July 2010 10:00
Here's how to read a twitter stream for the keyword 'ruby' using the twitter-stream gem and eventmachine.

*installation*

gem1.9.1 install eventmachine

Building native extensions. This could take a while...
Successfully installed eventmachine-0.12.10
1 gem installed
Installing ri documentation for eventmachine-0.12.10...
Updating class cache with 2538 classes...
Installing RDoc documentation for eventmachine-0.12.10...
Could not find main page README

gem1.9.1 install twitter-stream

Successfully installed twitter-stream-0.1.6
1 gem installed
Installing ri documentation for twitter-stream-0.1.6...
Updating class cache with 2598 classes...
Installing RDoc documentation for twitter-stream-0.1.6...


*example*

require 'eventmachine'
require 'twitter/json_stream'
require 'json'

username, password = 'drobertson', 'xxxxx'

EventMachine.run {

twitter = Twitter::JSONStream.connect(
:path => '/1/statuses/filter.json?track=ruby',
:auth => "#{username}:#{password}"
)

twitter.each_item do |status|
status = JSON.parse(status)
puts "#{status['user']['screen_name']}: #{status['text']}"
end

puts "Server started"
}

output:

moviedb: SAVE $7.02 - Max & Ruby's Halloween $7.96 http://dealnay.com/388823 #animation #bargain
naotaco: @shokai ありがとうございますー。rubyのtwitterも相当楽でいいですよね!
xkrezinsky: Model ex at centre of Ruby break-up - http://www.newzfor.me/?4crd


Resources:
- examples/multicast.rb at master from igrigorik's em-websocket [github.com]
- Using EventMachine with the Twitter Stream [dzone.com]

*update: 10-Jul-2010 @ 12:29pm*

There's now an Rcscript job for the above.

alias:
alias str="rcscript //job:stream http://rorbuilder.info/r/twitter.rsf"


example:
str -u drobertson -p secret ruby

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/jD0w-7k1RWs/11863

 


Taxonomy by Zaragoza Online