rainforestqa 0.0.1
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.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +67 -0
- data/LICENSE.txt +22 -0
- data/README.md +42 -0
- data/Rakefile +7 -0
- data/lib/rainforestqa/api.rb +11 -0
- data/lib/rainforestqa/client.rb +58 -0
- data/lib/rainforestqa/errors.rb +22 -0
- data/lib/rainforestqa/modules/environments.rb +14 -0
- data/lib/rainforestqa/modules/generators.rb +26 -0
- data/lib/rainforestqa/modules/runs.rb +14 -0
- data/lib/rainforestqa/modules/schedules.rb +25 -0
- data/lib/rainforestqa/modules/site_environments.rb +29 -0
- data/lib/rainforestqa/modules/sites.rb +25 -0
- data/lib/rainforestqa/modules/tests.rb +30 -0
- data/lib/rainforestqa/request/encode_json.rb +51 -0
- data/lib/rainforestqa/request.rb +16 -0
- data/lib/rainforestqa/response/parse_json.rb +30 -0
- data/lib/rainforestqa/response/raise_error_from_json.rb +23 -0
- data/lib/rainforestqa/utils.rb +11 -0
- data/lib/rainforestqa/version.rb +3 -0
- data/lib/rainforestqa.rb +17 -0
- data/rainforestqa.gemspec +25 -0
- data/test_local.sh +1 -0
- metadata +113 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: fd81a72126f3cc9713c255d11202ad8af0e37ef2
|
4
|
+
data.tar.gz: 4ab54d4fd886da6a86fd7486ab00372425afb47f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 80bfb02f3ef6f8cb11a2387b06530cd86e36e52d5b7778cefa5e380798a0b570db1508e5d77ddabea9712b1dba147151f17a78db913b64fdac52d10a58289f9a
|
7
|
+
data.tar.gz: d51ac157c79967f6b1c3ed3a91f2c1dd8d1061d16a48a27cd794d195cc83b0225c1352b5c20805fcc8b1f520d2e488cfe3428380afb622c8088182719da5ad4e
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
.idea
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.0.0
|
data/Gemfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'rake'
|
4
|
+
gem 'yard'
|
5
|
+
group :development do
|
6
|
+
gem 'pry'
|
7
|
+
end
|
8
|
+
|
9
|
+
group :test do
|
10
|
+
gem 'webmock'
|
11
|
+
gem 'rspec', '>= 2.14'
|
12
|
+
gem 'simplecov', :require => false
|
13
|
+
gem "codeclimate-test-reporter", require: nil
|
14
|
+
end
|
15
|
+
|
16
|
+
gemspec
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rainforestqa (0.0.1)
|
5
|
+
faraday (~> 0.9.1)
|
6
|
+
json (~> 1.8)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
addressable (2.3.7)
|
12
|
+
codeclimate-test-reporter (0.4.7)
|
13
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
14
|
+
coderay (1.1.0)
|
15
|
+
crack (0.4.2)
|
16
|
+
safe_yaml (~> 1.0.0)
|
17
|
+
diff-lcs (1.2.5)
|
18
|
+
docile (1.1.5)
|
19
|
+
faraday (0.9.1)
|
20
|
+
multipart-post (>= 1.2, < 3)
|
21
|
+
json (1.8.2)
|
22
|
+
method_source (0.8.2)
|
23
|
+
multi_json (1.11.0)
|
24
|
+
multipart-post (2.0.0)
|
25
|
+
pry (0.10.1)
|
26
|
+
coderay (~> 1.1.0)
|
27
|
+
method_source (~> 0.8.1)
|
28
|
+
slop (~> 3.4)
|
29
|
+
rake (10.4.2)
|
30
|
+
rspec (3.2.0)
|
31
|
+
rspec-core (~> 3.2.0)
|
32
|
+
rspec-expectations (~> 3.2.0)
|
33
|
+
rspec-mocks (~> 3.2.0)
|
34
|
+
rspec-core (3.2.2)
|
35
|
+
rspec-support (~> 3.2.0)
|
36
|
+
rspec-expectations (3.2.0)
|
37
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
+
rspec-support (~> 3.2.0)
|
39
|
+
rspec-mocks (3.2.1)
|
40
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
+
rspec-support (~> 3.2.0)
|
42
|
+
rspec-support (3.2.2)
|
43
|
+
safe_yaml (1.0.4)
|
44
|
+
simplecov (0.9.2)
|
45
|
+
docile (~> 1.1.0)
|
46
|
+
multi_json (~> 1.0)
|
47
|
+
simplecov-html (~> 0.9.0)
|
48
|
+
simplecov-html (0.9.0)
|
49
|
+
slop (3.6.0)
|
50
|
+
webmock (1.20.4)
|
51
|
+
addressable (>= 2.3.6)
|
52
|
+
crack (>= 0.3.2)
|
53
|
+
yard (0.8.7.6)
|
54
|
+
|
55
|
+
PLATFORMS
|
56
|
+
ruby
|
57
|
+
|
58
|
+
DEPENDENCIES
|
59
|
+
bundler (~> 1.6)
|
60
|
+
codeclimate-test-reporter
|
61
|
+
pry
|
62
|
+
rainforestqa!
|
63
|
+
rake
|
64
|
+
rspec (>= 2.14)
|
65
|
+
simplecov
|
66
|
+
webmock
|
67
|
+
yard
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Timor Tsentsiper
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Rainforestqa
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'rainforestqa'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install rainforestqa
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
To run this locally (this will start irb)
|
22
|
+
|
23
|
+
```
|
24
|
+
rake console
|
25
|
+
```
|
26
|
+
|
27
|
+
in the console:
|
28
|
+
|
29
|
+
```
|
30
|
+
client = RainforestQA::Client.new(api_key: 'key')
|
31
|
+
client.site_environments
|
32
|
+
```
|
33
|
+
|
34
|
+
etc
|
35
|
+
|
36
|
+
## Contributing
|
37
|
+
|
38
|
+
1. Fork it ( https://github.com/[my-github-username]/rainforestqa/fork )
|
39
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
40
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
41
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
42
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
module RainforestQA
|
2
|
+
module API
|
3
|
+
include RainforestQA::Modules::Schedules
|
4
|
+
include RainforestQA::Modules::Tests
|
5
|
+
include RainforestQA::Modules::Runs
|
6
|
+
include RainforestQA::Modules::Sites
|
7
|
+
include RainforestQA::Modules::Environments
|
8
|
+
include RainforestQA::Modules::SiteEnvironments
|
9
|
+
include RainforestQA::Modules::Generators
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
module RainforestQA
|
2
|
+
class Client
|
3
|
+
include RainforestQA::API
|
4
|
+
|
5
|
+
API_VERSION = '1'.freeze
|
6
|
+
API_URL = 'https://app.rainforestqa.com/api'.freeze
|
7
|
+
API_PREFIX = API_URL + "/" + API_VERSION + "/"
|
8
|
+
|
9
|
+
attr_accessor :api_key
|
10
|
+
|
11
|
+
def initialize(options = {})
|
12
|
+
options.each do | k, v |
|
13
|
+
if v.is_a?(Integer)
|
14
|
+
raise RainforestQA::APIConfigurationError
|
15
|
+
end
|
16
|
+
send(:"#{k}=", v)
|
17
|
+
end
|
18
|
+
yield(self) if block_given?
|
19
|
+
end
|
20
|
+
|
21
|
+
def post(path, params = {})
|
22
|
+
request(:post, path, params)
|
23
|
+
end
|
24
|
+
|
25
|
+
def get(path, params = {})
|
26
|
+
request(:get, path, params)
|
27
|
+
end
|
28
|
+
|
29
|
+
def put(path, params = {})
|
30
|
+
request(:put, path, params)
|
31
|
+
end
|
32
|
+
|
33
|
+
def delete(path, params = {})
|
34
|
+
request(:delete, path, params)
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def connection(options = {})
|
40
|
+
@connection ||= Faraday.new(API_URL, options) do | conn |
|
41
|
+
conn.request :encode_json
|
42
|
+
conn.adapter :net_http
|
43
|
+
conn.response :parse_json
|
44
|
+
conn.response :raise_error_from_json
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def request(method, path, params = {})
|
49
|
+
connection.send(method.to_sym) do | req |
|
50
|
+
req.url API_PREFIX + path
|
51
|
+
req.headers['CLIENT_TOKEN'] = api_key
|
52
|
+
req.params = params
|
53
|
+
end
|
54
|
+
rescue Faraday::Error::TimeoutError, Timeout::Error => error
|
55
|
+
raise(RainforestQA::APITimeoutError.new(error))
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module RainforestQA
|
2
|
+
class APITimeoutError < StandardError; end
|
3
|
+
class APIConfigurationError < StandardError; end
|
4
|
+
|
5
|
+
class APIResponseError < StandardError
|
6
|
+
|
7
|
+
attr_reader :message, :status
|
8
|
+
def initialize(body)
|
9
|
+
@message, @status = parse_error_body(body)
|
10
|
+
super(message)
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
def parse_error_body(body)
|
15
|
+
if body.nil?
|
16
|
+
['', nil]
|
17
|
+
elsif body[:error]
|
18
|
+
[body[:error], body[:success]]
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'rainforestqa/utils'
|
2
|
+
|
3
|
+
module RainforestQA
|
4
|
+
module Modules
|
5
|
+
module Generators
|
6
|
+
include RainforestQA::Utils
|
7
|
+
|
8
|
+
def generators(options = {})
|
9
|
+
perform(:get, "generators", options)
|
10
|
+
end
|
11
|
+
|
12
|
+
def generator(id, options = {})
|
13
|
+
perform(:get, "generators/#{id}", options)
|
14
|
+
end
|
15
|
+
|
16
|
+
def update_generator(id, options = {})
|
17
|
+
perform(:put, "generators/#{id}", options)
|
18
|
+
end
|
19
|
+
|
20
|
+
def delete_generator(id, options = {})
|
21
|
+
perform(:delete, "generators/#{id}", options)
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'rainforestqa/utils'
|
2
|
+
|
3
|
+
module RainforestQA
|
4
|
+
module Modules
|
5
|
+
module Schedules
|
6
|
+
include RainforestQA::Utils
|
7
|
+
|
8
|
+
def schedules(options ={})
|
9
|
+
perform(:get, "schedules", options)
|
10
|
+
end
|
11
|
+
|
12
|
+
def get_schedule(id, options ={})
|
13
|
+
perform(:get, "schedules/#{id}", options)
|
14
|
+
end
|
15
|
+
|
16
|
+
def delete_schedule(id, options = {})
|
17
|
+
perform(:delete, "schedules/#{id}", options)
|
18
|
+
end
|
19
|
+
|
20
|
+
def update_schedule(id, attributes)
|
21
|
+
perform(:put, "schedules/#{id}", attributes )
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'rainforestqa/utils'
|
2
|
+
|
3
|
+
module RainforestQA
|
4
|
+
module Modules
|
5
|
+
module SiteEnvironments
|
6
|
+
include RainforestQA::Utils
|
7
|
+
|
8
|
+
def site_environments(options = {})
|
9
|
+
perform(:get, "site_environments", options)
|
10
|
+
end
|
11
|
+
|
12
|
+
def create_site_environment(options = {})
|
13
|
+
perform(:post, "site_environments", options)
|
14
|
+
end
|
15
|
+
|
16
|
+
def update_site_environment(id, attributes = {})
|
17
|
+
perform(:put, "site_environments/#{id}", attributes)
|
18
|
+
end
|
19
|
+
|
20
|
+
def site_environments_for(site_id, options = {})
|
21
|
+
site_environments = perform(:get, "site_environments", options)
|
22
|
+
site_environments[:site_environments].select do | se |
|
23
|
+
se[:site_id] == site_id
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'rainforestqa/utils'
|
2
|
+
|
3
|
+
module RainforestQA
|
4
|
+
module Modules
|
5
|
+
module Sites
|
6
|
+
include RainforestQA::Utils
|
7
|
+
|
8
|
+
def sites(options = {})
|
9
|
+
perform(:get, "sites", options)
|
10
|
+
end
|
11
|
+
|
12
|
+
def create_site(options = {})
|
13
|
+
perform(:post, "sites", options)
|
14
|
+
end
|
15
|
+
|
16
|
+
def delete_site(id, options ={})
|
17
|
+
perform(:delete, "sites/#{id}", options)
|
18
|
+
end
|
19
|
+
|
20
|
+
def update_site(id, attributes = {})
|
21
|
+
perform(:put, "sites/#{id}", attributes)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rainforestqa/utils'
|
2
|
+
|
3
|
+
module RainforestQA
|
4
|
+
module Modules
|
5
|
+
module Tests
|
6
|
+
include RainforestQA::Utils
|
7
|
+
|
8
|
+
def tests(options = {})
|
9
|
+
perform(:get, "tests", options)
|
10
|
+
end
|
11
|
+
|
12
|
+
def test(id, options = {})
|
13
|
+
perform(:get, "tests/#{id}", options)
|
14
|
+
end
|
15
|
+
|
16
|
+
def update_test(id, attributes = {})
|
17
|
+
perform(:put, "tests/#{id}", attributes)
|
18
|
+
end
|
19
|
+
|
20
|
+
def create_test(attributes = {})
|
21
|
+
perform(:post, "tests", attributes)
|
22
|
+
end
|
23
|
+
|
24
|
+
def delete_test(id, options = {})
|
25
|
+
perform(:delete, "tests/#{id}", options )
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module RainforestQA
|
5
|
+
module RequestExt
|
6
|
+
class EncodeJson < Faraday::Middleware
|
7
|
+
CONTENT_TYPE = 'Content-Type'.freeze
|
8
|
+
MIME_TYPE = 'application/json'.freeze
|
9
|
+
|
10
|
+
dependency do
|
11
|
+
require 'json' unless defined?(::JSON)
|
12
|
+
end
|
13
|
+
|
14
|
+
def call(env)
|
15
|
+
match_content_type(env) do |data|
|
16
|
+
env[:body] = encode data
|
17
|
+
end
|
18
|
+
@app.call env
|
19
|
+
end
|
20
|
+
|
21
|
+
def encode(data)
|
22
|
+
::JSON.dump data
|
23
|
+
end
|
24
|
+
|
25
|
+
def match_content_type(env)
|
26
|
+
if process_request?(env)
|
27
|
+
env[:request_headers][CONTENT_TYPE] ||= MIME_TYPE
|
28
|
+
yield env[:body] unless env[:body].respond_to?(:to_str)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def process_request?(env)
|
33
|
+
type = request_type(env)
|
34
|
+
has_body?(env) and (type.empty? or type == MIME_TYPE)
|
35
|
+
end
|
36
|
+
|
37
|
+
def has_body?(env)
|
38
|
+
body = env[:body] and !(body.respond_to?(:to_str) and body.empty?)
|
39
|
+
end
|
40
|
+
|
41
|
+
def request_type(env)
|
42
|
+
type = env[:request_headers][CONTENT_TYPE].to_s
|
43
|
+
type = type.split(';', 2).first if type.index(';')
|
44
|
+
type
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
Faraday::Request.register_middleware :encode_json => RainforestQA::RequestExt::EncodeJson
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module RainforestQA
|
2
|
+
class Request
|
3
|
+
attr_accessor :client, :request_method, :path, :options
|
4
|
+
|
5
|
+
def initialize(client, request_method, path, options = {})
|
6
|
+
@client = client
|
7
|
+
@request_method = request_method
|
8
|
+
@path = path
|
9
|
+
@options = options
|
10
|
+
end
|
11
|
+
|
12
|
+
def perform
|
13
|
+
@client.send(@request_method, @path, @options).body
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
|
5
|
+
module RainforestQA
|
6
|
+
module ResponseExt
|
7
|
+
class ParseJson < Faraday::Response::Middleware
|
8
|
+
WHITESPACE_REGEX = /\A^\s*$\z/
|
9
|
+
|
10
|
+
def parse(body)
|
11
|
+
case body
|
12
|
+
when WHITESPACE_REGEX, nil
|
13
|
+
nil
|
14
|
+
else
|
15
|
+
JSON.parse(body, :symbolize_names => true)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def on_complete(response)
|
20
|
+
response.body = parse(response.body) if respond_to?(:parse) && !unparsable_status_codes.include?(response.status)
|
21
|
+
end
|
22
|
+
|
23
|
+
def unparsable_status_codes
|
24
|
+
[204, 301, 302, 304]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
Faraday::Response.register_middleware :parse_json => RainforestQA::ResponseExt::ParseJson
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
|
5
|
+
module RainforestQA
|
6
|
+
module ResponseExt
|
7
|
+
class RaiseErrorFromJson < Faraday::Response::Middleware
|
8
|
+
def on_complete(response)
|
9
|
+
code = response.status.to_i
|
10
|
+
body = JSON.parse(response.body, :symbolize_names => true)
|
11
|
+
|
12
|
+
# Error for invalid codes
|
13
|
+
if !(200..300).include?(code)
|
14
|
+
fail(RainforestQA::APIResponseError.new(body))
|
15
|
+
else
|
16
|
+
# How did we get here?
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
Faraday::Response.register_middleware :raise_error_from_json => RainforestQA::ResponseExt::RaiseErrorFromJson
|
data/lib/rainforestqa.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require "rainforestqa/version"
|
2
|
+
require "rainforestqa/version"
|
3
|
+
require "rainforestqa/errors"
|
4
|
+
require "rainforestqa/request/encode_json"
|
5
|
+
require "rainforestqa/response/parse_json"
|
6
|
+
require "rainforestqa/response/raise_error_from_json"
|
7
|
+
require 'rainforestqa/modules/schedules'
|
8
|
+
require 'rainforestqa/modules/tests'
|
9
|
+
require 'rainforestqa/modules/runs'
|
10
|
+
require 'rainforestqa/modules/sites'
|
11
|
+
require 'rainforestqa/modules/environments'
|
12
|
+
require 'rainforestqa/modules/site_environments'
|
13
|
+
require 'rainforestqa/modules/generators'
|
14
|
+
require "rainforestqa/api"
|
15
|
+
require "rainforestqa/request"
|
16
|
+
require "rainforestqa/utils"
|
17
|
+
require "rainforestqa/client"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'rainforestqa/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "rainforestqa"
|
8
|
+
spec.version = RainforestQA::VERSION
|
9
|
+
spec.authors = ["Timor Tsentsiper"]
|
10
|
+
spec.email = ["timor@codecademy.com"]
|
11
|
+
spec.summary = %q{Write a short summary. Required.}
|
12
|
+
spec.description = %q{Write a longer description. Optional.}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
22
|
+
spec.add_dependency 'json', '~> 1.8'
|
23
|
+
spec.add_dependency "faraday", '~> 0.9.1'
|
24
|
+
spec.required_ruby_version = '>= 2.0'
|
25
|
+
end
|
data/test_local.sh
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
irb -I lib -r rainforestqa.rb
|
metadata
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rainforestqa
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Timor Tsentsiper
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-03-30 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.8'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.8'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.9.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.9.1
|
55
|
+
description: Write a longer description. Optional.
|
56
|
+
email:
|
57
|
+
- timor@codecademy.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- .gitignore
|
63
|
+
- .ruby-version
|
64
|
+
- Gemfile
|
65
|
+
- Gemfile.lock
|
66
|
+
- LICENSE.txt
|
67
|
+
- README.md
|
68
|
+
- Rakefile
|
69
|
+
- lib/rainforestqa.rb
|
70
|
+
- lib/rainforestqa/api.rb
|
71
|
+
- lib/rainforestqa/client.rb
|
72
|
+
- lib/rainforestqa/errors.rb
|
73
|
+
- lib/rainforestqa/modules/environments.rb
|
74
|
+
- lib/rainforestqa/modules/generators.rb
|
75
|
+
- lib/rainforestqa/modules/runs.rb
|
76
|
+
- lib/rainforestqa/modules/schedules.rb
|
77
|
+
- lib/rainforestqa/modules/site_environments.rb
|
78
|
+
- lib/rainforestqa/modules/sites.rb
|
79
|
+
- lib/rainforestqa/modules/tests.rb
|
80
|
+
- lib/rainforestqa/request.rb
|
81
|
+
- lib/rainforestqa/request/encode_json.rb
|
82
|
+
- lib/rainforestqa/response/parse_json.rb
|
83
|
+
- lib/rainforestqa/response/raise_error_from_json.rb
|
84
|
+
- lib/rainforestqa/utils.rb
|
85
|
+
- lib/rainforestqa/version.rb
|
86
|
+
- rainforestqa.gemspec
|
87
|
+
- test_local.sh
|
88
|
+
homepage: ''
|
89
|
+
licenses:
|
90
|
+
- MIT
|
91
|
+
metadata: {}
|
92
|
+
post_install_message:
|
93
|
+
rdoc_options: []
|
94
|
+
require_paths:
|
95
|
+
- lib
|
96
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - '>='
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '2.0'
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - '>='
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
requirements: []
|
107
|
+
rubyforge_project:
|
108
|
+
rubygems_version: 2.1.11
|
109
|
+
signing_key:
|
110
|
+
specification_version: 4
|
111
|
+
summary: Write a short summary. Required.
|
112
|
+
test_files: []
|
113
|
+
has_rdoc:
|