pisoni 1.23.1 → 1.23.2

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
  SHA256:
3
- metadata.gz: 0c0d644f09f13b9842035dd8d79c81d5a3b96dda73ef5f6be9ea3cfde25f04e4
4
- data.tar.gz: 439dbc720c9b97fa4d0233873e63ee9fce07530c68aa7f09b5a569109e372bf1
3
+ metadata.gz: 9b32b9bf7d4534092ec0a19ef433f354ba6eb2aebf87b315ed53132541ada123
4
+ data.tar.gz: b45e5cf8b827909cb87b16336f20ee22186b9e302ce4ff6b948cd822aa556ae2
5
5
  SHA512:
6
- metadata.gz: 497ff1601eb48abaf834ef26284d34e4115d939e5abe069351a5188856a027fe720fd3880ed2961b459d1494b988787b7fa12d1849836863a809fd1a68890534
7
- data.tar.gz: b3cd58bb92cfa762a74ed1a2eecebba56e78ff2b3c584af7aa3580501569db54217bb0ec435941182f66b6d2711300d820edf453b04b69c8c3bf7beed3155ddf
6
+ metadata.gz: 7ed1c92963ec49ba67db747d8070b5020119b5ff61599f499cf1fd628ff0c6d09c4adf286159c3c46dfd119f14ce326e05a0b429cc63b4784efeaee05478a007
7
+ data.tar.gz: 8138a68e836ac62f461de46659746b6cc66b2da121c8843132e08570cf141fb551c0ffa738cb5a081e87c5e4e816a969ae3cc3ba3ec95b99100ca8483213f4ae
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  Notable changes to Pisoni will be tracked in this document.
4
4
 
