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
/home/chintanparikh/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/completion.rb:9:in `require': cannot load such file -- readline (LoadError) | |
from /home/chintanparikh/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>' | |
from /home/chintanparikh/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/commands/console.rb:3:in `require' | |
from /home/chintanparikh/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/commands/console.rb:3:in `<top (required)>' | |
from /home/chintanparikh/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/commands.rb:38:in `require' | |
from /home/chintanparikh/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/commands.rb:38:in `<top (required)>' | |
from script/rails:6:in `require' | |
from script/rails:6:in `<main>' |
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
<%= form_for(@project) do |f| %> | |
<%= f.error_messages %> | |
<p> | |
<%= f.label :name %> | |
<%= f.text_field :name %> | |
</p> | |
<%= f.submit %> | |
<% 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
chintanparikh in ~/Documents/Rails/ticketee on develop? | |
[1] $ rake cucumber:ok ✘ | |
/home/chintanparikh/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -S bundle exec cucumber --profile default | |
Using the default profile... | |
wrong number of arguments (1 for 0) (ArgumentError) | |
/home/chintanparikh/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-3.3.0/lib/factory_girl/syntax/default.rb:6:in `define' | |
/home/chintanparikh/Documents/Rails/ticketee/factories/project_factory.rb:1:in `<top (required)>' | |
/home/chintanparikh/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `load' | |
/home/chintanparikh/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `block in load' | |
/home/chintanparikh/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency' |
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
chintanparikh in ~/Documents/Rails/ticketee on develop? | |
$ bin/cucumber features/viewing_projects.feature | |
Using the default profile... | |
Factory already registered: project (FactoryGirl::DuplicateDefinitionError) | |
/home/chintanparikh/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-3.3.0/lib/factory_girl/disallows_duplicates_registry.rb:11:in `register' | |
/home/chintanparikh/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-3.3.0/lib/factory_girl.rb:58:in `block in register_factory' | |
/home/chintanparikh/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-3.3.0/lib/factory_girl.rb:57:in `each' | |
/home/chintanparikh/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-3.3.0/lib/factory_girl.rb:57:in `register_factory' | |
/home/chintanparikh/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-3.3.0/lib/factory_girl/syntax/default.rb:20:in `factory' | |
/home/chintanparikh/Documents/Rails/ticketee/factories/project_factory.rb:2:in `block in <top (required)>' |
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
@project = Project.find(params[:id]) | |
rescue ActiveRecord::RecordNotFound | |
flash[:alert] = "The project you were looking for could not be found" | |
redirect_to projects_path |
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
--------------------- post_steps.rb (Using this with Cucumber) -------------------- | |
Given /^there is a post called "(.*?)"$/ do |title| | |
FactoryGirl.create(:post, :title => title) | |
end | |
--------------------- factories/post_factory.rb ----------------------------- | |
FactoryGirl.define do | |
factory :post 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: Editing Posts | |
In order to be able to edit posts | |
As a user | |
I want to be able to do this via an interface | |
Background: | |
Given there is a post called "Hello, world" | |
When I follow "Hello, world" | |
Scenario: Editing a new post |
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
Given /^there is a category called "(.*?)"$/ do |category_name| | |
FactoryGirl.create(:category, name: category_name) | |
end | |
Then /^I want to see "(.*?)"$/ do |text| | |
page.should have_text(text) | |
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
require 'nokogiri' | |
require 'open-uri' | |
xml_content = <<XML | |
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:usr="http://streams.atlassian.com/syndication/username/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:thr="http://purl.org/syndication/thread/1.0"> | |
<title>MongoDB - Activity Stream</title> | |
<id>https://jira.mongodb.org</id> | |
<updated>2012-06-09T13:57:52Z</updated> | |
<dc:date>2012-06-09T13:57:52Z</dc:date> | |
<entry> |
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 'nokogiri' | |
require 'open-uri' | |
xml = Nokogiri::XML(open('https://jira.mongodb.org/plugins/servlet/streams')) | |
xml.xpath('//usr:username').each do |username| | |
puts username.content | |
end | |
OlderNewer