my_api_client 1.1.0 → 1.2.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/.circleci/config.yml +6 -6
- data/.rubocop.yml +4 -3
- data/.ruby-version +1 -0
- data/CHANGELOG.md +47 -0
- data/Gemfile.lock +65 -64
- data/README.jp.md +2 -2
- data/README.md +2 -2
- data/example/api_clients/my_error_api_client.rb +1 -1
- data/example/api_clients/my_header_api_client.rb +1 -1
- data/example/api_clients/my_pagination_api_client.rb +2 -2
- data/example/api_clients/my_rest_api_client.rb +10 -10
- data/example/api_clients/my_status_api_client.rb +1 -1
- data/gemfiles/rails_7.1.gemfile +15 -0
- data/gemfiles/rails_7.2.gemfile +15 -0
- data/lib/my_api_client/error_handling.rb +1 -1
- data/lib/my_api_client/errors/network_error.rb +1 -1
- data/lib/my_api_client/errors.rb +1 -1
- data/lib/my_api_client/exceptions.rb +1 -1
- data/lib/my_api_client/params/params.rb +1 -1
- data/lib/my_api_client/params/request.rb +8 -8
- data/lib/my_api_client/request/basic.rb +2 -2
- data/lib/my_api_client/request/executor.rb +1 -1
- data/lib/my_api_client/request/pagination.rb +1 -3
- data/lib/my_api_client/request.rb +5 -5
- data/lib/my_api_client/rspec/matcher_helper.rb +3 -3
- data/lib/my_api_client/rspec/matchers/request_to.rb +1 -1
- data/lib/my_api_client/version.rb +1 -1
- data/my_api/Gemfile +1 -1
- data/my_api/Gemfile.lock +53 -49
- data/my_api/app/controllers/error_controller.rb +1 -1
- data/my_api/app/controllers/pagination_controller.rb +1 -1
- data/my_api/app/controllers/rest_controller.rb +4 -4
- data/my_api/app/controllers/status_controller.rb +1 -1
- data/my_api/spec/controllers/error_controller_spec.rb +4 -4
- data/my_api/spec/controllers/status_controller_spec.rb +3 -3
- data/my_api_client.gemspec +2 -1
- data/rails_app/rails_6.1/Gemfile.lock +73 -71
- data/rails_app/rails_7.0/Gemfile.lock +78 -76
- data/rails_app/rails_7.1/.dockerignore +31 -0
- data/rails_app/rails_7.1/.rspec +1 -0
- data/rails_app/rails_7.1/Dockerfile +55 -0
- data/rails_app/rails_7.1/Gemfile +16 -0
- data/rails_app/rails_7.1/Gemfile.lock +241 -0
- data/rails_app/rails_7.1/README.md +24 -0
- data/rails_app/rails_7.1/Rakefile +8 -0
- data/rails_app/rails_7.1/app/controllers/application_controller.rb +4 -0
- data/rails_app/rails_7.1/app/controllers/concerns/.keep +0 -0
- data/rails_app/rails_7.1/app/models/application_record.rb +5 -0
- data/rails_app/rails_7.1/app/models/concerns/.keep +0 -0
- data/rails_app/rails_7.1/bin/bundle +122 -0
- data/rails_app/rails_7.1/bin/docker-entrypoint +8 -0
- data/rails_app/rails_7.1/bin/rails +6 -0
- data/rails_app/rails_7.1/bin/rake +6 -0
- data/rails_app/rails_7.1/bin/setup +35 -0
- data/rails_app/rails_7.1/config/application.rb +46 -0
- data/rails_app/rails_7.1/config/boot.rb +5 -0
- data/rails_app/rails_7.1/config/credentials.yml.enc +1 -0
- data/rails_app/rails_7.1/config/database.yml +25 -0
- data/rails_app/rails_7.1/config/environment.rb +7 -0
- data/rails_app/rails_7.1/config/environments/development.rb +58 -0
- data/rails_app/rails_7.1/config/environments/production.rb +74 -0
- data/rails_app/rails_7.1/config/environments/test.rb +56 -0
- data/rails_app/rails_7.1/config/initializers/cors.rb +17 -0
- data/rails_app/rails_7.1/config/initializers/filter_parameter_logging.rb +10 -0
- data/rails_app/rails_7.1/config/initializers/inflections.rb +17 -0
- data/rails_app/rails_7.1/config/locales/en.yml +31 -0
- data/rails_app/rails_7.1/config/puma.rb +46 -0
- data/rails_app/rails_7.1/config/routes.rb +12 -0
- data/rails_app/rails_7.1/config.ru +8 -0
- data/rails_app/rails_7.1/db/seeds.rb +10 -0
- data/rails_app/rails_7.1/lib/tasks/.keep +0 -0
- data/rails_app/rails_7.1/public/robots.txt +2 -0
- data/rails_app/rails_7.1/spec/rails_helper.rb +13 -0
- data/rails_app/rails_7.1/spec/spec_helper.rb +13 -0
- data/rails_app/rails_7.1/storage/.keep +0 -0
- data/rails_app/rails_7.1/tmp/.keep +0 -0
- data/rails_app/rails_7.1/tmp/pids/.keep +0 -0
- data/rails_app/rails_7.1/tmp/storage/.keep +0 -0
- data/rails_app/rails_7.1/vendor/.keep +0 -0
- data/rails_app/rails_7.2/.dockerignore +42 -0
- data/rails_app/rails_7.2/.github/dependabot.yml +12 -0
- data/rails_app/rails_7.2/.github/workflows/ci.yml +55 -0
- data/rails_app/rails_7.2/.rspec +1 -0
- data/rails_app/rails_7.2/Dockerfile +62 -0
- data/rails_app/rails_7.2/Gemfile +15 -0
- data/rails_app/rails_7.2/Gemfile.lock +240 -0
- data/rails_app/rails_7.2/README.md +24 -0
- data/rails_app/rails_7.2/Rakefile +8 -0
- data/rails_app/rails_7.2/app/controllers/application_controller.rb +4 -0
- data/rails_app/rails_7.2/app/controllers/concerns/.keep +0 -0
- data/rails_app/rails_7.2/app/models/application_record.rb +5 -0
- data/rails_app/rails_7.2/app/models/concerns/.keep +0 -0
- data/rails_app/rails_7.2/bin/brakeman +9 -0
- data/rails_app/rails_7.2/bin/bundle +122 -0
- data/rails_app/rails_7.2/bin/docker-entrypoint +13 -0
- data/rails_app/rails_7.2/bin/rails +6 -0
- data/rails_app/rails_7.2/bin/rake +6 -0
- data/rails_app/rails_7.2/bin/rubocop +10 -0
- data/rails_app/rails_7.2/bin/setup +39 -0
- data/rails_app/rails_7.2/config/application.rb +46 -0
- data/rails_app/rails_7.2/config/boot.rb +5 -0
- data/rails_app/rails_7.2/config/credentials.yml.enc +1 -0
- data/rails_app/rails_7.2/config/database.yml +32 -0
- data/rails_app/rails_7.2/config/environment.rb +7 -0
- data/rails_app/rails_7.2/config/environments/development.rb +59 -0
- data/rails_app/rails_7.2/config/environments/production.rb +77 -0
- data/rails_app/rails_7.2/config/environments/test.rb +53 -0
- data/rails_app/rails_7.2/config/initializers/cors.rb +18 -0
- data/rails_app/rails_7.2/config/initializers/filter_parameter_logging.rb +10 -0
- data/rails_app/rails_7.2/config/initializers/inflections.rb +18 -0
- data/rails_app/rails_7.2/config/locales/en.yml +31 -0
- data/rails_app/rails_7.2/config/puma.rb +36 -0
- data/rails_app/rails_7.2/config/routes.rb +12 -0
- data/rails_app/rails_7.2/config.ru +8 -0
- data/rails_app/rails_7.2/db/seeds.rb +11 -0
- data/rails_app/rails_7.2/lib/tasks/.keep +0 -0
- data/rails_app/rails_7.2/public/robots.txt +3 -0
- data/rails_app/rails_7.2/spec/rails_helper.rb +13 -0
- data/rails_app/rails_7.2/spec/spec_helper.rb +13 -0
- data/rails_app/rails_7.2/storage/.keep +0 -0
- data/rails_app/rails_7.2/tmp/.keep +0 -0
- data/rails_app/rails_7.2/tmp/pids/.keep +0 -0
- data/rails_app/rails_7.2/tmp/storage/.keep +0 -0
- data/rails_app/rails_7.2/vendor/.keep +0 -0
- metadata +107 -4
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# Ignore git directory.
|
|
4
|
+
/.git/
|
|
5
|
+
/.gitignore
|
|
6
|
+
|
|
7
|
+
# Ignore bundler config.
|
|
8
|
+
/.bundle
|
|
9
|
+
|
|
10
|
+
# Ignore all environment files (except templates).
|
|
11
|
+
/.env*
|
|
12
|
+
!/.env*.erb
|
|
13
|
+
|
|
14
|
+
# Ignore all default key files.
|
|
15
|
+
/config/master.key
|
|
16
|
+
/config/credentials/*.key
|
|
17
|
+
|
|
18
|
+
# Ignore all logfiles and tempfiles.
|
|
19
|
+
/log/*
|
|
20
|
+
/tmp/*
|
|
21
|
+
!/log/.keep
|
|
22
|
+
!/tmp/.keep
|
|
23
|
+
|
|
24
|
+
# Ignore pidfiles, but keep the directory.
|
|
25
|
+
/tmp/pids/*
|
|
26
|
+
!/tmp/pids/.keep
|
|
27
|
+
|
|
28
|
+
# Ignore storage (uploaded files in development and any SQLite databases).
|
|
29
|
+
/storage/*
|
|
30
|
+
!/storage/.keep
|
|
31
|
+
/tmp/storage/*
|
|
32
|
+
!/tmp/storage/.keep
|
|
33
|
+
|
|
34
|
+
# Ignore CI service files.
|
|
35
|
+
/.github
|
|
36
|
+
|
|
37
|
+
# Ignore development files
|
|
38
|
+
/.devcontainer
|
|
39
|
+
|
|
40
|
+
# Ignore Docker-related files
|
|
41
|
+
/.dockerignore
|
|
42
|
+
/Dockerfile*
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [ main ]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
scan_ruby:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout code
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Set up Ruby
|
|
17
|
+
uses: ruby/setup-ruby@v1
|
|
18
|
+
with:
|
|
19
|
+
ruby-version: .ruby-version
|
|
20
|
+
bundler-cache: true
|
|
21
|
+
|
|
22
|
+
- name: Scan for common Rails security vulnerabilities using static analysis
|
|
23
|
+
run: bin/brakeman --no-pager
|
|
24
|
+
|
|
25
|
+
scan_js:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- name: Checkout code
|
|
30
|
+
uses: actions/checkout@v4
|
|
31
|
+
|
|
32
|
+
- name: Set up Ruby
|
|
33
|
+
uses: ruby/setup-ruby@v1
|
|
34
|
+
with:
|
|
35
|
+
ruby-version: .ruby-version
|
|
36
|
+
bundler-cache: true
|
|
37
|
+
|
|
38
|
+
- name: Scan for security vulnerabilities in JavaScript dependencies
|
|
39
|
+
run: bin/importmap audit
|
|
40
|
+
|
|
41
|
+
lint:
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
steps:
|
|
44
|
+
- name: Checkout code
|
|
45
|
+
uses: actions/checkout@v4
|
|
46
|
+
|
|
47
|
+
- name: Set up Ruby
|
|
48
|
+
uses: ruby/setup-ruby@v1
|
|
49
|
+
with:
|
|
50
|
+
ruby-version: .ruby-version
|
|
51
|
+
bundler-cache: true
|
|
52
|
+
|
|
53
|
+
- name: Lint code for consistent style
|
|
54
|
+
run: bin/rubocop -f github
|
|
55
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
--require spec_helper
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# syntax = docker/dockerfile:1
|
|
2
|
+
|
|
3
|
+
# This Dockerfile is designed for production, not development. Use with Kamal or build'n'run by hand:
|
|
4
|
+
# docker build -t my-app .
|
|
5
|
+
# docker run -d -p 80:80 -p 443:443 --name my-app -e RAILS_MASTER_KEY=<value from config/master.key> my-app
|
|
6
|
+
|
|
7
|
+
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
|
|
8
|
+
ARG RUBY_VERSION=3.1.6
|
|
9
|
+
FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base
|
|
10
|
+
|
|
11
|
+
# Rails app lives here
|
|
12
|
+
WORKDIR /rails
|
|
13
|
+
|
|
14
|
+
# Install base packages
|
|
15
|
+
RUN apt-get update -qq && \
|
|
16
|
+
apt-get install --no-install-recommends -y curl libjemalloc2 sqlite3 && \
|
|
17
|
+
rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
|
18
|
+
|
|
19
|
+
# Set production environment
|
|
20
|
+
ENV RAILS_ENV="production" \
|
|
21
|
+
BUNDLE_DEPLOYMENT="1" \
|
|
22
|
+
BUNDLE_PATH="/usr/local/bundle" \
|
|
23
|
+
BUNDLE_WITHOUT="development"
|
|
24
|
+
|
|
25
|
+
# Throw-away build stage to reduce size of final image
|
|
26
|
+
FROM base AS build
|
|
27
|
+
|
|
28
|
+
# Install packages needed to build gems
|
|
29
|
+
RUN apt-get update -qq && \
|
|
30
|
+
apt-get install --no-install-recommends -y build-essential git pkg-config && \
|
|
31
|
+
rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
|
32
|
+
|
|
33
|
+
# Install application gems
|
|
34
|
+
COPY Gemfile Gemfile.lock ./
|
|
35
|
+
RUN bundle install && \
|
|
36
|
+
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git
|
|
37
|
+
|
|
38
|
+
# Copy application code
|
|
39
|
+
COPY . .
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
# Final stage for app image
|
|
45
|
+
FROM base
|
|
46
|
+
|
|
47
|
+
# Copy built artifacts: gems, application
|
|
48
|
+
COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}"
|
|
49
|
+
COPY --from=build /rails /rails
|
|
50
|
+
|
|
51
|
+
# Run and own only the runtime files as a non-root user for security
|
|
52
|
+
RUN groupadd --system --gid 1000 rails && \
|
|
53
|
+
useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && \
|
|
54
|
+
chown -R rails:rails db log storage tmp
|
|
55
|
+
USER 1000:1000
|
|
56
|
+
|
|
57
|
+
# Entrypoint prepares the database.
|
|
58
|
+
ENTRYPOINT ["/rails/bin/docker-entrypoint"]
|
|
59
|
+
|
|
60
|
+
# Start the server by default, this can be overwritten at runtime
|
|
61
|
+
EXPOSE 3000
|
|
62
|
+
CMD ["./bin/rails", "server"]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
source 'https://rubygems.org'
|
|
4
|
+
|
|
5
|
+
gem 'my_api_client', path: '../..'
|
|
6
|
+
gem 'puma', '>= 5.0'
|
|
7
|
+
gem 'rails', '~> 7.2.1'
|
|
8
|
+
gem 'sqlite3', '>= 1.4'
|
|
9
|
+
|
|
10
|
+
gem 'tzinfo-data', platforms: %i[windows jruby]
|
|
11
|
+
|
|
12
|
+
group :development, :test do
|
|
13
|
+
gem 'debug', platforms: %i[mri windows], require: 'debug/prelude'
|
|
14
|
+
gem 'rspec-rails'
|
|
15
|
+
end
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: ../..
|
|
3
|
+
specs:
|
|
4
|
+
my_api_client (1.1.0)
|
|
5
|
+
activesupport (>= 6.1.0)
|
|
6
|
+
faraday (>= 0.17.1)
|
|
7
|
+
jsonpath
|
|
8
|
+
sawyer (>= 0.8.2)
|
|
9
|
+
|
|
10
|
+
GEM
|
|
11
|
+
remote: https://rubygems.org/
|
|
12
|
+
specs:
|
|
13
|
+
actioncable (7.2.1)
|
|
14
|
+
actionpack (= 7.2.1)
|
|
15
|
+
activesupport (= 7.2.1)
|
|
16
|
+
nio4r (~> 2.0)
|
|
17
|
+
websocket-driver (>= 0.6.1)
|
|
18
|
+
zeitwerk (~> 2.6)
|
|
19
|
+
actionmailbox (7.2.1)
|
|
20
|
+
actionpack (= 7.2.1)
|
|
21
|
+
activejob (= 7.2.1)
|
|
22
|
+
activerecord (= 7.2.1)
|
|
23
|
+
activestorage (= 7.2.1)
|
|
24
|
+
activesupport (= 7.2.1)
|
|
25
|
+
mail (>= 2.8.0)
|
|
26
|
+
actionmailer (7.2.1)
|
|
27
|
+
actionpack (= 7.2.1)
|
|
28
|
+
actionview (= 7.2.1)
|
|
29
|
+
activejob (= 7.2.1)
|
|
30
|
+
activesupport (= 7.2.1)
|
|
31
|
+
mail (>= 2.8.0)
|
|
32
|
+
rails-dom-testing (~> 2.2)
|
|
33
|
+
actionpack (7.2.1)
|
|
34
|
+
actionview (= 7.2.1)
|
|
35
|
+
activesupport (= 7.2.1)
|
|
36
|
+
nokogiri (>= 1.8.5)
|
|
37
|
+
racc
|
|
38
|
+
rack (>= 2.2.4, < 3.2)
|
|
39
|
+
rack-session (>= 1.0.1)
|
|
40
|
+
rack-test (>= 0.6.3)
|
|
41
|
+
rails-dom-testing (~> 2.2)
|
|
42
|
+
rails-html-sanitizer (~> 1.6)
|
|
43
|
+
useragent (~> 0.16)
|
|
44
|
+
actiontext (7.2.1)
|
|
45
|
+
actionpack (= 7.2.1)
|
|
46
|
+
activerecord (= 7.2.1)
|
|
47
|
+
activestorage (= 7.2.1)
|
|
48
|
+
activesupport (= 7.2.1)
|
|
49
|
+
globalid (>= 0.6.0)
|
|
50
|
+
nokogiri (>= 1.8.5)
|
|
51
|
+
actionview (7.2.1)
|
|
52
|
+
activesupport (= 7.2.1)
|
|
53
|
+
builder (~> 3.1)
|
|
54
|
+
erubi (~> 1.11)
|
|
55
|
+
rails-dom-testing (~> 2.2)
|
|
56
|
+
rails-html-sanitizer (~> 1.6)
|
|
57
|
+
activejob (7.2.1)
|
|
58
|
+
activesupport (= 7.2.1)
|
|
59
|
+
globalid (>= 0.3.6)
|
|
60
|
+
activemodel (7.2.1)
|
|
61
|
+
activesupport (= 7.2.1)
|
|
62
|
+
activerecord (7.2.1)
|
|
63
|
+
activemodel (= 7.2.1)
|
|
64
|
+
activesupport (= 7.2.1)
|
|
65
|
+
timeout (>= 0.4.0)
|
|
66
|
+
activestorage (7.2.1)
|
|
67
|
+
actionpack (= 7.2.1)
|
|
68
|
+
activejob (= 7.2.1)
|
|
69
|
+
activerecord (= 7.2.1)
|
|
70
|
+
activesupport (= 7.2.1)
|
|
71
|
+
marcel (~> 1.0)
|
|
72
|
+
activesupport (7.2.1)
|
|
73
|
+
base64
|
|
74
|
+
bigdecimal
|
|
75
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
76
|
+
connection_pool (>= 2.2.5)
|
|
77
|
+
drb
|
|
78
|
+
i18n (>= 1.6, < 2)
|
|
79
|
+
logger (>= 1.4.2)
|
|
80
|
+
minitest (>= 5.1)
|
|
81
|
+
securerandom (>= 0.3)
|
|
82
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
83
|
+
addressable (2.8.7)
|
|
84
|
+
public_suffix (>= 2.0.2, < 7.0)
|
|
85
|
+
base64 (0.2.0)
|
|
86
|
+
bigdecimal (3.1.8)
|
|
87
|
+
builder (3.3.0)
|
|
88
|
+
concurrent-ruby (1.3.4)
|
|
89
|
+
connection_pool (2.4.1)
|
|
90
|
+
crass (1.0.6)
|
|
91
|
+
date (3.3.4)
|
|
92
|
+
debug (1.9.2)
|
|
93
|
+
irb (~> 1.10)
|
|
94
|
+
reline (>= 0.3.8)
|
|
95
|
+
diff-lcs (1.5.1)
|
|
96
|
+
drb (2.2.1)
|
|
97
|
+
erubi (1.13.0)
|
|
98
|
+
faraday (2.11.0)
|
|
99
|
+
faraday-net_http (>= 2.0, < 3.4)
|
|
100
|
+
logger
|
|
101
|
+
faraday-net_http (3.3.0)
|
|
102
|
+
net-http
|
|
103
|
+
globalid (1.2.1)
|
|
104
|
+
activesupport (>= 6.1)
|
|
105
|
+
i18n (1.14.5)
|
|
106
|
+
concurrent-ruby (~> 1.0)
|
|
107
|
+
io-console (0.7.2)
|
|
108
|
+
irb (1.14.0)
|
|
109
|
+
rdoc (>= 4.0.0)
|
|
110
|
+
reline (>= 0.4.2)
|
|
111
|
+
jsonpath (1.1.5)
|
|
112
|
+
multi_json
|
|
113
|
+
logger (1.6.1)
|
|
114
|
+
loofah (2.22.0)
|
|
115
|
+
crass (~> 1.0.2)
|
|
116
|
+
nokogiri (>= 1.12.0)
|
|
117
|
+
mail (2.8.1)
|
|
118
|
+
mini_mime (>= 0.1.1)
|
|
119
|
+
net-imap
|
|
120
|
+
net-pop
|
|
121
|
+
net-smtp
|
|
122
|
+
marcel (1.0.4)
|
|
123
|
+
mini_mime (1.1.5)
|
|
124
|
+
minitest (5.25.1)
|
|
125
|
+
multi_json (1.15.0)
|
|
126
|
+
net-http (0.4.1)
|
|
127
|
+
uri
|
|
128
|
+
net-imap (0.4.16)
|
|
129
|
+
date
|
|
130
|
+
net-protocol
|
|
131
|
+
net-pop (0.1.2)
|
|
132
|
+
net-protocol
|
|
133
|
+
net-protocol (0.2.2)
|
|
134
|
+
timeout
|
|
135
|
+
net-smtp (0.5.0)
|
|
136
|
+
net-protocol
|
|
137
|
+
nio4r (2.7.3)
|
|
138
|
+
nokogiri (1.16.7-x86_64-darwin)
|
|
139
|
+
racc (~> 1.4)
|
|
140
|
+
nokogiri (1.16.7-x86_64-linux)
|
|
141
|
+
racc (~> 1.4)
|
|
142
|
+
psych (5.1.2)
|
|
143
|
+
stringio
|
|
144
|
+
public_suffix (6.0.1)
|
|
145
|
+
puma (6.4.2)
|
|
146
|
+
nio4r (~> 2.0)
|
|
147
|
+
racc (1.8.1)
|
|
148
|
+
rack (3.1.7)
|
|
149
|
+
rack-session (2.0.0)
|
|
150
|
+
rack (>= 3.0.0)
|
|
151
|
+
rack-test (2.1.0)
|
|
152
|
+
rack (>= 1.3)
|
|
153
|
+
rackup (2.1.0)
|
|
154
|
+
rack (>= 3)
|
|
155
|
+
webrick (~> 1.8)
|
|
156
|
+
rails (7.2.1)
|
|
157
|
+
actioncable (= 7.2.1)
|
|
158
|
+
actionmailbox (= 7.2.1)
|
|
159
|
+
actionmailer (= 7.2.1)
|
|
160
|
+
actionpack (= 7.2.1)
|
|
161
|
+
actiontext (= 7.2.1)
|
|
162
|
+
actionview (= 7.2.1)
|
|
163
|
+
activejob (= 7.2.1)
|
|
164
|
+
activemodel (= 7.2.1)
|
|
165
|
+
activerecord (= 7.2.1)
|
|
166
|
+
activestorage (= 7.2.1)
|
|
167
|
+
activesupport (= 7.2.1)
|
|
168
|
+
bundler (>= 1.15.0)
|
|
169
|
+
railties (= 7.2.1)
|
|
170
|
+
rails-dom-testing (2.2.0)
|
|
171
|
+
activesupport (>= 5.0.0)
|
|
172
|
+
minitest
|
|
173
|
+
nokogiri (>= 1.6)
|
|
174
|
+
rails-html-sanitizer (1.6.0)
|
|
175
|
+
loofah (~> 2.21)
|
|
176
|
+
nokogiri (~> 1.14)
|
|
177
|
+
railties (7.2.1)
|
|
178
|
+
actionpack (= 7.2.1)
|
|
179
|
+
activesupport (= 7.2.1)
|
|
180
|
+
irb (~> 1.13)
|
|
181
|
+
rackup (>= 1.0.0)
|
|
182
|
+
rake (>= 12.2)
|
|
183
|
+
thor (~> 1.0, >= 1.2.2)
|
|
184
|
+
zeitwerk (~> 2.6)
|
|
185
|
+
rake (13.2.1)
|
|
186
|
+
rdoc (6.7.0)
|
|
187
|
+
psych (>= 4.0.0)
|
|
188
|
+
reline (0.5.10)
|
|
189
|
+
io-console (~> 0.5)
|
|
190
|
+
rspec-core (3.13.1)
|
|
191
|
+
rspec-support (~> 3.13.0)
|
|
192
|
+
rspec-expectations (3.13.2)
|
|
193
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
194
|
+
rspec-support (~> 3.13.0)
|
|
195
|
+
rspec-mocks (3.13.1)
|
|
196
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
197
|
+
rspec-support (~> 3.13.0)
|
|
198
|
+
rspec-rails (7.0.1)
|
|
199
|
+
actionpack (>= 7.0)
|
|
200
|
+
activesupport (>= 7.0)
|
|
201
|
+
railties (>= 7.0)
|
|
202
|
+
rspec-core (~> 3.13)
|
|
203
|
+
rspec-expectations (~> 3.13)
|
|
204
|
+
rspec-mocks (~> 3.13)
|
|
205
|
+
rspec-support (~> 3.13)
|
|
206
|
+
rspec-support (3.13.1)
|
|
207
|
+
sawyer (0.9.2)
|
|
208
|
+
addressable (>= 2.3.5)
|
|
209
|
+
faraday (>= 0.17.3, < 3)
|
|
210
|
+
securerandom (0.3.1)
|
|
211
|
+
sqlite3 (2.0.4-x86_64-darwin)
|
|
212
|
+
sqlite3 (2.0.4-x86_64-linux-gnu)
|
|
213
|
+
stringio (3.1.1)
|
|
214
|
+
thor (1.3.2)
|
|
215
|
+
timeout (0.4.1)
|
|
216
|
+
tzinfo (2.0.6)
|
|
217
|
+
concurrent-ruby (~> 1.0)
|
|
218
|
+
uri (0.13.1)
|
|
219
|
+
useragent (0.16.10)
|
|
220
|
+
webrick (1.8.1)
|
|
221
|
+
websocket-driver (0.7.6)
|
|
222
|
+
websocket-extensions (>= 0.1.0)
|
|
223
|
+
websocket-extensions (0.1.5)
|
|
224
|
+
zeitwerk (2.6.18)
|
|
225
|
+
|
|
226
|
+
PLATFORMS
|
|
227
|
+
x86_64-darwin-23
|
|
228
|
+
x86_64-linux
|
|
229
|
+
|
|
230
|
+
DEPENDENCIES
|
|
231
|
+
debug
|
|
232
|
+
my_api_client!
|
|
233
|
+
puma (>= 5.0)
|
|
234
|
+
rails (~> 7.2.1)
|
|
235
|
+
rspec-rails
|
|
236
|
+
sqlite3 (>= 1.4)
|
|
237
|
+
tzinfo-data
|
|
238
|
+
|
|
239
|
+
BUNDLED WITH
|
|
240
|
+
2.3.27
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# README
|
|
2
|
+
|
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
|
4
|
+
application up and running.
|
|
5
|
+
|
|
6
|
+
Things you may want to cover:
|
|
7
|
+
|
|
8
|
+
* Ruby version
|
|
9
|
+
|
|
10
|
+
* System dependencies
|
|
11
|
+
|
|
12
|
+
* Configuration
|
|
13
|
+
|
|
14
|
+
* Database creation
|
|
15
|
+
|
|
16
|
+
* Database initialization
|
|
17
|
+
|
|
18
|
+
* How to run the test suite
|
|
19
|
+
|
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
|
21
|
+
|
|
22
|
+
* Deployment instructions
|
|
23
|
+
|
|
24
|
+
* ...
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
|
4
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
|
5
|
+
|
|
6
|
+
require_relative 'config/application'
|
|
7
|
+
|
|
8
|
+
Rails.application.load_tasks
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'bundle' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
require 'rubygems'
|
|
12
|
+
|
|
13
|
+
m = Module.new do
|
|
14
|
+
module_function
|
|
15
|
+
|
|
16
|
+
def invoked_as_script?
|
|
17
|
+
File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def env_var_version
|
|
21
|
+
ENV.fetch('BUNDLER_VERSION', nil)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def cli_arg_version
|
|
25
|
+
return unless invoked_as_script? # don't want to hijack other binstubs
|
|
26
|
+
return unless 'update'.start_with?(ARGV.first || ' ') # must be running `bundle update`
|
|
27
|
+
|
|
28
|
+
bundler_version = nil
|
|
29
|
+
update_index = nil
|
|
30
|
+
ARGV.each_with_index do |a, i|
|
|
31
|
+
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
|
32
|
+
bundler_version = a
|
|
33
|
+
end
|
|
34
|
+
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o
|
|
35
|
+
|
|
36
|
+
bundler_version = Regexp.last_match(1)
|
|
37
|
+
update_index = i
|
|
38
|
+
end
|
|
39
|
+
bundler_version
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def gemfile
|
|
43
|
+
gemfile = ENV.fetch('BUNDLE_GEMFILE', nil)
|
|
44
|
+
return gemfile if gemfile && !gemfile.empty?
|
|
45
|
+
|
|
46
|
+
File.expand_path('../Gemfile', __dir__)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def lockfile
|
|
50
|
+
lockfile =
|
|
51
|
+
case File.basename(gemfile)
|
|
52
|
+
when 'gems.rb' then gemfile.sub(/\.rb$/, gemfile)
|
|
53
|
+
else "#{gemfile}.lock"
|
|
54
|
+
end
|
|
55
|
+
File.expand_path(lockfile)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def lockfile_version
|
|
59
|
+
return unless File.file?(lockfile)
|
|
60
|
+
|
|
61
|
+
lockfile_contents = File.read(lockfile)
|
|
62
|
+
unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o
|
|
63
|
+
return
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
Regexp.last_match(1)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def bundler_requirement
|
|
70
|
+
@bundler_requirement ||=
|
|
71
|
+
env_var_version || cli_arg_version ||
|
|
72
|
+
bundler_requirement_for(lockfile_version)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def bundler_requirement_for(version)
|
|
76
|
+
return "#{Gem::Requirement.default}.a" unless version
|
|
77
|
+
|
|
78
|
+
bundler_gem_version = Gem::Version.new(version)
|
|
79
|
+
|
|
80
|
+
requirement = bundler_gem_version.approximate_recommendation
|
|
81
|
+
|
|
82
|
+
return requirement unless Gem.rubygems_version < Gem::Version.new('2.7.0')
|
|
83
|
+
|
|
84
|
+
requirement += '.a' if bundler_gem_version.prerelease?
|
|
85
|
+
|
|
86
|
+
requirement
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def load_bundler!
|
|
90
|
+
ENV['BUNDLE_GEMFILE'] ||= gemfile
|
|
91
|
+
|
|
92
|
+
activate_bundler
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def activate_bundler
|
|
96
|
+
gem_error = activation_error_handling do
|
|
97
|
+
gem 'bundler', bundler_requirement
|
|
98
|
+
end
|
|
99
|
+
return if gem_error.nil?
|
|
100
|
+
|
|
101
|
+
require_error = activation_error_handling do
|
|
102
|
+
require 'bundler/version'
|
|
103
|
+
end
|
|
104
|
+
if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
|
|
105
|
+
return
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
|
|
109
|
+
exit 42
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def activation_error_handling
|
|
113
|
+
yield
|
|
114
|
+
nil
|
|
115
|
+
rescue StandardError, LoadError => e
|
|
116
|
+
e
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
m.load_bundler!
|
|
121
|
+
|
|
122
|
+
load Gem.bin_path('bundler', 'bundle') if m.invoked_as_script?
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/bin/bash -e
|
|
2
|
+
|
|
3
|
+
# Enable jemalloc for reduced memory usage and latency.
|
|
4
|
+
if [ -z "${LD_PRELOAD+x}" ] && [ -f /usr/lib/*/libjemalloc.so.2 ]; then
|
|
5
|
+
export LD_PRELOAD="$(echo /usr/lib/*/libjemalloc.so.2)"
|
|
6
|
+
fi
|
|
7
|
+
|
|
8
|
+
# If running the rails server then create or migrate existing database
|
|
9
|
+
if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then
|
|
10
|
+
./bin/rails db:prepare
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
exec "${@}"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require 'rubygems'
|
|
5
|
+
require 'bundler/setup'
|
|
6
|
+
|
|
7
|
+
# explicit rubocop config increases performance slightly while avoiding config confusion.
|
|
8
|
+
ARGV.unshift('--config', File.expand_path('../.rubocop.yml', __dir__))
|
|
9
|
+
|
|
10
|
+
load Gem.bin_path('rubocop', 'rubocop')
|