pingen-client 0.2.0 → 0.3.0

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: b0fa20ad4aed09cdf236b031a30a9dd568841ffa41abb499d3357b70fee5fb3e
4
- data.tar.gz: b2ac3124e1a4b8e0f63a9c00d051b339efedaf19b2528b29c7e738812a44d5f9
3
+ metadata.gz: a14640d900adb7abceeadcb82a0ee4ce287d0b2dbad5f49b55838629dd2940d8
4
+ data.tar.gz: 51b6b529af3eb1bdaa174d8d849661dc07bffe3978ce5716db6f5509f0d000d3
5
5
  SHA512:
6
- metadata.gz: d3342d0757a943ddcd98451b6c989c55bf33027cc33114c178d20ae8db4dc9e4ad6f06dcbb5c1310e0b2416b1324ed2e7508092ea599b9d42a8f25865f82f721
7
- data.tar.gz: 305840fc5a481901e1fed4af32275dd0102046a55c5bfd9dec85588de3cc7a50f2549104cbe2f63d35b62c4bbdf5c61499da3e85b68dc30b8d1d7ec14aed7ecf
6
+ metadata.gz: 59b698dea712f8a29648af79cb3012aa67f60023f94f3fd31d31d7503ce810b021bd6210abe1c3c624185a11248806d3e3be6d3e06206ec6969099cdbb21246e
7
+ data.tar.gz: a4444f1e10d33474a94c19fb9a7a99b10a3e093ffc59f7aeecd1146e92443587de3c9fc0b7833f09fdd1c47f53fd669b338694a085880b46f52590a8364bb424
@@ -0,0 +1,25 @@
1
+ name: Auto approve and merge PRs by dependabot
2
+ on:
3
+ pull_request
4
+ jobs:
5
+ autoapprove:
6
+ name: Auto Approve a PR by dependabot # Name of the job
7
+ runs-on: ubuntu-latest # Environment on which the job runs
8
+ steps:
9
+ - name: Auto approve
10
+ uses: hmarr/auto-approve-action@v2.0.0 # Custom action for auto approval already available on marketplace
11
+ if: (github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]') && (contains(github.event.pull_request.labels.*.name, 'dependencies'))
12
+ with:
13
+ github-token: ${{ github.token }}
14
+ automerge:
15
+ name: Auto merge after successful checks
16
+ needs: autoapprove
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Auto merge
20
+ uses: pascalgn/automerge-action@135f0bdb927d9807b5446f7ca9ecc2c51de03c4a
21
+ if: (github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]')
22
+ env:
23
+ GITHUB_TOKEN: ${{ github.token }}
24
+ MERGE_LABELS: dependencies
25
+ MERGE_METHOD: squash
data/Gemfile.lock CHANGED
@@ -1,12 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pingen-client (0.2.0)
4
+ pingen-client (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- addressable (2.7.0)
9
+ addressable (2.8.0)
10
10
  public_suffix (>= 2.0.2, < 5.0)
11
11
  ast (2.4.2)
12
12
  crack (0.4.5)
@@ -15,12 +15,12 @@ GEM
15
15
  dotenv (2.7.6)
16
16
  hashdiff (1.0.1)
17
17
  multipart-post (2.1.1)
18
- parallel (1.20.1)
19
- parser (3.0.1.1)
18
+ parallel (1.21.0)
19
+ parser (3.0.2.0)
20
20
  ast (~> 2.4.1)
21
21
  public_suffix (4.0.6)
22
22
  rainbow (3.0.0)
23
- rake (13.0.3)
23
+ rake (13.0.6)
24
24
  regexp_parser (2.1.1)
25
25
  rexml (3.2.5)
26
26
  rspec (3.10.0)
@@ -36,28 +36,28 @@ GEM
36
36
  diff-lcs (>= 1.2.0, < 2.0)
37
37
  rspec-support (~> 3.10.0)
38
38
  rspec-support (3.10.2)
39
- rubocop (1.14.0)
39
+ rubocop (1.20.0)
40
40
  parallel (~> 1.10)
41
41
  parser (>= 3.0.0.0)
42
42
  rainbow (>= 2.2.2, < 4.0)
43
43
  regexp_parser (>= 1.8, < 3.0)
44
44
  rexml
45
- rubocop-ast (>= 1.5.0, < 2.0)
45
+ rubocop-ast (>= 1.9.1, < 2.0)
46
46
  ruby-progressbar (~> 1.7)
47
47
  unicode-display_width (>= 1.4.0, < 3.0)
48
- rubocop-ast (1.7.0)
48
+ rubocop-ast (1.12.0)
49
49
  parser (>= 3.0.1.1)
50
- rubocop-performance (1.11.2)
50
+ rubocop-performance (1.11.5)
51
51
  rubocop (>= 1.7.0, < 2.0)
52
52
  rubocop-ast (>= 0.4.0)
53
53
  ruby-progressbar (1.11.0)
54
- standard (1.1.1)
55
- rubocop (= 1.14.0)
56
- rubocop-performance (= 1.11.2)
57
- unicode-display_width (2.0.0)
54
+ standard (1.3.0)
55
+ rubocop (= 1.20.0)
56
+ rubocop-performance (= 1.11.5)
57
+ unicode-display_width (2.1.0)
58
58
  vcr (6.0.0)
59
- webmock (3.13.0)
60
- addressable (>= 2.3.6)
59
+ webmock (3.14.0)
60
+ addressable (>= 2.8.0)
61
61
  crack (>= 0.3.2)
62
62
  hashdiff (>= 0.4.0, < 2.0.0)
63
63
 
@@ -76,4 +76,4 @@ DEPENDENCIES
76
76
  webmock
77
77
 
78
78
  BUNDLED WITH
79
- 2.2.20
79
+ 2.2.27
data/dependabot.yml ADDED
@@ -0,0 +1,19 @@
1
+ version: 2
2
+ updates:
3
+
4
+ # Maintain dependencies for Bundler
5
+ - package-ecosystem: "bundler"
6
+ directory: "/"
7
+ schedule:
8
+ interval: "monthly"
9
+ time: "07:00"
10
+ timezone: "Europe/Zurich"
11
+ assignees:
12
+ - "coorasse"
13
+ labels:
14
+ - "dep-update"
15
+ pull-request-branch-name:
16
+ separator: "-"
17
+ commit-message:
18
+ prefix: "bundler"
19
+ include: "scope"
@@ -12,23 +12,19 @@ module Pingen
12
12
  @client.get_request("/document/get/id/#{id}")
13
13
  end
14
14
 
15
- # send_params:
16
15
  # fast_send: true | false, default: false.
17
16
  # true - A Post
18
17
  # false - B Post
19
- # color: true | false, default: false
20
- def upload(pdf, send: false, **send_params)
21
- data = {send: send}.merge(send ? parse_send_params(send_params) : {})
18
+ def upload(pdf, send: false, fast_send: false, color: false)
19
+ data = {send: send}.merge(send ? parse_send_params(fast_send, color) : {})
22
20
  @client.post_multipart_request("/document/upload", pdf, data: data.to_json)
23
21
  end
24
22
 
25
- # send_params:
26
23
  # fast_send: true | false, default: false.
27
24
  # true - A Post
28
25
  # false - B Post
29
- # color: true | false, default: false
30
- def send(id, **send_params)
31
- @client.post_request("/document/send/id/#{id}", parse_send_params(send_params))
26
+ def send(id, fast_send: false, color: false)
27
+ @client.post_request("/document/send/id/#{id}", parse_send_params(fast_send, color))
32
28
  end
33
29
 
34
30
  def pdf(id)
@@ -41,8 +37,8 @@ module Pingen
41
37
 
42
38
  private
43
39
 
44
- def parse_send_params(**params)
45
- {color: params[:color] ? 1 : 0, speed: params[:fast_send] ? 1 : 2}
40
+ def parse_send_params(fast_send, color)
41
+ {color: color ? 1 : 0, speed: fast_send ? 1 : 2}
46
42
  end
47
43
  end
48
44
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "pingen-client"
5
- spec.version = "0.2.0"
5
+ spec.version = "0.3.0"
6
6
  spec.authors = ["Martin Cavoj", "Alessandro Rodi"]
7
7
  spec.email = ["alessandro.rodi@renuo.ch"]
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pingen-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Cavoj
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-09-20 00:00:00.000000000 Z
12
+ date: 2021-10-27 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: This gem allows you to connect to Pingen API and use the services provided
15
15
  email:
@@ -19,6 +19,7 @@ extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
21
  - ".env.example"
22
+ - ".github/workflows/github_dependabot.yml"
22
23
  - ".gitignore"
23
24
  - ".rspec"
24
25
  - ".semaphore/semaphore.yml"
@@ -31,6 +32,7 @@ files:
31
32
  - bin/check
32
33
  - bin/console
33
34
  - bin/setup
35
+ - dependabot.yml
34
36
  - lib/pingen/client.rb
35
37
  - lib/pingen/documents.rb
36
38
  - lib/pingen/response.rb