ropen_pi 0.1.1 → 0.4.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/.devcontainer/Dockerfile +77 -0
- data/.devcontainer/base.Dockerfile +43 -0
- data/.devcontainer/devcontainer.json +46 -0
- data/.gitignore +1 -0
- data/.husky/.gitignore +1 -0
- data/.husky/commit-msg +4 -0
- data/.rspec +3 -0
- data/.rubocop.yml +4 -0
- data/.rubocop_todo.yml +133 -27
- data/Gemfile.lock +176 -119
- data/LICENSE +1 -1
- data/Makefile +42 -0
- data/README.md +7 -7
- data/examples/.envrc +2 -2
- data/examples/Gemfile +7 -10
- data/examples/Gemfile.lock +13 -9
- data/examples/docker-compose.yml +1 -5
- data/lib/generators/ropen_pi/install_generator.rb +7 -6
- data/lib/generators/ropen_pi/templates/ropen_pi_helper.rb +1 -1
- data/lib/ropen_pi/config_helper.rb +34 -17
- data/lib/ropen_pi/specs/configuration.rb +32 -28
- data/lib/ropen_pi/specs/example_group_helpers.rb +8 -5
- data/lib/ropen_pi/specs/request_factory.rb +3 -3
- data/lib/ropen_pi/specs/writer.rb +1 -3
- data/lib/ropen_pi/version.rb +1 -1
- data/package-lock.json +5403 -0
- data/package.json +59 -0
- data/ropen_pi.gemspec +7 -6
- metadata +50 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a304a7f71dcde5944de01e9c95d8270ba25a0e194dd6f2db35407a1564833299
|
4
|
+
data.tar.gz: 05c8d7846d67090d4516e922adce8fb09dc972e8bd27289bf862bca484caa8fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 870b04861a8894949c68a8394a28cbe26054d816f085d9eafea86a587349243e9f92b750f9e4711930639ec38b7d0fdf7871e6b67d6d5e77931d68abf78391f5
|
7
|
+
data.tar.gz: 8bd71b3d4bb488421415a9637fb87bb4823baf661a5eb1445f757177700da4bb1e05aec7bd1a197c6d88ad90e6771a5060af8eaef86ffe24d78db03889738be6
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.0, 2, 2.7, 2.6, 3-bullseye, 3.0-bullseye, 2-bullseye, 2.7-bullseye, 2.6-bullseye, 3-buster, 3.0-buster, 2-buster, 2.7-buster, 2.6-buster
|
2
|
+
ARG VARIANT=2.7-bullseye
|
3
|
+
FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT}
|
4
|
+
|
5
|
+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
|
6
|
+
ARG NODE_VERSION="none"
|
7
|
+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
|
8
|
+
|
9
|
+
ARG USERNAME=vscode
|
10
|
+
|
11
|
+
RUN \
|
12
|
+
mkdir -p /home/${USERNAME}/.vscode-server/extensions \
|
13
|
+
/home/${USERNAME}/.vscode-server-insiders/extensions \
|
14
|
+
&& chown -R ${USERNAME} \
|
15
|
+
/home/${USERNAME}/.vscode-server \
|
16
|
+
/home/${USERNAME}/.vscode-server-insiders; \
|
17
|
+
\
|
18
|
+
SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.zsh_history" \
|
19
|
+
&& mkdir /commandhistory \
|
20
|
+
&& touch /commandhistory/.zsh_history \
|
21
|
+
&& chown -R ${USERNAME} /commandhistory \
|
22
|
+
&& echo ${SNIPPET} >> "/home/${USERNAME}/.zshrc"
|
23
|
+
|
24
|
+
ENV \
|
25
|
+
APP_PORT=3000 \
|
26
|
+
TZ="Europe/Berlin"
|
27
|
+
|
28
|
+
# [Optional] Uncomment this section to install additional OS packages.
|
29
|
+
RUN \
|
30
|
+
apt-get update && export DEBIAN_FRONTEND=noninteractive; \
|
31
|
+
apt-get -y install --no-install-recommends \
|
32
|
+
libjemalloc-dev \
|
33
|
+
libjemalloc2 \
|
34
|
+
git \
|
35
|
+
libcurl4-openssl-dev \
|
36
|
+
libpq-dev \
|
37
|
+
postgresql-client \
|
38
|
+
;
|
39
|
+
|
40
|
+
# [Optional] Uncomment this line to install global node packages.
|
41
|
+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
42
|
+
|
43
|
+
ARG BUNDLER_VERSION=2.2.32
|
44
|
+
ENV \
|
45
|
+
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 \
|
46
|
+
GEM_HOME=/bundle \
|
47
|
+
BUNDLE_JOBS=4 \
|
48
|
+
BUNDLE_RETRY=3
|
49
|
+
ENV BUNDLE_PATH ${GEM_HOME}
|
50
|
+
ENV \
|
51
|
+
BUNDLE_APP_CONFIG=${BUNDLE_PATH} \
|
52
|
+
BUNDLE_BIN=${BUNDLE_PATH}/bin
|
53
|
+
|
54
|
+
RUN \
|
55
|
+
gem update --system; \
|
56
|
+
gem install bundler -v ${BUNDLER_VERSION};
|
57
|
+
|
58
|
+
ENV \
|
59
|
+
PATH=${BUNDLE_BIN}:${PATH}
|
60
|
+
|
61
|
+
################################################################################
|
62
|
+
# META
|
63
|
+
|
64
|
+
ARG BUILD_DATE
|
65
|
+
ARG VCS_REF
|
66
|
+
ARG VCS_URL
|
67
|
+
ARG VARIANT=2.7-bullseye
|
68
|
+
|
69
|
+
LABEL \
|
70
|
+
org.label-schema.schema-version="1.0" \
|
71
|
+
org.label-schema.vendor="Territory Embrace | Talentplatforms" \
|
72
|
+
org.label-schema.vcs-url="${VCS_URL}" \
|
73
|
+
org.label-schema.vcs-ref="${VCS_REF}" \
|
74
|
+
org.label-schema.name="ruby" \
|
75
|
+
org.label-schema.version="${VARIANT}" \
|
76
|
+
org.label-schema.build-date="${BUILD_DATE}" \
|
77
|
+
org.label-schema.description="dev ruby image"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.0, 2, 2.7, 2.6, 3-bullseye, 3.0-bullseye, 2-bullseye, 2.7-bullseye, 2.6-bullseye, 3-buster, 3.0-buster, 2-buster, 2.7-buster, 2.6-buster
|
2
|
+
ARG VARIANT=2-bullseye
|
3
|
+
FROM ruby:${VARIANT}
|
4
|
+
|
5
|
+
# Copy library scripts to execute
|
6
|
+
COPY library-scripts/*.sh library-scripts/*.env /tmp/library-scripts/
|
7
|
+
|
8
|
+
# [Option] Install zsh
|
9
|
+
ARG INSTALL_ZSH="true"
|
10
|
+
# [Option] Upgrade OS packages to their latest versions
|
11
|
+
ARG UPGRADE_PACKAGES="true"
|
12
|
+
# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies.
|
13
|
+
ARG USERNAME=vscode
|
14
|
+
ARG USER_UID=1000
|
15
|
+
ARG USER_GID=$USER_UID
|
16
|
+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
17
|
+
# Remove imagemagick due to https://security-tracker.debian.org/tracker/CVE-2019-10131
|
18
|
+
&& apt-get purge -y imagemagick imagemagick-6-common \
|
19
|
+
# Install common packages, non-root user, rvm, core build tools
|
20
|
+
&& bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true" \
|
21
|
+
&& bash /tmp/library-scripts/ruby-debian.sh "none" "${USERNAME}" "true" "true" \
|
22
|
+
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
23
|
+
|
24
|
+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
|
25
|
+
ARG NODE_VERSION="none"
|
26
|
+
ENV NVM_DIR=/usr/local/share/nvm
|
27
|
+
ENV NVM_SYMLINK_CURRENT=true \
|
28
|
+
PATH=${NVM_DIR}/current/bin:${PATH}
|
29
|
+
RUN bash /tmp/library-scripts/node-debian.sh "${NVM_DIR}" "${NODE_VERSION}" "${USERNAME}" \
|
30
|
+
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
31
|
+
|
32
|
+
# Remove library scripts for final image
|
33
|
+
RUN rm -rf /tmp/library-scripts
|
34
|
+
|
35
|
+
# [Optional] Uncomment this section to install additional OS packages.
|
36
|
+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
37
|
+
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
38
|
+
|
39
|
+
# [Optional] Uncomment this line to install additional gems.
|
40
|
+
# RUN gem install <your-gem-names-here>
|
41
|
+
|
42
|
+
# [Optional] Uncomment this line to install global node packages.
|
43
|
+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
@@ -0,0 +1,46 @@
|
|
1
|
+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
2
|
+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/ruby
|
3
|
+
{
|
4
|
+
"name": "Ruby",
|
5
|
+
"build": {
|
6
|
+
"dockerfile": "Dockerfile",
|
7
|
+
"args": {
|
8
|
+
// Update 'VARIANT' to pick a Ruby version: 3, 3.0, 2, 2.7, 2.6
|
9
|
+
// Append -bullseye or -buster to pin to an OS version.
|
10
|
+
// Use -bullseye variants on local on arm64/Apple Silicon.
|
11
|
+
"VARIANT": "2.7",
|
12
|
+
// Options
|
13
|
+
"NODE_VERSION": "14"
|
14
|
+
}
|
15
|
+
},
|
16
|
+
// Set *default* container specific settings.json values on container create.
|
17
|
+
"settings": {
|
18
|
+
"terminal.integrated.defaultProfile.linux": "zsh",
|
19
|
+
"rubyTestExplorer.logpanel": true,
|
20
|
+
"rubyTestExplorer.rspecCommand": "bundle exec rspec",
|
21
|
+
"rubyTestExplorer.debugCommand": "bundle exec rdebug-ide",
|
22
|
+
"rubyTestExplorer.testFramework": "rspec",
|
23
|
+
"ruby.rubocop.useBundler": true,
|
24
|
+
"solargraph.useBundler": true
|
25
|
+
},
|
26
|
+
// Add the IDs of extensions you want installed when the container is created.
|
27
|
+
"extensions": [
|
28
|
+
"eamodio.gitlens",
|
29
|
+
"mikestead.dotenv",
|
30
|
+
"editorconfig.editorconfig",
|
31
|
+
"nhoizey.gremlins",
|
32
|
+
"rebornix.ruby",
|
33
|
+
"misogi.ruby-rubocop",
|
34
|
+
"castwide.solargraph",
|
35
|
+
"connorshea.vscode-ruby-test-adapter"
|
36
|
+
],
|
37
|
+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
38
|
+
// "forwardPorts": [],
|
39
|
+
// Use 'postCreateCommand' to run commands after the container is created.
|
40
|
+
"postCreateCommand": "make devcon_init",
|
41
|
+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
42
|
+
"remoteUser": "vscode",
|
43
|
+
"features": {
|
44
|
+
"git": "latest"
|
45
|
+
}
|
46
|
+
}
|
data/.gitignore
CHANGED
data/.husky/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
_
|
data/.husky/commit-msg
ADDED
data/.rspec
ADDED
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,54 +1,160 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2022-01-19 14:55:50 UTC using RuboCop version 1.25.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
+
# Offense count: 2
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
|
12
|
+
# Include: **/*.gemspec
|
13
|
+
Gemspec/OrderedDependencies:
|
14
|
+
Exclude:
|
15
|
+
- 'ropen_pi.gemspec'
|
16
|
+
|
17
|
+
# Offense count: 1
|
18
|
+
# Configuration parameters: Include.
|
19
|
+
# Include: **/*.gemspec
|
20
|
+
Gemspec/RequiredRubyVersion:
|
21
|
+
Exclude:
|
22
|
+
- 'ropen_pi.gemspec'
|
23
|
+
|
9
24
|
# Offense count: 1
|
10
25
|
# Cop supports --auto-correct.
|
26
|
+
# Configuration parameters: AllowForAlignment.
|
27
|
+
Layout/CommentIndentation:
|
28
|
+
Exclude:
|
29
|
+
- 'lib/ropen_pi/specs/response_validator.rb'
|
30
|
+
|
31
|
+
# Offense count: 1
|
32
|
+
# Cop supports --auto-correct.
|
33
|
+
Layout/EmptyLineAfterMagicComment:
|
34
|
+
Exclude:
|
35
|
+
- 'lib/ropen_pi/specs/configuration.rb'
|
36
|
+
|
37
|
+
# Offense count: 1
|
38
|
+
# Cop supports --auto-correct.
|
39
|
+
# Configuration parameters: IndentationWidth.
|
40
|
+
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
41
|
+
Layout/FirstHashElementIndentation:
|
42
|
+
EnforcedStyle: consistent
|
43
|
+
|
44
|
+
# Offense count: 5
|
45
|
+
# Cop supports --auto-correct.
|
46
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
|
47
|
+
# SupportedStyles: space, no_space, compact
|
48
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
49
|
+
Layout/SpaceInsideHashLiteralBraces:
|
50
|
+
Exclude:
|
51
|
+
- 'spec/config_helper_spec.rb'
|
52
|
+
|
53
|
+
# Offense count: 2
|
54
|
+
# Cop supports --auto-correct.
|
55
|
+
# Configuration parameters: EnforcedStyle.
|
56
|
+
# SupportedStyles: final_newline, final_blank_line
|
57
|
+
Layout/TrailingEmptyLines:
|
58
|
+
Exclude:
|
59
|
+
- 'lib/ropen_pi/specs/configuration.rb'
|
60
|
+
- 'spec/config_helper_spec.rb'
|
61
|
+
|
62
|
+
# Offense count: 4
|
63
|
+
# Cop supports --auto-correct.
|
11
64
|
# Configuration parameters: AllowInHeredoc.
|
12
65
|
Layout/TrailingWhitespace:
|
13
66
|
Exclude:
|
14
|
-
- '
|
67
|
+
- 'lib/ropen_pi/config_helper.rb'
|
68
|
+
- 'lib/ropen_pi/specs/configuration.rb'
|
69
|
+
- 'spec/specs/example_group_helpers_spec.rb'
|
15
70
|
|
16
|
-
|
71
|
+
# Offense count: 3
|
72
|
+
# Cop supports --auto-correct.
|
73
|
+
Lint/AmbiguousRegexpLiteral:
|
17
74
|
Exclude:
|
18
|
-
- '
|
19
|
-
- 'config/routes/*.rb'
|
20
|
-
- 'spec/**/*.rb'
|
21
|
-
- 'db/migrate/*.rb'
|
75
|
+
- 'spec/specs/response_validator_spec.rb'
|
22
76
|
|
77
|
+
# Offense count: 6
|
78
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
23
79
|
Metrics/MethodLength:
|
24
|
-
|
25
|
-
- 'config/routes/*.rb'
|
26
|
-
- 'spec/**/*.rb'
|
27
|
-
- 'db/migrate/*.rb'
|
80
|
+
Max: 31
|
28
81
|
|
29
82
|
# Offense count: 2
|
83
|
+
# Configuration parameters: CountComments, CountAsOne.
|
84
|
+
Metrics/ModuleLength:
|
85
|
+
Max: 266
|
86
|
+
|
87
|
+
# Offense count: 1
|
88
|
+
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
89
|
+
Metrics/ParameterLists:
|
90
|
+
Max: 6
|
91
|
+
|
92
|
+
# Offense count: 5
|
93
|
+
# Configuration parameters: IgnoredMethods.
|
94
|
+
Metrics/PerceivedComplexity:
|
95
|
+
Max: 21
|
96
|
+
|
97
|
+
# Offense count: 16
|
98
|
+
# Configuration parameters: AllowedConstants.
|
30
99
|
Style/Documentation:
|
31
|
-
|
100
|
+
Exclude:
|
101
|
+
- 'spec/**/*'
|
102
|
+
- 'test/**/*'
|
103
|
+
- 'lib/generators/ropen_pi/install_generator.rb'
|
104
|
+
- 'lib/ropen_pi.rb'
|
105
|
+
- 'lib/ropen_pi/config_helper.rb'
|
106
|
+
- 'lib/ropen_pi/specs.rb'
|
107
|
+
- 'lib/ropen_pi/specs/configuration.rb'
|
108
|
+
- 'lib/ropen_pi/specs/example_group_helpers.rb'
|
109
|
+
- 'lib/ropen_pi/specs/example_helpers.rb'
|
110
|
+
- 'lib/ropen_pi/specs/extended_schema.rb'
|
111
|
+
- 'lib/ropen_pi/specs/open_api_formatter.rb'
|
112
|
+
- 'lib/ropen_pi/specs/request_factory.rb'
|
113
|
+
- 'lib/ropen_pi/specs/response_validator.rb'
|
114
|
+
- 'lib/ropen_pi/specs/writer.rb'
|
32
115
|
|
33
116
|
# Offense count: 2
|
34
117
|
# Cop supports --auto-correct.
|
35
118
|
Style/ExpandPathArguments:
|
36
119
|
Exclude:
|
37
|
-
- '
|
38
|
-
- 'bin/rake'
|
120
|
+
- 'ropen_pi.gemspec'
|
39
121
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
-
|
122
|
+
# Offense count: 2
|
123
|
+
# Cop supports --auto-correct.
|
124
|
+
# Configuration parameters: AllowSplatArgument.
|
125
|
+
Style/HashConversion:
|
126
|
+
Exclude:
|
127
|
+
- 'lib/ropen_pi/specs/request_factory.rb'
|
46
128
|
|
129
|
+
# Offense count: 1
|
130
|
+
# Cop supports --auto-correct.
|
131
|
+
# Configuration parameters: AllowedReceivers.
|
132
|
+
Style/HashEachMethods:
|
47
133
|
Exclude:
|
48
|
-
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
-
|
54
|
-
- '
|
134
|
+
- 'lib/ropen_pi/specs/example_group_helpers.rb'
|
135
|
+
|
136
|
+
# Offense count: 4
|
137
|
+
Style/OpenStructUse:
|
138
|
+
Exclude:
|
139
|
+
- 'spec/specs/configuration_spec.rb'
|
140
|
+
- 'spec/specs/open_api_formatter_spec.rb'
|
141
|
+
- 'spec/specs/response_validator_spec.rb'
|
142
|
+
|
143
|
+
# Offense count: 1
|
144
|
+
# Cop supports --auto-correct.
|
145
|
+
Style/RedundantBegin:
|
146
|
+
Exclude:
|
147
|
+
- 'lib/ropen_pi/specs/configuration.rb'
|
148
|
+
|
149
|
+
# Offense count: 4
|
150
|
+
# Cop supports --auto-correct.
|
151
|
+
Style/SingleArgumentDig:
|
152
|
+
Exclude:
|
153
|
+
- 'lib/ropen_pi/specs/open_api_formatter.rb'
|
154
|
+
|
155
|
+
# Offense count: 1
|
156
|
+
# Cop supports --auto-correct.
|
157
|
+
# Configuration parameters: AllowModifier.
|
158
|
+
Style/SoleNestedConditional:
|
159
|
+
Exclude:
|
160
|
+
- 'lib/ropen_pi/specs/example_group_helpers.rb'
|