rest-assured 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,15 @@
1
+ bundler_args: --without local
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
6
+ env: DISPLAY=:99.0
7
+ before_script:
8
+ - "mysql -e 'create database rest_assured_test;'"
9
+ - "sh -e /etc/init.d/xvfb start"
10
+ script: "bundle exec rspec --color spec && bundle exec cucumber --format progress"
11
+ branches:
12
+ only:
13
+ - master
14
+ notifications:
15
+ email: false
data/Gemfile CHANGED
@@ -10,18 +10,23 @@ gem 'shoulda-matchers'
10
10
  gem 'rack-test'
11
11
  gem 'capybara'
12
12
  gem 'capybara-firebug'
13
- gem RUBY_VERSION =~ /^1\.8/ ? 'ruby-debug' : 'ruby-debug19'
14
- gem 'awesome_print'
15
- gem 'interactive_editor'
16
- gem 'launchy'
17
13
  gem 'rake'
14
+ gem 'mysql2'
15
+ gem 'thin'
16
+ gem 'relish'
18
17
  gem "spork", "> 0.9.0.rc"
19
- gem "guard-spork"
20
- if RUBY_PLATFORM =~ /darwin/
21
- gem 'growl_notify'
22
- gem 'rb-fsevent'
18
+ gem 'childprocess'
19
+
20
+ group :local do
21
+ gem 'ruby-debug', :platform => :mri_18
22
+ gem 'ruby-debug19', :platform => :mri_19
23
+ gem 'awesome_print'
24
+ gem 'interactive_editor'
25
+ gem 'launchy'
26
+ gem "guard-spork"
27
+ if RUBY_PLATFORM =~ /darwin/
28
+ gem 'growl_notify'
29
+ gem 'rb-fsevent'
30
+ end
31
+ gem 'sinatra-activerecord'
23
32
  end
24
- gem 'sinatra-activerecord'
25
- gem 'mysql'
26
- gem 'sqlite3', '~> 1.3.4'
27
- gem 'thin'
data/README.markdown CHANGED
@@ -1,25 +1,27 @@
1
1
  # REST assured
2
2
 