5
+ ## 1.23.2 - 2018-06-04
6
+
7
+ ### Changed
8
+
9
+ - Use `[pisoni]` as default logline prefix instead of `[core]`. ([#5](https://github.com/3scale/pisoni/pull/5))
10
+ - Relax requirement on Faraday version and warn when the user might find issues
11
+ with old versions. ([#4](https://github.com/3scale/pisoni/pull/4))
12
+
5
13
  ## 1.23.1 - 2018-05-29
6
14
 
7
15
  ### Added
data/Makefile CHANGED
@@ -4,7 +4,7 @@ PROJECT_PATH := $(patsubst %/,%,$(dir $(MKFILE_PATH)))
4
4
  include $(PROJECT_PATH)/.env
5
5
 
6
6
  include $(PROJECT_PATH)/mk/compose.mk
7
- COMPOSE := $(COMPOSE_BIN) -f $(PROJECT_PATH)/docker/docker-compose.yml
7
+ COMPOSE ?= $(COMPOSE_BIN) -f $(PROJECT_PATH)/docker/docker-compose.yml -f $(PROJECT_PATH)/docker/docker-compose.apisonator.yml
8
8
 
9
9
  CI_IMAGE_REPO ?= quay.io/3scale
10
10
  CI_IMAGE_NAME ?= pisoni-ci
@@ -12,9 +12,14 @@ CI_IMAGE ?= $(CI_IMAGE_REPO)/$(CI_IMAGE_NAME)
12
12
  CI_DOCKERFILE ?= $(PROJECT_PATH)/docker/Dockerfile.ci
13
13
 
14
14
  include $(PROJECT_PATH)/mk/ci-image.mk
15
+ include $(PROJECT_PATH)/mk/ci.mk
15
16
 
16
17
  all: clean pull build test
17
18
 
19
+ $(call ci_build_target,ci-pull,pull)
20
+ $(call ci_build_target,ci-test,test)
21
+ $(call ci_build_target,ci-compose-config,compose-config)
22
+
18
23
  .PHONY: compose-config
19
24
  compose-config: compose
20
25
  $(COMPOSE) config
data/README.md CHANGED
@@ -1,3 +1,6 @@
1
+ [![CircleCI](https://circleci.com/gh/3scale/pisoni.svg?style=shield)](https://circleci.com/gh/3scale/pisoni)
2
+ [![Maintainability](https://api.codeclimate.com/v1/badges/4b18ae93abefdba17e0b/maintainability)](https://codeclimate.com/github/3scale/pisoni/maintainability)
3
+
1
4
  # Pisoni
2
5
 
3
6
  Pisoni is a Ruby client for the internal API of the
data/bors.toml ADDED
@@ -0,0 +1,3 @@
1
+ status = ["ci/circleci"]
2
+ pr_status = ["ci/circleci", "codeclimate"]
3
+ delete_merged_branches = true
@@ -5,7 +5,7 @@ module ThreeScale
5
5
  module Logger
6
6
  InjectedLogger.use(:error, :info, :debug) {}
7
7
  InjectedLogger.after_injection do |logger|
8
- logger.prefix = '[core]' unless logger.prefix
8
+ logger.prefix = '[pisoni]' unless logger.prefix
9
9
  end
10
10
  end
11
11
  end
@@ -14,9 +14,9 @@ module ThreeScale
14
14
  result = api_do_get(options,
15
15
  { uri: service_errors_uri(service_id),
16
16
  prefix: '',
17
- rprefix: :errors }) do |result|
18
- if result[:response].status == 400 &&
19
- result[:response_json][:error] == 'per_page needs to be > 0'
17
+ rprefix: :errors }) do |res|
18
+ if res[:response].status == 400 &&
19
+ res[:response_json][:error] == 'per_page needs to be > 0'
20
20
  raise InvalidPerPage.new
21
21
  end
22
22
  true
@@ -12,8 +12,8 @@ module ThreeScale
12
12
 
13
13
  def self.load_all(service_id)
14
14
  result = api_do_get({}, { uri: transactions_uri(service_id),
15
- rprefix: :transactions }) do |result|
16
- return nil if result[:response].status == 404
15
+ rprefix: :transactions }) do |res|
16
+ return nil if res[:response].status == 404
17
17
  true
18
18
  end
19
19
 
@@ -13,8 +13,8 @@ module ThreeScale
13
13
  def self.load(service_id, app_id)
14
14
  result = api_do_get({},
15
15
  uri: utilization_uri(service_id, app_id),
16
- rprefix: :utilization) do |result|
17
- return nil if result[:response].status == 404
16
+ rprefix: :utilization) do |res|
17
+ return nil if res[:response].status == 404
18
18
  true
19
19
  end
20
20
 
@@ -1,5 +1,5 @@
1
1
  module ThreeScale
2
2
  module Core
3
- VERSION = '1.23.1'
3
+ VERSION = '1.23.2'
4
4
  end
5
5
  end
data/lib/3scale/core.rb CHANGED
@@ -1,6 +1,14 @@
1
1
  require 'uri'
2
2
  require 'json'
3
3
  require 'faraday'
4
+ require 'net/http/persistent'
5
+
6
+ # Warn that Faraday < 0.13 and Net::HTTP::Persistent >= 3.0.0 don't mix well
7
+ if Faraday::VERSION =~ /0\.([0-9]|1[012])\.\d+/ &&
8
+ Net::HTTP::Persistent::VERSION =~ /^[^012]\.\d+\.\d+/
9
+ warn 'The combination of faraday < 0.13 and net-http-persistent 3.0+ is ' \
10
+ 'known to have issues. See https://github.com/lostisland/faraday/issues/617'
11
+ end
4
12
 
5
13
  require '3scale/core/version'
6
14
  require '3scale/core/logger'
data/pisoni.gemspec CHANGED
@@ -18,9 +18,9 @@ Gem::Specification.new do |s|
18
18
  s.description = 'Client for the Apisonator internal API for model data.'
19
19
  s.license = 'Apache-2.0'
20
20
 
21
- s.add_dependency 'faraday', '~> 0.13.1'
22
- s.add_dependency 'json', '~> 1.8.1'
23
- s.add_dependency 'injectedlogger', '~> 0.0.13'
21
+ s.add_dependency 'faraday', '>= 0.9.1'
22
+ s.add_dependency 'json', '>= 1.8.1'
23
+ s.add_dependency 'injectedlogger', '>= 0.0.13'
24
24
  s.add_dependency 'net-http-persistent'
25
25
 
26
26
  s.add_development_dependency 'rake'
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pisoni
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.23.1
4
+ version: 1.23.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alejandro Martinez Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-29 00:00:00.000000000 Z
11
+ date: 2018-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.13.1
19
+ version: 0.9.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.13.1
26
+ version: 0.9.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.8.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.8.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: injectedlogger
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.0.13
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.0.13
55
55
  - !ruby/object:Gem::Dependency
@@ -94,6 +94,7 @@ files:
94
94
  - NOTICE
95
95
  - README.md
96
96
  - Rakefile
97
+ - bors.toml
97
98
  - lib/3scale/core.rb
98
99
  - lib/3scale/core/alert_limit.rb
99
100
  - lib/3scale/core/api_client.rb