multi_session_store 0.2.7 → 0.3.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: 364f12b6749ac844e95dea4bce2c71d9fbbc784d6d94ef7fd93dfb57147319ad
4
- data.tar.gz: 0dbab4e5bef0a00b0e054eb21e1242bb0a8d7045b9abe9aab637c2f17c1da6ca
3
+ metadata.gz: 9183ce442b494f0327c64af69e8c4ddf7204836f44afbb286ffdeb1c3b121dc2
4
+ data.tar.gz: eb1331812c7db41690ea5e5e1a1bc396ad17335de4d4c7d908795e9ea466eb63
5
5
  SHA512:
6
- metadata.gz: 64b367448c0a81ae6f6b6c116ed911499dd561957219b710496fa0fd7111d247ba6131ec633c3b122cc2118bb2b45ee1413d0d4c10222a31e78c511eaf41b5bd
7
- data.tar.gz: e2b62659267f4d22ac411f3ffb788dbe16bc50b47b0dda67b803d9f5a437b5d2edc3e8c7a38564ceb6c66493780969997667c1dd6b1a4db7a3e32f8c6e6f8cf1
6
+ metadata.gz: 4bee69a36d4934416a42676de360732ac97394f4710d5b50574e727877895e0c3856e200c51e95b4bc9697a719bcfd83eda6b43e6faa2248394a4f604e83a361
7
+ data.tar.gz: a27a3d09d2adb4980e488b511596b9c755f77d843908a33b94f8db589c637363fdd972d7ff5a1acad1e29e02a478a0f44db9fe2c7b6ec12f5aa43d831c8aa471
@@ -0,0 +1,73 @@
1
+ name: CI
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ test:
7
+ name: Test
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ ruby-versions: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4']
12
+
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Setup ruby
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: ${{ matrix.ruby-versions }}
21
+
22
+ - name: Run dependencies
23
+ run: bundle install
24
+
25
+ - name: Run tests
26
+ run: bundle exec rake
27
+
28
+ # a nem sikerult a gemfury push, a tokennel nem jo vmi, lehet pusholni lokalbol
29
+ # deploy:
30
+ # name: Deploy
31
+ # runs-on: ubuntu-latest
32
+ # needs: [test]
33
+ # timeout-minutes: 3
34
+ #
35
+ # if: ${{ github.ref_name == 'master' }}
36
+ # steps:
37
+ # - name: Checkout code
38
+ # uses: actions/checkout@v4
39
+ # - name: Push to gemfury
40
+ # run: |
41
+ # mkdir -p $HOME/.gem
42
+ # touch $HOME/.gem/credentials
43
+ # chmod 0600 $HOME/.gem/credentials
44
+ # printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
45
+ # gem build *.gemspec
46
+ # gem push *.gem
47
+ #
48
+ # env:
49
+ # GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
50
+
51
+ failed-slack-notification:
52
+ if: ${{ always() && contains(needs.*.result, 'failure') }}
53
+ runs-on: ubuntu-latest
54
+ needs: [test]
55
+ # needs: [test, deploy]
56
+ steps:
57
+ - name: Send Notification
58
+ run: |
59
+ curl -X POST -H 'Content-type: application/json' --data "{\"attachments\":[
60
+ {\"color\":\"#ff0000\",\"blocks\":[
61
+ {\"type\":\"header\",\"text\":{\"type\":\"plain_text\",\"text\":\"Build failed\"}},
62
+ {\"type\":\"section\",\"fields\":[
63
+ {\"text\":\"*Branch*\\n$GITHUB_REF\",\"type\":\"mrkdwn\"},
64
+ {\"text\":\"*Project*\\n<https://github.com/emartech/multi_session_store/actions/runs/$GITHUB_RUN_ID|$PROJECT_NAME>\",\"type\":\"mrkdwn\"}
65
+ ]},
66
+ {\"type\":\"section\",\"fields\":[
67
+ {\"text\":\"*Commit*\\n<https://github.com/emartech/multi_session_store/commit/$GITHUB_SHA|$GITHUB_SHA>\",\"type\":\"mrkdwn\"}
68
+ ]},
69
+ {\"type\":\"section\",\"fields\":[
70
+ {\"text\":\"*Committer*\\n$GITHUB_ACTOR\",\"type\":\"mrkdwn\"}
71
+ ]}
72
+ ]}
73
+ ]}" ${{ secrets.SLACK_INTEGRATION }}
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ .idea
9
10
 