3
+ [![Build status](https://secure.travis-ci.org/BBC/REST-assured.png)](https://secure.travis-ci.org/BBC/REST-assured)
4
+
3
5
  ## Overview
4
6
 
5
- A tool for stubbing/mocking external http based services that your app under test interacts with. This is useful for blackbox/integration testing.
7
+ A tool for stubbing/spying on http(s) based services that your app under test interacts with. This is useful for blackbox/integration testing.
6
8
  There are three main use cases:
7
9
 
8
10
  * stubbing out external data sources with predefined data
9
- * verify requests to external services
10
- * quickly emulate different behavior of external services during development (using web UI)
11
+ * verify requests to external services (aka spying)
12
+ * quickly simulate different behavior of external services using web UI; useful in development
11
13
 
12
14
  ## Usage
13
15
 
14
16
  You are going to need ruby >= 1.8.7.
15
17
 
16
- First make sure there is database adapter:
18
+ Rest-assured requires a database to run. Either sqlite or mysql. So, make sure there is one and its backed with corresponding client gem:
17
19
 
18
- bash$ gem install sqlite3 # or mysql
20
+ bash$ gem install sqlite3 # or mysql2
19
21
 
20
22
  If using mysql, rest-assured expects database 'rest\_assured' to be accessible by user 'root' with no password. Those are defaults and can be changed with cli options.
21
23
 
22
- It is also recommended to have thin installed. This improves startup time (over default webrick) and also it works in-memory sqlite (which webrick does not):
24
+ It is also recommended to have thin installed. This improves startup time (over default webrick) and also it works with in-memory sqlite (which webrick does not):
23
25
 
24
26
  bash$ gem install thin
25
27
 
@@ -34,19 +36,21 @@ Or clone from github and run:
34
36
  bash$ cd rest-assured && bundle install
35
37
  bash$ ./bin/rest-assured -d :memory: & # in-memory sqlite db
36
38
 
37
- This starts an instance of rest-assured on port 4578. It is accessible via REST or web interfaces on 'http://localhost:4578'
39
+ This starts up an instance of rest-assured on port 4578. It is accessible via REST or web interfaces on 'http://localhost:4578'
38
40
 
39
41
  Various options (such as ssl, port, db credentials, etc.) are available through command line options. Check out `rest-assured -h` to see what they are.
40
42
 
41
- NOTE that although sqlite is an extremely handy option (especially with :memory:), I found it sometimes locking tables under non-trivial load. Hence there is mysql - more setup, but always works. But may be that is just me sqliting it wrong.
43
+ NOTE that although sqlite is an extremely handy option (especially with :memory:), I found it sometimes locking tables under non-trivial load. Hence there is a Plan B - mysql. But may be that is just me sqliting it wrong.
42
44
 
43
45
  ## Doubles
44
46
 
45
- Double is a stub/mock of HTTP request.
47
+ Double is a stub/spy of HTTP request. Create a double that has the same request fullpath and method as the one your app is sending to a dependant service and then convience your app that rest-assured is that dependency (hint: by making endpoints configurable).
46
48
 
47
49
  ### Ruby Client API
48
50
 
49
- Rest-assured provides client library to work with doubles. Set it up in env.rb/spec_helper.rb first:
51
+ Rest-assured provides client library to work with doubles. Check out 'Ruby API' section in [documentation](https://www.relishapp.com/artemave/rest-assured) for full reference.
52
+
53
+ Set it up first in env.rb/spec_helper.rb:
50
54
 
51
55
  ```ruby
52
56
  require 'rest-assured/client'
@@ -62,7 +66,7 @@ RestAssured::Double.create(fullpath: '/products', content: 'this is content')
62
66
 
63
67
  Now GET 'http://localhost:4578/products' will be returning 'this is content'.
64
68
 
65
- You can also verify what requests happen on a double. Say this is a Given part of a test:
69
+ You can also verify what requests happen on a double, or, in other words, spy on a double. Say this is a Given part of a test:
66
70
 
67
71
  ```ruby
68
72
  @double = RestAssured::Double.create(fullpath: '/products', verb: 'POST')
@@ -71,7 +75,7 @@ You can also verify what requests happen on a double. Say this is a Given part o
71
75
  Then let us assume that 'http://localhost:4578/products' got POSTed as a result of some actions in When part. Now we can examine requests happened on that double in Then part:
72
76
 
73
77
  ```ruby
74
- @double.wait_for_requests(1, :timeout => 10) # defaults to 5 seconds
78
+ @double.wait_for_requests(1, timeout: 10) # defaults to 5 seconds
75
79
 
76
80
  req = @double.requests.first
77
81
 
@@ -89,9 +93,11 @@ RestClient.delete "#{RestAssured::Client.config.server_address}/doubles/all"
89
93
 
90
94
  ### Plain REST API
91
95
 
96
+ For those using rest-assured from non-ruby environments.
97
+
92
98
  #### Create double
93
99
 
94
- HTTP POST to '/doubles' creates double and returns its json representation.
100
+ HTTP POST to '/doubles' creates a double and returns its json representation.
95
101
  The following options can be passed as request parameters:
96
102
 
97
103
  - __fullpath__ - e.g., '/some/api/object', or with parameters in query string (useful for doubling GETs) - '/some/other/api/object?a=2&b=c'. Mandatory.
@@ -126,14 +132,14 @@ RestClient.delete "#{RestAssured::Client.config.server_address}/doubles/all"
126
132
  },
127
133
  "id": 1,
128
134
  "requests": [
129
- {
130
- "double_id": 1,
131
- "created_at": "2011-12-12T11:13:33+00:00",
132
- "body": "",
133
- "rack_env": "{\"SERVER_SOFTWARE\":\"thin 1.3.1 codename Triple Espresso\",\"SERVER_NAME\":\"localhost\",\"rack.version\":[1,0],\"rack.multithread\":false,\"rack.multiprocess\":false,\"rack.run_once\":false,\"REQUEST_METHOD\":\"GET\",\"REQUEST_PATH\":\"/api/something\",\"PATH_INFO\":\"/api/something\",\"REQUEST_URI\":\"/api/something\",\"HTTP_VERSION\":\"HTTP/1.1\",\"HTTP_USER_AGENT\":\"curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3\",\"HTTP_HOST\":\"localhost:4578\",\"HTTP_ACCEPT\":\"*/*\",\"GATEWAY_INTERFACE\":\"CGI/1.2\",\"SERVER_PORT\":\"4578\",\"QUERY_STRING\":\"\",\"SERVER_PROTOCOL\":\"HTTP/1.1\",\"rack.url_scheme\":\"http\",\"SCRIPT_NAME\":\"\",\"REMOTE_ADDR\":\"127.0.0.1\",\"async.callback\":{},\"async.close\":{},\"rack.session\":{\"session_id\":\"2d206d4edb880d41ae098bf0551c6904a4914f8632d101606b5304d4f651ce52\",\"tracking\":{\"HTTP_USER_AGENT\":\"06e79511d71287ca292dced4ef07c8fff9400376\",\"HTTP_ACCEPT_ENCODING\":\"da39a3ee5e6b4b0d3255bfef95601890afd80709\",\"HTTP_ACCEPT_LANGUAGE\":\"da39a3ee5e6b4b0d3255bfef95601890afd80709\"},\"__FLASH__\":{}},\"rack.session.options\":{\"key\":\"rack.session\",\"path\":\"/\",\"domain\":null,\"expire_after\":null,\"secure\":false,\"httponly\":true,\"defer\":false,\"renew\":false,\"sidbits\":128,\"secure_random\":{\"pid\":7885},\"secret\":\"bf80c75d713c92d2e3f94ea58be318c3f8988a3ed79d997f9cf883cc7aab1141225477ed81da7fe62ac77ecac3f979d255328dcbe8caa1bb342f4be6cb850983\",\"coder\":{},\"id\":\"2d206d4edb880d41ae098bf0551c6904a4914f8632d101606b5304d4f651ce52\"},\"rack.request.cookie_hash\":{},\"rack.session.unpacked_cookie_data\":{\"session_id\":\"2d206d4edb880d41ae098bf0551c6904a4914f8632d101606b5304d4f651ce52\"},\"x-rack.flash\":{\"opts\":{\"sweep\":true},\"store\":{\"session_id\":\"2d206d4edb880d41ae098bf0551c6904a4914f8632d101606b5304d4f651ce52\",\"tracking\":{\"HTTP_USER_AGENT\":\"06e79511d71287ca292dced4ef07c8fff9400376\",\"HTTP_ACCEPT_ENCODING\":\"da39a3ee5e6b4b0d3255bfef95601890afd80709\",\"HTTP_ACCEPT_LANGUAGE\":\"da39a3ee5e6b4b0d3255bfef95601890afd80709\"},\"__FLASH__\":{}},\"flagged\":[]},\"rack.request.query_string\":\"\",\"rack.request.query_hash\":{}}",
134
- "id": 1,
135
- "params": "{}"
136
- }
135
+ {
136
+ "double_id": 1,
137
+ "created_at": "2011-12-12T11:13:33+00:00",
138
+ "body": "",
139
+ "rack_env": "{\"SERVER_SOFTWARE\":\"thin 1.3.1 codename Triple Espresso\",\"SERVER_NAME\":\"localhost\",\"rack.version\":[1,0],\"rack.multithread\":false,\"rack.multiprocess\":false,\"rack.run_once\":false,\"REQUEST_METHOD\":\"GET\",\"REQUEST_PATH\":\"/api/something\",\"PATH_INFO\":\"/api/something\",\"REQUEST_URI\":\"/api/something\",\"HTTP_VERSION\":\"HTTP/1.1\",\"HTTP_USER_AGENT\":\"curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3\",\"HTTP_HOST\":\"localhost:4578\",\"HTTP_ACCEPT\":\"*/*\",\"GATEWAY_INTERFACE\":\"CGI/1.2\",\"SERVER_PORT\":\"4578\",\"QUERY_STRING\":\"\",\"SERVER_PROTOCOL\":\"HTTP/1.1\",\"rack.url_scheme\":\"http\",\"SCRIPT_NAME\":\"\",\"REMOTE_ADDR\":\"127.0.0.1\",\"async.callback\":{},\"async.close\":{},\"rack.session\":{\"session_id\":\"2d206d4edb880d41ae098bf0551c6904a4914f8632d101606b5304d4f651ce52\",\"tracking\":{\"HTTP_USER_AGENT\":\"06e79511d71287ca292dced4ef07c8fff9400376\",\"HTTP_ACCEPT_ENCODING\":\"da39a3ee5e6b4b0d3255bfef95601890afd80709\",\"HTTP_ACCEPT_LANGUAGE\":\"da39a3ee5e6b4b0d3255bfef95601890afd80709\"},\"__FLASH__\":{}},\"rack.session.options\":{\"key\":\"rack.session\",\"path\":\"/\",\"domain\":null,\"expire_after\":null,\"secure\":false,\"httponly\":true,\"defer\":false,\"renew\":false,\"sidbits\":128,\"secure_random\":{\"pid\":7885},\"secret\":\"bf80c75d713c92d2e3f94ea58be318c3f8988a3ed79d997f9cf883cc7aab1141225477ed81da7fe62ac77ecac3f979d255328dcbe8caa1bb342f4be6cb850983\",\"coder\":{},\"id\":\"2d206d4edb880d41ae098bf0551c6904a4914f8632d101606b5304d4f651ce52\"},\"rack.request.cookie_hash\":{},\"rack.session.unpacked_cookie_data\":{\"session_id\":\"2d206d4edb880d41ae098bf0551c6904a4914f8632d101606b5304d4f651ce52\"},\"x-rack.flash\":{\"opts\":{\"sweep\":true},\"store\":{\"session_id\":\"2d206d4edb880d41ae098bf0551c6904a4914f8632d101606b5304d4f651ce52\",\"tracking\":{\"HTTP_USER_AGENT\":\"06e79511d71287ca292dced4ef07c8fff9400376\",\"HTTP_ACCEPT_ENCODING\":\"da39a3ee5e6b4b0d3255bfef95601890afd80709\",\"HTTP_ACCEPT_LANGUAGE\":\"da39a3ee5e6b4b0d3255bfef95601890afd80709\"},\"__FLASH__\":{}},\"flagged\":[]},\"rack.request.query_string\":\"\",\"rack.request.query_hash\":{}}",
140
+ "id": 1,
141
+ "params": "{}"
142
+ }
137
143
  ],
138
144
  "content": "awesome",
139
145
  "description": null,
@@ -155,7 +161,11 @@ RestClient.delete "#{RestAssured::Client.config.server_address}/doubles/all"
155
161
 
156
162
  ## Redirects
157
163
 
158
- It is sometimes desirable to only double certain calls while letting others through to the 'real' services. Meet Redirects. Kind of "rewrite rules" for requests that didn't match any double. Here is the rest API for managing redirects:
164
+ It is sometimes desirable to only double certain calls while letting others through to the 'real' services. Meet Redirects. Kind of "rewrite rules" for requests that didn't match any double.
165
+
166
+ Another potential use for redirects is setting up a 'default' double that matches multiple fullpaths. This is of course given your app does not mind an extra redirect. Also note that 'default' double still covers only one http verb so requests with different methods won't match.
167
+
168
+ Here is the rest API for managing redirects:
159
169
 
160
170
  ### Create redirect
161
171
 
@@ -1,4 +1,4 @@
1
- Feature: create double using ruby client api
1
+ Feature: create double
2
2
  As ruby developer
3
3
  I want to be able to create doubles via client api
4
4
  So that interactions with rest-assured server are completely hidden from me
@@ -9,12 +9,12 @@ Feature: create double using ruby client api
9
9
  RestAssured::Client.config.server_address = 'http://localhost:9876'
10
10
  """
11
11
 
12
- Scenario: create double with defaults
12
+ Scenario: default options
13
13
  When I create a double:
14
14
  """
15
15
  @double = RestAssured::Double.create(:fullpath => '/some/api')
16
16
  """
17
- Then it should have the following defaults:
17
+ Then the following should be true:
18
18
  """
19
19
  @double.verb.should == 'GET'
20
20
  @double.response_headers.should == {}
@@ -25,12 +25,12 @@ Feature: create double using ruby client api
25
25
  last_response.should be_ok
26
26
  """
27
27
 
28
- Scenario: create double with specified response headers
28
+ Scenario: specify response headers
29
29
  When I create a double:
30
30
  """
31
31
  @double = RestAssured::Double.create(:fullpath => '/some/api', :response_headers => { 'Content-Type' => 'text/html' })
32
32
  """
33
- Then it should have the following defaults:
33
+ Then the following should be true:
34
34
  """
35
35
  @double.response_headers.should == { 'Content-Type' => 'text/html' }
36
36
 
@@ -38,3 +38,44 @@ Feature: create double using ruby client api
38
38
  last_response.headers['Content-Type'].should == 'text/html'
39
39
  """
40
40
 
41
+ Scenario: specify content
42
+ When I create a double:
43
+ """
44
+ @double = RestAssured::Double.create(:fullpath => '/some/api', :content => 'awesome')
45
+ """
46
+ Then the following should be true:
47
+ """
48
+ @double.content = 'awesome'
49
+
50
+ get @double.fullpath
51
+ last_response.body == 'awesome'
52
+ """
53
+
54
+ Scenario: specify verb
55
+ When I create a double:
56
+ """
57
+ @double = RestAssured::Double.create(:fullpath => '/some/api', :verb => 'POST')
58
+ """
59
+ Then the following should be true:
60
+ """
61
+ @double.verb = 'POST'
62
+
63
+ get @double.fullpath
64
+ last_response.should_not be_ok
65
+
66
+ post @double.fullpath
67
+ last_response.should be_ok
68
+ """
69
+
70
+ Scenario: specify status
71
+ When I create a double:
72
+ """
73
+ @double = RestAssured::Double.create(:fullpath => '/some/api', :status => 302)
74
+ """
75
+ Then the following should be true:
76
+ """
77
+ @double.status = 302
78
+
79
+ get @double.fullpath
80
+ last_response.status == 302
81
+ """
@@ -8,13 +8,11 @@ end
8
8
 
9
9
  Then /^the log file should be (.*)$/ do |logfile|
10
10
  @app_config[:logfile].should == logfile
11
- `rm #{logfile}`
12
11
  end
13
12
 
14
13
  Then /^database adapter should be sqlite and db file should be (.*)$/ do |dbfile|
15
14
  @app_config[:db_config][:database].should == dbfile
16
15
  @app_config[:db_config][:adapter].should == 'sqlite3'
17
- `rm #{dbfile}`
18
16
  end
19
17
 
20
18
  Then /^database options should be:$/ do |table|
@@ -24,7 +22,7 @@ Then /^database options should be:$/ do |table|
24
22
  string.empty? ? nil : string
25
23
  end
26
24
 
27
- @app_config[:db_config][:adapter].should == 'mysql'
25
+ @app_config[:db_config][:adapter].should == 'mysql2'
28
26
  @app_config[:db_config][:database].should == res['dbname']
29
27
  @app_config[:db_config][:user].should == res['dbuser']
30
28
  @app_config[:db_config][:password].should == empty_to_nil[res['dbpass']]
@@ -83,7 +83,7 @@ Then /^I should see existing doubles:$/ do |doubles|
83
83
  end
84
84
 
85
85
  Given /^I am on "([^"]*)" page$/ do |page|
86
- When "I visit \"#{page}\" page"
86
+ step "I visit \"#{page}\" page"
87
87
  end
88
88
 
89
89
  When /^I choose to create a double$/ do
@@ -8,7 +8,7 @@ Given /^there is redirect with pattern "([^"]*)" and uri "([^"]*)"$/ do |pattern
8
8
  end
9
9
 
10
10
  When /^I register redirect with pattern "([^"]*)" and uri "([^"]*)"$/ do |pattern, url|
11
- Given %{there is redirect with pattern "#{pattern}" and uri "#{url}"}
11
+ step %{there is redirect with pattern "#{pattern}" and uri "#{url}"}
12
12
  end
13
13
 
14
14
  Then /^it should redirect to "([^"]*)"$/ do |real_api_url|
