bs2 0.1.0 → 0.2.0
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 +4 -4
- data/.github/workflows/{gem-push.yml → publish.yml} +10 -4
- data/.github/workflows/test.yml +26 -0
- data/Gemfile.lock +2 -1
- data/lib/bs2.rb +6 -2
- data/lib/bs2/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc1fec8361a5732235cdb719ec75fb26e3c5a95bc3bd464d71832a0340019974
|
4
|
+
data.tar.gz: 41916656e628d6fe2bc8e261aa5829ea91a91a95ce1bf01c81de2670dd31e02d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0062d5435e28bfd71bc27b21e87467c5eba724b1859ffa80fd09513ce778ecba0aa201cbd72e0cc61b0095caefda6bee15504228525edcb59688c4b3303e6653
|
7
|
+
data.tar.gz: d5f3a982d1d4b037ac71baea54a8b6bcc732a3a26aea3faa6b07df830ba5c2011afd16cceee2b7906aadb23901f0ef9701d55637db90b214efe2aa127d751c6c
|
@@ -1,10 +1,9 @@
|
|
1
|
-
name:
|
1
|
+
name: Publish
|
2
2
|
|
3
3
|
on:
|
4
4
|
push:
|
5
|
-
|
6
|
-
|
7
|
-
branches: [ master ]
|
5
|
+
paths:
|
6
|
+
- lib/bs2/version.rb
|
8
7
|
|
9
8
|
jobs:
|
10
9
|
build:
|
@@ -17,6 +16,13 @@ jobs:
|
|
17
16
|
uses: actions/setup-ruby@v1
|
18
17
|
with:
|
19
18
|
ruby-version: 2.6.x
|
19
|
+
- name: Bundle
|
20
|
+
run: |
|
21
|
+
gem install bundler:2.2.4
|
22
|
+
bundle
|
23
|
+
|
24
|
+
- name: Test
|
25
|
+
run: bundle exec rake test
|
20
26
|
|
21
27
|
- name: Publish to RubyGems
|
22
28
|
run: |
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
build:
|
11
|
+
name: Build + Test
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
- name: Set up Ruby 2.6
|
17
|
+
uses: actions/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: 2.6.x
|
20
|
+
- name: Bundle
|
21
|
+
run: |
|
22
|
+
gem install bundler:2.2.4
|
23
|
+
bundle
|
24
|
+
|
25
|
+
- name: Test
|
26
|
+
run: bundle exec rake test
|
data/Gemfile.lock
CHANGED
data/lib/bs2.rb
CHANGED
@@ -53,12 +53,14 @@ module BS2
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
def generate_pdf(id
|
56
|
+
def generate_pdf(id)
|
57
57
|
connector = create_connector(false)
|
58
58
|
|
59
59
|
response = connector.get("/pj/forintegration/cobranca/v1/boletos/#{id}/imprimivel")
|
60
60
|
|
61
|
-
|
61
|
+
return false unless response.success?
|
62
|
+
|
63
|
+
response.body
|
62
64
|
end
|
63
65
|
|
64
66
|
def fetch_billet(id)
|
@@ -86,6 +88,8 @@ module BS2
|
|
86
88
|
|
87
89
|
resp = connector.post("/pj/forintegration/cobranca/v1/boletos/simplificado", data)
|
88
90
|
|
91
|
+
return false unless resp.success?
|
92
|
+
|
89
93
|
resp.body
|
90
94
|
end
|
91
95
|
|
data/lib/bs2/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bs2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emerson Almeida
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday_middleware
|
@@ -31,7 +31,8 @@ executables: []
|
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
-
- ".github/workflows/
|
34
|
+
- ".github/workflows/publish.yml"
|
35
|
+
- ".github/workflows/test.yml"
|
35
36
|
- ".gitignore"
|
36
37
|
- ".travis.yml"
|
37
38
|
- CODE_OF_CONDUCT.md
|