Project

raps

0.0
No commit activity in last 3 years
No release in over 3 years
Rack server to delivery rails public directory.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 5.0
~> 10.0

Runtime

~> 0.3
 Project Readme

Raps

Rack server to delivery rails public directory.
Mainly, for fetching public data on testing.

Usage

  • test/test_helper.rb
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'

include WebMock::API # if you use webmock

class ActiveSupport::TestCase
  # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
  fixtures :all

  # Add this line
  stub_request(:get, /test.statics.local\/.*/).to_rack(Raps::Server)
end

Installation

Add this line to your application's Gemfile:

gem 'raps'

And then execute:

$ bundle

Or install it yourself as:

$ gem install raps

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/maruware/raps.