ehsso 0.6.0 → 0.7.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: d41ec655415b6806e4294ff6e28d4b4a178b9dd88aca2662cf8dfdb7382e5324
4
- data.tar.gz: e659665ea07cd9e34ef5390222f874265fe964fd58dc45cd3416c4134dd25791
3
+ metadata.gz: 78474617434e6d24addeef20df5cea2f193f858c233d80c06c9a5dcf43891536
4
+ data.tar.gz: 5b5a20eb87f5059234028faed9508f86fbadf4fb061e1ddf048b110041959b5e
5
5
  SHA512:
6
- metadata.gz: 31ef14c4188888bbfb01fa4dd73469a16346703f554eb59f365deacc047204b1eb73e15f1a2a20ce3ad7e828610278bcfab62dde61c9fec8573655c4e5966205
7
- data.tar.gz: 4fe87a8e2fb5a05db5dbc456910a31d483d49208e56f5f5f0f83221b3fa4dad1fc01ebe630fb7593899ab41350ac796b5e6467803251a609e4e9a4974c5f46ac
6
+ metadata.gz: 648fb5f32db29fe8f7694adc49b1ddc01307956eeabed1b7a86396b49828b5a82c4f161df027aea0265e2cf88199c8645e1d9f6cba6b2549e011ff1fa67944a3
7
+ data.tar.gz: df834d5550a94636da051dfce6ef88f89bf1abf4800c6803238358f7ff53fa33353f71a3acf59af8852c7a3ac4733a4556887d4ab8b1f312c8942aa292f8bd39
@@ -1,11 +1,16 @@
1
1
  name: 02 - Release
2
2
 
3
3
  on:
4
- workflow_dispatch:
4
+ push:
5
+ tags:
6
+ - 'v*'
5
7
 
6
8
  jobs:
7
9
  release:
8
10
  runs-on: ubuntu-latest
11
+ permissions:
12
+ id-token: write
13
+ contents: write
9
14
 
10
15
  steps:
11
16
  - name: Checkout current code
@@ -19,14 +24,8 @@ jobs:
19
24
  bundler-cache: true
20
25
  cache-version: 1
21
26
 
22
- - name: Release to RubyGems
23
- env:
24
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25
- run: |
26
- git config --global user.email "thomas.steiner@ikey.ch"
27
- git config --global user.name "thomis"
28
- mkdir ~/.gem
29
- echo -e "---\n:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" > ~/.gem/credentials
30
- chmod 600 ~/.gem/credentials
31
- bundle exec rake release
32
- rm ~/.gem/credentials
27
+ - name: Build gem
28
+ run: gem build *.gemspec
29
+
30
+ - name: Push to Rubygems
31
+ uses: rubygems/release-gem@v1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog of ehsso
2
2
 
3
+ ## 0.7.1 / 2025-11-09
4
+
5
+ * Enable Trusted Publishing
6
+
7
+ ## 0.7.0 / 2025-10-22
8
+
9
+ * Fix Rails 8.1 compatibility - make Rails engine loading conditional
10
+ * Fix Typhoeus constant resolution in Person class
11
+ * Achieve 100% test coverage with additional specs for error handling and edge cases
12
+
3
13
  ## 0.6.0 / 2025-08-20
4
14
 
5
15
  * Upgrade gem dependencies
data/README.md CHANGED
@@ -172,6 +172,12 @@ class ApplicationController < ActionController::Base
172
172
  end
173
173
  ```
174
174
 
175
+ ## Publishing
176
+
177
+ This project uses [Trusted Publishing](https://guides.rubygems.org/trusted-publishing/) to securely publish gems to RubyGems.org. Trusted Publishing eliminates the need for long-lived API tokens by using OpenID Connect (OIDC) to establish a trusted relationship between GitHub Actions and RubyGems.org.
178
+
179
+ With Trusted Publishing configured, gem releases are automatically published to RubyGems when the release workflow runs, providing a more secure and streamlined publishing process.
180
+
175
181
  ## Contributing
176
182
 
177
183
  Bug reports and pull requests are welcome on GitHub at https://github.com/thomis/ehsso.
data/ehsso.gemspec CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency "standard", "~> 1.18"
30
30
  spec.add_development_dependency "simplecov", "~> 0.21"
31
31
 
32
- spec.add_runtime_dependency("typhoeus", "~> 1.3")
32
+ spec.add_runtime_dependency("typhoeus", "~> 1.5")
33
33
  spec.add_runtime_dependency("logger", "~> 1.7")
34
34
  spec.add_runtime_dependency("bigdecimal", "~> 3.2")
35
35
  end
data/lib/ehsso/person.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require "typhoeus"
2
+
1
3
  module Ehsso
2
4
  class Person
3
5
  attr_accessor :id
@@ -103,7 +105,7 @@ module Ehsso
103
105
  userpwd = Ehsso.configuration.username_and_password
104
106
 
105
107
  # allows to mock class for rspec
106
- service_class = args[:service_class] || Typhoeus
108
+ service_class = args[:service_class] || ::Typhoeus
107
109
 
108
110
  response = service_class.post(url, body: JSON.generate(payload(action: args[:action])), userpwd: userpwd, ssl_verifypeer: false)
109
111
  handle_response(response)
data/lib/ehsso/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ehsso
2
- VERSION = "0.6.0"
2
+ VERSION = "0.7.1"
3
3
  end
data/lib/ehsso.rb CHANGED
@@ -2,8 +2,12 @@ require "json"
2
2
 
3
3
  require "ehsso/version"
4
4
  require "ehsso/configuration"
5
- require "ehsso/engine"
6
5
  require "ehsso/person"
7
6
 
7
+ # Only load the Rails engine if Rails is defined and loaded
8
+ if defined?(Rails::Engine)
9
+ require "ehsso/engine"
10
+ end
11
+
8
12
  module Ehsso
9
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ehsso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Steiner
@@ -99,14 +99,14 @@ dependencies:
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '1.3'
102
+ version: '1.5'
103
103
  type: :runtime
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '1.3'
109
+ version: '1.5'
110
110
  - !ruby/object:Gem::Dependency
111
111
  name: logger
112
112
  requirement: !ruby/object:Gem::Requirement