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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b7bdf98a2ffd8a815f23fa7c0fb156b65db15c2
4
- data.tar.gz: 2c9c6b90f0eb6e22664593708c719632636e9731
3
+ metadata.gz: 4692c06d81569ff3af2fe27ed0e1d1e2719a56b0
4
+ data.tar.gz: 934264090ba0f3a6fc8a2523722230bbf9543883
5
5
  SHA512:
6
- metadata.gz: fad1b24f0b125671dd6f9663e0014f9b54ea69be808a31bb5cd751dca6871e53a3c117ddf3f4d8376575607586a7db9c57cc4c3de69d9ef826384c7b604124d4
7
- data.tar.gz: 841ee6f1a1e95ea9601f26b62f4d1420fbf2622f9275dba8923f71a3f8bc207389c1ca776444e61aaceb62fdd0d2042fcd4b30716d7361fdc13308a84f01c90b
6
+ metadata.gz: 5e63c2e853e52cec1d0d3ac84067d332c60ad8f93639ff9eaf302c337009b3c40df2b3f79d5b9714d6f8f7c16744cb122683da3057b119b61f51e4459cf240a6
7
+ data.tar.gz: 7521a9abadb42ea469918045e3ed8829df7ac2d06469e92bae146a3836344bcf36d9adae406863519917498388c525ea0fb2b91acfbb96bf0b8eda41a96bac70
data/.travis.yml CHANGED
@@ -1,3 +1,8 @@
1
+ sudo: false
2
+
3
+ before_install:
4
+ - gem install bundler
5
+
1
6
  bundler_args: --without development
2
7
 
3
8
  language: ruby
@@ -7,6 +12,7 @@ rvm:
7
12
  - 2.0.0
8
13
  - 2.1.0
9
14
  - 2.2.0
15
+ - 2.3.0
10
16
  - ruby-head
11
17
  - jruby-19mode
12
18
  - jruby-head
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.3.0'
6
- gem 'simplecov', '~> 0.10.0', require: false
7
- gem 'webmock', '~> 1.21.0'
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
- The MIT License (MIT)
3
+ Copyright (c) 2016 Justas Palumickas
3
4
 
4
- Copyright (c) 2012 Justas Palumickas
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy of
7
- this software and associated documentation files (the "Software"), to deal in
8
- the Software without restriction, including without limitation the rights to
9
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
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, FITNESS
18
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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-2015 Justas Palumickas.
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.md
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 = RACK_BUILDER_CLASS.new do |builder|
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
@@ -7,7 +7,7 @@ module Ivapi
7
7
  #
8
8
  # Returns the Ivapi::Error.
9
9
  def self.from_response(response)
10
- status = response[:status].to_i
10
+ status = response[:status].to_i
11
11
 
12
12
  klass = case status
13
13
  when 400 then Ivapi::BadRequest
@@ -11,7 +11,7 @@ module Ivapi
11
11
 
12
12
  def on_complete(response)
13
13
  error = Ivapi::Error.from_response(response)
14
- fail error if error
14
+ raise error if error
15
15
  end
16
16
  end
17
17
  end
data/lib/ivapi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ivapi
2
- VERSION = '1.1.7'
2
+ VERSION = '1.1.8'.freeze
3
3
  end
@@ -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 { fail Ivapi::Error.from_response(response) }
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 { fail Ivapi::Error.from_response(response) }
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 { fail Ivapi::Error.from_response(response) }
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.formatter = SimpleCov::Formatter::MultiFormatter[
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.7
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: 2015-10-13 00:00:00.000000000 Z
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.4.5.1
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.