big_session 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 +7 -0
- data/.circleci/config.yml +32 -0
- data/.rubocop.yml +10 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +21 -0
- data/README.md +60 -0
- data/Rakefile +8 -0
- data/big_session.gemspec +44 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/examples/landing_page_app_and_core_app/README.md +3 -0
- data/examples/landing_page_app_and_core_app/app_core/.ruby-version +1 -0
- data/examples/landing_page_app_and_core_app/app_core/Dockerfile +22 -0
- data/examples/landing_page_app_and_core_app/app_core/Gemfile +66 -0
- data/examples/landing_page_app_and_core_app/app_core/Gemfile.lock +236 -0
- data/examples/landing_page_app_and_core_app/app_core/README.md +24 -0
- data/examples/landing_page_app_and_core_app/app_core/Rakefile +6 -0
- data/examples/landing_page_app_and_core_app/app_core/app/assets/config/manifest.js +3 -0
- data/examples/landing_page_app_and_core_app/app_core/app/assets/images/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/app/assets/javascripts/application.js +16 -0
- data/examples/landing_page_app_and_core_app/app_core/app/assets/javascripts/cable.js +13 -0
- data/examples/landing_page_app_and_core_app/app_core/app/assets/javascripts/channels/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/app/assets/stylesheets/application.css +15 -0
- data/examples/landing_page_app_and_core_app/app_core/app/channels/application_cable/channel.rb +4 -0
- data/examples/landing_page_app_and_core_app/app_core/app/channels/application_cable/connection.rb +4 -0
- data/examples/landing_page_app_and_core_app/app_core/app/controllers/application_controller.rb +12 -0
- data/examples/landing_page_app_and_core_app/app_core/app/controllers/concerns/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/app/controllers/conversions_controller.rb +8 -0
- data/examples/landing_page_app_and_core_app/app_core/app/helpers/application_helper.rb +2 -0
- data/examples/landing_page_app_and_core_app/app_core/app/jobs/application_job.rb +2 -0
- data/examples/landing_page_app_and_core_app/app_core/app/mailers/application_mailer.rb +4 -0
- data/examples/landing_page_app_and_core_app/app_core/app/models/application_record.rb +3 -0
- data/examples/landing_page_app_and_core_app/app_core/app/models/concerns/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/app/views/layouts/application.html.erb +15 -0
- data/examples/landing_page_app_and_core_app/app_core/app/views/layouts/mailer.html.erb +13 -0
- data/examples/landing_page_app_and_core_app/app_core/app/views/layouts/mailer.text.erb +1 -0
- data/examples/landing_page_app_and_core_app/app_core/bin/bundle +3 -0
- data/examples/landing_page_app_and_core_app/app_core/bin/rails +9 -0
- data/examples/landing_page_app_and_core_app/app_core/bin/rake +9 -0
- data/examples/landing_page_app_and_core_app/app_core/bin/setup +36 -0
- data/examples/landing_page_app_and_core_app/app_core/bin/spring +17 -0
- data/examples/landing_page_app_and_core_app/app_core/bin/update +31 -0
- data/examples/landing_page_app_and_core_app/app_core/bin/yarn +11 -0
- data/examples/landing_page_app_and_core_app/app_core/config.ru +5 -0
- data/examples/landing_page_app_and_core_app/app_core/config/application.rb +19 -0
- data/examples/landing_page_app_and_core_app/app_core/config/boot.rb +4 -0
- data/examples/landing_page_app_and_core_app/app_core/config/cable.yml +10 -0
- data/examples/landing_page_app_and_core_app/app_core/config/credentials.yml.enc +1 -0
- data/examples/landing_page_app_and_core_app/app_core/config/database.yml +88 -0
- data/examples/landing_page_app_and_core_app/app_core/config/environment.rb +5 -0
- data/examples/landing_page_app_and_core_app/app_core/config/environments/development.rb +78 -0
- data/examples/landing_page_app_and_core_app/app_core/config/environments/production.rb +94 -0
- data/examples/landing_page_app_and_core_app/app_core/config/environments/test.rb +46 -0
- data/examples/landing_page_app_and_core_app/app_core/config/initializers/application_controller_renderer.rb +8 -0
- data/examples/landing_page_app_and_core_app/app_core/config/initializers/assets.rb +14 -0
- data/examples/landing_page_app_and_core_app/app_core/config/initializers/backtrace_silencers.rb +7 -0
- data/examples/landing_page_app_and_core_app/app_core/config/initializers/big_session.rb +7 -0
- data/examples/landing_page_app_and_core_app/app_core/config/initializers/content_security_policy.rb +25 -0
- data/examples/landing_page_app_and_core_app/app_core/config/initializers/cookies_serializer.rb +5 -0
- data/examples/landing_page_app_and_core_app/app_core/config/initializers/filter_parameter_logging.rb +4 -0
- data/examples/landing_page_app_and_core_app/app_core/config/initializers/inflections.rb +16 -0
- data/examples/landing_page_app_and_core_app/app_core/config/initializers/mime_types.rb +4 -0
- data/examples/landing_page_app_and_core_app/app_core/config/initializers/wrap_parameters.rb +14 -0
- data/examples/landing_page_app_and_core_app/app_core/config/locales/en.yml +33 -0
- data/examples/landing_page_app_and_core_app/app_core/config/puma.rb +34 -0
- data/examples/landing_page_app_and_core_app/app_core/config/routes.rb +4 -0
- data/examples/landing_page_app_and_core_app/app_core/config/spring.rb +6 -0
- data/examples/landing_page_app_and_core_app/app_core/config/storage.yml +34 -0
- data/examples/landing_page_app_and_core_app/app_core/db/seeds.rb +7 -0
- data/examples/landing_page_app_and_core_app/app_core/entrypoint.sh +8 -0
- data/examples/landing_page_app_and_core_app/app_core/lib/assets/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/lib/tasks/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/log/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/package.json +5 -0
- data/examples/landing_page_app_and_core_app/app_core/public/404.html +67 -0
- data/examples/landing_page_app_and_core_app/app_core/public/422.html +67 -0
- data/examples/landing_page_app_and_core_app/app_core/public/500.html +66 -0
- data/examples/landing_page_app_and_core_app/app_core/public/apple-touch-icon-precomposed.png +0 -0
- data/examples/landing_page_app_and_core_app/app_core/public/apple-touch-icon.png +0 -0
- data/examples/landing_page_app_and_core_app/app_core/public/favicon.ico +0 -0
- data/examples/landing_page_app_and_core_app/app_core/public/robots.txt +1 -0
- data/examples/landing_page_app_and_core_app/app_core/storage/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/test/application_system_test_case.rb +5 -0
- data/examples/landing_page_app_and_core_app/app_core/test/controllers/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/test/fixtures/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/test/fixtures/files/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/test/helpers/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/test/integration/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/test/mailers/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/test/models/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/test/system/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/test/test_helper.rb +10 -0
- data/examples/landing_page_app_and_core_app/app_core/tmp/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_core/vendor/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/.ruby-version +1 -0
- data/examples/landing_page_app_and_core_app/app_lp/Dockerfile +22 -0
- data/examples/landing_page_app_and_core_app/app_lp/Gemfile +66 -0
- data/examples/landing_page_app_and_core_app/app_lp/Gemfile.lock +256 -0
- data/examples/landing_page_app_and_core_app/app_lp/README.md +24 -0
- data/examples/landing_page_app_and_core_app/app_lp/Rakefile +6 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/assets/config/manifest.js +3 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/assets/images/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/assets/javascripts/application.js +16 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/assets/javascripts/cable.js +13 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/assets/javascripts/channels/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/assets/stylesheets/application.css +15 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/channels/application_cable/channel.rb +4 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/channels/application_cable/connection.rb +4 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/controllers/application_controller.rb +10 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/controllers/concerns/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/controllers/conversions_controller.rb +13 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/controllers/lps_controller.rb +3 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/helpers/application_helper.rb +2 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/jobs/application_job.rb +2 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/mailers/application_mailer.rb +4 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/models/application_record.rb +3 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/models/concerns/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/views/layouts/application.html.erb +15 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/views/layouts/mailer.html.erb +13 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/views/layouts/mailer.text.erb +1 -0
- data/examples/landing_page_app_and_core_app/app_lp/app/views/lps/show.html.haml +5 -0
- data/examples/landing_page_app_and_core_app/app_lp/bin/bundle +3 -0
- data/examples/landing_page_app_and_core_app/app_lp/bin/rails +9 -0
- data/examples/landing_page_app_and_core_app/app_lp/bin/rake +9 -0
- data/examples/landing_page_app_and_core_app/app_lp/bin/setup +36 -0
- data/examples/landing_page_app_and_core_app/app_lp/bin/spring +17 -0
- data/examples/landing_page_app_and_core_app/app_lp/bin/update +31 -0
- data/examples/landing_page_app_and_core_app/app_lp/bin/yarn +11 -0
- data/examples/landing_page_app_and_core_app/app_lp/config.ru +5 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/application.rb +19 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/boot.rb +4 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/cable.yml +10 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/credentials.yml.enc +1 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/database.yml +88 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/environment.rb +5 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/environments/development.rb +77 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/environments/production.rb +94 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/environments/test.rb +46 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/initializers/application_controller_renderer.rb +8 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/initializers/assets.rb +14 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/initializers/backtrace_silencers.rb +7 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/initializers/big_session.rb +7 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/initializers/content_security_policy.rb +25 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/initializers/cookies_serializer.rb +5 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/initializers/filter_parameter_logging.rb +4 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/initializers/inflections.rb +16 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/initializers/mime_types.rb +4 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/initializers/wrap_parameters.rb +14 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/locales/en.yml +33 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/puma.rb +34 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/routes.rb +5 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/spring.rb +6 -0
- data/examples/landing_page_app_and_core_app/app_lp/config/storage.yml +34 -0
- data/examples/landing_page_app_and_core_app/app_lp/db/seeds.rb +7 -0
- data/examples/landing_page_app_and_core_app/app_lp/entrypoint.sh +8 -0
- data/examples/landing_page_app_and_core_app/app_lp/lib/assets/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/lib/tasks/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/log/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/package.json +5 -0
- data/examples/landing_page_app_and_core_app/app_lp/public/404.html +67 -0
- data/examples/landing_page_app_and_core_app/app_lp/public/422.html +67 -0
- data/examples/landing_page_app_and_core_app/app_lp/public/500.html +66 -0
- data/examples/landing_page_app_and_core_app/app_lp/public/apple-touch-icon-precomposed.png +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/public/apple-touch-icon.png +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/public/favicon.ico +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/public/robots.txt +1 -0
- data/examples/landing_page_app_and_core_app/app_lp/storage/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/test/application_system_test_case.rb +5 -0
- data/examples/landing_page_app_and_core_app/app_lp/test/controllers/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/test/fixtures/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/test/fixtures/files/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/test/helpers/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/test/integration/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/test/mailers/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/test/models/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/test/system/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/test/test_helper.rb +10 -0
- data/examples/landing_page_app_and_core_app/app_lp/tmp/.keep +0 -0
- data/examples/landing_page_app_and_core_app/app_lp/vendor/.keep +0 -0
- data/examples/landing_page_app_and_core_app/docker-compose.yml +26 -0
- data/lib/big_session.rb +15 -0
- data/lib/big_session/faraday.rb +35 -0
- data/lib/big_session/rack_middleware.rb +57 -0
- data/lib/big_session/session_id.rb +25 -0
- data/lib/big_session/version.rb +5 -0
- metadata +330 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 994588f4941c7cc708c7eb25b6c83eeccd3152955e3383dd9091d5760e80c564
|
|
4
|
+
data.tar.gz: 89b653bd49cf3d7cb121edef8fdd7b4a813f95fa3533f1499c0140890dbfce33
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: e861d9b437bb3ed1080ad04fdff2e58a5df8031a97a9d643efd1dd6ccd6fb2fc4759db98cfe8dedb21f33c397b6f97a48efaaeb418b554a7154be1f9cc8c14b0
|
|
7
|
+
data.tar.gz: bdd49cd22dd15c31a305423020abfd1663057e141fcfb8de76849756c909f8be7b27a3766b112bcf35f39ad69c75514ac831af94a4bcb4cbfe9c36c27eb2f414
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
jobs:
|
|
3
|
+
build:
|
|
4
|
+
docker:
|
|
5
|
+
- image: circleci/ruby:2.6.4
|
|
6
|
+
working_directory: ~/repo
|
|
7
|
+
steps:
|
|
8
|
+
- checkout
|
|
9
|
+
- run:
|
|
10
|
+
name: install dependencies
|
|
11
|
+
command: |
|
|
12
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
|
13
|
+
- run:
|
|
14
|
+
name: run tests
|
|
15
|
+
command: |
|
|
16
|
+
mkdir /tmp/test-results
|
|
17
|
+
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
|
|
18
|
+
circleci tests split --split-by=timings)"
|
|
19
|
+
|
|
20
|
+
COV=1 bundle exec rspec \
|
|
21
|
+
--format progress \
|
|
22
|
+
--format RspecJunitFormatter \
|
|
23
|
+
--out /tmp/test-results/rspec.xml \
|
|
24
|
+
--format progress \
|
|
25
|
+
$TEST_FILES
|
|
26
|
+
- store_test_results:
|
|
27
|
+
path: /tmp/test-results
|
|
28
|
+
- store_artifacts:
|
|
29
|
+
path: /tmp/test-results
|
|
30
|
+
destination: test-results
|
|
31
|
+
- store_artifacts:
|
|
32
|
+
path: coverage
|
data/.rubocop.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Yuichiro Someya
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
[](https://circleci.com/gh/speee/big_session)
|
|
2
|
+
|
|
3
|
+
# BigSession
|
|
4
|
+
|
|
5
|
+
BigSession is a rubygem that helps tracing session over a chain of multiple applications (it's a *big session*!).
|
|
6
|
+
|
|
7
|
+
It is inspired heavily by [ZipkinTracer](https://github.com/openzipkin/zipkin-tracer), [ReuestTracer](https://github.com/crealytics/request-tracer) and general ideas of tracing with slight difference in its concept.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
Add this line to your application's Gemfile:
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
gem 'big_session'
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
And then execute:
|
|
18
|
+
|
|
19
|
+
$ bundle
|
|
20
|
+
|
|
21
|
+
Or install it yourself as:
|
|
22
|
+
|
|
23
|
+
$ gem install big_session
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
### Use BigSession with Rails and Faraday
|
|
28
|
+
(It is an only way to use BigSession at the moment.)
|
|
29
|
+
|
|
30
|
+
Install BigSession to your rails application**s** and put these lines below to your Rails configuration files, `config/initializers/big_session.rb` for example.
|
|
31
|
+
|
|
32
|
+
```ruby
|
|
33
|
+
# inbound
|
|
34
|
+
|
|
35
|
+
::BigSession::RackMiddleware.activate
|
|
36
|
+
|
|
37
|
+
# outbound
|
|
38
|
+
|
|
39
|
+
::BigSession::FaradayBigSession.activate
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
It makes the application receives/generates a big session id for every request.
|
|
43
|
+
|
|
44
|
+
You can then pass the id to another rails application via HTTP Header (`X-Bigse-SessionId`) when you use Faraday to send HTTP request.
|
|
45
|
+
|
|
46
|
+
Check `./example` for expected use cases.
|
|
47
|
+
|
|
48
|
+
## Development
|
|
49
|
+
|
|
50
|
+
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.
|
|
51
|
+
|
|
52
|
+
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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
53
|
+
|
|
54
|
+
## Contributing
|
|
55
|
+
|
|
56
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/speee/big_session.
|
|
57
|
+
|
|
58
|
+
## License
|
|
59
|
+
|
|
60
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/big_session.gemspec
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
|
+
require 'big_session/version'
|
|
6
|
+
|
|
7
|
+
Gem::Specification.new do |spec|
|
|
8
|
+
spec.name = 'big_session'
|
|
9
|
+
spec.version = BigSession::VERSION
|
|
10
|
+
spec.authors = ['Yuichiro Someya']
|
|
11
|
+
spec.email = ['me@ayemos.me']
|
|
12
|
+
|
|
13
|
+
spec.summary = 'BigSession is a rubygem that helps tracing session over a chain of multiple applications.'
|
|
14
|
+
spec.description = 'BigSession is a rubygem that helps tracing session over a chain of multiple applications.'
|
|
15
|
+
spec.homepage = 'https://github.com/speee/big_session'
|
|
16
|
+
spec.license = 'MIT'
|
|
17
|
+
|
|
18
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
|
19
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
|
20
|
+
if spec.respond_to?(:metadata)
|
|
21
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
|
22
|
+
spec.metadata['source_code_uri'] = 'https://github.com/speee/big_session'
|
|
23
|
+
spec.metadata['changelog_uri'] = 'https://github.com/speee/big_session'
|
|
24
|
+
else
|
|
25
|
+
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
|
26
|
+
'public gem pushes.'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Specify which files should be added to the gem when it is released.
|
|
30
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
31
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
32
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
33
|
+
end
|
|
34
|
+
spec.require_paths = ['lib']
|
|
35
|
+
|
|
36
|
+
spec.add_development_dependency 'bundler', '~> 1.17'
|
|
37
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
|
38
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
39
|
+
spec.add_development_dependency 'rspec_junit_formatter'
|
|
40
|
+
spec.add_development_dependency 'rubocop', '>= 0.75'
|
|
41
|
+
spec.add_development_dependency 'simplecov', '~> 0.17'
|
|
42
|
+
|
|
43
|
+
spec.add_dependency 'faraday', '~> 0.15'
|
|
44
|
+
end
|
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "big_session"
|
|
5
|
+
|
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
+
|
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
+
# require "pry"
|
|
11
|
+
# Pry.start
|
|
12
|
+
|
|
13
|
+
require "irb"
|
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ruby-2.6.3
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
FROM ruby:2.6.3
|
|
2
|
+
|
|
3
|
+
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
|
|
4
|
+
|
|
5
|
+
RUN mkdir /app
|
|
6
|
+
WORKDIR /app
|
|
7
|
+
|
|
8
|
+
COPY Gemfile /app/Gemfile
|
|
9
|
+
COPY Gemfile.lock /app/Gemfile.lock
|
|
10
|
+
COPY ./big_session /app/big_session
|
|
11
|
+
RUN bundle install
|
|
12
|
+
COPY . /app
|
|
13
|
+
|
|
14
|
+
# Add a script to be executed every time the container starts.
|
|
15
|
+
COPY entrypoint.sh /usr/bin/
|
|
16
|
+
RUN chmod +x /usr/bin/entrypoint.sh
|
|
17
|
+
ENTRYPOINT ["entrypoint.sh"]
|
|
18
|
+
|
|
19
|
+
EXPOSE 3000
|
|
20
|
+
|
|
21
|
+
# Start the main process.
|
|
22
|
+
CMD ["rails", "server", "-b", "0.0.0.0"]
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|
3
|
+
|
|
4
|
+
ruby '2.6.3'
|
|
5
|
+
|
|
6
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
|
7
|
+
gem 'rails', '~> 5.2.3'
|
|
8
|
+
# Use postgresql as the database for Active Record
|
|
9
|
+
gem 'pg', '>= 0.18', '< 2.0'
|
|
10
|
+
# Use Puma as the app server
|
|
11
|
+
gem 'puma', '~> 3.11'
|
|
12
|
+
# Use SCSS for stylesheets
|
|
13
|
+
gem 'sass-rails', '~> 5.0'
|
|
14
|
+
# Use Uglifier as compressor for JavaScript assets
|
|
15
|
+
gem 'uglifier', '>= 1.3.0'
|
|
16
|
+
# See https://github.com/rails/execjs#readme for more supported runtimes
|
|
17
|
+
# gem 'mini_racer', platforms: :ruby
|
|
18
|
+
|
|
19
|
+
# Use CoffeeScript for .coffee assets and views
|
|
20
|
+
gem 'coffee-rails', '~> 4.2'
|
|
21
|
+
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
|
22
|
+
gem 'turbolinks', '~> 5'
|
|
23
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
|
24
|
+
gem 'jbuilder', '~> 2.5'
|
|
25
|
+
# Use Redis adapter to run Action Cable in production
|
|
26
|
+
# gem 'redis', '~> 4.0'
|
|
27
|
+
# Use ActiveModel has_secure_password
|
|
28
|
+
# gem 'bcrypt', '~> 3.1.7'
|
|
29
|
+
|
|
30
|
+
# Use ActiveStorage variant
|
|
31
|
+
# gem 'mini_magick', '~> 4.8'
|
|
32
|
+
|
|
33
|
+
# Use Capistrano for deployment
|
|
34
|
+
# gem 'capistrano-rails', group: :development
|
|
35
|
+
|
|
36
|
+
# Reduces boot times through caching; required in config/boot.rb
|
|
37
|
+
gem 'bootsnap', '>= 1.1.0', require: false
|
|
38
|
+
|
|
39
|
+
gem 'faraday'
|
|
40
|
+
gem 'lograge'
|
|
41
|
+
gem 'big_session'
|
|
42
|
+
|
|
43
|
+
group :development, :test do
|
|
44
|
+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
|
45
|
+
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
group :development do
|
|
49
|
+
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
|
|
50
|
+
gem 'web-console', '>= 3.3.0'
|
|
51
|
+
gem 'listen', '>= 3.0.5', '< 3.2'
|
|
52
|
+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
|
53
|
+
gem 'spring'
|
|
54
|
+
gem 'spring-watcher-listen', '~> 2.0.0'
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
group :test do
|
|
58
|
+
# Adds support for Capybara system testing and selenium driver
|
|
59
|
+
gem 'capybara', '>= 2.15'
|
|
60
|
+
gem 'selenium-webdriver'
|
|
61
|
+
# Easy installation and use of chromedriver to run system tests with Chrome
|
|
62
|
+
gem 'chromedriver-helper'
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
|
66
|
+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: big_session
|
|
3
|
+
specs:
|
|
4
|
+
big_session (0.1.0)
|
|
5
|
+
faraday (~> 0.15)
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
actioncable (5.2.3)
|
|
11
|
+
actionpack (= 5.2.3)
|
|
12
|
+
nio4r (~> 2.0)
|
|
13
|
+
websocket-driver (>= 0.6.1)
|
|
14
|
+
actionmailer (5.2.3)
|
|
15
|
+
actionpack (= 5.2.3)
|
|
16
|
+
actionview (= 5.2.3)
|
|
17
|
+
activejob (= 5.2.3)
|
|
18
|
+
mail (~> 2.5, >= 2.5.4)
|
|
19
|
+
rails-dom-testing (~> 2.0)
|
|
20
|
+
actionpack (5.2.3)
|
|
21
|
+
actionview (= 5.2.3)
|
|
22
|
+
activesupport (= 5.2.3)
|
|
23
|
+
rack (~> 2.0)
|
|
24
|
+
rack-test (>= 0.6.3)
|
|
25
|
+
rails-dom-testing (~> 2.0)
|
|
26
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
|
27
|
+
actionview (5.2.3)
|
|
28
|
+
activesupport (= 5.2.3)
|
|
29
|
+
builder (~> 3.1)
|
|
30
|
+
erubi (~> 1.4)
|
|
31
|
+
rails-dom-testing (~> 2.0)
|
|
32
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
|
33
|
+
activejob (5.2.3)
|
|
34
|
+
activesupport (= 5.2.3)
|
|
35
|
+
globalid (>= 0.3.6)
|
|
36
|
+
activemodel (5.2.3)
|
|
37
|
+
activesupport (= 5.2.3)
|
|
38
|
+
activerecord (5.2.3)
|
|
39
|
+
activemodel (= 5.2.3)
|
|
40
|
+
activesupport (= 5.2.3)
|
|
41
|
+
arel (>= 9.0)
|
|
42
|
+
activestorage (5.2.3)
|
|
43
|
+
actionpack (= 5.2.3)
|
|
44
|
+
activerecord (= 5.2.3)
|
|
45
|
+
marcel (~> 0.3.1)
|
|
46
|
+
activesupport (5.2.3)
|
|
47
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
48
|
+
i18n (>= 0.7, < 2)
|
|
49
|
+
minitest (~> 5.1)
|
|
50
|
+
tzinfo (~> 1.1)
|
|
51
|
+
addressable (2.6.0)
|
|
52
|
+
public_suffix (>= 2.0.2, < 4.0)
|
|
53
|
+
archive-zip (0.12.0)
|
|
54
|
+
io-like (~> 0.3.0)
|
|
55
|
+
arel (9.0.0)
|
|
56
|
+
bindex (0.8.1)
|
|
57
|
+
bootsnap (1.4.4)
|
|
58
|
+
msgpack (~> 1.0)
|
|
59
|
+
builder (3.2.3)
|
|
60
|
+
byebug (11.0.1)
|
|
61
|
+
capybara (3.28.0)
|
|
62
|
+
addressable
|
|
63
|
+
mini_mime (>= 0.1.3)
|
|
64
|
+
nokogiri (~> 1.8)
|
|
65
|
+
rack (>= 1.6.0)
|
|
66
|
+
rack-test (>= 0.6.3)
|
|
67
|
+
regexp_parser (~> 1.5)
|
|
68
|
+
xpath (~> 3.2)
|
|
69
|
+
childprocess (1.0.1)
|
|
70
|
+
rake (< 13.0)
|
|
71
|
+
chromedriver-helper (2.1.1)
|
|
72
|
+
archive-zip (~> 0.10)
|
|
73
|
+
nokogiri (~> 1.8)
|
|
74
|
+
coffee-rails (4.2.2)
|
|
75
|
+
coffee-script (>= 2.2.0)
|
|
76
|
+
railties (>= 4.0.0)
|
|
77
|
+
coffee-script (2.4.1)
|
|
78
|
+
coffee-script-source
|
|
79
|
+
execjs
|
|
80
|
+
coffee-script-source (1.12.2)
|
|
81
|
+
concurrent-ruby (1.1.5)
|
|
82
|
+
crass (1.0.4)
|
|
83
|
+
erubi (1.8.0)
|
|
84
|
+
execjs (2.7.0)
|
|
85
|
+
faraday (0.15.4)
|
|
86
|
+
multipart-post (>= 1.2, < 3)
|
|
87
|
+
ffi (1.11.1)
|
|
88
|
+
globalid (0.4.2)
|
|
89
|
+
activesupport (>= 4.2.0)
|
|
90
|
+
i18n (1.6.0)
|
|
91
|
+
concurrent-ruby (~> 1.0)
|
|
92
|
+
io-like (0.3.0)
|
|
93
|
+
jbuilder (2.9.1)
|
|
94
|
+
activesupport (>= 4.2.0)
|
|
95
|
+
listen (3.1.5)
|
|
96
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
|
97
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
|
98
|
+
ruby_dep (~> 1.2)
|
|
99
|
+
lograge (0.11.2)
|
|
100
|
+
actionpack (>= 4)
|
|
101
|
+
activesupport (>= 4)
|
|
102
|
+
railties (>= 4)
|
|
103
|
+
request_store (~> 1.0)
|
|
104
|
+
loofah (2.2.3)
|
|
105
|
+
crass (~> 1.0.2)
|
|
106
|
+
nokogiri (>= 1.5.9)
|
|
107
|
+
mail (2.7.1)
|
|
108
|
+
mini_mime (>= 0.1.1)
|
|
109
|
+
marcel (0.3.3)
|
|
110
|
+
mimemagic (~> 0.3.2)
|
|
111
|
+
method_source (0.9.2)
|
|
112
|
+
mimemagic (0.3.3)
|
|
113
|
+
mini_mime (1.0.2)
|
|
114
|
+
mini_portile2 (2.4.0)
|
|
115
|
+
minitest (5.11.3)
|
|
116
|
+
msgpack (1.3.1)
|
|
117
|
+
multipart-post (2.1.1)
|
|
118
|
+
nio4r (2.4.0)
|
|
119
|
+
nokogiri (1.10.4)
|
|
120
|
+
mini_portile2 (~> 2.4.0)
|
|
121
|
+
pg (1.1.4)
|
|
122
|
+
public_suffix (3.1.1)
|
|
123
|
+
puma (3.12.1)
|
|
124
|
+
rack (2.0.7)
|
|
125
|
+
rack-test (1.1.0)
|
|
126
|
+
rack (>= 1.0, < 3)
|
|
127
|
+
rails (5.2.3)
|
|
128
|
+
actioncable (= 5.2.3)
|
|
129
|
+
actionmailer (= 5.2.3)
|
|
130
|
+
actionpack (= 5.2.3)
|
|
131
|
+
actionview (= 5.2.3)
|
|
132
|
+
activejob (= 5.2.3)
|
|
133
|
+
activemodel (= 5.2.3)
|
|
134
|
+
activerecord (= 5.2.3)
|
|
135
|
+
activestorage (= 5.2.3)
|
|
136
|
+
activesupport (= 5.2.3)
|
|
137
|
+
bundler (>= 1.3.0)
|
|
138
|
+
railties (= 5.2.3)
|
|
139
|
+
sprockets-rails (>= 2.0.0)
|
|
140
|
+
rails-dom-testing (2.0.3)
|
|
141
|
+
activesupport (>= 4.2.0)
|
|
142
|
+
nokogiri (>= 1.6)
|
|
143
|
+
rails-html-sanitizer (1.2.0)
|
|
144
|
+
loofah (~> 2.2, >= 2.2.2)
|
|
145
|
+
railties (5.2.3)
|
|
146
|
+
actionpack (= 5.2.3)
|
|
147
|
+
activesupport (= 5.2.3)
|
|
148
|
+
method_source
|
|
149
|
+
rake (>= 0.8.7)
|
|
150
|
+
thor (>= 0.19.0, < 2.0)
|
|
151
|
+
rake (12.3.3)
|
|
152
|
+
rb-fsevent (0.10.3)
|
|
153
|
+
rb-inotify (0.10.0)
|
|
154
|
+
ffi (~> 1.0)
|
|
155
|
+
regexp_parser (1.6.0)
|
|
156
|
+
request_store (1.4.1)
|
|
157
|
+
rack (>= 1.4)
|
|
158
|
+
ruby_dep (1.5.0)
|
|
159
|
+
rubyzip (1.2.3)
|
|
160
|
+
sass (3.7.4)
|
|
161
|
+
sass-listen (~> 4.0.0)
|
|
162
|
+
sass-listen (4.0.0)
|
|
163
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
|
164
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
|
165
|
+
sass-rails (5.1.0)
|
|
166
|
+
railties (>= 5.2.0)
|
|
167
|
+
sass (~> 3.1)
|
|
168
|
+
sprockets (>= 2.8, < 4.0)
|
|
169
|
+
sprockets-rails (>= 2.0, < 4.0)
|
|
170
|
+
tilt (>= 1.1, < 3)
|
|
171
|
+
selenium-webdriver (3.142.3)
|
|
172
|
+
childprocess (>= 0.5, < 2.0)
|
|
173
|
+
rubyzip (~> 1.2, >= 1.2.2)
|
|
174
|
+
spring (2.1.0)
|
|
175
|
+
spring-watcher-listen (2.0.1)
|
|
176
|
+
listen (>= 2.7, < 4.0)
|
|
177
|
+
spring (>= 1.2, < 3.0)
|
|
178
|
+
sprockets (3.7.2)
|
|
179
|
+
concurrent-ruby (~> 1.0)
|
|
180
|
+
rack (> 1, < 3)
|
|
181
|
+
sprockets-rails (3.2.1)
|
|
182
|
+
actionpack (>= 4.0)
|
|
183
|
+
activesupport (>= 4.0)
|
|
184
|
+
sprockets (>= 3.0.0)
|
|
185
|
+
thor (0.20.3)
|
|
186
|
+
thread_safe (0.3.6)
|
|
187
|
+
tilt (2.0.9)
|
|
188
|
+
turbolinks (5.2.0)
|
|
189
|
+
turbolinks-source (~> 5.2)
|
|
190
|
+
turbolinks-source (5.2.0)
|
|
191
|
+
tzinfo (1.2.5)
|
|
192
|
+
thread_safe (~> 0.1)
|
|
193
|
+
uglifier (4.1.20)
|
|
194
|
+
execjs (>= 0.3.0, < 3)
|
|
195
|
+
web-console (3.7.0)
|
|
196
|
+
actionview (>= 5.0)
|
|
197
|
+
activemodel (>= 5.0)
|
|
198
|
+
bindex (>= 0.4.0)
|
|
199
|
+
railties (>= 5.0)
|
|
200
|
+
websocket-driver (0.7.1)
|
|
201
|
+
websocket-extensions (>= 0.1.0)
|
|
202
|
+
websocket-extensions (0.1.4)
|
|
203
|
+
xpath (3.2.0)
|
|
204
|
+
nokogiri (~> 1.8)
|
|
205
|
+
|
|
206
|
+
PLATFORMS
|
|
207
|
+
ruby
|
|
208
|
+
|
|
209
|
+
DEPENDENCIES
|
|
210
|
+
big_session!
|
|
211
|
+
bootsnap (>= 1.1.0)
|
|
212
|
+
byebug
|
|
213
|
+
capybara (>= 2.15)
|
|
214
|
+
chromedriver-helper
|
|
215
|
+
coffee-rails (~> 4.2)
|
|
216
|
+
faraday
|
|
217
|
+
jbuilder (~> 2.5)
|
|
218
|
+
listen (>= 3.0.5, < 3.2)
|
|
219
|
+
lograge
|
|
220
|
+
pg (>= 0.18, < 2.0)
|
|
221
|
+
puma (~> 3.11)
|
|
222
|
+
rails (~> 5.2.3)
|
|
223
|
+
sass-rails (~> 5.0)
|
|
224
|
+
selenium-webdriver
|
|
225
|
+
spring
|
|
226
|
+
spring-watcher-listen (~> 2.0.0)
|
|
227
|
+
turbolinks (~> 5)
|
|
228
|
+
tzinfo-data
|
|
229
|
+
uglifier (>= 1.3.0)
|
|
230
|
+
web-console (>= 3.3.0)
|
|
231
|
+
|
|
232
|
+
RUBY VERSION
|
|
233
|
+
ruby 2.6.3p62
|
|
234
|
+
|
|
235
|
+
BUNDLED WITH
|
|
236
|
+
1.17.2
|