ftf 0.0.9 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28fd260a50ddfbb3a1a6d41fb13f2d311b67e9ba40e1d74e8eaec0caecbf9e71
4
- data.tar.gz: aff01ec6e5a3c3e3dc79cb136f0cae783f42095cf5c00f2c9839863d2ea9cc7d
3
+ metadata.gz: 5fbff326e39fd778026e133f8bfcd5926791a1f296163099485ac27abfa1cad9
4
+ data.tar.gz: ab5f0989838c97972eeb2007ac28d259ac4553b1a08b03e73ae1da1b7dc3c8d5
5
5
  SHA512:
6
- metadata.gz: c0d7e7d6eb843b3997bac0f4defd28535cd1a076dc6bc4d2740288d2607a13c9b0bcb99ae09cbd4b459cff6e2b876c0c2e4d03deffacfddf4728250be6b95ab1
7
- data.tar.gz: 69cff96c5050471efbc44921f29a29ea477adc3d9ba374be6341fd160a18bd7d424684e01599ea8cbc9d4be153e95f7f339efc782cd5e98bfd8bcfdda24a580c
6
+ metadata.gz: 299a3512a2cdfd35bdc6c28470bbf7dcc1363e16b733a75e763986bebb0c7c526f6f41e323b15a3b51c3e2d0e2cae83bb6b616d7b4b0366ade5d611eff12f39e
7
+ data.tar.gz: 0252ea55d127d25a70d4b70b1ea945eda80e90f3f5d9eedaea55644f3b69ada1ea10383c9f438938fe8807eb054836a31ae357f0639cf79c3d180d1ffeb86421
@@ -0,0 +1,4 @@
1
+ ---
2
+
3
+ default: true
4
+ line-length: false
data/.rubocop.yml CHANGED
@@ -1,6 +1,8 @@
1
+ ---
1
2
  AllCops:
2
3
  NewCops: enable
3
- TargetRubyVersion: 3.0
4
+ SuggestExtensions: false
5
+ TargetRubyVersion: 3.2
4
6
 
5
7
  Style/Documentation:
6
8
  Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.0
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] - 2025-01-27
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
- - Initial release
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 UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
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 UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
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`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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/aitor/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/aitor/ftf/blob/main/CODE_OF_CONDUCT.md).
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/aitor/ftf/blob/main/CODE_OF_CONDUCT.md).
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/lib/ftf/generator.rb CHANGED
@@ -14,10 +14,10 @@ module FTF
14
14
  end
15
15
 
16
16
  def validate! # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
17
- if !@report.request_id.blank? && @report.file_type != ("C")
17
+ if !@report.request_id.blank? && @report.file_type != "C"
18
18
  raise "Files generated for a request id must be complementary (type C)"
19
19
  end
20
- if @report.products.empty? && @report.file_type != ("N")
20
+ if @report.products.empty? && @report.file_type != "N"
21
21
  raise "Files generated without product records must be negative (type N)"
22
22
  end
23
23
  if !@report.products.empty? && !%w[M C].include?(@report.file_type)
data/lib/ftf/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FTF
4
- VERSION = "0.0.9"
4
+ VERSION = "0.1.0"
5
5
  end
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.9
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: 2026-01-16 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
- name: fiddle
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.11'
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.11'
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
- - aitor@devengo.com
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"
@@ -98,7 +64,6 @@ metadata:
98
64
  homepage_uri: https://github.com/devengoapp/ftf
99
65
  source_code_uri: https://github.com/devengoapp/ftf
100
66
  rubygems_mfa_required: 'true'
101
- post_install_message:
102
67
  rdoc_options: []
103
68
  require_paths:
104
69
  - lib
@@ -106,15 +71,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
71
  requirements:
107
72
  - - ">="
108
73
  - !ruby/object:Gem::Version
109
- version: 3.0.0
74
+ version: '3.2'
110
75
  required_rubygems_version: !ruby/object:Gem::Requirement
111
76
  requirements:
112
77
  - - ">="
113
78
  - !ruby/object:Gem::Version
114
79
  version: '0'
115
80
  requirements: []
116
- rubygems_version: 3.3.3
117
- signing_key:
81
+ rubygems_version: 3.6.9
118
82
  specification_version: 4
119
83
  summary: A ruby gem to generate FTF files for SEPBLAC
120
84
  test_files: []