10
11
  # rspec failure tracking
11
12
  .rspec_status
data/.travis.yml CHANGED
@@ -4,4 +4,6 @@ language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
6
  - 2.7.3
7
- before_install: gem install bundler -v 2.2.27
7
+ - 3.1.2
8
+ - 3.4.1
9
+ before_install: gem install bundler
data/README.md CHANGED
@@ -26,6 +26,9 @@ Or install it yourself as:
26
26
 
27
27
  Bug reports and pull requests are welcome on GitHub at https://github.com/emartech/multi_session_store.
28
28
 
29
+ ### Push from local machine
30
+ gem build *.gemspec
31
+
29
32
  ## License
30
33
 
31
34
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -10,7 +10,7 @@ module MultiSessionStore
10
10
  def call(env)
11
11
  request = Rack::Request.new(env)
12
12
  set_subsession_id_from_header(request)
13
- generate_subsession_id_if_needed(request)
13
+ generate_subsession_id_if_needed(env, request)
14
14
  @app.call(env)
15
15
  end
16
16
 
@@ -22,8 +22,15 @@ module MultiSessionStore
22
22
  request.update_param 'subsession_id', request.get_header(SUBSESSION_ID_HEADER) if request.has_header?(SUBSESSION_ID_HEADER)
23
23
  end
24
24
 
25
- def generate_subsession_id_if_needed(request)
26
- request.update_param 'subsession_id', new_subsession_id if subsession_id_is_needed?(request)
25
+ def generate_subsession_id_if_needed(env, request)
26
+ if subsession_id_is_needed?(request)
27
+ session_id = new_subsession_id
28
+ query_string = Rack::Utils.parse_nested_query(request.query_string)
29
+ query_string['subsession_id'] = session_id
30
+ env['QUERY_STRING'] = query_string.to_query
31
+ env['rack.request.query_string'] = nil
32
+ request.update_param 'subsession_id', session_id
33
+ end
27
34
  end
28
35
 
29
36
  def new_subsession_id
@@ -1,3 +1,3 @@
1
1
  module MultiSessionStore
2
- VERSION = "0.2.7"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_session_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emarsys Smart Insight developers
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2021-09-16 00:00:00.000000000 Z
10
+ date: 2025-02-03 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: actionpack
@@ -88,6 +87,7 @@ executables: []
88
87
  extensions: []
89
88
  extra_rdoc_files: []
90
89
  files:
90
+ - ".github/workflows/main.yml"
91
91
  - ".gitignore"
92
92
  - ".rspec"
93
93
  - ".travis.yml"
@@ -111,7 +111,6 @@ metadata:
111
111
  homepage_uri: https://github.com/emartech/multi_session_store
112
112
  source_code_uri: https://github.com/emartech/multi_session_store.git
113
113
  changelog_uri: https://github.com/emartech/multi_session_store/blob/master/CHANGELOG.md
114
- post_install_message:
115
114
  rdoc_options: []
116
115
  require_paths:
117
116
  - lib
@@ -126,8 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
125
  - !ruby/object:Gem::Version
127
126
  version: '0'
128
127
  requirements: []
129
- rubygems_version: 3.1.6
130
- signing_key:
128
+ rubygems_version: 3.6.3
131
129
  specification_version: 4
132
130
  summary: MultiSessionStore for Rails applications
133
131
  test_files: []