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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4721088f9ef97e488e098c9b6df68929b1807690911634eb14d334a12b733c0c
4
- data.tar.gz: e938a5ed1dbcbd56893e177de99770329e99e3934c365a63d2447df3eb1cea91
3
+ metadata.gz: 22d87c29df9db036de3e5a322f8526aab4f71070921567d39fb0e99f4b8ee3a5
4
+ data.tar.gz: fccd18305a5a179e2e60ffb443ae4fd65eaada2ea744739d651c7bbd2e5956c5
5
5
  SHA512:
6
- metadata.gz: bc396e03d1883571e80ded83c31d0a37d3248a5e2ad080dd4f4693cbeab1d00a37720cf84088a7f087eb0f757d485847dc4b2f26c236f2b291848404718a6cd5
7
- data.tar.gz: d0437e3cc3b6e4981d9d54a4854796fa68a0a3ac3516dc0211fc2e7dc29688925f261a38d4945cb7d9b4bc2019a5829dd85d5aca6acc9eb376c85423044c2794
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
@@ -1,4 +1,6 @@
1
+ # 1.0.1
2
+ - Suportando valores BigDecimal para tipo :decimal
1
3
  # 1.0.0
2
- - Implemenado suporte completo a API V1 (NFS-e)
4
+ - Implementado suporte completo a API V1 (NFS-e)
3
5
  # 0.1.0
4
6
  - WIP (ainda não disponível para uso em produção)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- enotas_api (0.1.0)
4
+ enotas_api (1.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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) }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EnotasApi
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
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.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-19 00:00:00.000000000 Z
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"