airborne 0.0.20 → 0.0.21

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: 72800611382a9339603e8e316774b92c7afadc09
4
- data.tar.gz: 522ad81904bc8644e5b3f4bddeaa9551dfa9c5a0
3
+ metadata.gz: ac24980885b43225b94ae50551b7dbc902a530ff
4
+ data.tar.gz: 3f283170d3c681ba2b951f36c1d3c2be0f007b9f
5
5
  SHA512:
6
- metadata.gz: 5f4a73c106f9d9492ca973815d85f383107010affbf3a37d5db6d7e074c48fb6623e74f693cf550e8d6971f0cf24235af42e310cfbeb37fb1f98542a93f50481
7
- data.tar.gz: 2dc74d2d76a6bd1a3f424b9b563d3e4ea9ea68ecb84c0591b50d1e31b29860406edddb21d1fbc42c643397fcff8e5cedf13ef1524821af01a077fab5a7275fe8
6
+ metadata.gz: ef83ca97f295ded5b8c56a46f993cbffe546dc9a21e71cc7892c2fd124b72a09cb524271626f2cdedb6909b67f9489d465f5a3e7743fdc99e5d5e24c65400cf1
7
+ data.tar.gz: 2b093bcf6f591e4458cae28e59f3d384a58b6df3b8cdefda4e692cc3d1c7b278c0451b9979cc9ee99d303dcfa35a3651a3cffc4d93c472e5473a4e1cfb2df428
@@ -2,7 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - 2.0.0
4
4
  - 2.1.0
5
- - 2.1.1
5
+ - 2.1.3
6
6
 
7
7
 
8
8
  script: bundle exec rspec spec
data/README.md CHANGED
@@ -134,7 +134,35 @@ Airborne.configure do |config|
134
134
  end
135
135
  ```
136
136
 
137
- Under the covers, Airborne uses [rack-test](https://github.com/brynary/rack-test) to make the requests. (Rails applications are still not working correctly, support for Rails will come soon!)
137
+ Under the covers, Airborne uses [rack-test](https://github.com/brynary/rack-test) to make the requests.
138
+
139
+ ##Rails Applications
140
+
141
+ If you're testing and API you've written in Rails, Airborne plays along with `rspec-rails` using the following setup:
142
+
143
+ In your `spec/rails_helper.rb` file, change RSpec configure to Airborne configure, and set the `rack_app` configuration setting to your Rails Application:
144
+
145
+ ```ruby
146
+ Airborne.configure do |config|
147
+ config.rack_app = Rails.application
148
+ end
149
+ ```
150
+
151
+ Then, in your actual tests, since `rspec-rails` already has `get`, `post`, `put`... functions, you need to use `airborne_get`, `airborne_post` instead:
152
+
153
+ ```ruby
154
+ require 'rails_helper'
155
+
156
+ RSpec.describe FooController, :type => :controller do
157
+ describe "GET bar" do
158
+ it "returns correct types" do
159
+ airborne_get '/foo/bar.json'
160
+ expect_json_types({foo: :string})
161
+ end
162
+ end
163
+ end
164
+ ```
165
+ Just like with all other Rack applications, Airborne uses [rack-test](https://github.com/brynary/rack-test) to make the requests.
138
166
 
139
167
  ##API
140
168
 
@@ -306,7 +334,7 @@ end
306
334
 
307
335
  The MIT License
308
336
 
309
- Copyright (c) 2014 brooklyndev, sethpollack
337
+ Copyright (c) 2014 [brooklyndev](https://github.com/brooklynDev), [sethpollack](https://github.com/sethpollack)
310
338
 
311
339
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
312
340
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'airborne'
3
- s.version = '0.0.20'
3
+ s.version = '0.0.21'
4
4
  s.date = '2014-09-12'
5
5
  s.summary = "RSpec driven API testing framework"
6
6
  s.authors = ["Alex Friedman", "Seth Pollack"]
@@ -11,6 +11,6 @@ Gem::Specification.new do |s|
11
11
  s.add_runtime_dependency 'rspec', '~> 3.1', '>= 3.1.0'
12
12
  s.add_runtime_dependency 'rest-client', '~> 1.7', '>= 1.7.2'
13
13
  s.add_runtime_dependency 'rack-test', '~> 0.6', '>= 0.6.2'
14
- s.add_runtime_dependency 'activesupport', '~> 4.1.6', '>= 4.1.6'
14
+ s.add_runtime_dependency 'activesupport', '>= 4.0.1', '>= 4.0.1'
15
15
  s.add_development_dependency 'webmock', '~> 0'
16
- end
16
+ end
@@ -1,5 +1,5 @@
1
1
  require 'json'
2
- require 'active_support/core_ext'
2
+ require 'active_support/hash_with_indifferent_access'
3
3
 
4
4
  module Airborne
5
5
  include RequestExpectations
@@ -60,6 +60,16 @@ module Airborne
60
60
  @json_body
61
61
  end
62
62
 
63
+ alias_method :airborne_get, :get
64
+ alias_method :airborne_post, :post
65
+ alias_method :airborne_patch, :patch
66
+ alias_method :airborne_put, :put
67
+ alias_method :airborne_delete, :delete
68
+ alias_method :airborne_response, :response
69
+ alias_method :airborne_headers, :headers
70
+ alias_method :airborne_body, :body
71
+ alias_method :airborne_json_body, :json_body
72
+
63
73
  private
64
74
 
65
75
  def get_url(url)
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.0.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Friedman
@@ -75,22 +75,16 @@ dependencies:
75
75
  name: activesupport
76
76
  requirement: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - "~>"
79
- - !ruby/object:Gem::Version
80
- version: 4.1.6
81
78
  - - ">="
82
79
  - !ruby/object:Gem::Version
83
- version: 4.1.6
80
+ version: 4.0.1
84
81
  type: :runtime
85
82
  prerelease: false
86
83
  version_requirements: !ruby/object:Gem::Requirement
87
84
  requirements:
88
- - - "~>"
89
- - !ruby/object:Gem::Version
90
- version: 4.1.6
91
85
  - - ">="
92
86
  - !ruby/object:Gem::Version
93
- version: 4.1.6
87
+ version: 4.0.1
94
88
  - !ruby/object:Gem::Dependency
95
89
  name: webmock
96
90
  requirement: !ruby/object:Gem::Requirement
@@ -174,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
168
  version: '0'
175
169
  requirements: []
176
170
  rubyforge_project:
177
- rubygems_version: 2.2.0
171
+ rubygems_version: 2.1.5
178
172
  signing_key:
179
173
  specification_version: 4
180
174
  summary: RSpec driven API testing framework