remi-rackbox 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +7 -0
- data/Rakefile +2 -1
- data/VERSION.yml +1 -1
- data/examples/sinatra/config.ru +3 -5
- data/lib/rackbox.rb +2 -7
- data/lib/rackbox/bacon.rb +1 -0
- data/lib/rackbox/spec.rb +10 -0
- data/lib/rackbox/test.rb +1 -0
- metadata +16 -4
data/README.markdown
CHANGED
@@ -90,9 +90,16 @@ on how things work in [Merb][] so I can duplicate any functionality I'm missing.
|
|
90
90
|
TODO
|
91
91
|
----
|
92
92
|
|
93
|
+
- recreate examples so they all follow a SIMPLE spec ... eg. they should all return request headers if you call `/request_headers`
|
94
|
+
- get rid of Thin as a dependency! use rails-rack-adapter
|
95
|
+
- get rid of including custom rpsec matchers, use rspec-custom-matchers
|
96
|
+
- make the spec module inclusion less magical! refactor the spec helpers out ... make it more explicit to include the spec helpers?
|
97
|
+
- add test/unit support (the above'll be helpful for this)
|
98
|
+
- bugfix: 'request' method makes spec helpers angry!
|
93
99
|
- request('/', :format => :json) # simple helpers for content type request accepts
|
94
100
|
- get usage documentation working for `./script/generate blackbox_spec`
|
95
101
|
- refactor all specs ... an app should implement a simple API that we can spec against ... some URIs should return session vars, some request vars, etc
|
102
|
+
- add a rackbox script for helping to quickly run requests against apps!
|
96
103
|
|
97
104
|
|
98
105
|
|
data/Rakefile
CHANGED
@@ -13,8 +13,9 @@ begin
|
|
13
13
|
s.description = "Merb-like BlackBox testing for Rack apps, including Rails"
|
14
14
|
s.authors = %w( remi )
|
15
15
|
s.files = FileList["[A-Z]*", "{lib,spec,examples,rails_generators}/**/*"]
|
16
|
+
s.add_dependency 'remi-rails-rack-adapter'
|
17
|
+
# s.add_dependency 'remi-rspec-custom-matchers'
|
16
18
|
# s.executables = "neato"
|
17
|
-
# s.add_dependency 'person-project'
|
18
19
|
end
|
19
20
|
rescue LoadError
|
20
21
|
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
data/VERSION.yml
CHANGED
data/examples/sinatra/config.ru
CHANGED
@@ -1,11 +1,9 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'sinatra'
|
3
3
|
|
4
|
-
|
5
|
-
:
|
6
|
-
:env => :production
|
7
|
-
)
|
4
|
+
set :run, false
|
5
|
+
set :environment, :production
|
8
6
|
|
9
7
|
require 'sinatra_app'
|
10
8
|
use Rack::Session::Cookie
|
11
|
-
run Sinatra
|
9
|
+
run Sinatra::Application
|
data/lib/rackbox.rb
CHANGED
@@ -1,13 +1,8 @@
|
|
1
|
-
# TODO split up into different files! sheesh!
|
2
|
-
|
3
1
|
$:.unshift File.dirname(__FILE__)
|
4
|
-
require 'rubygems'
|
5
|
-
begin
|
6
|
-
require 'thin' # required for Rails pre Rails 2.3, as Thin has the Rack::Adapter::Rails
|
7
|
-
rescue LoadError
|
8
|
-
end
|
9
2
|
|
3
|
+
require 'rubygems'
|
10
4
|
require 'rack'
|
5
|
+
require 'rails-rack-adapter' # update this so it's only loaded when/if needed
|
11
6
|
|
12
7
|
require 'rackbox/rack/content_length_fix'
|
13
8
|
require 'rackbox/rack/sticky_sessions'
|
@@ -0,0 +1 @@
|
|
1
|
+
# this should get you up and running for using RackBox with Bacon
|
data/lib/rackbox/spec.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# this should get you up and running for using RackBox with RSpec
|
2
|
+
require File.dirname(__FILE__) + '/../rackbox'
|
3
|
+
|
4
|
+
spec_configuration = nil
|
5
|
+
spec_configuration = Spec::Example if defined? Spec::Example
|
6
|
+
spec_configuration = Spec::Runner if defined? Spec::Runner
|
7
|
+
|
8
|
+
spec_configuration.configure do |config|
|
9
|
+
config.use_blackbox = true
|
10
|
+
end
|
data/lib/rackbox/test.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# this should get you up and running for using RackBox with test/unit
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remi-rackbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- remi
|
@@ -9,10 +9,19 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-03-
|
12
|
+
date: 2009-03-13 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: remi-rails-rack-adapter
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
16
25
|
description: Merb-like BlackBox testing for Rack apps, including Rails
|
17
26
|
email: remi@remitaylor.com
|
18
27
|
executables: []
|
@@ -35,10 +44,13 @@ files:
|
|
35
44
|
- lib/rackbox/rack/extensions_for_rspec.rb
|
36
45
|
- lib/rackbox/rack/sticky_sessions.rb
|
37
46
|
- lib/rackbox/rack/content_length_fix.rb
|
47
|
+
- lib/rackbox/spec.rb
|
38
48
|
- lib/rackbox/spec
|
39
49
|
- lib/rackbox/spec/configuration.rb
|
40
50
|
- lib/rackbox/spec/helpers.rb
|
51
|
+
- lib/rackbox/bacon.rb
|
41
52
|
- lib/rackbox/app.rb
|
53
|
+
- lib/rackbox/test.rb
|
42
54
|
- lib/rackbox/rackbox.rb
|
43
55
|
- lib/rackbox/matchers.rb
|
44
56
|
- spec/request_method_spec.rb
|