ftf 0.0.8 → 0.1.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/.markdownlint.yaml +4 -0
- data/.rubocop.yml +3 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +18 -2
- data/README.md +31 -10
- data/ftf-0.0.8.gem +0 -0
- data/lib/ftf/generator.rb +2 -3
- data/lib/ftf/version.rb +1 -1
- metadata +10 -45
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5fbff326e39fd778026e133f8bfcd5926791a1f296163099485ac27abfa1cad9
|
|
4
|
+
data.tar.gz: ab5f0989838c97972eeb2007ac28d259ac4553b1a08b03e73ae1da1b7dc3c8d5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 299a3512a2cdfd35bdc6c28470bbf7dcc1363e16b733a75e763986bebb0c7c526f6f41e323b15a3b51c3e2d0e2cae83bb6b616d7b4b0366ade5d611eff12f39e
|
|
7
|
+
data.tar.gz: 0252ea55d127d25a70d4b70b1ea945eda80e90f3f5d9eedaea55644f3b69ada1ea10383c9f438938fe8807eb054836a31ae357f0639cf79c3d180d1ffeb86421
|
data/.markdownlint.yaml
ADDED
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.4.12
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this gem are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow
|
|
5
|
+
[Semantic Versioning](https://semver.org).
|
|
6
|
+
|
|
1
7
|
## [Unreleased]
|
|
2
8
|
|
|
3
|
-
## [0.1.0] -
|
|
9
|
+
## [0.1.0] - 2026-11-10
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **Breaking:** requires Ruby 3.2 or later ([#11](https://github.com/devengoapp/ftf/pull/11)).
|
|
14
|
+
- Releases are published with trusted publishing and a Sigstore attestation ([#12](https://github.com/devengoapp/ftf/pull/12)).
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
- Drops the unused `fiddle` and `rdoc` runtime dependencies, and relaxes `zeitwerk` to `~> 2.6` ([#11](https://github.com/devengoapp/ftf/pull/11)).
|
|
4
19
|
|
|
5
|
-
|
|
20
|
+
[Unreleased]: https://github.com/devengoapp/ftf/compare/v0.1.0...HEAD
|
|
21
|
+
[0.1.0]: https://github.com/devengoapp/ftf/compare/v0.0.9...v0.1.0
|
data/README.md
CHANGED
|
@@ -41,6 +41,8 @@
|
|
|
41
41
|
- 0-N records 21
|
|
42
42
|
- 0-N records 22
|
|
43
43
|
- 1 record 99
|
|
44
|
+
|
|
45
|
+
```json
|
|
44
46
|
{
|
|
45
47
|
"fiscal_id": "",
|
|
46
48
|
"request_id": "",
|
|
@@ -49,24 +51,20 @@
|
|
|
49
51
|
|
|
50
52
|
]
|
|
51
53
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ftf`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
54
|
+
```
|
|
55
55
|
|
|
56
56
|
## Installation
|
|
57
57
|
|
|
58
|
-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
|
59
|
-
|
|
60
58
|
Install the gem and add to the application's Gemfile by executing:
|
|
61
59
|
|
|
62
60
|
```bash
|
|
63
|
-
bundle add
|
|
61
|
+
bundle add ftf
|
|
64
62
|
```
|
|
65
63
|
|
|
66
64
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
|
67
65
|
|
|
68
66
|
```bash
|
|
69
|
-
gem install
|
|
67
|
+
gem install ftf
|
|
70
68
|
```
|
|
71
69
|
|
|
72
70
|
## Usage
|
|
@@ -77,11 +75,34 @@ TODO: Write usage instructions here
|
|
|
77
75
|
|
|
78
76
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
79
77
|
|
|
80
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
78
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
79
|
+
|
|
80
|
+
## Release
|
|
81
|
+
|
|
82
|
+
Anyone with write access can release:
|
|
83
|
+
|
|
84
|
+
1. Open a PR titled `Bump to vX.Y.Z` that:
|
|
85
|
+
- bumps the version in `lib/ftf/version.rb` and in `Gemfile.lock` (`bundle install`);
|
|
86
|
+
- moves the entries under `## [Unreleased]` in `CHANGELOG.md` into a new `## [X.Y.Z] - YYYY-MM-DD` section, following [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
87
|
+
|
|
88
|
+
Merge it once CI passes.
|
|
89
|
+
2. Tag the merge commit on `main` and push the tag:
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
git switch main && git pull
|
|
93
|
+
git tag -m vX.Y.Z vX.Y.Z
|
|
94
|
+
git push origin vX.Y.Z
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The tag triggers `release.yml`, which runs CI, fails unless the tag is on `main` and `CHANGELOG.md` has a section for the version, and publishes the gem to [rubygems.org](https://rubygems.org/gems/ftf) through [trusted publishing](https://guides.rubygems.org/trusted-publishing/) with a [Sigstore](https://www.sigstore.dev) attestation. No API key is involved.
|
|
98
|
+
|
|
99
|
+
If the `publish` job fails, fix the cause and re-run the failed job; the tag stays as it is.
|
|
100
|
+
|
|
101
|
+
Once published, create a [GitHub release](https://github.com/devengoapp/ftf/releases) for the tag with the version's changelog section as notes.
|
|
81
102
|
|
|
82
103
|
## Contributing
|
|
83
104
|
|
|
84
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
105
|
+
Bug reports and pull requests are welcome on GitHub at <https://github.com/devengoapp/ftf>. 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/devengoapp/ftf/blob/main/CODE_OF_CONDUCT.md).
|
|
85
106
|
|
|
86
107
|
## License
|
|
87
108
|
|
|
@@ -89,4 +110,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
89
110
|
|
|
90
111
|
## Code of Conduct
|
|
91
112
|
|
|
92
|
-
Everyone interacting in the Ftf project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
113
|
+
Everyone interacting in the Ftf project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/devengoapp/ftf/blob/main/CODE_OF_CONDUCT.md).
|
data/ftf-0.0.8.gem
ADDED
|
Binary file
|
data/lib/ftf/generator.rb
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "json"
|
|
4
|
-
require "debug"
|
|
5
4
|
|
|
6
5
|
module FTF
|
|
7
6
|
# Generate
|
|
@@ -15,10 +14,10 @@ module FTF
|
|
|
15
14
|
end
|
|
16
15
|
|
|
17
16
|
def validate! # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
|
|
18
|
-
if !@report.request_id.blank? && @report.file_type !=
|
|
17
|
+
if !@report.request_id.blank? && @report.file_type != "C"
|
|
19
18
|
raise "Files generated for a request id must be complementary (type C)"
|
|
20
19
|
end
|
|
21
|
-
if @report.products.empty? && @report.file_type !=
|
|
20
|
+
if @report.products.empty? && @report.file_type != "N"
|
|
22
21
|
raise "Files generated without product records must be negative (type N)"
|
|
23
22
|
end
|
|
24
23
|
if !@report.products.empty? && !%w[M C].include?(@report.file_type)
|
data/lib/ftf/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,70 +1,36 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ftf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aitor García Rey
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '1.1'
|
|
20
|
-
type: :runtime
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - "~>"
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '1.1'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: rdoc
|
|
13
|
+
name: zeitwerk
|
|
29
14
|
requirement: !ruby/object:Gem::Requirement
|
|
30
15
|
requirements:
|
|
31
16
|
- - "~>"
|
|
32
17
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '6
|
|
18
|
+
version: '2.6'
|
|
34
19
|
type: :runtime
|
|
35
20
|
prerelease: false
|
|
36
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
22
|
requirements:
|
|
38
23
|
- - "~>"
|
|
39
24
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '6
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: zeitwerk
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - ">="
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: 2.6.0
|
|
48
|
-
- - "<"
|
|
49
|
-
- !ruby/object:Gem::Version
|
|
50
|
-
version: 2.7.0
|
|
51
|
-
type: :runtime
|
|
52
|
-
prerelease: false
|
|
53
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
54
|
-
requirements:
|
|
55
|
-
- - ">="
|
|
56
|
-
- !ruby/object:Gem::Version
|
|
57
|
-
version: 2.6.0
|
|
58
|
-
- - "<"
|
|
59
|
-
- !ruby/object:Gem::Version
|
|
60
|
-
version: 2.7.0
|
|
25
|
+
version: '2.6'
|
|
61
26
|
description: Generate SEPBLAC FTF valid files from a json
|
|
62
27
|
email:
|
|
63
|
-
-
|
|
28
|
+
- dev@devengo.com
|
|
64
29
|
executables: []
|
|
65
30
|
extensions: []
|
|
66
31
|
extra_rdoc_files: []
|
|
67
32
|
files:
|
|
33
|
+
- ".markdownlint.yaml"
|
|
68
34
|
- ".rspec"
|
|
69
35
|
- ".rubocop.yml"
|
|
70
36
|
- ".ruby-version"
|
|
@@ -74,6 +40,7 @@ files:
|
|
|
74
40
|
- README.md
|
|
75
41
|
- Rakefile
|
|
76
42
|
- doc/instrucciones_para_la_declaracion_de_informacion_al_FTF.pdf
|
|
43
|
+
- ftf-0.0.8.gem
|
|
77
44
|
- lib/ftf.rb
|
|
78
45
|
- lib/ftf/generator.rb
|
|
79
46
|
- lib/ftf/mappings/holder.rb
|
|
@@ -97,7 +64,6 @@ metadata:
|
|
|
97
64
|
homepage_uri: https://github.com/devengoapp/ftf
|
|
98
65
|
source_code_uri: https://github.com/devengoapp/ftf
|
|
99
66
|
rubygems_mfa_required: 'true'
|
|
100
|
-
post_install_message:
|
|
101
67
|
rdoc_options: []
|
|
102
68
|
require_paths:
|
|
103
69
|
- lib
|
|
@@ -105,15 +71,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
105
71
|
requirements:
|
|
106
72
|
- - ">="
|
|
107
73
|
- !ruby/object:Gem::Version
|
|
108
|
-
version: 3.
|
|
74
|
+
version: '3.2'
|
|
109
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
76
|
requirements:
|
|
111
77
|
- - ">="
|
|
112
78
|
- !ruby/object:Gem::Version
|
|
113
79
|
version: '0'
|
|
114
80
|
requirements: []
|
|
115
|
-
rubygems_version: 3.
|
|
116
|
-
signing_key:
|
|
81
|
+
rubygems_version: 3.6.9
|
|
117
82
|
specification_version: 4
|
|
118
83
|
summary: A ruby gem to generate FTF files for SEPBLAC
|
|
119
84
|
test_files: []
|