session-validator-client 5.1.0 → 5.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d091acd762f22b286f6c92cde9e72642b8ff3919cbbc0df99e48a159c111d65a
4
- data.tar.gz: af944e85aa7a0199f1ec0d115582046826f838124e04440e4106550512cde3c3
3
+ metadata.gz: 6242bc6b7c02d62ac8bceff4c620ae8836bd1935a23df95a839cd84b8b5c1934
4
+ data.tar.gz: ca9638fab46429d9df13658fd728cbabc0773998d61554dbb00ac7aa397f10fe
5
5
  SHA512:
6
- metadata.gz: 2bb739c2ae71f993ed3e7ed6a1309b8be0e25163afd858d09960071ba737e9ea380e2ab720ae7cd5993cc37307497f9311c8291761226dcc9ce46940300df310
7
- data.tar.gz: 44cfd9d65bd547f96895971d5f796568a30a3e42115eb457a0a28b18e8ba717d573601bee8fa85428e85ad45c08b61d42758820bf771038b1149e17ec883c320
6
+ metadata.gz: ad5b41199775adc15dbaa11e72b169a2651fb352a7c4ca279abc93e14c72f74b55c6a7618c8cf6714936b3c6cce7ad6bff1222511e1dc4ca640aacacbd1bffd6
7
+ data.tar.gz: b1a9477a886cbc02cd11d04cd27c18385a18970cb48be418b1addec74514823ec34f35d35f73a7d4c632cfdbb532f461cc3414fc8844e8eceefde86c3d64f21b
@@ -7,10 +7,10 @@ jobs:
7
7
  runs-on: ubuntu-latest
8
8
  strategy:
9
9
  matrix:
10
- ruby-versions: ['2.6', '2.7', '3.0']
10
+ ruby-versions: ['2.6', '2.7', '3.0', '3.2']
11
11
 
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v4
14
14
  - uses: ruby/setup-ruby@v1
15
15
  with:
16
16
  ruby-version: ${{ matrix.ruby-versions }}
@@ -28,4 +28,4 @@ jobs:
28
28
  gem build *.gemspec
29
29
  gem push *.gem
30
30
  env:
31
- GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
31
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  *.gem
2
2
  Gemfile.lock
3
3
  .ruby-version
4
+ .env
data/Makefile ADDED
@@ -0,0 +1,7 @@
1
+ .PHONY: test sh
2
+
3
+ test:
4
+ docker compose run --rm app bash -c "bundle install && rspec"
5
+
6
+ sh:
7
+ docker compose run --rm app bash -c "bundle install && bash"
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # session-validator-client-ruby ![Build status](https://travis-ci.org/emartech/session-validator-client-ruby.svg?branch=master)
1
+ # Session Validator Client Ruby ![Build Status](https://github.com/emartech/session-validator-client-ruby/actions/workflows/ruby.yml/badge.svg)
2
2
 
3
3
  Ruby client for Emarsys session validator service.
4
4
 
@@ -10,35 +10,38 @@ gem install session-validator-client
10
10
 
11
11
  ## Usage
12
12
 
13
- Setup the following environment variables:
14
-
15
- * `KEY_POOL`
16
- * `SESSION_VALIDATOR_KEYID`
17
- * `SESSION_VALIDATOR_URL`
18
-
19
- ### Validating a single Msid
20
- `valid?(msid)` returns `true` if `msid` is valid
13
+ Copy `.env.example` to `.env` and set the necessary values for usage in your service.
21
14
 
15
+ ### Create client
22
16
  ```ruby
23
17
  require "session_validator"
24
18
 
25
19
  client = SessionValidator::Client.new
26
- client.valid?("staging_int_5ad5f96f307cf9.61063404")
27
20
  ```
28
21
 
29
- ### Batch validating multiple MSIDS
30
- `filter_invalid(msids)` returns an array of the invalid MSIDS.
22
+ ### Requests without Escher
23
+ For mTLS on GAP.
31
24
 
32
25
  ```ruby
33
26
  require "session_validator"
34
27
 
35
- client = SessionValidator::Client.new
28
+ client = SessionValidator::Client.new(use_escher: false)
29
+ ```
30
+
31
+ ### Validating a single MSID
32
+ ```ruby
33
+ client.valid?("staging_int_5ad5f96f307cf9.61063404")
34
+ ```
35
+
36
+ ### Batch validating multiple MSIDs
37
+ Returns an array of the invalid MSIDs.
38
+ ```ruby
36
39
  client.filter_invalid(["staging_int_5ad5f96f307cf9.61063404", "staging_int_5ad5f96f307cf9.61063405"])
37
40
  ```
38
41
 
39
- ## Running tests
42
+ ## Local development
40
43
 
44
+ ### Running tests
41
45
  ```bash
42
- $ bundle install
43
- $ rspec
46
+ make test
44
47
  ```
@@ -0,0 +1,6 @@
1
+ services:
2
+ app:
3
+ image: ruby:3.2.5
4
+ working_dir: /home/app/src
5
+ volumes:
6
+ - .:/home/app/src
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "session-validator-client"
3
- s.version = "5.1.0"
3
+ s.version = "5.1.2"
4
4
  s.summary = "Ruby client for Emarsys session validator service"
5
5
  s.authors = ["Emarsys Technologies Ltd."]
6
6
  s.email = "security@emarsys.com"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: session-validator-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emarsys Technologies Ltd.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-06 00:00:00.000000000 Z
11
+ date: 2024-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: escher-keypool
@@ -134,14 +134,16 @@ executables: []
134
134
  extensions: []
135
135
  extra_rdoc_files: []
136
136
  files:
137
- - ".env"
137
+ - ".env.example"
138
138
  - ".github/workflows/ruby.yml"
139
139
  - ".gitignore"
140
140
  - ".rspec"
141
141
  - Gemfile
142
142
  - LICENSE.txt
143
+ - Makefile
143
144
  - README.md
144
145
  - bin/console
146
+ - docker-compose.yml
145
147
  - lib/session_validator.rb
146
148
  - lib/session_validator/cached_client.rb
147
149
  - lib/session_validator/client.rb
File without changes