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
| World(Rack::Test::Methods) | |
| Given /^I am a valid API user$/ do | |
| @user = Factory(:user) | |
| authorize(@user.email, @user.password) | |
| end | |
| Given /^I send and accept XML$/ do | |
| header 'Accept', 'text/xml' | |
| header 'Content-Type', 'text/xml' |
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 /^I send and accept JSON$/ do | |
| header 'Accept', 'application/json' | |
| header 'Content-Type', 'application/json' | |
| 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
| Given /^I am a valid API user$/ do | |
| @user = Factory(:user) | |
| authorize(@user.email, @user.password) | |
| 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
| World(Rack::Test::Methods) |
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
| Before do | |
| module Resque | |
| def self.enqueue(klass, *args) | |
| klass.perform(*args) | |
| 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
| ruby-1.8.7-p249 > Geokit::Bounds.from_point_and_radius([53.91848,-122.776584], 4993) | |
| => #<Geokit::Bounds:0x1050e7580 @ne=#<Geokit::LatLng:0x1050e8e08 @lat=53.897792470202, @lng=-43.4942376451051>, @sw=#<Geokit::LatLng:0x1050e8e58 @lat=-18.265247529798, @lng=-202.058930354895>> | |
| ruby-1.8.7-p249 > Geokit::Bounds.from_point_and_radius([53.91848,-122.776584], 4997) | |
| => #<Geokit::Bounds:0x1050dee08 @ne=#<Geokit::LatLng:0x1050e0690 @lat=53.8399645290606, @lng=-43.4579700787395>, @sw=#<Geokit::LatLng:0x1050e06e0 @lat=-18.3230754709394, @lng=-202.09519792126>> |
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
| source :rubygems | |
| gem "rails", "= 2.3.8" | |
| gem "pg" | |
| gem "acl9" | |
| gem 'authlogic' | |
| gem 'formtastic' | |
| gem 'paperclip' | |
| gem 'httparty' | |
| gem "searchlogic" |
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
| <% | |
| rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" | |
| rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}" | |
| std_opts = "#{rerun_opts} --format rerun --out rerun.txt --strict --tags ~@wip --tags ~@pending --color" | |
| all_opts = "--format progress --strict --tags ~@wip --tags ~@pending --color" | |
| %> | |
| autotest: --format pretty --tags @wip --wip --tags ~@spreedly features | |
| autotest-all: --format progress --tags ~@pending --tags ~@spreedly features | |
| default: <%= std_opts %> | |
| all: <%= all_opts %> |
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
| package org.jruby.util; | |
| import com.martiansoftware.nailgun.NGContext; | |
| import org.jruby.Main; | |
| import org.jruby.RubyInstanceConfig; | |
| import org.jruby.ast.executable.Script; | |
| import org.jruby.exceptions.MainExitException; | |
| import org.jruby.exceptions.ThreadKill; | |
| public class NailMain { |
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
| class DubyApp < HttpServlet | |
| def_edb(list, 'com/ribrdb/list.dhtml') | |
| def doGet(request, response) | |
| @posts = Post.all.run | |
| response.getWriter.write(list) | |
| end | |
| def doPost(request, response) | |
| post = Post.new |