airborne 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb2cc7c750235264547682073bf9a99fc30eb027
4
- data.tar.gz: ea66ce3a100d4078abcadaa4c832b840d7187f66
3
+ metadata.gz: b0398a03ac513e4fadf9d6e182d133841558dc83
4
+ data.tar.gz: 9670252f3903b13a10bc2618393cd913b51e3aff
5
5
  SHA512:
6
- metadata.gz: e13485b10fcff3a67558501f82a70f0cd0dd12b0cffcfd0275990107ba115715719a6e26a0dc85b9ba60308003e38553047c1aa34d770e47e9a8a3fd7c9bf903
7
- data.tar.gz: fc929249c14d7549170299591e6336474677d1db7f1b5c4d28d9d5eb67127fa045a9601b4136df287be839a4bad891deec4cc77a1ca2dafa73590265af511b21
6
+ metadata.gz: 53595be571ceb18c879b8565966dbcc3e61fac76f100fc731d46baebc76b4146bb039ba2da0db9eb1e120f9f16994f444e9146ee34ef457ec9950326e53dd01f
7
+ data.tar.gz: f02703730d28dad7db1650e067c5178e843cac5a386ad51416e1628ba77d11dea9d2c6c79e612c2e95d82391c5a9f33a47f5cbfa2e5e53d9b736ab689ad44ade
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ -fd -c
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'airborne'
3
- s.version = '0.1.4'
3
+ s.version = '0.1.5'
4
4
  s.date = '2014-11-24'
5
5
  s.summary = "RSpec driven API testing framework"
6
6
  s.authors = ["Alex Friedman", "Seth Pollack"]
@@ -48,7 +48,8 @@ module Airborne
48
48
  set_response(make_request(:head, url, {headers: headers}))
49
49
  end
50
50
 
51
- def options()
51
+ def options(url, headers = nil)
52
+ set_response(make_request(:options, url, {headers: headers}))
52
53
  end
53
54
 
54
55
  def response
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'head' do
4
+ it 'should allow testing on options requests' do
5
+ mock_options('simple_options', {'foo' => 'foo'})
6
+ options '/simple_options', {}
7
+ expect_status(200)
8
+ expect_header('foo', 'foo')
9
+ end
10
+ end
@@ -33,6 +33,10 @@ module StubHelper
33
33
  stub_request(:head, @base_url + url).to_return(headers: response_headers, body: nil, status: status)
34
34
  end
35
35
 
36
+ def mock_options(url, response_headers = {}, status = 200)
37
+ stub_request(:options, @base_url + url).to_return(headers: response_headers, body: nil, status: status)
38
+ end
39
+
36
40
  private
37
41
 
38
42
  def get_json_response_file(name)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airborne
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Friedman
@@ -15,88 +15,88 @@ dependencies:
15
15
  name: rspec
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '3.1'
21
- - - '>='
21
+ - - ">="
22
22
  - !ruby/object:Gem::Version
23
23
  version: 3.1.0
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - ~>
28
+ - - "~>"
29
29
  - !ruby/object:Gem::Version
30
30
  version: '3.1'
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 3.1.0
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rest-client
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.7'
41
- - - '>='
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: 1.7.2
44
44
  type: :runtime
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - ~>
48
+ - - "~>"
49
49
  - !ruby/object:Gem::Version
50
50
  version: '1.7'
51
- - - '>='
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: 1.7.2
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: rack-test
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0.6'
61
- - - '>='
61
+ - - ">="
62
62
  - !ruby/object:Gem::Version
63
63
  version: 0.6.2
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - ~>
68
+ - - "~>"
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0.6'
71
- - - '>='
71
+ - - ">="
72
72
  - !ruby/object:Gem::Version
73
73
  version: 0.6.2
74
74
  - !ruby/object:Gem::Dependency
75
75
  name: activesupport
76
76
  requirement: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - '>='
78
+ - - ">="
79
79
  - !ruby/object:Gem::Version
80
80
  version: 4.0.1
81
81
  type: :runtime
82
82
  prerelease: false
83
83
  version_requirements: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - '>='
85
+ - - ">="
86
86
  - !ruby/object:Gem::Version
87
87
  version: 4.0.1
88
88
  - !ruby/object:Gem::Dependency
89
89
  name: webmock
90
90
  requirement: !ruby/object:Gem::Requirement
91
91
  requirements:
92
- - - ~>
92
+ - - "~>"
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  type: :development
96
96
  prerelease: false
97
97
  version_requirements: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - ~>
99
+ - - "~>"
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  description:
@@ -107,9 +107,10 @@ executables: []
107
107
  extensions: []
108
108
  extra_rdoc_files: []
109
109
  files:
110
- - .coveralls.yml
111
- - .gitignore
112
- - .travis.yml
110
+ - ".coveralls.yml"
111
+ - ".gitignore"
112
+ - ".rspec"
113
+ - ".travis.yml"
113
114
  - Gemfile
114
115
  - LICENSE
115
116
  - README.md
@@ -139,6 +140,7 @@ files:
139
140
  - spec/airborne/expectations/expect_json_types_spec.rb
140
141
  - spec/airborne/expectations/expect_status_spec.rb
141
142
  - spec/airborne/head_spec.rb
143
+ - spec/airborne/options_spec.rb
142
144
  - spec/airborne/patch_spec.rb
143
145
  - spec/airborne/post_spec.rb
144
146
  - spec/airborne/put_spec.rb
@@ -169,17 +171,17 @@ require_paths:
169
171
  - lib
170
172
  required_ruby_version: !ruby/object:Gem::Requirement
171
173
  requirements:
172
- - - '>='
174
+ - - ">="
173
175
  - !ruby/object:Gem::Version
174
176
  version: '0'
175
177
  required_rubygems_version: !ruby/object:Gem::Requirement
176
178
  requirements:
177
- - - '>='
179
+ - - ">="
178
180
  - !ruby/object:Gem::Version
179
181
  version: '0'
180
182
  requirements: []
181
183
  rubyforge_project:
182
- rubygems_version: 2.4.1
184
+ rubygems_version: 2.2.2
183
185
  signing_key:
184
186
  specification_version: 4
185
187
  summary: RSpec driven API testing framework