ropen_pi 0.3.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f86834742cd1643f964b60f07ce4ae9aa1be0b5187856bf412aed237d3947702
4
- data.tar.gz: e66857f8eecd559392e4a81e4cdbb044e3f1012f28601c863496dbf0c32a1da3
3
+ metadata.gz: fcd5d05fa6720c6b4dced01be1c3406aec8cbf3617feca2edd83f7fb5aaeefa6
4
+ data.tar.gz: bcea3da8ddce3d7cbb0d62b8ff97b4a6c5eeb2213e507758fbc4c52ed8ef876f
5
5
  SHA512:
6
- metadata.gz: c3cbd9fc614f7f0791f4fdb0d0965426c2e06ac62cef288ff1ac2307188d73d7f1360cc8852c93bd1aaed81528be18da6cfffb05c9cf51b7435208a626dd30be
7
- data.tar.gz: a4cb8aebd774ef451f2902d680d53972a2daac7416002e1dfa7a67610c08da6d11556bea23e5945570d90d2968dcc37bec8af3e3b009bfa36aa9e756ec5b1973
6
+ metadata.gz: 02cf0eed335f80db88fbfe6cd4993efe3a522da31d8c36b83d068b3ec6bdc51941025a0e42658cdb085aaa62236235750e5db1fd7fe94abf6c4aeab29f1ba178
7
+ data.tar.gz: 9b52466b66c2f977fa557b0ff3881908fff30881eb1b4bb06239f692099658102349f1191f30bb6227b67d4efa4a986ca432d81ca0f25ad3a64887e90bf619bd
@@ -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
@@ -4,6 +4,7 @@
4
4
  /coverage/
5
5
  /doc/
6
6
  /pkg/
7
+ /node_modules/
7
8
  /spec/reports/
8
9
  /tmp/
9
10
 
data/.husky/.gitignore ADDED
@@ -0,0 +1 @@
1
+ _
data/.husky/commit-msg ADDED
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npx --no-install commitlint --edit "$1"
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml CHANGED
@@ -2,3 +2,7 @@
2
2
  inherit_from:
3
3
  - https://raw.githubusercontent.com/talentplatforms/shared-rubocop/master/.talentplatforms-rubocop.yml
4
4
  - .rubocop_todo.yml
5
+
6
+ AllCops:
7
+ SuggestExtensions: false
8
+ NewCops: enable
data/.rubocop_todo.yml CHANGED
@@ -1,54 +1,160 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2019-09-10 10:49:27 +0200 using RuboCop version 0.74.0.
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
- - 'config/environments/test.rb'
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
- Metrics/BlockLength:
71
+ # Offense count: 3
72
+ # Cop supports --auto-correct.
73
+ Lint/AmbiguousRegexpLiteral:
17
74
  Exclude:
18
- - 'config/routes.rb'
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
- Exclude:
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
- Enabled: false
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
- - 'bin/rails'
38
- - 'bin/rake'
120
+ - 'ropen_pi.gemspec'
39
121
 
40
- AllCops:
41
- TargetRubyVersion: 2.7
42
- Include:
43
- - "**/*.rb"
44
- - Rakefile
45
- - config.ru
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
- - db/schema.rb
49
- - 'vendor/**/*'
50
- - 'bin/**/*'
51
- - spec/spec_helper.rb
52
- - spec/rails_helper.rb
53
- - lib/tasks/auto_annotate_models.rake
54
- - 'ropen_pi.gemspec'
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'