@@ -63,6 +63,6 @@ Then /^it should raise MoreRequestsExpected error after with the following messa
63
63
  @more_reqs_exc.message.should =~ /#{string}/
64
64
  end
65
65
 
66
- Then /^it should have the following defaults:$/ do |code|
66
+ Then /^the following should be true:$/ do |code|
67
67
  eval code
68
68
  end
@@ -50,7 +50,7 @@ Spork.each_run do
50
50
  TestServer.stop
51
51
  end
52
52
 
53
- TestServer.start(:port => 9876)
53
+ TestServer.start(:port => 9876, :db_user => ENV['TRAVIS'] ? "''" : "root")
54
54
 
55
55
  while not TestServer.up?
56
56
  puts 'Waiting for TestServer to come up...'
@@ -1,29 +1,24 @@
1
1
  require 'net/http'
2
+ require 'childprocess'
2
3
 
3
- # This is only needed till I get ActiveResource going through rack-test
4
+ # This is only needed till someone gets ActiveResource going through rack-test
4
5
  class TestServer
5
- @pid_file = "./rest-assured.pid"
6
-
7
6
  def self.start(opts = {})
8
7
  @server_port = opts[:port] || 9876
8
+ db_user = opts[:db_user] || 'root'
9
9
 
10
- print 'Starting TestServer server... '
10
+ print "Starting TestServer server... "
11
11
 
