capybara-typhoeus 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,47 +1,31 @@
1
- Capybara-restfulie
1
+ Capybara-typhoeus
2
2
  ==================
3
3
 
4
- This gems makes it possible to use [Faraday](http://github.com/technoweenie/faraday) for remote testing.
4
+ This gems makes it possible to use [Typhoeus](https://github.com/dbalatero/typhoeus) for remote testing.
5
5
 
6
6
  This gem is a [Capybara](http://github.com/jnicklas/capybara) extension. The structure of the gem is taken from the work done on [Capybara-mechanize](http://github.com/jeroenvandijk/capybara-mechanize).
7
7
 
8
8
  ### Installation
9
9
 
10
- gem install capybara-faraday
10
+ gem install capybara-typhoeus
11
11
 
12
12
  ### Usage without Cucumber
13
13
 
14
- require 'capybara/faraday'
14
+ require 'capybara/typhoeus'
15
15
 
16
16
  ### Usage with Cucumber and tags
17
17
 
18
- A @faraday tag is added to your hooks when you add the following line to your env.rb
18
+ A @typhoeus tag is added to your hooks when you add the following line to your env.rb
19
19
 
20
- require 'capybara/faraday/cucumber'
20
+ require 'capybara/typhoeus/cucumber'
21
21
 
22
- The following scenario will then be using the Faraday driver
22
+ The following scenario will then be using the Typhoeus driver
23
23
 
24
- @faraday
24
+ @typhoeus
25
25
  Scenario: do something with the API
26
26
  Given I send and accept JSON
27
27
  When I send a GET request to /users
28
-
29
- If you want to use a specific faraday supported adapter, you need to install the dependency and then specify the tag matching it:
30
28
 
31
- To use Typhoeus
32
-
33
- @faraday_typhoeus
34
- Scenario: do something with the API
35
- Given I send and accept JSON
36
- When I send a GET request to /users
37
-
38
- To use Patron
39
-
40
- @faraday_patron
41
- Scenario: do something with the API
42
- Given I send and accept JSON
43
- When I send a GET request to /users
44
-
45
29
  ### Remote testing
46
30
 
47
31
  When you want to use this driver to test a remote application. You have to set the app_host:
@@ -127,7 +127,7 @@ class Capybara::Driver::Typhoeus < Capybara::Driver::Base
127
127
  opts = {
128
128
  :method => method,
129
129
  :headers => headers.merge("Content-Type" => as, "Accept" => as),
130
- :timeout => 100,
130
+ :timeout => 2000, # 2 seconds
131
131
  }
132
132
  opts[method==:get ? :params : :body] = params
133
133
  request = Typhoeus::Request.new @current_uri, opts
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-typhoeus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: capybara
17
- requirement: &2156010100 !ruby/object:Gem::Requirement
17
+ requirement: &2157319400 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 0.4.1
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2156010100
25
+ version_requirements: *2157319400
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: typhoeus
28
- requirement: &2156088440 !ruby/object:Gem::Requirement
28
+ requirement: &2157318920 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 0.2.4
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2156088440
36
+ version_requirements: *2157318920
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: yajl-ruby
39
- requirement: &2156177540 !ruby/object:Gem::Requirement
39
+ requirement: &2157318440 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: 0.8.2
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2156177540
47
+ version_requirements: *2157318440
48
48
  description: Typhoeus driver for Capybara, allowing testing of REST APIs
49
49
  email: joseph.halter@thetalentbox.com
50
50
  executables: []