my_api_client 1.3.1 → 2.0.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/.dockerignore +8 -0
- data/.envrc.skeleton +0 -1
- data/.github/dependabot.yml +82 -7
- data/.github/workflows/ci.yml +334 -0
- data/.github/workflows/dependabot-auto-merge.yml +96 -0
- data/.github/workflows/release.yml +33 -0
- data/.github/workflows/rubocop_challenge.yml +33 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/AGENTS.md +128 -0
- data/CHANGELOG.md +54 -2
- data/CLAUDE.md +6 -0
- data/Dockerfile +22 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +67 -59
- data/README.md +398 -62
- data/docker-compose.yml +29 -0
- data/docs/runbooks/dependabot_pr_auto_merge.md +113 -0
- data/gemfiles/rails_7.2.gemfile +1 -1
- data/gemfiles/{rails_7.1.gemfile → rails_8.0.gemfile} +2 -2
- data/gemfiles/{rails_6.1.gemfile → rails_8.1.gemfile} +2 -2
- data/lib/my_api_client/default_error_handlers.rb +1 -1
- data/lib/my_api_client/errors/client_error.rb +5 -1
- data/lib/my_api_client/integrations/bugsnag.rb +1 -1
- data/lib/my_api_client/version.rb +1 -1
- data/lib/my_api_client.rb +1 -1
- data/my_api/.ruby-version +1 -1
- data/my_api/AGENTS.md +35 -0
- data/my_api/Dockerfile +25 -0
- data/my_api/Gemfile +5 -16
- data/my_api/Gemfile.lock +263 -228
- data/my_api/README.md +36 -25
- data/my_api/Rakefile +3 -2
- data/my_api/app/controllers/application_controller.rb +1 -2
- data/my_api/app/controllers/error_controller.rb +2 -2
- data/my_api/app/controllers/header_controller.rb +6 -3
- data/my_api/app/controllers/pagination_controller.rb +5 -15
- data/my_api/app/controllers/rest_controller.rb +12 -16
- data/my_api/app/controllers/status_controller.rb +3 -4
- data/my_api/config/application.rb +12 -67
- data/{rails_app/rails_6.1 → my_api}/config/boot.rb +1 -1
- data/{rails_app/rails_7.1 → my_api}/config/environment.rb +0 -2
- data/my_api/config/environments/development.rb +6 -6
- data/my_api/config/environments/production.rb +5 -8
- data/my_api/config/environments/test.rb +5 -6
- data/my_api/config/routes.rb +2 -10
- data/my_api/config.ru +2 -4
- data/my_api/public/index.html +10 -90
- data/{rails_app/rails_7.0 → my_api}/spec/rails_helper.rb +3 -4
- data/my_api/spec/requests/error_controller_spec.rb +18 -0
- data/my_api/spec/requests/pagination_controller_spec.rb +22 -0
- data/my_api/spec/requests/rest_controller_spec.rb +22 -0
- data/my_api/spec/requests/status_controller_spec.rb +20 -0
- data/my_api/spec/spec_helper.rb +15 -23
- data/my_api_client.gemspec +2 -2
- data/rails_app/AGENTS.md +13 -0
- data/rails_app/rails_7.2/Dockerfile +1 -1
- data/rails_app/rails_7.2/Gemfile +2 -0
- data/rails_app/rails_7.2/Gemfile.lock +143 -122
- data/rails_app/{rails_7.1 → rails_8.0}/.dockerignore +16 -2
- data/rails_app/{rails_6.1 → rails_8.0}/.gitattributes +2 -1
- data/rails_app/rails_8.0/.github/workflows/ci.yml +39 -0
- data/rails_app/{rails_6.1 → rails_8.0}/.gitignore +11 -7
- data/rails_app/rails_8.0/.rubocop.yml +8 -0
- data/rails_app/rails_8.0/.ruby-version +1 -0
- data/rails_app/{rails_7.1 → rails_8.0}/Dockerfile +28 -18
- data/rails_app/rails_8.0/Gemfile +15 -0
- data/rails_app/rails_8.0/Gemfile.lock +286 -0
- data/rails_app/{rails_6.1 → rails_8.0}/Rakefile +1 -3
- data/rails_app/{rails_7.1 → rails_8.0}/app/controllers/application_controller.rb +0 -2
- data/rails_app/rails_8.0/app/jobs/application_job.rb +7 -0
- data/rails_app/rails_8.0/app/mailers/application_mailer.rb +4 -0
- data/rails_app/{rails_7.0 → rails_8.0}/app/models/application_record.rb +0 -2
- data/rails_app/rails_8.0/app/views/layouts/mailer.html.erb +13 -0
- data/rails_app/rails_8.0/app/views/layouts/mailer.text.erb +1 -0
- data/rails_app/rails_8.0/bin/brakeman +7 -0
- data/rails_app/rails_8.0/bin/dev +2 -0
- data/rails_app/rails_8.0/bin/docker-entrypoint +14 -0
- data/rails_app/rails_8.0/bin/rails +4 -0
- data/rails_app/rails_8.0/bin/rake +4 -0
- data/rails_app/rails_8.0/bin/rubocop +8 -0
- data/rails_app/{rails_7.1 → rails_8.0}/bin/setup +11 -12
- data/rails_app/rails_8.0/bin/thrust +5 -0
- data/rails_app/{rails_7.1 → rails_8.0}/config/application.rb +14 -16
- data/rails_app/rails_8.0/config/boot.rb +3 -0
- data/rails_app/rails_8.0/config/cable.yml +10 -0
- data/rails_app/rails_8.0/config/credentials.yml.enc +1 -0
- data/rails_app/{rails_7.1 → rails_8.0}/config/database.yml +18 -2
- data/rails_app/{rails_6.1 → rails_8.0}/config/environment.rb +1 -3
- data/rails_app/rails_8.0/config/environments/development.rb +70 -0
- data/rails_app/rails_8.0/config/environments/production.rb +86 -0
- data/rails_app/{rails_7.1 → rails_8.0}/config/environments/test.rb +16 -19
- data/rails_app/{rails_7.1 → rails_8.0}/config/initializers/cors.rb +0 -1
- data/rails_app/{rails_7.1 → rails_8.0}/config/initializers/filter_parameter_logging.rb +2 -4
- data/rails_app/{rails_7.0 → rails_8.0}/config/initializers/inflections.rb +0 -1
- data/rails_app/rails_8.0/config/puma.rb +41 -0
- data/rails_app/{rails_7.1 → rails_8.0}/config/routes.rb +1 -3
- data/rails_app/rails_8.0/config/storage.yml +34 -0
- data/rails_app/{rails_7.1 → rails_8.0}/config.ru +1 -3
- data/rails_app/{rails_7.1 → rails_8.0}/db/seeds.rb +0 -1
- data/rails_app/{rails_7.1 → rails_8.0}/spec/rails_helper.rb +1 -1
- data/rails_app/rails_8.1/.dockerignore +45 -0
- data/rails_app/rails_8.1/.gitattributes +9 -0
- data/rails_app/rails_8.1/.github/workflows/ci.yml +52 -0
- data/rails_app/rails_8.1/.gitignore +33 -0
- data/rails_app/rails_8.1/.rspec +1 -0
- data/rails_app/rails_8.1/.rubocop.yml +8 -0
- data/rails_app/rails_8.1/.ruby-version +1 -0
- data/rails_app/rails_8.1/Dockerfile +68 -0
- data/rails_app/rails_8.1/Gemfile +15 -0
- data/rails_app/rails_8.1/Gemfile.lock +289 -0
- data/rails_app/{rails_7.0 → rails_8.1}/Rakefile +1 -3
- data/rails_app/{rails_6.1 → rails_8.1}/app/controllers/application_controller.rb +0 -2
- data/rails_app/rails_8.1/app/jobs/application_job.rb +7 -0
- data/rails_app/rails_8.1/app/mailers/application_mailer.rb +4 -0
- data/rails_app/{rails_7.1 → rails_8.1}/app/models/application_record.rb +0 -2
- data/rails_app/rails_8.1/app/views/layouts/mailer.html.erb +13 -0
- data/rails_app/rails_8.1/app/views/layouts/mailer.text.erb +1 -0
- data/rails_app/rails_8.1/bin/brakeman +7 -0
- data/rails_app/rails_8.1/bin/bundler-audit +6 -0
- data/rails_app/rails_8.1/bin/ci +6 -0
- data/rails_app/rails_8.1/bin/dev +2 -0
- data/rails_app/{rails_7.1 → rails_8.1}/bin/docker-entrypoint +1 -1
- data/rails_app/rails_8.1/bin/rails +4 -0
- data/rails_app/rails_8.1/bin/rake +4 -0
- data/rails_app/rails_8.1/bin/rubocop +8 -0
- data/rails_app/{rails_7.0 → rails_8.1}/bin/setup +13 -13
- data/rails_app/rails_8.1/bin/thrust +5 -0
- data/rails_app/{rails_6.1 → rails_8.1}/config/application.rb +19 -17
- data/rails_app/rails_8.1/config/boot.rb +3 -0
- data/rails_app/rails_8.1/config/bundler-audit.yml +5 -0
- data/rails_app/rails_8.1/config/cable.yml +10 -0
- data/rails_app/rails_8.1/config/ci.rb +19 -0
- data/rails_app/rails_8.1/config/credentials.yml.enc +1 -0
- data/rails_app/rails_8.1/config/database.yml +40 -0
- data/rails_app/{rails_7.0 → rails_8.1}/config/environment.rb +1 -3
- data/rails_app/rails_8.1/config/environments/development.rb +73 -0
- data/rails_app/rails_8.1/config/environments/production.rb +86 -0
- data/rails_app/rails_8.1/config/environments/test.rb +53 -0
- data/rails_app/{rails_7.0 → rails_8.1}/config/initializers/cors.rb +1 -2
- data/rails_app/rails_8.1/config/initializers/filter_parameter_logging.rb +8 -0
- data/rails_app/{rails_7.1 → rails_8.1}/config/initializers/inflections.rb +0 -1
- data/rails_app/rails_8.1/config/locales/en.yml +31 -0
- data/rails_app/rails_8.1/config/puma.rb +42 -0
- data/rails_app/rails_8.1/config/routes.rb +10 -0
- data/rails_app/rails_8.1/config/storage.yml +27 -0
- data/rails_app/{rails_7.0 → rails_8.1}/config.ru +1 -3
- data/rails_app/rails_8.1/db/seeds.rb +9 -0
- data/rails_app/{rails_6.1 → rails_8.1}/spec/rails_helper.rb +1 -2
- metadata +139 -136
- data/.circleci/config.yml +0 -344
- data/README.jp.md +0 -785
- data/gemfiles/rails_7.0.gemfile +0 -15
- data/my_api/.envrc.skeleton +0 -3
- data/my_api/.jetskeep +0 -1
- data/my_api/Procfile +0 -7
- data/my_api/app/helpers/application_helper.rb +0 -5
- data/my_api/app/jobs/application_job.rb +0 -7
- data/my_api/app/models/application_item.rb +0 -5
- data/my_api/config/dynamodb.yml +0 -22
- data/my_api/spec/controllers/error_controller_spec.rb +0 -43
- data/my_api/spec/controllers/header_controller_spec.rb +0 -33
- data/my_api/spec/controllers/pagination_controller_spec.rb +0 -73
- data/my_api/spec/controllers/rest_controller_spec.rb +0 -99
- data/my_api/spec/controllers/status_controller_spec.rb +0 -47
- data/my_api/spec/fixtures/payloads/posts-index.json +0 -51
- data/my_api/spec/fixtures/payloads/posts-show.json +0 -53
- data/rails_app/rails_6.1/.rspec +0 -3
- data/rails_app/rails_6.1/Gemfile +0 -17
- data/rails_app/rails_6.1/Gemfile.lock +0 -195
- data/rails_app/rails_6.1/app/models/application_record.rb +0 -5
- data/rails_app/rails_6.1/bin/bundle +0 -122
- data/rails_app/rails_6.1/bin/rails +0 -6
- data/rails_app/rails_6.1/bin/rake +0 -6
- data/rails_app/rails_6.1/bin/setup +0 -35
- data/rails_app/rails_6.1/config/credentials.yml.enc +0 -1
- data/rails_app/rails_6.1/config/database.yml +0 -25
- data/rails_app/rails_6.1/config/environments/development.rb +0 -59
- data/rails_app/rails_6.1/config/environments/production.rb +0 -97
- data/rails_app/rails_6.1/config/environments/test.rb +0 -51
- data/rails_app/rails_6.1/config/initializers/application_controller_renderer.rb +0 -9
- data/rails_app/rails_6.1/config/initializers/backtrace_silencers.rb +0 -10
- data/rails_app/rails_6.1/config/initializers/cors.rb +0 -17
- data/rails_app/rails_6.1/config/initializers/filter_parameter_logging.rb +0 -8
- data/rails_app/rails_6.1/config/initializers/inflections.rb +0 -17
- data/rails_app/rails_6.1/config/initializers/mime_types.rb +0 -5
- data/rails_app/rails_6.1/config/initializers/wrap_parameters.rb +0 -16
- data/rails_app/rails_6.1/config/locales/en.yml +0 -33
- data/rails_app/rails_6.1/config/routes.rb +0 -5
- data/rails_app/rails_6.1/config.ru +0 -8
- data/rails_app/rails_6.1/db/seeds.rb +0 -8
- data/rails_app/rails_7.0/Gemfile +0 -13
- data/rails_app/rails_7.0/Gemfile.lock +0 -212
- data/rails_app/rails_7.0/app/controllers/application_controller.rb +0 -4
- data/rails_app/rails_7.0/bin/bundle +0 -122
- data/rails_app/rails_7.0/bin/rails +0 -6
- data/rails_app/rails_7.0/bin/rake +0 -6
- data/rails_app/rails_7.0/config/application.rb +0 -41
- data/rails_app/rails_7.0/config/boot.rb +0 -5
- data/rails_app/rails_7.0/config/credentials.yml.enc +0 -1
- data/rails_app/rails_7.0/config/database.yml +0 -25
- data/rails_app/rails_7.0/config/environments/development.rb +0 -58
- data/rails_app/rails_7.0/config/environments/production.rb +0 -70
- data/rails_app/rails_7.0/config/environments/test.rb +0 -52
- data/rails_app/rails_7.0/config/initializers/filter_parameter_logging.rb +0 -8
- data/rails_app/rails_7.0/config/locales/en.yml +0 -33
- data/rails_app/rails_7.0/config/routes.rb +0 -8
- data/rails_app/rails_7.0/db/seeds.rb +0 -8
- data/rails_app/rails_7.1/Gemfile +0 -16
- data/rails_app/rails_7.1/Gemfile.lock +0 -241
- data/rails_app/rails_7.1/README.md +0 -24
- data/rails_app/rails_7.1/Rakefile +0 -8
- data/rails_app/rails_7.1/bin/bundle +0 -122
- data/rails_app/rails_7.1/bin/rails +0 -6
- data/rails_app/rails_7.1/bin/rake +0 -6
- data/rails_app/rails_7.1/config/boot.rb +0 -5
- data/rails_app/rails_7.1/config/credentials.yml.enc +0 -1
- data/rails_app/rails_7.1/config/environments/development.rb +0 -58
- data/rails_app/rails_7.1/config/environments/production.rb +0 -74
- data/rails_app/rails_7.1/config/puma.rb +0 -46
- data/rails_app/rails_7.1/public/robots.txt +0 -2
- data/rails_app/rails_7.1/spec/spec_helper.rb +0 -13
- data/rails_app/rails_7.1/vendor/.keep +0 -0
- data/rails_app/rails_7.2/.github/dependabot.yml +0 -12
- /data/rails_app/{rails_7.1 → rails_8.0}/.rspec +0 -0
- /data/rails_app/{rails_6.1 → rails_8.0}/README.md +0 -0
- /data/rails_app/{rails_6.1 → rails_8.0}/app/controllers/concerns/.keep +0 -0
- /data/rails_app/{rails_6.1/app/javascript → rails_8.0/app/models/concerns}/.keep +0 -0
- /data/rails_app/{rails_7.1 → rails_8.0}/config/locales/en.yml +0 -0
- /data/rails_app/{rails_6.1/app/models/concerns → rails_8.0/lib/tasks}/.keep +0 -0
- /data/rails_app/{rails_6.1/lib/tasks → rails_8.0/log}/.keep +0 -0
- /data/rails_app/{rails_6.1 → rails_8.0}/public/robots.txt +0 -0
- /data/rails_app/{rails_6.1/tmp → rails_8.0/script}/.keep +0 -0
- /data/rails_app/{rails_6.1 → rails_8.0}/spec/spec_helper.rb +0 -0
- /data/rails_app/{rails_6.1/tmp/pids → rails_8.0/storage}/.keep +0 -0
- /data/rails_app/{rails_6.1 → rails_8.0}/vendor/.keep +0 -0
- /data/rails_app/{rails_7.0 → rails_8.1}/README.md +0 -0
- /data/rails_app/{rails_7.1 → rails_8.1}/app/controllers/concerns/.keep +0 -0
- /data/rails_app/{rails_7.1 → rails_8.1}/app/models/concerns/.keep +0 -0
- /data/rails_app/{rails_7.1 → rails_8.1}/lib/tasks/.keep +0 -0
- /data/rails_app/{rails_7.1/storage → rails_8.1/log}/.keep +0 -0
- /data/rails_app/{rails_7.0 → rails_8.1}/public/robots.txt +0 -0
- /data/rails_app/{rails_7.1/tmp → rails_8.1/script}/.keep +0 -0
- /data/rails_app/{rails_7.0 → rails_8.1}/spec/spec_helper.rb +0 -0
- /data/rails_app/{rails_7.1/tmp/pids → rails_8.1/storage}/.keep +0 -0
- /data/rails_app/{rails_7.1/tmp/storage → rails_8.1/vendor}/.keep +0 -0
data/.circleci/config.yml
DELETED
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
# Ruby CircleCI 2.0 configuration file
|
|
2
|
-
#
|
|
3
|
-
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
|
4
|
-
#
|
|
5
|
-
version: 2.1
|
|
6
|
-
|
|
7
|
-
orbs:
|
|
8
|
-
ruby-orbs: sue445/ruby-orbs@1.6.0
|
|
9
|
-
code-climate: rvla/code-climate@0.0.2
|
|
10
|
-
|
|
11
|
-
references:
|
|
12
|
-
- &ruby_version
|
|
13
|
-
ruby_version:
|
|
14
|
-
type: enum
|
|
15
|
-
enum: &ruby_version_enum ["3.1", "3.2", "3.3"]
|
|
16
|
-
default: "3.3"
|
|
17
|
-
- &rails_version
|
|
18
|
-
rails_version:
|
|
19
|
-
type: enum
|
|
20
|
-
enum: &rails_version_enum ["6.1", "7.0", "7.1", "7.2"]
|
|
21
|
-
default: "7.2"
|
|
22
|
-
- &bundler_options
|
|
23
|
-
bundler_options:
|
|
24
|
-
type: string
|
|
25
|
-
default: ""
|
|
26
|
-
|
|
27
|
-
executors:
|
|
28
|
-
api_executor:
|
|
29
|
-
parameters:
|
|
30
|
-
<<: *ruby_version
|
|
31
|
-
docker:
|
|
32
|
-
- image: cimg/ruby:<< parameters.ruby_version >>
|
|
33
|
-
working_directory: ~/repo/my_api
|
|
34
|
-
gem_executor:
|
|
35
|
-
parameters:
|
|
36
|
-
<<: *ruby_version
|
|
37
|
-
docker:
|
|
38
|
-
- image: cimg/ruby:<< parameters.ruby_version >>
|
|
39
|
-
working_directory: ~/repo
|
|
40
|
-
rails_executor:
|
|
41
|
-
parameters:
|
|
42
|
-
<<: *ruby_version
|
|
43
|
-
<<: *rails_version
|
|
44
|
-
docker:
|
|
45
|
-
- image: cimg/ruby:<< parameters.ruby_version >>
|
|
46
|
-
working_directory: ~/repo/rails_app/rails_<< parameters.rails_version >>
|
|
47
|
-
|
|
48
|
-
commands:
|
|
49
|
-
modify_active_support_version:
|
|
50
|
-
description: Modify ActiveSupport Version
|
|
51
|
-
parameters:
|
|
52
|
-
<<: *rails_version
|
|
53
|
-
steps:
|
|
54
|
-
- run: |
|
|
55
|
-
cp gemfiles/rails_<< parameters.rails_version >>.gemfile Gemfile
|
|
56
|
-
bundle update activesupport
|
|
57
|
-
run_rspec_for_api:
|
|
58
|
-
description: Run RSpec for the API
|
|
59
|
-
steps:
|
|
60
|
-
- run:
|
|
61
|
-
name: Execute RSpec
|
|
62
|
-
command: |
|
|
63
|
-
bundle exec rspec --format documentation \
|
|
64
|
-
--color \
|
|
65
|
-
--format RspecJunitFormatter
|
|
66
|
-
deploy_api_server:
|
|
67
|
-
description: Deploy the API server on the AWS
|
|
68
|
-
steps:
|
|
69
|
-
- run:
|
|
70
|
-
name: Install RSync
|
|
71
|
-
command: sudo apt-get install -y rsync
|
|
72
|
-
- run:
|
|
73
|
-
# This command is not currently work. It could't reference uploaded gem file.
|
|
74
|
-
# You can execute `$ bundle exec jets deploy` on your local.
|
|
75
|
-
name: Deploy the API server with jets
|
|
76
|
-
command: JETS_AGREE=yes bundle exec jets deploy
|
|
77
|
-
run_rspec_for_gem:
|
|
78
|
-
description: Run RSpec for the gem
|
|
79
|
-
steps:
|
|
80
|
-
- code-climate/install
|
|
81
|
-
- run:
|
|
82
|
-
name: Execute RSpec
|
|
83
|
-
command: |
|
|
84
|
-
mkdir /tmp/test-results
|
|
85
|
-
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
|
|
86
|
-
cc-test-reporter before-build
|
|
87
|
-
bundle exec rspec --format documentation \
|
|
88
|
-
--color \
|
|
89
|
-
--format RspecJunitFormatter \
|
|
90
|
-
--out /tmp/test-results/rspec.xml \
|
|
91
|
-
$TEST_FILES
|
|
92
|
-
- code-climate/format-coverage:
|
|
93
|
-
input-type: simplecov
|
|
94
|
-
prefix: $(readlink -f .)
|
|
95
|
-
coverage-file: coverage/coverage.json
|
|
96
|
-
output: coverage/codeclimate.$CIRCLE_BUILD_NUM.json
|
|
97
|
-
- persist_to_workspace:
|
|
98
|
-
root: coverage
|
|
99
|
-
paths:
|
|
100
|
-
- codeclimate.*.json
|
|
101
|
-
- store_test_results:
|
|
102
|
-
path: /tmp/test-results
|
|
103
|
-
- store_artifacts:
|
|
104
|
-
path: /tmp/test-results
|
|
105
|
-
destination: test-results
|
|
106
|
-
rubocop:
|
|
107
|
-
steps:
|
|
108
|
-
- run:
|
|
109
|
-
name: Run RuboCop
|
|
110
|
-
command: bundle exec rubocop
|
|
111
|
-
yardoc:
|
|
112
|
-
description: "Generate YARDoc"
|
|
113
|
-
steps:
|
|
114
|
-
- run: bundle exec yardoc -o ./yardoc
|
|
115
|
-
- store_artifacts:
|
|
116
|
-
path: ./yardoc
|
|
117
|
-
destination: yardoc
|
|
118
|
-
rake_build:
|
|
119
|
-
steps:
|
|
120
|
-
- run:
|
|
121
|
-
name: Rake Build
|
|
122
|
-
command: bundle exec rake build
|
|
123
|
-
rubocop_challenge:
|
|
124
|
-
steps:
|
|
125
|
-
- run:
|
|
126
|
-
name: Rubocop Challenge
|
|
127
|
-
command: |
|
|
128
|
-
gem install rubocop_challenger
|
|
129
|
-
rubocop_challenger go --email=ryz310@gmail.com --name=ryz310
|
|
130
|
-
release:
|
|
131
|
-
description: Release to RubyGems.org
|
|
132
|
-
steps:
|
|
133
|
-
- run:
|
|
134
|
-
name: Create Rubygems Credentials
|
|
135
|
-
command: |
|
|
136
|
-
mkdir ~/.gem || true
|
|
137
|
-
echo -e "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}" > ~/.gem/credentials
|
|
138
|
-
chmod 0600 ~/.gem/credentials
|
|
139
|
-
- run:
|
|
140
|
-
name: Release Gem
|
|
141
|
-
command: |
|
|
142
|
-
git push --set-upstream origin ${CIRCLE_BRANCH}
|
|
143
|
-
bundle exec rake release --trace
|
|
144
|
-
setup:
|
|
145
|
-
description: Setup for Job Working
|
|
146
|
-
parameters:
|
|
147
|
-
<<: *ruby_version
|
|
148
|
-
<<: *bundler_options
|
|
149
|
-
steps:
|
|
150
|
-
- checkout:
|
|
151
|
-
path: ~/repo
|
|
152
|
-
- run:
|
|
153
|
-
name: Install Bundler 2.x
|
|
154
|
-
command: gem install bundler -v '~> 2.0'
|
|
155
|
-
- ruby-orbs/bundle-install:
|
|
156
|
-
cache_key_prefix: v3-dependencies-<< parameters.ruby_version >>
|
|
157
|
-
bundle_extra_args: << parameters.bundler_options >>
|
|
158
|
-
restore_bundled_with: false
|
|
159
|
-
test_and_deploy_for_api:
|
|
160
|
-
description: Test and build the API
|
|
161
|
-
steps:
|
|
162
|
-
- run_rspec_for_api
|
|
163
|
-
- deploy_api_server
|
|
164
|
-
test_and_build_for_gem:
|
|
165
|
-
description: Test and build the RubyGem
|
|
166
|
-
parameters:
|
|
167
|
-
<<: *rails_version
|
|
168
|
-
steps:
|
|
169
|
-
- modify_active_support_version:
|
|
170
|
-
rails_version: << parameters.rails_version >>
|
|
171
|
-
- run_rspec_for_gem
|
|
172
|
-
- rake_build
|
|
173
|
-
verify_api_client_generator:
|
|
174
|
-
description: Verify the API client generator
|
|
175
|
-
parameters:
|
|
176
|
-
<<: *rails_version
|
|
177
|
-
steps:
|
|
178
|
-
- run:
|
|
179
|
-
name: "[Workaround] See: https://obel.hatenablog.jp/entry/20210831/1630350000"
|
|
180
|
-
command: |
|
|
181
|
-
sudo ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7.1.0 /usr/lib/x86_64-linux-gnu/libffi.so.6
|
|
182
|
-
- run:
|
|
183
|
-
name: Generate new API client files
|
|
184
|
-
command: |
|
|
185
|
-
bin/rails g api_client path/to/resource \
|
|
186
|
-
get:path/to/resource \
|
|
187
|
-
post:path/to/resource \
|
|
188
|
-
--endpoint https://example.com/myapi
|
|
189
|
-
- run:
|
|
190
|
-
name: Check the API client files exists
|
|
191
|
-
command: |
|
|
192
|
-
test -e "app/api_clients/application_api_client.rb" & \
|
|
193
|
-
test -e "app/api_clients/path/to/resource_api_client.rb" & \
|
|
194
|
-
test -e "spec/api_clients/path/to/resource_api_client_spec.rb"
|
|
195
|
-
- run:
|
|
196
|
-
name: Run rspec with the generated spec file
|
|
197
|
-
command: bundle exec rspec -f d spec/api_clients/path/to
|
|
198
|
-
|
|
199
|
-
jobs:
|
|
200
|
-
test_api:
|
|
201
|
-
parameters:
|
|
202
|
-
<<: *ruby_version
|
|
203
|
-
executor:
|
|
204
|
-
name: api_executor
|
|
205
|
-
ruby_version: << parameters.ruby_version >>
|
|
206
|
-
steps:
|
|
207
|
-
- setup:
|
|
208
|
-
ruby_version: << parameters.ruby_version >>
|
|
209
|
-
- run_rspec_for_api
|
|
210
|
-
deploy_api:
|
|
211
|
-
parameters:
|
|
212
|
-
<<: *ruby_version
|
|
213
|
-
executor:
|
|
214
|
-
name: api_executor
|
|
215
|
-
ruby_version: << parameters.ruby_version >>
|
|
216
|
-
steps:
|
|
217
|
-
- setup:
|
|
218
|
-
ruby_version: << parameters.ruby_version >>
|
|
219
|
-
- test_and_deploy_for_api
|
|
220
|
-
build_gem:
|
|
221
|
-
parameters:
|
|
222
|
-
<<: *ruby_version
|
|
223
|
-
<<: *rails_version
|
|
224
|
-
<<: *bundler_options
|
|
225
|
-
executor:
|
|
226
|
-
name: gem_executor
|
|
227
|
-
ruby_version: << parameters.ruby_version >>
|
|
228
|
-
steps:
|
|
229
|
-
- setup:
|
|
230
|
-
ruby_version: << parameters.ruby_version >>
|
|
231
|
-
bundler_options: << parameters.bundler_options >>
|
|
232
|
-
- test_and_build_for_gem:
|
|
233
|
-
rails_version: << parameters.rails_version >>
|
|
234
|
-
verify_generator:
|
|
235
|
-
parameters:
|
|
236
|
-
<<: *ruby_version
|
|
237
|
-
<<: *rails_version
|
|
238
|
-
executor:
|
|
239
|
-
name: rails_executor
|
|
240
|
-
ruby_version: << parameters.ruby_version >>
|
|
241
|
-
rails_version: << parameters.rails_version >>
|
|
242
|
-
steps:
|
|
243
|
-
- setup:
|
|
244
|
-
ruby_version: << parameters.ruby_version >>
|
|
245
|
-
- verify_api_client_generator:
|
|
246
|
-
rails_version: << parameters.rails_version >>
|
|
247
|
-
upload-coverage:
|
|
248
|
-
executor: gem_executor
|
|
249
|
-
steps:
|
|
250
|
-
- attach_workspace:
|
|
251
|
-
at: ~/repo
|
|
252
|
-
- code-climate/install
|
|
253
|
-
- code-climate/sum-coverage:
|
|
254
|
-
input: codeclimate.*.json
|
|
255
|
-
parts: 24
|
|
256
|
-
- code-climate/upload-coverage
|
|
257
|
-
rubocop:
|
|
258
|
-
executor: gem_executor
|
|
259
|
-
steps:
|
|
260
|
-
- setup
|
|
261
|
-
- rubocop
|
|
262
|
-
yardoc:
|
|
263
|
-
executor: gem_executor
|
|
264
|
-
steps:
|
|
265
|
-
- setup
|
|
266
|
-
- yardoc
|
|
267
|
-
rubocop_challenge:
|
|
268
|
-
executor: gem_executor
|
|
269
|
-
steps:
|
|
270
|
-
- checkout
|
|
271
|
-
- rubocop_challenge
|
|
272
|
-
release:
|
|
273
|
-
executor: gem_executor
|
|
274
|
-
steps:
|
|
275
|
-
- setup
|
|
276
|
-
- release
|
|
277
|
-
|
|
278
|
-
workflows:
|
|
279
|
-
version: 2
|
|
280
|
-
|
|
281
|
-
commit:
|
|
282
|
-
jobs:
|
|
283
|
-
- build_gem:
|
|
284
|
-
name: build_on_ruby_<< matrix.ruby_version >>_and_rails_<< matrix.rails_version >><< matrix.bundler_options >>
|
|
285
|
-
matrix:
|
|
286
|
-
parameters:
|
|
287
|
-
ruby_version: *ruby_version_enum
|
|
288
|
-
rails_version: *rails_version_enum
|
|
289
|
-
bundler_options: ["--with integrations", "--without integrations"]
|
|
290
|
-
- verify_generator:
|
|
291
|
-
name: verify_generator_on_ruby_<< matrix.ruby_version >>_and_rails_<< matrix.rails_version >>
|
|
292
|
-
matrix:
|
|
293
|
-
parameters:
|
|
294
|
-
ruby_version: *ruby_version_enum
|
|
295
|
-
rails_version: *rails_version_enum
|
|
296
|
-
# TODO: Update the version of Ruby on Jets or re-create the test API server with Ruby on Rails 8.0
|
|
297
|
-
# - test_api:
|
|
298
|
-
# ruby_version: "3.2" # Ruby on Jets requires Ruby 2.5, 2.7 or 3.2
|
|
299
|
-
- rubocop
|
|
300
|
-
- yardoc
|
|
301
|
-
- upload-coverage:
|
|
302
|
-
requires:
|
|
303
|
-
- build_gem
|
|
304
|
-
- verify_generator # for GitHub requirements
|
|
305
|
-
- release:
|
|
306
|
-
context: RubyGems API Key
|
|
307
|
-
requires:
|
|
308
|
-
- build_gem
|
|
309
|
-
- verify_generator
|
|
310
|
-
- rubocop
|
|
311
|
-
filters:
|
|
312
|
-
branches:
|
|
313
|
-
only:
|
|
314
|
-
- release
|
|
315
|
-
|
|
316
|
-
challenge:
|
|
317
|
-
triggers:
|
|
318
|
-
- schedule:
|
|
319
|
-
cron: "30 23 * * *" # 8:30am every day (JST)
|
|
320
|
-
filters:
|
|
321
|
-
branches:
|
|
322
|
-
only: [master]
|
|
323
|
-
jobs:
|
|
324
|
-
- rubocop_challenge
|
|
325
|
-
|
|
326
|
-
# deploy_api_server:
|
|
327
|
-
# triggers:
|
|
328
|
-
# - schedule:
|
|
329
|
-
# cron: "0 12 * * *" # 3:00am every day (JST)
|
|
330
|
-
# filters:
|
|
331
|
-
# branches:
|
|
332
|
-
# only: [master]
|
|
333
|
-
# jobs:
|
|
334
|
-
# - deploy_api:
|
|
335
|
-
# ruby_version: '3.0'
|
|
336
|
-
# - build_gem:
|
|
337
|
-
# requires: [deploy_api]
|
|
338
|
-
|
|
339
|
-
experimental:
|
|
340
|
-
notify:
|
|
341
|
-
branches:
|
|
342
|
-
only:
|
|
343
|
-
- master
|
|
344
|
-
- release
|