12
- p = Process.fork do
13
- if get_pid
14
- print "\nPrevious TestServer instance appears to be running. Will be using it."
15
- else
16
- Process.exec("bundle exec rest-assured -p #{@server_port} -a mysql")
17
- end
18
- end
12
+ @child = ChildProcess.build("bundle exec rest-assured -p #@server_port -a mysql -u #{db_user}")
13
+ @child.io.inherit!
14
+ @child.start
19
15
 
20
- Process.detach(p)
21
16
  puts 'Done.'
22
17
  end
23
18
 
24
19
  def self.stop
25
20
  print 'Shutting down TestServer server... '
26
- Process.kill('TERM', get_pid.to_i) rescue puts( "Failed to kill TestServer server: #{$!}" )
21
+ @child.stop
27
22
  puts 'Done.'
28
23
  end
29
24
 
@@ -37,10 +32,4 @@ class TestServer
37
32
  rescue Errno::ECONNREFUSED
38
33
  false
39
34
  end
40
-
41
- private
42
-
43
- def self.get_pid
44
- `ps -eo pid,args`.split("\n").grep( /rest-assured -p #{@server_port}/ ).map{|p| p.split.first }.first
45
- end
46
35
  end
@@ -133,7 +133,7 @@ module RestAssured
133
133
  end
134
134
 
135
135
  opts = {
136
- :adapter => 'mysql',
136
+ :adapter => 'mysql2',
137
137
  :reconnect => true,
138
138
  :pool => 20,
139
139
  :user => AppConfig.user || 'root',
@@ -1,3 +1,3 @@
1
1
  module RestAssured
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
data/rest-assured.gemspec CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
22
22
 
23
23
  s.add_dependency 'sinatra', '>= 1.3.1'
24
24
  s.add_dependency 'rack-flash', '>= 0.1.2'
25
+ s.add_dependency 'rack', '<= 1.3.6'
25
26
  s.add_dependency 'haml', '>= 3.1.3'
26
27
  s.add_dependency 'activerecord', '~> 3.1.0'
27
28
  s.add_dependency 'activeresource', '~> 3.1.0'
@@ -76,6 +76,7 @@ module RestAssured
76
76
  end
77
77
  end
78
78
 
79
+ sleep 0.5
79
80
  lambda { dd.wait_for_requests(3) }.should raise_error(MoreRequestsExpected, 'Expected 3 requests. Got 2.')
80
81
  end
81
82
  end
@@ -1,5 +1,4 @@
1
1
  require File.expand_path('../../spec_helper', __FILE__)
2
- require 'rest-assured/models/request'
3
2
 
4
3
  module RestAssured::Models
5
4
  describe Request do
data/spec/spec_helper.rb CHANGED
@@ -55,7 +55,7 @@ Spork.each_run do
55
55
  TestServer.stop
56
56
  end
57
57
 
58
- TestServer.start(:port => 9876)
58
+ TestServer.start(:port => 9876, :db_user => ENV['TRAVIS'] ? "''" : "root")
59
59
 
60
60
  while not TestServer.up?
61
61
  puts 'Waiting for TestServer to come up...'
metadata CHANGED
@@ -1,115 +1,93 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rest-assured
3
- version: !ruby/object:Gem::Version
4
- hash: 19
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.1
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 3
9
- - 0
10
- version: 0.3.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Artem Avetisyan
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-12-12 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-01-09 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: sinatra
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2156624960 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 25
29
- segments:
30
- - 1
31
- - 3
32
- - 1
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
33
21
  version: 1.3.1
34
22
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: rack-flash
38
23
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *2156624960
25
+ - !ruby/object:Gem::Dependency
26
+ name: rack-flash
27
+ requirement: &2156637900 !ruby/object:Gem::Requirement
40
28
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 31
45
- segments:
46
- - 0
47
- - 1
48
- - 2
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
49
32
  version: 0.1.2
50
33
  type: :runtime
51
- version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
53
- name: haml
54
34
  prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *2156637900
36
+ - !ruby/object:Gem::Dependency
37
+ name: rack
38
+ requirement: &2156636780 !ruby/object:Gem::Requirement
56
39
  none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- hash: 5
61
- segments:
62
- - 3
63
- - 1
64
- - 3
40
+ requirements:
41
+ - - <=
42
+ - !ruby/object:Gem::Version
43
+ version: 1.3.6
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *2156636780
47
+ - !ruby/object:Gem::Dependency
48
+ name: haml
49
+ requirement: &2156632620 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
65
54
  version: 3.1.3
66
55
  type: :runtime
67
- version_requirements: *id003
68
- - !ruby/object:Gem::Dependency
69
- name: activerecord
70
56
  prerelease: false
71
- requirement: &id004 !ruby/object:Gem::Requirement
57
+ version_requirements: *2156632620
58
+ - !ruby/object:Gem::Dependency
59
+ name: activerecord
60
+ requirement: &2156674120 !ruby/object:Gem::Requirement
72
61
  none: false
73
- requirements:
62
+ requirements:
74
63
  - - ~>
75
- - !ruby/object:Gem::Version
76
- hash: 3
77
- segments:
78
- - 3
79
- - 1
80
- - 0
64
+ - !ruby/object:Gem::Version
81
65
  version: 3.1.0
82
66
  type: :runtime
83
- version_requirements: *id004
84
- - !ruby/object:Gem::Dependency
85
- name: activeresource
86
67
  prerelease: false
87
- requirement: &id005 !ruby/object:Gem::Requirement
68
+ version_requirements: *2156674120
69
+ - !ruby/object:Gem::Dependency
70
+ name: activeresource
71
+ requirement: &2156672900 !ruby/object:Gem::Requirement
88
72
  none: false
89
- requirements:
73
+ requirements:
90
74
  - - ~>
91
- - !ruby/object:Gem::Version
92
- hash: 3
93
- segments:
94
- - 3
95
- - 1
96
- - 0
75
+ - !ruby/object:Gem::Version
97
76
  version: 3.1.0
98
77
  type: :runtime
99
- version_requirements: *id005
78
+ prerelease: false
79
+ version_requirements: *2156672900
100
80
  description:
101
- email:
81
+ email:
102
82
  - artem.avetisyan@bbc.co.uk
103
- executables:
83
+ executables:
104
84
  - rest-assured
105
85
  extensions: []
106
-
107
86
  extra_rdoc_files: []
108
-
109
- files:
87
+ files:
110
88
  - .gitignore
89
+ - .travis.yml
111
90
  - Gemfile
112
- - Gemfile.lock
113
91
  - Guardfile
114
92
  - LICENSE
115
93
  - README.markdown
@@ -200,40 +178,32 @@ files:
200
178
  - views/redirects/new.haml
201
179
  homepage: https://github.com/BBC/rest-assured
202
180
  licenses: []
203
-
204
181
  post_install_message:
205
182
  rdoc_options: []
206
-
207
- require_paths:
183
+ require_paths:
208
184
  - lib
209
- required_ruby_version: !ruby/object:Gem::Requirement
185
+ required_ruby_version: !ruby/object:Gem::Requirement
210
186
  none: false
211
- requirements:
212
- - - ">="
213
- - !ruby/object:Gem::Version
214
- hash: 57
215
- segments:
216
- - 1
217
- - 8
218
- - 7
187
+ requirements:
188
+ - - ! '>='
189
+ - !ruby/object:Gem::Version
219
190
  version: 1.8.7
220
- required_rubygems_version: !ruby/object:Gem::Requirement
191
+ required_rubygems_version: !ruby/object:Gem::Requirement
221
192
  none: false
222
- requirements:
223
- - - ">="
224
- - !ruby/object:Gem::Version
225
- hash: 3
226
- segments:
193
+ requirements:
194
+ - - ! '>='
195
+ - !ruby/object:Gem::Version
196
+ version: '0'
197
+ segments:
227
198
  - 0
228
- version: "0"
199
+ hash: -90823280967256405
229
200
  requirements: []
230
-
231
201
  rubyforge_project: rest-assured
232
- rubygems_version: 1.8.6
202
+ rubygems_version: 1.8.10
233
203
  signing_key:
234
204
  specification_version: 3
235
205
  summary: A tool for high level mocking/stubbing HTTP based REST services
236
- test_files:
206
+ test_files:
237
207
  - features/command_line_options.feature
238
208
  - features/rest_api/doubles.feature
239
209
  - features/rest_api/redirects.feature
@@ -261,4 +231,3 @@ test_files:
261
231
  - spec/models/redirect_spec.rb
262
232
  - spec/models/request_spec.rb
263
233
  - spec/spec_helper.rb
264
- has_rdoc:
data/Gemfile.lock DELETED
@@ -1,158 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rest-assured (0.3.0)
5
- activerecord (~> 3.1.0)
6
- activeresource (~> 3.1.0)
7
- haml (>= 3.1.3)
8
- rack-flash (>= 0.1.2)
9
- sinatra (>= 1.3.1)
10
-
11
- GEM
12
- remote: http://rubygems.org/
13
- specs:
14
- activemodel (3.1.3)
15
- activesupport (= 3.1.3)
16
- builder (~> 3.0.0)
17
- i18n (~> 0.6)
18
- activerecord (3.1.3)
19
- activemodel (= 3.1.3)
20
- activesupport (= 3.1.3)
21
- arel (~> 2.2.1)
22
- tzinfo (~> 0.3.29)
23
- activeresource (3.1.3)
24
- activemodel (= 3.1.3)
25
- activesupport (= 3.1.3)
26
- activesupport (3.1.3)
27
- multi_json (~> 1.0)
28
- addressable (2.2.6)
29
- archive-tar-minitar (0.5.2)
30
- arel (2.2.1)
31
- awesome_print (0.4.0)
32
- builder (3.0.0)
33
- capybara (1.1.1)
34
- mime-types (>= 1.16)
35
- nokogiri (>= 1.3.3)
36
- rack (>= 1.0.0)
37
- rack-test (>= 0.5.4)
38
- selenium-webdriver (~> 2.0)
39
- xpath (~> 0.1.4)
40
- capybara-firebug (0.0.10)
41
- capybara (~> 1.0)
42
- childprocess (0.2.2)
43
- ffi (~> 1.0.6)
44
- columnize (0.3.5)
45
- cucumber (1.1.0)
46
- builder (>= 2.1.2)
47
- diff-lcs (>= 1.1.2)
48
- gherkin (~> 2.5.0)
49
- json (>= 1.4.6)
50
- term-ansicolor (>= 1.0.6)
51
- daemons (1.1.4)
52
- database_cleaner (0.6.7)
53
- diff-lcs (1.1.3)
54
- eventmachine (0.12.10)
55
- ffi (1.0.11)
56
- gherkin (2.5.4)
57
- json (>= 1.4.6)
58
- growl_notify (0.0.3)
59
- rb-appscript
60
- guard (0.8.8)
61
- thor (~> 0.14.6)
62
- guard-spork (0.3.1)
63
- guard (>= 0.8.4)
64
- spork (>= 0.8.4)
65
- haml (3.1.3)
66
- i18n (0.6.0)
67
- interactive_editor (0.0.10)
68
- spoon (>= 0.0.1)
69
- json (1.6.1)
70
- json_pure (1.6.1)
71
- launchy (2.0.5)
72
- addressable (~> 2.2.6)
73
- linecache19 (0.5.12)
74
- ruby_core_source (>= 0.1.4)
75
- mime-types (1.16)
76
- multi_json (1.0.4)
77
- mysql (2.8.1)
78
- nokogiri (1.5.0)
79
- rack (1.3.5)
80
- rack-flash (0.1.2)
81
- rack
82
- rack-protection (1.1.4)
83
- rack
84
- rack-test (0.6.1)
85
- rack (>= 1.0)
86
- rake (0.9.2.2)
87
- rb-appscript (0.6.1)
88
- rb-fsevent (0.4.3.1)
89
- rspec (2.7.0)
90
- rspec-core (~> 2.7.0)
91
- rspec-expectations (~> 2.7.0)
92
- rspec-mocks (~> 2.7.0)
93
- rspec-core (2.7.1)
94
- rspec-expectations (2.7.0)
95
- diff-lcs (~> 1.1.2)
96
- rspec-mocks (2.7.0)
97
- ruby-debug-base19 (0.11.25)
98
- columnize (>= 0.3.1)
99
- linecache19 (>= 0.5.11)
100
- ruby_core_source (>= 0.1.4)
101
- ruby-debug19 (0.11.6)
102
- columnize (>= 0.3.1)
103
- linecache19 (>= 0.5.11)
104
- ruby-debug-base19 (>= 0.11.19)
105
- ruby_core_source (0.1.5)
106
- archive-tar-minitar (>= 0.5.2)
107
- rubyzip (0.9.4)
108
- selenium-webdriver (2.12.2)
109
- childprocess (>= 0.2.1)
110
- ffi (~> 1.0.9)
111
- json_pure
112
- rubyzip
113
- shoulda-matchers (1.0.0.beta3)
114
- sinatra (1.3.1)
115
- rack (~> 1.3, >= 1.3.4)
116
- rack-protection (~> 1.1, >= 1.1.2)
117
- tilt (~> 1.3, >= 1.3.3)
118
- sinatra-activerecord (0.1.3)
119
- sinatra (>= 0.9.4)
120
- spoon (0.0.1)
121
- spork (0.9.0.rc9)
122
- sqlite3 (1.3.4)
123
- term-ansicolor (1.0.7)
124
- thin (1.3.1)
125
- daemons (>= 1.0.9)
126
- eventmachine (>= 0.12.6)
127
- rack (>= 1.0.0)
128
- thor (0.14.6)
129
- tilt (1.3.3)
130
- tzinfo (0.3.31)
131
- xpath (0.1.4)
132
- nokogiri (~> 1.3)
133
-
134
- PLATFORMS
135
- ruby
136
-
137
- DEPENDENCIES
138
- awesome_print
139
- capybara
140
- capybara-firebug
141
- cucumber
142
- database_cleaner
143
- growl_notify
144
- guard-spork
145
- interactive_editor
146
- launchy
147
- mysql
148
- rack-test
149
- rake
150
- rb-fsevent
151
- rest-assured!
152
- rspec
153
- ruby-debug19
154
- shoulda-matchers
155
- sinatra-activerecord
156
- spork (> 0.9.0.rc)
157
- sqlite3 (~> 1.3.4)
158
- thin