epics 1.7.2 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semaphore/semaphore.yml +51 -0
- data/CHANGELOG.md +5 -0
- data/README.md +2 -2
- data/epics.gemspec +5 -10
- data/lib/epics/client.rb +1 -1
- data/lib/epics/middleware/parse_ebics.rb +3 -3
- data/lib/epics/middleware/xmlsig.rb +2 -4
- data/lib/epics/version.rb +1 -1
- data/spec/middleware/parse_ebics_spec.rb +1 -1
- metadata +16 -16
- data/.travis.yml +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a022ab9e8c8af9a64b970a4d927b53f09321b6767545bee5c584538aa4a296a
|
4
|
+
data.tar.gz: 3dd7d404d54e32fe14993ba0272e666b94f38e1238d304c916d373ea057bff75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d821c36ea05aa51c005dd1dc6b86cd28f8067faf746e556e87f098fecd1a1951c2e33f3ee4a2df494a0df54e168b07f3155ea60be132a4663711a39ab03f8116
|
7
|
+
data.tar.gz: b48e1f0da804c867f0ce292f2db56352745f515607ea2292bae08c689fb6124b7c025aa4463792042a0e85feda8b4a0016b612c97cbb443d0648e5f499e84967
|
@@ -0,0 +1,51 @@
|
|
1
|
+
version: v1.0
|
2
|
+
name: Test
|
3
|
+
agent:
|
4
|
+
machine:
|
5
|
+
type: e1-standard-2
|
6
|
+
os_image: ubuntu1804
|
7
|
+
blocks:
|
8
|
+
- name: Setup
|
9
|
+
task:
|
10
|
+
jobs:
|
11
|
+
- name: "Checkout"
|
12
|
+
commands:
|
13
|
+
- checkout
|
14
|
+
- ls
|
15
|
+
- rm -f .rbenv-version .ruby-version
|
16
|
+
- name: Spec versions
|
17
|
+
task:
|
18
|
+
jobs:
|
19
|
+
- name: "2.4"
|
20
|
+
commands:
|
21
|
+
- checkout
|
22
|
+
- sem-version ruby 2.4
|
23
|
+
- cache restore
|
24
|
+
- bundle install
|
25
|
+
- cache store
|
26
|
+
- bundle exec rspec
|
27
|
+
- name: "2.5"
|
28
|
+
commands:
|
29
|
+
- checkout
|
30
|
+
- sem-version ruby 2.5
|
31
|
+
- cache restore
|
32
|
+
- bundle install
|
33
|
+
- cache store
|
34
|
+
- bundle exec rspec
|
35
|
+
- name: "2.6"
|
36
|
+
commands:
|
37
|
+
- checkout
|
38
|
+
- sem-version ruby 2.6
|
39
|
+
- cache restore
|
40
|
+
- bundle install
|
41
|
+
- cache store
|
42
|
+
- bundle exec rspec
|
43
|
+
- name: "jruby-9.2.0.0"
|
44
|
+
commands:
|
45
|
+
- checkout
|
46
|
+
- sem-version ruby jruby-9.2.0.0
|
47
|
+
- cache restore
|
48
|
+
- gem install bundler
|
49
|
+
- bundle install
|
50
|
+
- cache store
|
51
|
+
- bundle exec rspec
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![Build Status](https://
|
1
|
+
[![Build Status](https://railslove.semaphoreci.com/badges/epics/branches/master.svg?style=shields)](https://railslove.semaphoreci.com/branches/c29225c5-5b7e-4a90-8ac8-22d1aa28efcf)
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/epics.svg)](http://badge.fury.io/rb/epics)
|
3
3
|
|
4
4
|
# Epics
|
@@ -264,4 +264,4 @@ EPICS_VERIFY_SSL=false
|
|
264
264
|
|
265
265
|
---
|
266
266
|
|
267
|
-
2014-
|
267
|
+
2014-2019 - built with love by [Railslove](http://railslove.com) and released under the [GNU LESSER GENERAL PUBLIC LICENSE](https://github.com/railslove/epics/blob/master/LICENSE.txt). We have built quite a number of FinTech products. If you need support we are happy to help. Please contact us at team@railslove.com.
|
data/epics.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.homepage = 'https://github.com/railslove/epics'
|
27
27
|
spec.license = 'LGPL-3.0'
|
28
28
|
|
29
|
-
spec.required_ruby_version = '>= 2.
|
29
|
+
spec.required_ruby_version = '>= 2.4'
|
30
30
|
|
31
31
|
spec.files = `git ls-files -z`.split("\x0")
|
32
32
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
@@ -40,19 +40,14 @@ Gem::Specification.new do |spec|
|
|
40
40
|
spec.post_install_message += "Please create an issue on github (railslove/epics) if anything does not work as expected. And contact team@railslove.com if you are looking for support with your integration.\n"
|
41
41
|
spec.post_install_message += "\e[32m" + ('*' * 60) + "\n\e[0m"
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
spec.add_dependency 'nokogiri', '>= 1.8.5'
|
47
|
-
end
|
48
|
-
|
49
|
-
spec.add_dependency 'faraday'
|
50
|
-
spec.add_dependency 'rubyzip', '>= 1.2.1'
|
43
|
+
spec.add_dependency 'faraday', '>= 1.0.0'
|
44
|
+
spec.add_dependency 'nokogiri', '>= 1.10.7'
|
45
|
+
spec.add_dependency 'rubyzip', '2.2.0'
|
51
46
|
|
52
47
|
spec.add_development_dependency 'bundler', '>= 1.6.2'
|
53
48
|
spec.add_development_dependency 'equivalent-xml'
|
54
49
|
spec.add_development_dependency 'pry'
|
55
|
-
spec.add_development_dependency 'rake', '~>
|
50
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
56
51
|
spec.add_development_dependency 'rspec'
|
57
52
|
spec.add_development_dependency 'webmock'
|
58
53
|
end
|
data/lib/epics/client.rb
CHANGED
@@ -250,8 +250,8 @@ class Epics::Client
|
|
250
250
|
@connection ||= Faraday.new(headers: { 'Content-Type' => 'text/xml', user_agent: "EPICS v#{Epics::VERSION}"}, ssl: { verify: verify_ssl? }) do |faraday|
|
251
251
|
faraday.use Epics::XMLSIG, { client: self }
|
252
252
|
faraday.use Epics::ParseEbics, { client: self}
|
253
|
+
# faraday.use MyAdapter
|
253
254
|
# faraday.response :logger # log requests to STDOUT
|
254
|
-
faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
|
255
255
|
end
|
256
256
|
end
|
257
257
|
|
@@ -8,9 +8,9 @@ class Epics::ParseEbics < Faraday::Middleware
|
|
8
8
|
|
9
9
|
def call(env)
|
10
10
|
@app.call(env).on_complete do |response|
|
11
|
-
response
|
12
|
-
raise Epics::Error::TechnicalError, response
|
13
|
-
raise Epics::Error::BusinessError, response
|
11
|
+
response.body = ::Epics::Response.new(@client, response.body)
|
12
|
+
raise Epics::Error::TechnicalError, response.body.technical_code if response.body.technical_error?
|
13
|
+
raise Epics::Error::BusinessError, response.body.business_code if response.body.business_error?
|
14
14
|
end
|
15
15
|
rescue Epics::Error::TechnicalError, Epics::Error::BusinessError
|
16
16
|
raise # re-raise as otherwise they would be swallowed by the following rescue
|
@@ -6,13 +6,11 @@ class Epics::XMLSIG < Faraday::Middleware
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def call(env)
|
9
|
-
@signer = Epics::Signer.new(@client, env
|
9
|
+
@signer = Epics::Signer.new(@client, env.request_body)
|
10
10
|
@signer.digest!
|
11
11
|
@signer.sign!
|
12
12
|
|
13
|
-
env
|
14
|
-
|
13
|
+
env.request_body = @signer.doc.to_xml(save_with: Nokogiri::XML::Node::SaveOptions::AS_XML)
|
15
14
|
@app.call(env)
|
16
15
|
end
|
17
|
-
|
18
16
|
end
|
data/lib/epics/version.rb
CHANGED
@@ -9,7 +9,7 @@ RSpec.describe Epics::ParseEbics do
|
|
9
9
|
stub.post('/technical_nok') { [200, {}, File.read(File.join(File.dirname(__FILE__), '..', 'fixtures', 'xml', 'ebics_technical_nok.xml'))] }
|
10
10
|
stub.post('/ok') { [200, {}, File.read(File.join(File.dirname(__FILE__), '..', 'fixtures', 'xml', 'hpb_response_ebics_ns.xml'))] }
|
11
11
|
stub.post('/timeout') { raise Faraday::TimeoutError }
|
12
|
-
stub.post('/no_connection') { raise Faraday::
|
12
|
+
stub.post('/no_connection') { raise Faraday::ConnectionFailed, 'peer has finished all lan parties and gone home' }
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: epics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lars Brillert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.0.0
|
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: 1.
|
26
|
+
version: 1.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.10.7
|
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
|
-
version:
|
40
|
+
version: 1.10.7
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rubyzip
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 2.2.0
|
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
|
-
version:
|
54
|
+
version: 2.2.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '13.0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '13.0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,7 +155,7 @@ extra_rdoc_files: []
|
|
155
155
|
files:
|
156
156
|
- ".gitignore"
|
157
157
|
- ".rspec"
|
158
|
-
- ".
|
158
|
+
- ".semaphore/semaphore.yml"
|
159
159
|
- CHANGELOG.md
|
160
160
|
- CONTRIBUTING.md
|
161
161
|
- Gemfile
|
@@ -298,7 +298,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
298
298
|
requirements:
|
299
299
|
- - ">="
|
300
300
|
- !ruby/object:Gem::Version
|
301
|
-
version: '2.
|
301
|
+
version: '2.4'
|
302
302
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
303
303
|
requirements:
|
304
304
|
- - ">="
|