ee_e_business_register 0.3.0 → 0.4.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/README.md +1 -1
- data/lib/{ee_e_business_register.rb → ee_e_business_register/ee_e_business_register.rb} +12 -12
- data/lib/ee_e_business_register/version.rb +1 -1
- metadata +27 -66
- data/.ee_business_register_credentials.yml.example +0 -8
- data/.rubocop.yml +0 -8
- data/CHANGELOG.md +0 -93
- data/CODE_OF_CONDUCT.md +0 -132
- data/Makefile +0 -392
- data/Rakefile +0 -12
- data/sig/ee_e_business_register.rbs +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 85a977548cbfda3a8fcbd45e4c916375938e8ce178706d080e1e2403c19df73d
|
|
4
|
+
data.tar.gz: 49efdd558dfd06b97c58db3a01e1d0ac24a82378822ce6c92794176591c6ad2f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: efcb16a53de63f935abad86fbf070457085743dd23c5f99f7044768678aa357c55d0698e6fad04e271e79b682b5a80f60565f12e1a3e00a3cd6e46bc93cf0080
|
|
7
|
+
data.tar.gz: 26e454d82eefeb9a09364ba72f17fdfc7396a7da5541f13dcbd641d7af79eb6df071a4c8a71cb4169c97c59d4ec4558ea6c4fc151a4c06ff1040498e76a08fb9
|
data/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
A professional Ruby interface for accessing Estonian company data, following the KISS principle. Built for developers who value simplicity, reliability, and clean code architecture.
|
|
10
10
|
|
|
11
|
-
**Developed by [Sorbeet Payments OÜ](https://sorbet.ee)
|
|
11
|
+
**Developed by [Sorbeet Payments OÜ](https://sorbet.ee)**.
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -8,18 +8,18 @@ require "timeout"
|
|
|
8
8
|
# Ruby compatibility fix: alias the old timeout constant to new ones
|
|
9
9
|
Net::TimeoutError = Net::ReadTimeout unless defined?(Net::TimeoutError)
|
|
10
10
|
|
|
11
|
-
require_relative "
|
|
12
|
-
require_relative "
|
|
13
|
-
require_relative "
|
|
14
|
-
require_relative "
|
|
15
|
-
require_relative "
|
|
16
|
-
require_relative "
|
|
17
|
-
require_relative "
|
|
18
|
-
require_relative "
|
|
19
|
-
require_relative "
|
|
20
|
-
require_relative "
|
|
21
|
-
require_relative "
|
|
22
|
-
require_relative "
|
|
11
|
+
require_relative "version"
|
|
12
|
+
require_relative "errors"
|
|
13
|
+
require_relative "configuration"
|
|
14
|
+
require_relative "validation"
|
|
15
|
+
require_relative "types"
|
|
16
|
+
require_relative "models/company"
|
|
17
|
+
require_relative "models/classifier"
|
|
18
|
+
require_relative "models/trust"
|
|
19
|
+
require_relative "client"
|
|
20
|
+
require_relative "services/company_service"
|
|
21
|
+
require_relative "services/classifier_service"
|
|
22
|
+
require_relative "services/trusts_service"
|
|
23
23
|
|
|
24
24
|
# Estonian e-Business Register API Client
|
|
25
25
|
#
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ee_e_business_register
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Angelos Kapsimanis
|
|
@@ -15,28 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '2.
|
|
18
|
+
version: '2.14'
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '2.
|
|
26
|
-
- !ruby/object:Gem::Dependency
|
|
27
|
-
name: nokogiri
|
|
28
|
-
requirement: !ruby/object:Gem::Requirement
|
|
29
|
-
requirements:
|
|
30
|
-
- - "~>"
|
|
31
|
-
- !ruby/object:Gem::Version
|
|
32
|
-
version: '1.16'
|
|
33
|
-
type: :runtime
|
|
34
|
-
prerelease: false
|
|
35
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
-
requirements:
|
|
37
|
-
- - "~>"
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: '1.16'
|
|
25
|
+
version: '2.14'
|
|
40
26
|
- !ruby/object:Gem::Dependency
|
|
41
27
|
name: activesupport
|
|
42
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -51,20 +37,6 @@ dependencies:
|
|
|
51
37
|
- - "~>"
|
|
52
38
|
- !ruby/object:Gem::Version
|
|
53
39
|
version: '7.0'
|
|
54
|
-
- !ruby/object:Gem::Dependency
|
|
55
|
-
name: dry-struct
|
|
56
|
-
requirement: !ruby/object:Gem::Requirement
|
|
57
|
-
requirements:
|
|
58
|
-
- - "~>"
|
|
59
|
-
- !ruby/object:Gem::Version
|
|
60
|
-
version: '1.6'
|
|
61
|
-
type: :runtime
|
|
62
|
-
prerelease: false
|
|
63
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
-
requirements:
|
|
65
|
-
- - "~>"
|
|
66
|
-
- !ruby/object:Gem::Version
|
|
67
|
-
version: '1.6'
|
|
68
40
|
- !ruby/object:Gem::Dependency
|
|
69
41
|
name: dry-types
|
|
70
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -80,61 +52,61 @@ dependencies:
|
|
|
80
52
|
- !ruby/object:Gem::Version
|
|
81
53
|
version: '1.7'
|
|
82
54
|
- !ruby/object:Gem::Dependency
|
|
83
|
-
name:
|
|
55
|
+
name: dry-struct
|
|
84
56
|
requirement: !ruby/object:Gem::Requirement
|
|
85
57
|
requirements:
|
|
86
58
|
- - "~>"
|
|
87
59
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: '
|
|
89
|
-
type: :
|
|
60
|
+
version: '1.6'
|
|
61
|
+
type: :runtime
|
|
90
62
|
prerelease: false
|
|
91
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
92
64
|
requirements:
|
|
93
65
|
- - "~>"
|
|
94
66
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: '
|
|
67
|
+
version: '1.6'
|
|
96
68
|
- !ruby/object:Gem::Dependency
|
|
97
|
-
name:
|
|
69
|
+
name: bundler
|
|
98
70
|
requirement: !ruby/object:Gem::Requirement
|
|
99
71
|
requirements:
|
|
100
72
|
- - "~>"
|
|
101
73
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: '
|
|
74
|
+
version: '2.0'
|
|
103
75
|
type: :development
|
|
104
76
|
prerelease: false
|
|
105
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
78
|
requirements:
|
|
107
79
|
- - "~>"
|
|
108
80
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: '
|
|
81
|
+
version: '2.0'
|
|
110
82
|
- !ruby/object:Gem::Dependency
|
|
111
|
-
name:
|
|
83
|
+
name: rake
|
|
112
84
|
requirement: !ruby/object:Gem::Requirement
|
|
113
85
|
requirements:
|
|
114
86
|
- - "~>"
|
|
115
87
|
- !ruby/object:Gem::Version
|
|
116
|
-
version: '
|
|
88
|
+
version: '13.0'
|
|
117
89
|
type: :development
|
|
118
90
|
prerelease: false
|
|
119
91
|
version_requirements: !ruby/object:Gem::Requirement
|
|
120
92
|
requirements:
|
|
121
93
|
- - "~>"
|
|
122
94
|
- !ruby/object:Gem::Version
|
|
123
|
-
version: '
|
|
95
|
+
version: '13.0'
|
|
124
96
|
- !ruby/object:Gem::Dependency
|
|
125
|
-
name:
|
|
97
|
+
name: minitest
|
|
126
98
|
requirement: !ruby/object:Gem::Requirement
|
|
127
99
|
requirements:
|
|
128
100
|
- - "~>"
|
|
129
101
|
- !ruby/object:Gem::Version
|
|
130
|
-
version: '
|
|
102
|
+
version: '5.0'
|
|
131
103
|
type: :development
|
|
132
104
|
prerelease: false
|
|
133
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
134
106
|
requirements:
|
|
135
107
|
- - "~>"
|
|
136
108
|
- !ruby/object:Gem::Version
|
|
137
|
-
version: '
|
|
109
|
+
version: '5.0'
|
|
138
110
|
- !ruby/object:Gem::Dependency
|
|
139
111
|
name: rubocop
|
|
140
112
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -149,25 +121,20 @@ dependencies:
|
|
|
149
121
|
- - "~>"
|
|
150
122
|
- !ruby/object:Gem::Version
|
|
151
123
|
version: '1.21'
|
|
152
|
-
description:
|
|
153
|
-
|
|
124
|
+
description: Ruby gem providing a clean, professional interface to the Estonian e-Business
|
|
125
|
+
Register API. Allows searching for companies, retrieving detailed company information,
|
|
126
|
+
annual reports, and more.
|
|
154
127
|
email:
|
|
155
|
-
-
|
|
128
|
+
- contact@angeloskapsimanis.com
|
|
156
129
|
executables: []
|
|
157
130
|
extensions: []
|
|
158
131
|
extra_rdoc_files: []
|
|
159
132
|
files:
|
|
160
|
-
- ".ee_business_register_credentials.yml.example"
|
|
161
|
-
- ".rubocop.yml"
|
|
162
|
-
- CHANGELOG.md
|
|
163
|
-
- CODE_OF_CONDUCT.md
|
|
164
133
|
- LICENSE.txt
|
|
165
|
-
- Makefile
|
|
166
134
|
- README.md
|
|
167
|
-
- Rakefile
|
|
168
|
-
- lib/ee_e_business_register.rb
|
|
169
135
|
- lib/ee_e_business_register/client.rb
|
|
170
136
|
- lib/ee_e_business_register/configuration.rb
|
|
137
|
+
- lib/ee_e_business_register/ee_e_business_register.rb
|
|
171
138
|
- lib/ee_e_business_register/errors.rb
|
|
172
139
|
- lib/ee_e_business_register/models/classifier.rb
|
|
173
140
|
- lib/ee_e_business_register/models/company.rb
|
|
@@ -178,20 +145,13 @@ files:
|
|
|
178
145
|
- lib/ee_e_business_register/types.rb
|
|
179
146
|
- lib/ee_e_business_register/validation.rb
|
|
180
147
|
- lib/ee_e_business_register/version.rb
|
|
181
|
-
|
|
182
|
-
homepage: https://github.com/angeloskapis/ee_e_business_register
|
|
148
|
+
homepage: https://github.com/angeloskapsimanis/ee_e_business_register
|
|
183
149
|
licenses:
|
|
184
150
|
- MIT
|
|
185
151
|
metadata:
|
|
186
|
-
homepage_uri: https://github.com/
|
|
187
|
-
source_code_uri: https://github.com/
|
|
188
|
-
changelog_uri: https://github.com/
|
|
189
|
-
documentation_uri: https://rubydoc.info/gems/ee_e_business_register
|
|
190
|
-
bug_tracker_uri: https://github.com/angeloskapis/ee_e_business_register/issues
|
|
191
|
-
wiki_uri: https://github.com/angeloskapis/ee_e_business_register/wiki
|
|
192
|
-
mailing_list_uri: https://github.com/angeloskapis/ee_e_business_register/discussions
|
|
193
|
-
funding_uri: https://github.com/sponsors/angeloskapis
|
|
194
|
-
rubygems_mfa_required: 'true'
|
|
152
|
+
homepage_uri: https://github.com/angeloskapsimanis/ee_e_business_register
|
|
153
|
+
source_code_uri: https://github.com/angeloskapsimanis/ee_e_business_register
|
|
154
|
+
changelog_uri: https://github.com/angeloskapsimanis/ee_e_business_register/blob/main/CHANGELOG.md
|
|
195
155
|
rdoc_options: []
|
|
196
156
|
require_paths:
|
|
197
157
|
- lib
|
|
@@ -208,5 +168,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
208
168
|
requirements: []
|
|
209
169
|
rubygems_version: 3.6.9
|
|
210
170
|
specification_version: 4
|
|
211
|
-
summary:
|
|
171
|
+
summary: A clean, professional Ruby client for accessing Estonian company data from
|
|
172
|
+
the e-Business Register
|
|
212
173
|
test_files: []
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Estonian e-Business Register API Credentials
|
|
2
|
-
#
|
|
3
|
-
# Copy this file to ~/.ee_business_register_credentials.yml and fill in your credentials
|
|
4
|
-
# You can obtain credentials by signing an agreement with the Registers and Information Systems Center
|
|
5
|
-
# Visit: https://www.rik.ee/en/e-business-register/open-data-api
|
|
6
|
-
#
|
|
7
|
-
username: your_username_here
|
|
8
|
-
password: your_password_here
|
data/.rubocop.yml
DELETED
data/CHANGELOG.md
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [Unreleased]
|
|
9
|
-
|
|
10
|
-
### Added
|
|
11
|
-
- Enhanced documentation with comprehensive examples and walkthroughs
|
|
12
|
-
- Professional polish for production-ready release
|
|
13
|
-
- Improved demo application navigation and UX
|
|
14
|
-
- Additional gemspec metadata for better RubyGems integration
|
|
15
|
-
|
|
16
|
-
### Changed
|
|
17
|
-
- Polished all code comments and documentation strings for clarity
|
|
18
|
-
- Reviewed and improved all example code in documentation
|
|
19
|
-
- Enhanced error messages for better user experience
|
|
20
|
-
|
|
21
|
-
## [0.2.0] - 2024-12-XX
|
|
22
|
-
|
|
23
|
-
### Added
|
|
24
|
-
- Beneficial owners endpoint support (`get_beneficial_owners`)
|
|
25
|
-
- Comprehensive model classes for all data types
|
|
26
|
-
- Enhanced error handling with specific exception types
|
|
27
|
-
- Complete demo application with all endpoints
|
|
28
|
-
- Professional UI/UX for demo application
|
|
29
|
-
- Extensive documentation with real-world examples
|
|
30
|
-
|
|
31
|
-
### Changed
|
|
32
|
-
- Updated API operation mappings to current Estonian API version
|
|
33
|
-
- Improved data parsing and model conversion
|
|
34
|
-
- Enhanced client retry logic and timeout handling
|
|
35
|
-
- Deprecated company name search functionality (API limitation)
|
|
36
|
-
|
|
37
|
-
### Deprecated
|
|
38
|
-
- `search_companies` method - Estonian API removed name search capability
|
|
39
|
-
- `find_companies_like` method - functionality no longer available
|
|
40
|
-
|
|
41
|
-
### Fixed
|
|
42
|
-
- Registry code validation and normalization
|
|
43
|
-
- Date parsing and type conversion issues
|
|
44
|
-
- SOAP response parsing edge cases
|
|
45
|
-
- Model initialization with nil values
|
|
46
|
-
- Demo application navigation and routing
|
|
47
|
-
|
|
48
|
-
### Security
|
|
49
|
-
- Input sanitization for all user-provided data
|
|
50
|
-
- Prevention of XML/SOAP injection attacks
|
|
51
|
-
- Validation of Estonian registry codes and personal codes
|
|
52
|
-
|
|
53
|
-
## [0.1.0] - 2025-08-27
|
|
54
|
-
|
|
55
|
-
### Added
|
|
56
|
-
- Initial release of the Estonian e-Business Register API client
|
|
57
|
-
- Basic company lookup functionality
|
|
58
|
-
- SOAP client with authentication
|
|
59
|
-
- Core data models (Company, Address)
|
|
60
|
-
- Configuration system
|
|
61
|
-
- Basic error handling
|
|
62
|
-
- Unit tests and integration tests
|
|
63
|
-
- Demo application framework
|
|
64
|
-
|
|
65
|
-
### Features
|
|
66
|
-
- Find companies by registry code
|
|
67
|
-
- Get company details and documents
|
|
68
|
-
- Access annual reports
|
|
69
|
-
- Retrieve classifiers and reference data
|
|
70
|
-
- Health check endpoint
|
|
71
|
-
- Type-safe data models with dry-struct
|
|
72
|
-
- Bilingual support (Estonian/English)
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Contributing
|
|
77
|
-
|
|
78
|
-
When making changes, please:
|
|
79
|
-
|
|
80
|
-
1. Add entries to the `[Unreleased]` section
|
|
81
|
-
2. Use the following categories: Added, Changed, Deprecated, Removed, Fixed, Security
|
|
82
|
-
3. Follow the format: `- Description of change (#PR-number)`
|
|
83
|
-
4. Move entries to a new version section when releasing
|
|
84
|
-
|
|
85
|
-
## Release Process
|
|
86
|
-
|
|
87
|
-
1. Update the version number in `lib/ee_e_business_register/version.rb`
|
|
88
|
-
2. Move unreleased changes to a new version section in this changelog
|
|
89
|
-
3. Update the date for the new version
|
|
90
|
-
4. Create a git tag with the version number
|
|
91
|
-
5. Build and publish the gem to RubyGems
|
|
92
|
-
|
|
93
|
-
For more details, see the [Contributing Guidelines](CONTRIBUTING.md).
|
data/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
-
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
-
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
-
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
-
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
-
identity and orientation.
|
|
11
|
-
|
|
12
|
-
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
-
diverse, inclusive, and healthy community.
|
|
14
|
-
|
|
15
|
-
## Our Standards
|
|
16
|
-
|
|
17
|
-
Examples of behavior that contributes to a positive environment for our
|
|
18
|
-
community include:
|
|
19
|
-
|
|
20
|
-
* Demonstrating empathy and kindness toward other people
|
|
21
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
-
* Giving and gracefully accepting constructive feedback
|
|
23
|
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
-
and learning from the experience
|
|
25
|
-
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
-
community
|
|
27
|
-
|
|
28
|
-
Examples of unacceptable behavior include:
|
|
29
|
-
|
|
30
|
-
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
-
any kind
|
|
32
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
-
* Public or private harassment
|
|
34
|
-
* Publishing others' private information, such as a physical or email address,
|
|
35
|
-
without their explicit permission
|
|
36
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
-
professional setting
|
|
38
|
-
|
|
39
|
-
## Enforcement Responsibilities
|
|
40
|
-
|
|
41
|
-
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
-
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
-
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
-
or harmful.
|
|
45
|
-
|
|
46
|
-
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
-
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
-
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
-
decisions when appropriate.
|
|
50
|
-
|
|
51
|
-
## Scope
|
|
52
|
-
|
|
53
|
-
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
-
an individual is officially representing the community in public spaces.
|
|
55
|
-
Examples of representing our community include using an official email address,
|
|
56
|
-
posting via an official social media account, or acting as an appointed
|
|
57
|
-
representative at an online or offline event.
|
|
58
|
-
|
|
59
|
-
## Enforcement
|
|
60
|
-
|
|
61
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
-
reported to the community leaders responsible for enforcement at
|
|
63
|
-
[INSERT CONTACT METHOD].
|
|
64
|
-
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
-
|
|
66
|
-
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
-
reporter of any incident.
|
|
68
|
-
|
|
69
|
-
## Enforcement Guidelines
|
|
70
|
-
|
|
71
|
-
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
-
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
-
|
|
74
|
-
### 1. Correction
|
|
75
|
-
|
|
76
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
-
unprofessional or unwelcome in the community.
|
|
78
|
-
|
|
79
|
-
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
-
clarity around the nature of the violation and an explanation of why the
|
|
81
|
-
behavior was inappropriate. A public apology may be requested.
|
|
82
|
-
|
|
83
|
-
### 2. Warning
|
|
84
|
-
|
|
85
|
-
**Community Impact**: A violation through a single incident or series of
|
|
86
|
-
actions.
|
|
87
|
-
|
|
88
|
-
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
-
interaction with the people involved, including unsolicited interaction with
|
|
90
|
-
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
-
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
-
like social media. Violating these terms may lead to a temporary or permanent
|
|
93
|
-
ban.
|
|
94
|
-
|
|
95
|
-
### 3. Temporary Ban
|
|
96
|
-
|
|
97
|
-
**Community Impact**: A serious violation of community standards, including
|
|
98
|
-
sustained inappropriate behavior.
|
|
99
|
-
|
|
100
|
-
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
-
communication with the community for a specified period of time. No public or
|
|
102
|
-
private interaction with the people involved, including unsolicited interaction
|
|
103
|
-
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
-
Violating these terms may lead to a permanent ban.
|
|
105
|
-
|
|
106
|
-
### 4. Permanent Ban
|
|
107
|
-
|
|
108
|
-
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
-
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
-
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
-
|
|
112
|
-
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
113
|
-
community.
|
|
114
|
-
|
|
115
|
-
## Attribution
|
|
116
|
-
|
|
117
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
-
version 2.1, available at
|
|
119
|
-
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
120
|
-
|
|
121
|
-
Community Impact Guidelines were inspired by
|
|
122
|
-
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
123
|
-
|
|
124
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
|
125
|
-
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
126
|
-
[https://www.contributor-covenant.org/translations][translations].
|
|
127
|
-
|
|
128
|
-
[homepage]: https://www.contributor-covenant.org
|
|
129
|
-
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
130
|
-
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
131
|
-
[FAQ]: https://www.contributor-covenant.org/faq
|
|
132
|
-
[translations]: https://www.contributor-covenant.org/translations
|
data/Makefile
DELETED
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
# Estonian e-Business Register Ruby Gem Makefile
|
|
2
|
-
# Professional FinTech-grade automation for development workflow
|
|
3
|
-
#
|
|
4
|
-
# This Makefile provides a complete development and deployment workflow for the
|
|
5
|
-
# Estonian e-Business Register Ruby gem, including testing with API rate limiting,
|
|
6
|
-
# version management, building, and publishing to RubyGems.
|
|
7
|
-
#
|
|
8
|
-
# Key features:
|
|
9
|
-
# - API throttling for Estonian registry (1-second delays)
|
|
10
|
-
# - Comprehensive testing suite (unit + integration)
|
|
11
|
-
# - Automated version management with semantic versioning
|
|
12
|
-
# - Safe publishing workflow with confirmations
|
|
13
|
-
# - Code quality enforcement with RuboCop
|
|
14
|
-
# - Git integration for tagging and releases
|
|
15
|
-
#
|
|
16
|
-
# Usage:
|
|
17
|
-
# make help - Show available commands
|
|
18
|
-
# make test - Run all tests with API throttling
|
|
19
|
-
# make build - Build the gem package
|
|
20
|
-
# make demo - Build gem and launch Sinatra demo app
|
|
21
|
-
# make version-up - Increment version number
|
|
22
|
-
# make publish - Publish to RubyGems.org
|
|
23
|
-
# make release - Complete release workflow
|
|
24
|
-
|
|
25
|
-
# Ensure all targets are treated as commands, not files
|
|
26
|
-
# This prevents make from looking for files with these names
|
|
27
|
-
.PHONY: help test test-unit test-integration build clean install version-up publish lint format demo
|
|
28
|
-
|
|
29
|
-
# Terminal color codes for professional output formatting
|
|
30
|
-
# These make the output more readable and user-friendly
|
|
31
|
-
GREEN = \033[0;32m # Success messages
|
|
32
|
-
YELLOW = \033[0;33m # Warning messages
|
|
33
|
-
RED = \033[0;31m # Error messages
|
|
34
|
-
BLUE = \033[0;34m # Info messages
|
|
35
|
-
NC = \033[0m # No Color (reset)
|
|
36
|
-
|
|
37
|
-
# Configuration variables for the gem
|
|
38
|
-
# These can be easily modified if the gem structure changes
|
|
39
|
-
GEM_NAME = ee_e_business_register
|
|
40
|
-
VERSION_FILE = lib/ee_e_business_register/version.rb
|
|
41
|
-
|
|
42
|
-
#==============================================================================
|
|
43
|
-
# HELP AND DOCUMENTATION
|
|
44
|
-
#==============================================================================
|
|
45
|
-
|
|
46
|
-
# Default target - shows help when user runs 'make' without arguments
|
|
47
|
-
# This provides a user-friendly entry point to discover available commands
|
|
48
|
-
help: ## Show this help message
|
|
49
|
-
@echo "$(BLUE)Estonian e-Business Register Gem$(NC)"
|
|
50
|
-
@echo "$(BLUE)=================================$(NC)"
|
|
51
|
-
@echo ""
|
|
52
|
-
@echo "Available commands:"
|
|
53
|
-
# Extract all targets with ## comments and format them nicely
|
|
54
|
-
# This automatically generates help from the inline documentation
|
|
55
|
-
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " $(GREEN)%-15s$(NC) %s\n", $$1, $$2}'
|
|
56
|
-
@echo ""
|
|
57
|
-
@echo "$(YELLOW)Note: API tests include 1-second delays due to rate limiting$(NC)"
|
|
58
|
-
|
|
59
|
-
#==============================================================================
|
|
60
|
-
# TESTING COMMANDS
|
|
61
|
-
#==============================================================================
|
|
62
|
-
|
|
63
|
-
# Main test command - runs all tests with proper API throttling
|
|
64
|
-
# The Estonian e-Business Register API has rate limits, so we add delays
|
|
65
|
-
# between test files to avoid hitting the limits and getting blocked
|
|
66
|
-
# Tests include: basic company lookup, detailed company data (detailandmed_v2),
|
|
67
|
-
# classifiers, error handling, and comprehensive data model validation
|
|
68
|
-
test: ## Run all tests with API rate limiting delays
|
|
69
|
-
@echo "$(GREEN)Running complete test suite with API throttling...$(NC)"
|
|
70
|
-
# Custom test runner that loads each test file individually with delays
|
|
71
|
-
# This ensures we don't overwhelm the Estonian API with rapid requests
|
|
72
|
-
@bundle exec ruby -Ilib:test -e '\
|
|
73
|
-
require "minitest/autorun"; \
|
|
74
|
-
Dir.glob("test/**/test_*.rb").each do |file|; \
|
|
75
|
-
puts "Loading: #{file}"; \
|
|
76
|
-
require_relative file; \
|
|
77
|
-
sleep 1; \
|
|
78
|
-
end'
|
|
79
|
-
@echo "$(GREEN)✓ All tests completed including detailed company and documents functionality$(NC)"
|
|
80
|
-
@echo "$(BLUE)Detailed company data tests validate:$(NC)"
|
|
81
|
-
@echo " • General company information (addresses, activities, contacts)"
|
|
82
|
-
@echo " • Personnel data (board members, shareholders with OSAN/O roles)"
|
|
83
|
-
@echo " • Comprehensive business activity codes (EMTAK/NACE)"
|
|
84
|
-
@echo " • Estonian address system integration (ADS)"
|
|
85
|
-
@echo "$(BLUE)Company documents tests validate:$(NC)"
|
|
86
|
-
@echo " • Annual reports (PDF, XBRL, DDOC/BDOC formats)"
|
|
87
|
-
@echo " • Articles of association documents"
|
|
88
|
-
@echo " • Document filtering by type, year, and validity"
|
|
89
|
-
@echo " • Document metadata (size, URLs, status dates)"
|
|
90
|
-
@echo "$(YELLOW)Note: API integration tests require real credentials$(NC)"
|
|
91
|
-
@echo "$(YELLOW)Create ~/.ee_business_register_credentials.yml with username and password$(NC)"
|
|
92
|
-
|
|
93
|
-
# Unit tests only - these don't make API calls so no throttling needed
|
|
94
|
-
# Useful for quick feedback during development without hitting API limits
|
|
95
|
-
test-unit: ## Run unit tests only (no API calls)
|
|
96
|
-
@echo "$(GREEN)Running unit tests (excluding integration tests)...$(NC)"
|
|
97
|
-
# Exclude integration tests to avoid any API calls
|
|
98
|
-
# This gives developers fast feedback on code changes
|
|
99
|
-
@bundle exec ruby -Ilib:test -e '\
|
|
100
|
-
require "minitest/autorun"; \
|
|
101
|
-
Dir.glob("test/**/test_*.rb").reject { |f| f.include?("integration") }.each do |file|; \
|
|
102
|
-
puts "Loading: #{file}"; \
|
|
103
|
-
require_relative file; \
|
|
104
|
-
end'
|
|
105
|
-
|
|
106
|
-
# Integration tests with real API calls - requires valid credentials
|
|
107
|
-
# These tests actually connect to the Estonian e-Business Register
|
|
108
|
-
# and verify that our gem works with the real API
|
|
109
|
-
test-integration: ## Run integration tests with real API (requires credentials)
|
|
110
|
-
@echo "$(GREEN)Running integration tests with 1-second API throttling...$(NC)"
|
|
111
|
-
# Check if credentials file exists before attempting API tests
|
|
112
|
-
# This prevents confusing error messages for new developers
|
|
113
|
-
@if [ ! -f ~/.ee_business_register_credentials.yml ]; then \
|
|
114
|
-
echo "$(RED)Error: Credentials file not found at ~/.ee_business_register_credentials.yml$(NC)"; \
|
|
115
|
-
echo "$(YELLOW)Please create credentials file or skip integration tests$(NC)"; \
|
|
116
|
-
exit 1; \
|
|
117
|
-
fi
|
|
118
|
-
# Run only the integration test file with API throttling
|
|
119
|
-
@bundle exec ruby -Ilib:test test/integration_test.rb
|
|
120
|
-
@sleep 1 # Additional delay after integration tests
|
|
121
|
-
|
|
122
|
-
#==============================================================================
|
|
123
|
-
# BUILD AND PACKAGING
|
|
124
|
-
#==============================================================================
|
|
125
|
-
|
|
126
|
-
# Build the gem package from the gemspec
|
|
127
|
-
# This creates a .gem file that can be installed or published
|
|
128
|
-
build: clean ## Build the gem package
|
|
129
|
-
@echo "$(GREEN)Building $(GEM_NAME) gem...$(NC)"
|
|
130
|
-
# Use bundler's gem build command for consistency
|
|
131
|
-
# This ensures all dependencies and configurations are respected
|
|
132
|
-
@bundle exec gem build $(GEM_NAME).gemspec
|
|
133
|
-
@echo "$(GREEN)✓ Gem built successfully$(NC)"
|
|
134
|
-
# Show the built gem file(s) for verification
|
|
135
|
-
@ls -la *.gem 2>/dev/null || echo "$(RED)No gem file found$(NC)"
|
|
136
|
-
|
|
137
|
-
# Clean up build artifacts to ensure fresh builds
|
|
138
|
-
# Important for avoiding conflicts between different versions
|
|
139
|
-
clean: ## Clean built artifacts
|
|
140
|
-
@echo "$(GREEN)Cleaning build artifacts...$(NC)"
|
|
141
|
-
# Remove gem files and packaging directories
|
|
142
|
-
@rm -f *.gem
|
|
143
|
-
@rm -rf pkg/
|
|
144
|
-
@echo "$(GREEN)✓ Clean complete$(NC)"
|
|
145
|
-
|
|
146
|
-
# Install the gem locally for testing
|
|
147
|
-
# Useful for testing the gem in local Ruby environment
|
|
148
|
-
install: build ## Install the gem locally
|
|
149
|
-
@echo "$(GREEN)Installing $(GEM_NAME) locally...$(NC)"
|
|
150
|
-
# Install the most recently built gem file
|
|
151
|
-
@gem install *.gem
|
|
152
|
-
@echo "$(GREEN)✓ Gem installed locally$(NC)"
|
|
153
|
-
|
|
154
|
-
#==============================================================================
|
|
155
|
-
# VERSION MANAGEMENT
|
|
156
|
-
#==============================================================================
|
|
157
|
-
|
|
158
|
-
# Display current version from the version file
|
|
159
|
-
# Useful for checking version before releases
|
|
160
|
-
version: ## Show current version
|
|
161
|
-
@echo "$(GREEN)Current version:$(NC)"
|
|
162
|
-
# Extract version string from VERSION constant in Ruby file
|
|
163
|
-
@grep VERSION $(VERSION_FILE) | cut -d'"' -f2
|
|
164
|
-
|
|
165
|
-
# Increment patch version (x.y.z -> x.y.z+1)
|
|
166
|
-
# Use this for bug fixes and minor updates
|
|
167
|
-
version-up: ## Increment patch version (x.y.z -> x.y.z+1)
|
|
168
|
-
@echo "$(GREEN)Incrementing patch version...$(NC)"
|
|
169
|
-
# Use Ruby to safely modify the version file
|
|
170
|
-
# This handles the version format correctly and atomically
|
|
171
|
-
@ruby -i -pe '\
|
|
172
|
-
if /VERSION = "(\d+)\.(\d+)\.(\d+)"/ then \
|
|
173
|
-
gsub(/VERSION = "(\d+)\.(\d+)\.(\d+)"/, "VERSION = \"#{$$1}.#{$$2}.#{$$3.to_i + 1}\"") \
|
|
174
|
-
end' $(VERSION_FILE)
|
|
175
|
-
@echo "$(GREEN)✓ Version updated to:$(NC) $$(make version)"
|
|
176
|
-
@echo "$(YELLOW)Don't forget to commit the version change!$(NC)"
|
|
177
|
-
|
|
178
|
-
# Increment minor version (x.y.z -> x.y+1.0)
|
|
179
|
-
# Use this for new features that are backward compatible
|
|
180
|
-
version-up-minor: ## Increment minor version (x.y.z -> x.y+1.0)
|
|
181
|
-
@echo "$(GREEN)Incrementing minor version...$(NC)"
|
|
182
|
-
# Reset patch version to 0 when incrementing minor
|
|
183
|
-
@ruby -i -pe '\
|
|
184
|
-
if /VERSION = "(\d+)\.(\d+)\.(\d+)"/ then \
|
|
185
|
-
gsub(/VERSION = "(\d+)\.(\d+)\.(\d+)"/, "VERSION = \"#{$$1}.#{$$2.to_i + 1}.0\"") \
|
|
186
|
-
end' $(VERSION_FILE)
|
|
187
|
-
@echo "$(GREEN)✓ Version updated to:$(NC) $$(make version)"
|
|
188
|
-
@echo "$(YELLOW)Don't forget to commit the version change!$(NC)"
|
|
189
|
-
|
|
190
|
-
# Increment major version (x.y.z -> x+1.0.0)
|
|
191
|
-
# Use this for breaking changes or major new features
|
|
192
|
-
version-up-major: ## Increment major version (x.y.z -> x+1.0.0)
|
|
193
|
-
@echo "$(GREEN)Incrementing major version...$(NC)"
|
|
194
|
-
# Reset minor and patch versions to 0 when incrementing major
|
|
195
|
-
@ruby -i -pe '\
|
|
196
|
-
if /VERSION = "(\d+)\.(\d+)\.(\d+)"/ then \
|
|
197
|
-
gsub(/VERSION = "(\d+)\.(\d+)\.(\d+)"/, "VERSION = \"#{$$1.to_i + 1}.0.0\"") \
|
|
198
|
-
end' $(VERSION_FILE)
|
|
199
|
-
@echo "$(GREEN)✓ Version updated to:$(NC) $$(make version)"
|
|
200
|
-
@echo "$(YELLOW)Don't forget to commit the version change!$(NC)"
|
|
201
|
-
|
|
202
|
-
#==============================================================================
|
|
203
|
-
# PUBLISHING TO RUBYGEMS
|
|
204
|
-
#==============================================================================
|
|
205
|
-
|
|
206
|
-
# Publish gem to RubyGems.org - this is irreversible!
|
|
207
|
-
# Includes safety confirmation to prevent accidental publishing
|
|
208
|
-
publish: build ## Publish gem to RubyGems.org
|
|
209
|
-
@echo "$(GREEN)Publishing $(GEM_NAME) to RubyGems.org...$(NC)"
|
|
210
|
-
@echo "$(YELLOW)Current version: $$(make version)$(NC)"
|
|
211
|
-
@echo "$(YELLOW)Are you sure you want to publish? This cannot be undone.$(NC)"
|
|
212
|
-
# Interactive confirmation to prevent accidental publishing
|
|
213
|
-
# Publishing to RubyGems is permanent and cannot be reverted
|
|
214
|
-
@read -p "Type 'yes' to confirm: " confirm; \
|
|
215
|
-
if [ "$$confirm" = "yes" ]; then \
|
|
216
|
-
gem push *.gem && \
|
|
217
|
-
echo "$(GREEN)✓ Gem published successfully!$(NC)" && \
|
|
218
|
-
echo "$(BLUE)View at: https://rubygems.org/gems/$(GEM_NAME)$(NC)"; \
|
|
219
|
-
else \
|
|
220
|
-
echo "$(YELLOW)Publish cancelled$(NC)"; \
|
|
221
|
-
fi
|
|
222
|
-
|
|
223
|
-
# Dry run for publishing - test the process without actually publishing
|
|
224
|
-
# Useful for validating that everything is ready for publication
|
|
225
|
-
publish-dry-run: build ## Simulate publishing (safe test)
|
|
226
|
-
@echo "$(GREEN)Dry run: simulating gem publish...$(NC)"
|
|
227
|
-
@echo "$(YELLOW)Version: $$(make version)$(NC)"
|
|
228
|
-
@echo "$(YELLOW)Gem file: $$(ls *.gem)$(NC)"
|
|
229
|
-
@echo "$(GREEN)✓ Ready to publish (use 'make publish' to actually publish)$(NC)"
|
|
230
|
-
|
|
231
|
-
#==============================================================================
|
|
232
|
-
# CODE QUALITY AND LINTING
|
|
233
|
-
#==============================================================================
|
|
234
|
-
|
|
235
|
-
# Run RuboCop static code analysis
|
|
236
|
-
# Ensures code follows Ruby community standards
|
|
237
|
-
lint: ## Run RuboCop linter
|
|
238
|
-
@echo "$(GREEN)Running RuboCop linter...$(NC)"
|
|
239
|
-
# Check both lib and test directories for style issues
|
|
240
|
-
# Simple format provides clean, readable output
|
|
241
|
-
@bundle exec rubocop lib/ test/ --format simple
|
|
242
|
-
@echo "$(GREEN)✓ Linting complete$(NC)"
|
|
243
|
-
|
|
244
|
-
# Auto-fix RuboCop violations where possible
|
|
245
|
-
# Saves developer time by automatically fixing simple style issues
|
|
246
|
-
lint-fix: ## Run RuboCop with auto-correct
|
|
247
|
-
@echo "$(GREEN)Running RuboCop with auto-correct...$(NC)"
|
|
248
|
-
# Automatically fix issues that can be safely corrected
|
|
249
|
-
@bundle exec rubocop lib/ test/ --auto-correct
|
|
250
|
-
@echo "$(GREEN)✓ Auto-corrections applied$(NC)"
|
|
251
|
-
|
|
252
|
-
# Alias for lint-fix for convenience
|
|
253
|
-
format: lint-fix ## Alias for lint-fix
|
|
254
|
-
|
|
255
|
-
#==============================================================================
|
|
256
|
-
# DEVELOPMENT HELPERS
|
|
257
|
-
#==============================================================================
|
|
258
|
-
|
|
259
|
-
# Install all gem dependencies
|
|
260
|
-
# Essential setup step for new development environments
|
|
261
|
-
deps: ## Install dependencies
|
|
262
|
-
@echo "$(GREEN)Installing dependencies...$(NC)"
|
|
263
|
-
# Use bundler to install all dependencies from Gemfile
|
|
264
|
-
@bundle install
|
|
265
|
-
@echo "$(GREEN)✓ Dependencies installed$(NC)"
|
|
266
|
-
|
|
267
|
-
# Update all dependencies to latest compatible versions
|
|
268
|
-
# Important for security updates and bug fixes
|
|
269
|
-
deps-update: ## Update dependencies
|
|
270
|
-
@echo "$(GREEN)Updating dependencies...$(NC)"
|
|
271
|
-
# Update all gems to latest versions within constraints
|
|
272
|
-
@bundle update
|
|
273
|
-
@echo "$(GREEN)✓ Dependencies updated$(NC)"
|
|
274
|
-
|
|
275
|
-
# Start interactive console with gem pre-loaded
|
|
276
|
-
# Useful for testing gem functionality interactively
|
|
277
|
-
console: ## Start interactive console with gem loaded
|
|
278
|
-
@echo "$(GREEN)Starting interactive console...$(NC)"
|
|
279
|
-
# Use the provided console script which loads the gem
|
|
280
|
-
@bundle exec bin/console
|
|
281
|
-
|
|
282
|
-
# Launch the Sinatra demo application
|
|
283
|
-
# Builds the gem first to ensure latest version is used in demo
|
|
284
|
-
demo: build ## Build gem and launch Sinatra demo app
|
|
285
|
-
@echo "$(GREEN)Building gem and launching Sinatra demo application...$(NC)"
|
|
286
|
-
@echo "$(BLUE)Starting Estonian e-Business Register API Demo$(NC)"
|
|
287
|
-
@echo "$(BLUE)============================================$(NC)"
|
|
288
|
-
# Install the freshly built gem locally for demo to use latest version
|
|
289
|
-
@echo "$(YELLOW)Installing latest gem version for demo...$(NC)"
|
|
290
|
-
@gem install *.gem --local --force > /dev/null 2>&1 || true
|
|
291
|
-
# Navigate to demo directory and start the Sinatra app
|
|
292
|
-
@echo "$(GREEN)Starting demo app at http://localhost:4567$(NC)"
|
|
293
|
-
@echo "$(YELLOW)Press Ctrl+C to stop the server$(NC)"
|
|
294
|
-
@echo ""
|
|
295
|
-
# Change to demo directory and run the startup script
|
|
296
|
-
@cd ../demo_app && ruby start.rb
|
|
297
|
-
|
|
298
|
-
#==============================================================================
|
|
299
|
-
# GIT INTEGRATION
|
|
300
|
-
#==============================================================================
|
|
301
|
-
|
|
302
|
-
# Create git tag for current version
|
|
303
|
-
# Important for tracking releases and enabling rollbacks
|
|
304
|
-
git-tag: ## Create git tag for current version
|
|
305
|
-
@echo "$(GREEN)Creating git tag for version $$(make version)...$(NC)"
|
|
306
|
-
# Create annotated tag with version message
|
|
307
|
-
# Annotated tags include metadata like date and author
|
|
308
|
-
@git tag -a "v$$(make version)" -m "Release version $$(make version)"
|
|
309
|
-
@echo "$(GREEN)✓ Tag created: v$$(make version)$(NC)"
|
|
310
|
-
@echo "$(YELLOW)Push with: git push origin v$$(make version)$(NC)"
|
|
311
|
-
|
|
312
|
-
# Push all tags to remote repository
|
|
313
|
-
# Makes tags available to other developers and CI/CD systems
|
|
314
|
-
git-push-tags: ## Push all tags to origin
|
|
315
|
-
@echo "$(GREEN)Pushing tags to origin...$(NC)"
|
|
316
|
-
# Push all local tags to the remote repository
|
|
317
|
-
@git push origin --tags
|
|
318
|
-
@echo "$(GREEN)✓ Tags pushed$(NC)"
|
|
319
|
-
|
|
320
|
-
#==============================================================================
|
|
321
|
-
# COMPLETE RELEASE WORKFLOW
|
|
322
|
-
#==============================================================================
|
|
323
|
-
|
|
324
|
-
# Complete automated release process
|
|
325
|
-
# Combines all release steps into a single command for convenience
|
|
326
|
-
release: version-up build test git-tag publish git-push-tags ## Complete release workflow
|
|
327
|
-
@echo "$(GREEN)🎉 Release complete!$(NC)"
|
|
328
|
-
@echo "$(BLUE)Version $$(make version) has been:$(NC)"
|
|
329
|
-
@echo " • Built and tested"
|
|
330
|
-
@echo " • Tagged in git"
|
|
331
|
-
@echo " • Published to RubyGems"
|
|
332
|
-
@echo " • Tags pushed to origin"
|
|
333
|
-
|
|
334
|
-
#==============================================================================
|
|
335
|
-
# STATUS AND DIAGNOSTICS
|
|
336
|
-
#==============================================================================
|
|
337
|
-
|
|
338
|
-
# Show comprehensive project status
|
|
339
|
-
# Useful for debugging and understanding current state
|
|
340
|
-
status: ## Show project status
|
|
341
|
-
@echo "$(BLUE)Estonian e-Business Register Gem Status$(NC)"
|
|
342
|
-
@echo "$(BLUE)=======================================$(NC)"
|
|
343
|
-
# Display current version
|
|
344
|
-
@echo "Version: $$(make version)"
|
|
345
|
-
# Count built gem files
|
|
346
|
-
@echo "Gem files: $$(ls *.gem 2>/dev/null | wc -l | tr -d ' ') built"
|
|
347
|
-
# Show git status if this is a git repository
|
|
348
|
-
@echo "Git status:"
|
|
349
|
-
@git status --porcelain || echo " (not a git repository)"
|
|
350
|
-
@echo ""
|
|
351
|
-
# Check if dependencies are satisfied
|
|
352
|
-
@echo "Dependencies:"
|
|
353
|
-
@bundle check >/dev/null 2>&1 && echo " ✓ All dependencies satisfied" || echo " ⚠ Run 'make deps' to install dependencies"
|
|
354
|
-
@echo ""
|
|
355
|
-
# Check for API credentials
|
|
356
|
-
@echo "Credentials:"
|
|
357
|
-
@[ -f ~/.ee_business_register_credentials.yml ] && echo " ✓ API credentials configured" || echo " ⚠ No credentials file found"
|
|
358
|
-
|
|
359
|
-
#==============================================================================
|
|
360
|
-
# SECURITY AND PERFORMANCE
|
|
361
|
-
#==============================================================================
|
|
362
|
-
|
|
363
|
-
# Run security audit on all dependencies
|
|
364
|
-
# Important for FinTech applications to identify vulnerabilities
|
|
365
|
-
security-audit: ## Run security audit on dependencies
|
|
366
|
-
@echo "$(GREEN)Running security audit...$(NC)"
|
|
367
|
-
# Use bundler-audit to check for known vulnerabilities
|
|
368
|
-
# Update the vulnerability database first
|
|
369
|
-
@bundle audit check --update
|
|
370
|
-
@echo "$(GREEN)✓ Security audit complete$(NC)"
|
|
371
|
-
|
|
372
|
-
# Generate documentation (placeholder for future implementation)
|
|
373
|
-
# Professional gems should include comprehensive documentation
|
|
374
|
-
docs: ## Generate documentation (placeholder)
|
|
375
|
-
@echo "$(GREEN)Generating documentation...$(NC)"
|
|
376
|
-
@echo "$(YELLOW)Documentation generation not yet implemented$(NC)"
|
|
377
|
-
@echo "$(BLUE)See README.md for current documentation$(NC)"
|
|
378
|
-
|
|
379
|
-
# Run basic performance benchmarks
|
|
380
|
-
# Helps identify performance regressions during development
|
|
381
|
-
benchmark: ## Run basic performance benchmarks
|
|
382
|
-
@echo "$(GREEN)Running performance benchmarks...$(NC)"
|
|
383
|
-
# Simple benchmark of basic operations
|
|
384
|
-
# Note: This will make real API calls if credentials are configured
|
|
385
|
-
@bundle exec ruby -Ilib -e '\
|
|
386
|
-
require "ee_e_business_register"; \
|
|
387
|
-
require "benchmark"; \
|
|
388
|
-
puts "Note: Benchmarks will make real API calls if credentials are configured"; \
|
|
389
|
-
puts "Basic configuration benchmark:"; \
|
|
390
|
-
Benchmark.bm do |x|; \
|
|
391
|
-
x.report("Config creation:") { 1000.times { EeEBusinessRegister::Configuration.new } }; \
|
|
392
|
-
end'
|
data/Rakefile
DELETED