ivapi 1.1.7 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -0
- data/Gemfile +6 -5
- data/LICENSE +14 -14
- data/README.md +4 -3
- data/ivapi.gemspec +1 -0
- data/lib/ivapi/default.rb +1 -8
- data/lib/ivapi/error.rb +1 -1
- data/lib/ivapi/response/raise_error.rb +1 -1
- data/lib/ivapi/version.rb +1 -1
- data/spec/ivapi/error_spec.rb +3 -3
- data/spec/spec_helper.rb +6 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4692c06d81569ff3af2fe27ed0e1d1e2719a56b0
|
4
|
+
data.tar.gz: 934264090ba0f3a6fc8a2523722230bbf9543883
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e63c2e853e52cec1d0d3ac84067d332c60ad8f93639ff9eaf302c337009b3c40df2b3f79d5b9714d6f8f7c16744cb122683da3057b119b61f51e4459cf240a6
|
7
|
+
data.tar.gz: 7521a9abadb42ea469918045e3ed8829df7ac2d06469e92bae146a3836344bcf36d9adae406863519917498388c525ea0fb2b91acfbb96bf0b8eda41a96bac70
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
group :test do
|
4
|
+
gem 'codeclimate-test-reporter', require: false
|
5
|
+
gem 'coveralls', '~> 0.8.13', require: false
|
6
|
+
gem 'guard-rspec', '~> 4.6.5'
|
4
7
|
gem 'rake' # We need a rake gem for Travis CI.
|
5
|
-
gem 'rspec', '~> 3.
|
6
|
-
gem 'simplecov', '~> 0.
|
7
|
-
gem 'webmock', '~> 1.
|
8
|
-
gem 'coveralls', '~> 0.8.3', require: false
|
9
|
-
gem 'guard-rspec', '~> 4.6.4'
|
8
|
+
gem 'rspec', '~> 3.4.0'
|
9
|
+
gem 'simplecov', '~> 0.11.2', require: false
|
10
|
+
gem 'webmock', '~> 1.24.3'
|
10
11
|
end
|
11
12
|
|
12
13
|
gemspec
|
data/LICENSE
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
+
MIT License
|
1
2
|
|
2
|
-
|
3
|
+
Copyright (c) 2016 Justas Palumickas
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
the Software
|
9
|
-
|
10
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
11
|
-
subject to the following conditions:
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
12
11
|
|
13
12
|
The above copyright notice and this permission notice shall be included in all
|
14
13
|
copies or substantial portions of the Software.
|
15
14
|
|
16
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -72,10 +72,11 @@ implementations:
|
|
72
72
|
* Ruby 2.0.0
|
73
73
|
* Ruby 2.1.0
|
74
74
|
* Ruby 2.2.0
|
75
|
+
* Ruby 2.3.0
|
75
76
|
|
76
77
|
## Copyright
|
77
|
-
Copyright (c) 2012-
|
78
|
-
See [LICENSE][] for details.
|
78
|
+
Copyright (c) 2012-2016 Justas Palumickas.
|
79
|
+
See [LICENSE][license] for details.
|
79
80
|
|
80
81
|
[rubygems]: https://rubygems.org/gems/ivapi
|
81
82
|
[travis]: http://travis-ci.org/jpalumickas/ivapi
|
@@ -85,4 +86,4 @@ See [LICENSE][] for details.
|
|
85
86
|
|
86
87
|
[iv.lt]: http://www.iv.lt
|
87
88
|
[dedikuoti.lt]: http://www.dedikuoti.lt
|
88
|
-
[license]: LICENSE
|
89
|
+
[license]: https://raw.githubusercontent.com/jpalumickas/ivapi/master/LICENSE
|
data/ivapi.gemspec
CHANGED
@@ -24,6 +24,7 @@ Gem::Specification.new do |gem|
|
|
24
24
|
gem.add_dependency 'faraday_middleware', '~> 0.10.0'
|
25
25
|
gem.add_dependency 'hashie', '~> 3.4'
|
26
26
|
gem.add_dependency 'multi_json', '~> 1.11'
|
27
|
+
|
27
28
|
gem.add_development_dependency 'bundler', '~> 1.6'
|
28
29
|
gem.add_development_dependency 'rake', '~> 10.0'
|
29
30
|
|
data/lib/ivapi/default.rb
CHANGED
@@ -12,15 +12,8 @@ module Ivapi
|
|
12
12
|
# Default User Agent header string
|
13
13
|
USER_AGENT = "Ivapi ruby gem v#{Ivapi::VERSION}".freeze
|
14
14
|
|
15
|
-
# In Faraday 0.9, Faraday::Builder was renamed to Faraday::RackBuilder
|
16
|
-
RACK_BUILDER_CLASS = if defined?(Faraday::RackBuilder)
|
17
|
-
Faraday::RackBuilder
|
18
|
-
else
|
19
|
-
Faraday::Builder
|
20
|
-
end
|
21
|
-
|
22
15
|
# Default Faraday middleware stack
|
23
|
-
MIDDLEWARE =
|
16
|
+
MIDDLEWARE = Faraday::RackBuilder.new do |builder|
|
24
17
|
builder.request :json
|
25
18
|
|
26
19
|
builder.use FaradayMiddleware::FollowRedirects
|
data/lib/ivapi/error.rb
CHANGED
data/lib/ivapi/version.rb
CHANGED
data/spec/ivapi/error_spec.rb
CHANGED
@@ -3,19 +3,19 @@ describe Ivapi::Error do
|
|
3
3
|
describe '.from_response' do
|
4
4
|
it 'has bad request error raised when status is 400' do
|
5
5
|
response = { status: 400 }
|
6
|
-
expect {
|
6
|
+
expect { raise Ivapi::Error.from_response(response) }
|
7
7
|
.to raise_error(Ivapi::BadRequest)
|
8
8
|
end
|
9
9
|
|
10
10
|
it 'has unauthorized error raised when status is 401' do
|
11
11
|
response = { status: 401 }
|
12
|
-
expect {
|
12
|
+
expect { raise Ivapi::Error.from_response(response) }
|
13
13
|
.to raise_error(Ivapi::Unauthorized)
|
14
14
|
end
|
15
15
|
|
16
16
|
it 'has forbidden error raised when status is 403' do
|
17
17
|
response = { status: 403 }
|
18
|
-
expect {
|
18
|
+
expect { raise Ivapi::Error.from_response(response) }
|
19
19
|
.to raise_error(Ivapi::Forbidden)
|
20
20
|
end
|
21
21
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,17 +1,20 @@
|
|
1
1
|
require 'simplecov'
|
2
2
|
require 'coveralls'
|
3
|
+
require 'codeclimate-test-reporter'
|
3
4
|
|
4
|
-
SimpleCov.
|
5
|
+
SimpleCov.formatters = [
|
5
6
|
SimpleCov::Formatter::HTMLFormatter,
|
6
|
-
Coveralls::SimpleCov::Formatter
|
7
|
+
Coveralls::SimpleCov::Formatter,
|
8
|
+
CodeClimate::TestReporter::Formatter
|
7
9
|
]
|
10
|
+
|
8
11
|
SimpleCov.start
|
9
12
|
|
10
13
|
require 'ivapi'
|
11
14
|
require 'rspec'
|
12
15
|
require 'webmock/rspec'
|
13
16
|
|
14
|
-
WebMock.disable_net_connect!(allow: 'coveralls.io')
|
17
|
+
WebMock.disable_net_connect!(allow: ['coveralls.io', 'codeclimate.com'])
|
15
18
|
|
16
19
|
RSpec.configure do |config|
|
17
20
|
config.expect_with :rspec do |c|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ivapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justas Palumickas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
requirements:
|
182
182
|
- Interneto Vizija allow to use API only on them servers.
|
183
183
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.
|
184
|
+
rubygems_version: 2.6.3
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: Ruby wrapper for working with Interneto Vizija API.
|