Created
January 31, 2012 14:40
-
-
Save johanb/1710827 to your computer and use it in GitHub Desktop.
Bundler fun
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 'sinatra' | |
| module Example | |
| class App < Sinatra::Base | |
| end | |
| def self.app | |
| @app ||= Rack::Builder.new do | |
| run App | |
| 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
| require File.dirname(__FILE__) + '/spec_helper' | |
| describe "Something cool" do | |
| it "Should be able to load adressable" do | |
| response = get "/" | |
| uri = Addressable::URI.parse(response.headers["Location"]) | |
| 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
| source "http://rubygems.org" | |
| gem 'ruby-debug19', :platforms => :ruby_19 | |
| gem 'ruby-debug', :platforms => :ruby_18 | |
| # Specify your gem's dependencies in warden-podio.gemspec | |
| gemspec |
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
| # -*- encoding: utf-8 -*- | |
| $:.push File.expand_path("../lib", __FILE__) | |
| Gem::Specification.new do |s| | |
| # specify any dependencies here; for example: | |
| s.add_development_dependency "rack" | |
| s.add_development_dependency "rake" | |
| s.add_development_dependency "rspec", "~>2.8.0" | |
| s.add_development_dependency "sinatra" | |
| s.add_development_dependency "addressable", "~>2.2.0" | |
| s.add_development_dependency "rack-test", "~>0.5.3" | |
| # s.add_runtime_dependency "rest-client" | |
| s.files = `git ls-files`.split("\n") | |
| s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") | |
| s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } | |
| s.require_paths = ["lib"] | |
| 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
| Failure/Error: uri = Addressable::URI.parse(response.headers["Location"]) | |
| NameError: | |
| uninitialized constant RSpec::Core::ExampleGroup::Nested_1::Addressable | |
| # ./spec/example_spec.rb:8:in `block (2 levels) in <top (required)>' |
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
| Bundler.require(:default, :runtime, :test, :development) # useless | |
| require File.join(File.dirname(__FILE__), '..', 'lib', 'gemname') | |
| require File.join(File.dirname(__FILE__), 'app') | |
| require 'rack/test' | |
| require "addressable/uri" # < fix | |
| RSpec.configure do |config| | |
| config.include(Rack::Test::Methods) | |
| def app | |
| Example.app | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment