mifiel 2.0.0 → 2.1.1
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/dependabot.yml +17 -0
- data/.github/workflows/ci.yml +19 -4
- data/.github/workflows/pr-title.yml +35 -0
- data/.github/workflows/publish.yml +86 -0
- data/.release-please-manifest.json +3 -0
- data/Appraisals +5 -2
- data/CHANGELOG.md +25 -0
- data/README.md +28 -13
- data/RELEASING.md +71 -0
- data/gemfiles/rails_7.gemfile +2 -1
- data/gemfiles/rails_8.gemfile +1 -1
- data/lib/mifiel/document.rb +1 -2
- data/lib/mifiel/template.rb +1 -1
- data/lib/mifiel/version.rb +1 -1
- data/lib/mifiel/webhook.rb +24 -0
- data/lib/mifiel.rb +1 -0
- data/mifiel.gemspec +5 -1
- data/release-please-config.json +17 -0
- data/spec/mifiel/document_spec.rb +1 -1
- data/spec/mifiel/template_spec.rb +1 -0
- data/spec/support/fake_mifiel.rb +9 -0
- metadata +15 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eba6455242cf49846c2a5034b49e8e52607301c3fb2a95b070c078cdb81f5ce9
|
|
4
|
+
data.tar.gz: 865eba0522c078f3c475b23e242f963a6875010be73a4ee0b8d1411626df6afe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0f4aee8345311d6354d2471e8bc674772217a87176c5519d12739ad07817ca1adc44f31d0f071433d0b35abceb057adbd0e8aa00df70baf9b552ae8040731974
|
|
7
|
+
data.tar.gz: 4d15e16bc5561c6f102e829df1d7964c8e1b5d6421e658ca8cc06d3304b83663a8ba399353b6b548173769e2f4513b05baf95258d473c6109424b537b1170467
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "bundler"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
commit-message:
|
|
8
|
+
prefix: "chore(deps)"
|
|
9
|
+
prefix-development: "chore(deps-dev)"
|
|
10
|
+
- package-ecosystem: "github-actions"
|
|
11
|
+
directory: "/"
|
|
12
|
+
schedule:
|
|
13
|
+
interval: "monthly"
|
|
14
|
+
cooldown:
|
|
15
|
+
default-days: 7
|
|
16
|
+
commit-message:
|
|
17
|
+
prefix: "chore(deps)"
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -2,8 +2,25 @@ name: CI
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
5
11
|
|
|
6
12
|
jobs:
|
|
13
|
+
rubocop:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v7
|
|
17
|
+
- uses: ruby/setup-ruby@v1
|
|
18
|
+
with:
|
|
19
|
+
ruby-version: '4.0'
|
|
20
|
+
bundler-cache: true
|
|
21
|
+
- name: RuboCop
|
|
22
|
+
run: bundle exec rubocop
|
|
23
|
+
|
|
7
24
|
test:
|
|
8
25
|
runs-on: ubuntu-latest
|
|
9
26
|
strategy:
|
|
@@ -16,14 +33,12 @@ jobs:
|
|
|
16
33
|
env:
|
|
17
34
|
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
|
18
35
|
steps:
|
|
19
|
-
- uses: actions/checkout@v7
|
|
20
|
-
- uses: ruby/setup-ruby@v1
|
|
36
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
37
|
+
- uses: ruby/setup-ruby@13841a643d859a0b8166ebb0211afbf488121be4 # v1.346.0
|
|
21
38
|
with:
|
|
22
39
|
ruby-version: ${{ matrix.ruby }}
|
|
23
40
|
bundler-cache: true
|
|
24
41
|
- name: Create tmp dir
|
|
25
42
|
run: mkdir -p tmp
|
|
26
|
-
- name: RuboCop
|
|
27
|
-
run: bundle exec rubocop
|
|
28
43
|
- name: RSpec
|
|
29
44
|
run: bundle exec rspec
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: PR title
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, edited, synchronize, reopened]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
pull-requests: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
pr-title:
|
|
12
|
+
name: pr-title
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
permissions:
|
|
15
|
+
pull-requests: read
|
|
16
|
+
steps:
|
|
17
|
+
- uses: amannn/action-semantic-pull-request@66e72920af32222769c386d81f89656ebcb6d6d5 # v6.1.4
|
|
18
|
+
env:
|
|
19
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
20
|
+
with:
|
|
21
|
+
# Same list as the action default (commitizen/conventional-commit-types).
|
|
22
|
+
# Listed explicitly so a default change in a later release cannot widen types.
|
|
23
|
+
types: |
|
|
24
|
+
feat
|
|
25
|
+
fix
|
|
26
|
+
docs
|
|
27
|
+
style
|
|
28
|
+
refactor
|
|
29
|
+
perf
|
|
30
|
+
test
|
|
31
|
+
build
|
|
32
|
+
ci
|
|
33
|
+
chore
|
|
34
|
+
revert
|
|
35
|
+
# requireScope is off (the action default). A scope is allowed but not required.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v[0-9]+.[0-9]+.[0-9]+"
|
|
7
|
+
|
|
8
|
+
permissions: {}
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
persist-credentials: false
|
|
20
|
+
|
|
21
|
+
- name: Set up Ruby
|
|
22
|
+
uses: ruby/setup-ruby@13841a643d859a0b8166ebb0211afbf488121be4 # v1.346.0
|
|
23
|
+
with:
|
|
24
|
+
ruby-version: "3.4"
|
|
25
|
+
bundler-cache: false
|
|
26
|
+
|
|
27
|
+
- name: Check version matches tag
|
|
28
|
+
env:
|
|
29
|
+
GITHUB_REF_NAME: ${{ github.ref_name }}
|
|
30
|
+
run: |
|
|
31
|
+
set -euo pipefail
|
|
32
|
+
[[ "$GITHUB_REF_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "Tag $GITHUB_REF_NAME is not vMAJOR.MINOR.PATCH" >&2; exit 1; }
|
|
33
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
34
|
+
version="$(ruby -Ilib -rmifiel/version -e 'puts Mifiel::VERSION')"
|
|
35
|
+
if [ "$tag" != "$version" ]; then
|
|
36
|
+
echo "version mismatch: tag=${tag} version=${version}" >&2
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
- name: Check tagged commit is on main
|
|
41
|
+
run: |
|
|
42
|
+
set -euo pipefail
|
|
43
|
+
git fetch --no-tags origin main
|
|
44
|
+
if ! git merge-base --is-ancestor HEAD origin/main; then
|
|
45
|
+
echo "tagged commit $(git rev-parse --short HEAD) is not an ancestor of origin/main" >&2
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
- name: Build gem
|
|
50
|
+
run: gem build mifiel.gemspec
|
|
51
|
+
|
|
52
|
+
- name: Upload gem
|
|
53
|
+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
54
|
+
with:
|
|
55
|
+
name: gem
|
|
56
|
+
path: mifiel-*.gem
|
|
57
|
+
if-no-files-found: error
|
|
58
|
+
|
|
59
|
+
publish:
|
|
60
|
+
needs: build
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
environment: release
|
|
63
|
+
permissions:
|
|
64
|
+
id-token: write
|
|
65
|
+
steps:
|
|
66
|
+
- name: Download gem
|
|
67
|
+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
68
|
+
with:
|
|
69
|
+
name: gem
|
|
70
|
+
path: pkg
|
|
71
|
+
|
|
72
|
+
# Exchanges the OIDC token for a short-lived RubyGems API key.
|
|
73
|
+
# rubygems/release-gem also pushes a tag, which this workflow must not do.
|
|
74
|
+
- name: Configure RubyGems credentials
|
|
75
|
+
uses: rubygems/configure-rubygems-credentials@c6ca7f4bac0e29c9bde8eeae0a0a986b27efa05f # v2.2.0
|
|
76
|
+
|
|
77
|
+
- name: Publish to RubyGems
|
|
78
|
+
run: |
|
|
79
|
+
set -euo pipefail
|
|
80
|
+
shopt -s nullglob
|
|
81
|
+
gems=(pkg/*.gem)
|
|
82
|
+
if [ "${#gems[@]}" -ne 1 ]; then
|
|
83
|
+
echo "expected one gem, found ${#gems[@]}" >&2
|
|
84
|
+
exit 1
|
|
85
|
+
fi
|
|
86
|
+
gem push "${gems[0]}"
|
data/Appraisals
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
appraise 'rails-7' do
|
|
4
|
-
gem 'rails', '7'
|
|
4
|
+
gem 'rails', '~> 7.2.0'
|
|
5
|
+
# ActiveSupport 7.2 still calls JSON.generate(quirks_mode: true), which json 3 dropped.
|
|
6
|
+
gem 'json', '< 3'
|
|
5
7
|
gem 'mutex_m'
|
|
6
8
|
gem 'benchmark'
|
|
7
9
|
gem 'ostruct'
|
|
8
10
|
end
|
|
9
11
|
|
|
10
12
|
appraise 'rails-8' do
|
|
11
|
-
|
|
13
|
+
# 8.0.x still passes quirks_mode; 8.1 removed it and works with json 3.
|
|
14
|
+
gem 'rails', '~> 8.1.0'
|
|
12
15
|
end
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [2.1.1](https://github.com/Mifiel/ruby-api-client/compare/v2.1.0...v2.1.1) (2026-12-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* PATCH document and template updates ([#24](https://github.com/Mifiel/ruby-api-client/issues/24)) ([94a81f8](https://github.com/Mifiel/ruby-api-client/commit/94a81f8a979671e504ef02ebb308f1f95d411d66))
|
|
9
|
+
|
|
10
|
+
## v2.1.0 - 2026-10-11
|
|
11
|
+
|
|
12
|
+
- Add account-level webhook subscriptions and queued or instant triggering.
|
|
13
|
+
- Slim the README to installation and client setup. The API reference stays at docs.mifiel.com.
|
|
14
|
+
|
|
15
|
+
## v2.0.0 - 2026-08-25
|
|
16
|
+
|
|
17
|
+
### Breaking changes
|
|
18
|
+
|
|
19
|
+
- Require Ruby >= 3.2. Ruby 2.6 through 3.1 are no longer supported.
|
|
20
|
+
- Require `api-auth` ~> 2.0. Request signatures use a SHA1 digest.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Run continuous integration on GitHub Actions for Ruby 3.3, 3.4, and 4.0 against Rails 7 and 8.
|
|
25
|
+
- Remove Travis CI and the Rails 6 appraisal.
|
data/README.md
CHANGED
|
@@ -4,8 +4,16 @@
|
|
|
4
4
|
[![Build Status][travis-image]][travis-url]
|
|
5
5
|
[![Coverage Status][coveralls-image]][coveralls-url]
|
|
6
6
|
|
|
7
|
-
Ruby SDK for [Mifiel](https://www.mifiel.com) API.
|
|
8
|
-
|
|
7
|
+
Ruby SDK for the [Mifiel](https://www.mifiel.com) API.
|
|
8
|
+
|
|
9
|
+
## Documentation
|
|
10
|
+
|
|
11
|
+
API reference, guides, and examples:
|
|
12
|
+
|
|
13
|
+
- English: https://docs.mifiel.com/en/
|
|
14
|
+
- Español: https://docs.mifiel.com/es/
|
|
15
|
+
|
|
16
|
+
This README covers installation and client setup only.
|
|
9
17
|
|
|
10
18
|
## Installation
|
|
11
19
|
|
|
@@ -17,28 +25,35 @@ gem 'mifiel'
|
|
|
17
25
|
|
|
18
26
|
And then execute:
|
|
19
27
|
|
|
20
|
-
|
|
28
|
+
```bash
|
|
29
|
+
bundle
|
|
30
|
+
```
|
|
21
31
|
|
|
22
32
|
Or install it yourself as:
|
|
23
33
|
|
|
24
|
-
|
|
34
|
+
```bash
|
|
35
|
+
gem install mifiel
|
|
36
|
+
```
|
|
25
37
|
|
|
26
|
-
##
|
|
38
|
+
## Setup
|
|
27
39
|
|
|
28
|
-
|
|
40
|
+
1. Create an account (production or [sandbox](https://app-sandbox.mifiel.com)).
|
|
41
|
+
2. Generate an `APP_ID` and `APP_SECRET` in [Access Tokens](https://app-sandbox.mifiel.com/settings/access-tokens).
|
|
42
|
+
3. Configure the gem:
|
|
29
43
|
|
|
30
44
|
```ruby
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
Mifiel.config do |config|
|
|
46
|
+
config.app_id = '<APP_ID>'
|
|
47
|
+
config.app_secret = '<APP_SECRET>'
|
|
48
|
+
# Production is the default.
|
|
49
|
+
# For sandbox:
|
|
50
|
+
config.base_url = 'https://app-sandbox.mifiel.com/api/v1'
|
|
51
|
+
end
|
|
37
52
|
```
|
|
38
53
|
|
|
39
54
|
## Contributing
|
|
40
55
|
|
|
41
|
-
1. Fork it (
|
|
56
|
+
1. Fork it (https://github.com/Mifiel/ruby-api-client/fork)
|
|
42
57
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
43
58
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
44
59
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/RELEASING.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
releasing_schema: 1
|
|
3
|
+
repo: Mifiel/ruby-api-client
|
|
4
|
+
default_branch: main
|
|
5
|
+
owners: ["@genaromadrid"]
|
|
6
|
+
packages:
|
|
7
|
+
- id: api-client
|
|
8
|
+
name: mifiel
|
|
9
|
+
path: "."
|
|
10
|
+
registry: rubygems
|
|
11
|
+
registry_url: https://rubygems.org
|
|
12
|
+
visibility: public
|
|
13
|
+
version_files:
|
|
14
|
+
- path: lib/mifiel/version.rb
|
|
15
|
+
const: "Mifiel::VERSION"
|
|
16
|
+
changelog:
|
|
17
|
+
path: CHANGELOG.md
|
|
18
|
+
format: keep-a-changelog
|
|
19
|
+
tag:
|
|
20
|
+
pattern: "v{version}"
|
|
21
|
+
annotated: true
|
|
22
|
+
signed: true
|
|
23
|
+
release_tool:
|
|
24
|
+
name: manual
|
|
25
|
+
mode: pr-only
|
|
26
|
+
commands:
|
|
27
|
+
prepare: []
|
|
28
|
+
verify:
|
|
29
|
+
- ["gem", "build", "mifiel.gemspec"]
|
|
30
|
+
- ["bundle", "exec", "rspec"]
|
|
31
|
+
publish:
|
|
32
|
+
mode: ci-trusted-publishing
|
|
33
|
+
workflow: .github/workflows/publish.yml
|
|
34
|
+
trigger: tag
|
|
35
|
+
environment: release
|
|
36
|
+
secrets: []
|
|
37
|
+
bot:
|
|
38
|
+
registry_credentials: none
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
# Releasing mifiel
|
|
42
|
+
|
|
43
|
+
Pip, Mifiel's release-preparer bot, opens the release PR. This repo has no release-please workflow or config, and no workflow creates tags.
|
|
44
|
+
|
|
45
|
+
## Steps
|
|
46
|
+
|
|
47
|
+
1. Squash-merge the release PR.
|
|
48
|
+
2. On the merge commit, a maintainer runs:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
git tag -s vX.Y.Z -m "mifiel X.Y.Z" && git push origin vX.Y.Z
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The organization tag ruleset restricts who can create, move, or delete `v*` tags. It does not verify tag signatures, and the publish workflow does not check them. Signing release tags with `git tag -s` is a process step. The publish workflow checks a `vMAJOR.MINOR.PATCH` tag (`v[0-9]+.[0-9]+.[0-9]+`), that it matches `Mifiel::VERSION`, and that the tagged commit is an ancestor of the default branch.
|
|
55
|
+
|
|
56
|
+
3. Approve the `release` environment deployment.
|
|
57
|
+
4. Confirm the version on RubyGems.
|
|
58
|
+
|
|
59
|
+
No GitHub Release.
|
|
60
|
+
|
|
61
|
+
Never delete or move a pushed tag.
|
|
62
|
+
|
|
63
|
+
## Secrets and 2FA
|
|
64
|
+
|
|
65
|
+
- No RubyGems API token anywhere: not in repository, organization, or environment secrets.
|
|
66
|
+
- RubyGems MFA stays required. The gemspec sets `rubygems_mfa_required`.
|
|
67
|
+
- The RubyGems trusted publisher is owner `Mifiel`, repo `ruby-api-client`, workflow `publish.yml`, environment `release`.
|
|
68
|
+
|
|
69
|
+
## Missing tag
|
|
70
|
+
|
|
71
|
+
RubyGems `mifiel` 2.1.0 was published on 2026-10-11 and the signed tag `v2.1.0` is missing. Genaro-only follow-up: after confirming the published gem matches a rebuild, push a signed tag on commit `a69bffe` (`bump v2.1.0`). Do not create that tag from a workflow.
|
data/gemfiles/rails_7.gemfile
CHANGED
data/gemfiles/rails_8.gemfile
CHANGED
data/lib/mifiel/document.rb
CHANGED
|
@@ -5,7 +5,6 @@ require 'api-auth'
|
|
|
5
5
|
|
|
6
6
|
module Mifiel
|
|
7
7
|
class Document < Mifiel::Base
|
|
8
|
-
get :all, '/documents'
|
|
9
8
|
get :find, '/documents/:id'
|
|
10
9
|
|
|
11
10
|
get :raw_file, '/documents/:id/file', plain: true
|
|
@@ -18,7 +17,7 @@ module Mifiel
|
|
|
18
17
|
|
|
19
18
|
get :raw_xml, '/documents/:id/xml', plain: true
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
patch :save, '/documents/:id'
|
|
22
21
|
delete :delete, '/documents/:id'
|
|
23
22
|
post :create_from_template, '/templates/:template_id/generate_document', timeout: 60
|
|
24
23
|
post :create_many_from_template, '/templates/:template_id/generate_documents', timeout: 60
|
data/lib/mifiel/template.rb
CHANGED
data/lib/mifiel/version.rb
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mifiel
|
|
4
|
+
# Account-level webhook subscriptions.
|
|
5
|
+
# @see https://docs.mifiel.com/en/#tag/Webhooks
|
|
6
|
+
class Webhook < Mifiel::Base
|
|
7
|
+
get :all, '/webhooks'
|
|
8
|
+
get :find, '/webhooks/:id'
|
|
9
|
+
post :create, '/webhooks'
|
|
10
|
+
delete :delete, '/webhooks/:id'
|
|
11
|
+
|
|
12
|
+
# Trigger delivery for this webhook.
|
|
13
|
+
#
|
|
14
|
+
# @param resource [String] UUID of the related resource included in the callback payload
|
|
15
|
+
# @param instant [Boolean] when true, deliver immediately once instead of enqueueing retries
|
|
16
|
+
def trigger(resource:, instant: false)
|
|
17
|
+
self.class.process_request(
|
|
18
|
+
"/webhooks/#{id}/trigger",
|
|
19
|
+
:post,
|
|
20
|
+
payload: { resource: resource, instant: instant },
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
data/lib/mifiel.rb
CHANGED
data/mifiel.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
spec.authors = ['Genaro Madrid']
|
|
12
12
|
spec.email = ['genmadrid@gmail.com']
|
|
13
13
|
spec.summary = 'Ruby SDK for mifiel.com.'
|
|
14
|
-
spec.homepage = 'https://
|
|
14
|
+
spec.homepage = 'https://github.com/Mifiel/ruby-api-client'
|
|
15
15
|
spec.license = 'MIT'
|
|
16
16
|
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0")
|
|
@@ -24,5 +24,9 @@ Gem::Specification.new do |spec|
|
|
|
24
24
|
spec.add_dependency 'api-auth', '~> 2.0'
|
|
25
25
|
spec.add_dependency 'flexirest', '~> 1.6'
|
|
26
26
|
|
|
27
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
28
|
+
spec.metadata['homepage_uri'] = 'https://github.com/Mifiel/ruby-api-client'
|
|
29
|
+
spec.metadata['source_code_uri'] = 'https://github.com/Mifiel/ruby-api-client'
|
|
30
|
+
spec.metadata['changelog_uri'] = 'https://github.com/Mifiel/ruby-api-client/blob/main/CHANGELOG.md'
|
|
27
31
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
28
32
|
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packages": {
|
|
3
|
+
".": {
|
|
4
|
+
"changelog-path": "CHANGELOG.md",
|
|
5
|
+
"release-type": "ruby",
|
|
6
|
+
"package-name": "mifiel",
|
|
7
|
+
"version-file": "lib/mifiel/version.rb",
|
|
8
|
+
"include-component-in-tag": false,
|
|
9
|
+
"bump-minor-pre-major": false,
|
|
10
|
+
"bump-patch-for-minor-pre-major": false,
|
|
11
|
+
"draft": false,
|
|
12
|
+
"prerelease": false
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"last-release-sha": "a69bffede6f1b7edcf37380cd3dfa1b36ba39037",
|
|
16
|
+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
|
17
|
+
}
|
|
@@ -68,7 +68,7 @@ describe Mifiel::Document do
|
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
describe 'working with a document' do
|
|
71
|
-
let!(:document) { described_class.
|
|
71
|
+
let!(:document) { described_class.find('doc-id') }
|
|
72
72
|
|
|
73
73
|
describe '#raw_file' do
|
|
74
74
|
let(:document_content) { 'some-pdf-formatted-string' }
|
data/spec/support/fake_mifiel.rb
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
require 'sinatra/base'
|
|
4
4
|
|
|
5
5
|
class FakeMifiel < Sinatra::Base # rubocop:disable Metrics/ClassLength
|
|
6
|
+
# WebMock sends Host: app.mifiel.com. Sinatra's development host check only allows localhost.
|
|
7
|
+
set :host_authorization, { permitted_hosts: ['.mifiel.com'] }
|
|
8
|
+
|
|
6
9
|
get '/api/v1/keys' do
|
|
7
10
|
content_type :json
|
|
8
11
|
status 200
|
|
@@ -80,6 +83,12 @@ class FakeMifiel < Sinatra::Base # rubocop:disable Metrics/ClassLength
|
|
|
80
83
|
).to_json
|
|
81
84
|
end
|
|
82
85
|
|
|
86
|
+
get '/api/v1/documents/:id' do
|
|
87
|
+
content_type :json
|
|
88
|
+
status 200
|
|
89
|
+
document(id: params[:id]).to_json
|
|
90
|
+
end
|
|
91
|
+
|
|
83
92
|
get '/api/v1/documents/:id/file' do
|
|
84
93
|
status 200
|
|
85
94
|
'some-pdf-formatted-string'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mifiel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Genaro Madrid
|
|
@@ -44,14 +44,20 @@ extensions: []
|
|
|
44
44
|
extra_rdoc_files: []
|
|
45
45
|
files:
|
|
46
46
|
- ".editorconfig"
|
|
47
|
+
- ".github/dependabot.yml"
|
|
47
48
|
- ".github/workflows/ci.yml"
|
|
49
|
+
- ".github/workflows/pr-title.yml"
|
|
50
|
+
- ".github/workflows/publish.yml"
|
|
48
51
|
- ".gitignore"
|
|
52
|
+
- ".release-please-manifest.json"
|
|
49
53
|
- ".rspec"
|
|
50
54
|
- ".rubocop.yml"
|
|
51
55
|
- Appraisals
|
|
56
|
+
- CHANGELOG.md
|
|
52
57
|
- Gemfile
|
|
53
58
|
- LICENSE.txt
|
|
54
59
|
- README.md
|
|
60
|
+
- RELEASING.md
|
|
55
61
|
- Rakefile
|
|
56
62
|
- gemfiles/rails_7.gemfile
|
|
57
63
|
- gemfiles/rails_8.gemfile
|
|
@@ -64,9 +70,11 @@ files:
|
|
|
64
70
|
- lib/mifiel/template.rb
|
|
65
71
|
- lib/mifiel/user.rb
|
|
66
72
|
- lib/mifiel/version.rb
|
|
73
|
+
- lib/mifiel/webhook.rb
|
|
67
74
|
- mifiel-ruby-api-client.sublime-project
|
|
68
75
|
- mifiel.gemspec
|
|
69
76
|
- mise.toml
|
|
77
|
+
- release-please-config.json
|
|
70
78
|
- spec/fixtures/FIEL_AAA010101AAA.cer
|
|
71
79
|
- spec/fixtures/FIEL_AAA010101AAA.key
|
|
72
80
|
- spec/fixtures/example.pdf
|
|
@@ -77,10 +85,14 @@ files:
|
|
|
77
85
|
- spec/mifiel/user_spec.rb
|
|
78
86
|
- spec/spec_helper.rb
|
|
79
87
|
- spec/support/fake_mifiel.rb
|
|
80
|
-
homepage: https://
|
|
88
|
+
homepage: https://github.com/Mifiel/ruby-api-client
|
|
81
89
|
licenses:
|
|
82
90
|
- MIT
|
|
83
91
|
metadata:
|
|
92
|
+
allowed_push_host: https://rubygems.org
|
|
93
|
+
homepage_uri: https://github.com/Mifiel/ruby-api-client
|
|
94
|
+
source_code_uri: https://github.com/Mifiel/ruby-api-client
|
|
95
|
+
changelog_uri: https://github.com/Mifiel/ruby-api-client/blob/main/CHANGELOG.md
|
|
84
96
|
rubygems_mfa_required: 'true'
|
|
85
97
|
rdoc_options: []
|
|
86
98
|
require_paths:
|
|
@@ -96,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
96
108
|
- !ruby/object:Gem::Version
|
|
97
109
|
version: '0'
|
|
98
110
|
requirements: []
|
|
99
|
-
rubygems_version:
|
|
111
|
+
rubygems_version: 3.6.9
|
|
100
112
|
specification_version: 4
|
|
101
113
|
summary: Ruby SDK for mifiel.com.
|
|
102
114
|
test_files: []
|