enotas_api 1.0.0 → 1.0.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/workflows/ruby.yml +33 -0
- data/CHANGELOG.md +3 -1
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/enotas_api/support/type_handler.rb +3 -1
- data/lib/enotas_api/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22d87c29df9db036de3e5a322f8526aab4f71070921567d39fb0e99f4b8ee3a5
|
4
|
+
data.tar.gz: fccd18305a5a179e2e60ffb443ae4fd65eaada2ea744739d651c7bbd2e5956c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06626a5268ffb2aaca2b2b86d2bce7d50eeebc2c44a5148ac2388b2e75a14cea795770d830ca2f075621783bb099d2d88089519bb94926359f2d531eb42f244b
|
7
|
+
data.tar.gz: faf80c71d948c470a040fd8d0e488fae5175094767ea3391d51c25cc391800120eac50bc5179776e8688c6df04dd7dada6c243084da049ec2ae9810fb0fe5c3f
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ main ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ main ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v2
|
23
|
+
- name: Set up Ruby
|
24
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
25
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
26
|
+
# uses: ruby/setup-ruby@v1
|
27
|
+
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
28
|
+
with:
|
29
|
+
ruby-version: 2.6.6
|
30
|
+
- name: Install dependencies
|
31
|
+
run: bundle install
|
32
|
+
- name: Run tests
|
33
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -147,7 +147,7 @@ O suporte as novas APIs (V2) com suporte a NFC-e e NF-e estarão disponíveis em
|
|
147
147
|
1. Enviar ao repositório `git push origin main`
|
148
148
|
1. Criar uma tag `git tag <VERSAO> && git push origin <VERSAO>`
|
149
149
|
1. Gerar uma nova versão da gem `gem build enotas_api`
|
150
|
-
1. Publicar a gem `gem push enotas_api-<VERSAO
|
150
|
+
1. Publicar a gem `gem push enotas_api-<VERSAO>.gem`
|
151
151
|
## Contributing
|
152
152
|
Bug reports and pull requests are welcome on GitHub at https://github.com/salaozen/enotas_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/salaozen/enotas_api/blob/main/CODE_OF_CONDUCT.md).
|
153
153
|
|
@@ -1,10 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'bigdecimal'
|
4
|
+
|
3
5
|
module EnotasApi
|
4
6
|
class TypeHandler
|
5
7
|
VALIDATOR = {
|
6
8
|
boolean: ->(value, _type) { value.is_a?(TrueClass) || value.is_a?(FalseClass) },
|
7
|
-
decimal: ->(value, _type) { value.is_a?(Float) || value.is_a?(Integer) },
|
9
|
+
decimal: ->(value, _type) { value.is_a?(Float) || value.is_a?(Integer) || value.is_a?(BigDecimal) },
|
8
10
|
integer: ->(value, _type) { value.is_a?(Integer) },
|
9
11
|
string: ->(value, _type) { value.is_a?(String) },
|
10
12
|
entity: ->(value, type) { value.is_a?(type) || value.is_a?(Hash) }
|
data/lib/enotas_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enotas_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo Bohrer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -88,6 +88,7 @@ extensions: []
|
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
90
|
- ".editorconfig"
|
91
|
+
- ".github/workflows/ruby.yml"
|
91
92
|
- ".gitignore"
|
92
93
|
- ".rspec"
|
93
94
|
- ".rubocop.yml"
|