heavylog 0.1.0 → 0.1.1.beta.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67f8f650ce028d5d665e91dcf433598cac9f2e43b5f0bc27e4b275741ccbd9e0
4
- data.tar.gz: 10e83a39f390df38b8bb1d47ea9fdc508591f390a1f42f428a34d2deb8ea84d8
3
+ metadata.gz: d206e10d13818be551a6ddd6df008c174a0ae15c4e9499f340461df61ebf04d2
4
+ data.tar.gz: db09d3d4a4d186702094c6526b13e04f19ebd9150520d12f1397acfda6705401
5
5
  SHA512:
6
- metadata.gz: 1881fefdd481ac8129676698e71fff044207f6ec39add42eaf4ecb512208a321e74c2e3daeb9e34da5e79d133845355460adbf158fb8d9a160473dce480e86f7
7
- data.tar.gz: 9cbad0db88d74272274966840c5d3d84fde5b4a8d3f21d1d605a2f54c921d6e2f2ef18acc686f79982e3a7908c5aa462e4d16976b222f02c9f7bb58221a60e49
6
+ metadata.gz: cd1e47ed895ff0e25750ddae9634e49c06910f594f3f0e8413ab0be6d4abc7f8f3c6260f54deb7436d8d80fe74abb3dd1103b28e7c21dfcb91a73b8c4245eee0
7
+ data.tar.gz: 2304461fa1d4c1b7fdbbbceebd591edb61a6d05c30e3a0a4d2ce65b5a8cbb6b7700d93e2ef44823903a26258b98ee15cff78393d64b9adddcf2957c78488af6f
@@ -0,0 +1,49 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ if [ -f "/home/$HOSTLOGNAME/.ssh/id_rsa.pub.sign" ]; then
6
+ ln -sf /home/$HOSTLOGNAME/.ssh/id_rsa.pub.sign /home/vscode/.ssh/id_rsa.pub.sign
7
+ fi
8
+
9
+ sudo chown -R vscode:vscode .ruby-lsp
10
+ sudo chown -R vscode:vscode /usr/local/bundle
11
+
12
+ git config --global --add safe.directory $DEVC_WORKSPACE
13
+
14
+ function bootcmd() {
15
+ printf "\n"
16
+ toilet -f term -t -F border:metal "$1"
17
+ printf "+ $2\n"
18
+ }
19
+
20
+ MARKER_FILE=".devcontainer/.bootdone"
21
+
22
+ if [ -f "${MARKER_FILE}" ]; then
23
+ source "${MARKER_FILE}"
24
+ fi
25
+
26
+ if [ "${BUNDLE_ALREADY_INSTALLED}" != "true" ]; then
27
+ bootcmd "Installing gems" "bundle install"
28
+ bundle install
29
+ BUNDLE_ALREADY_INSTALLED="true"
30
+ fi
31
+
32
+ if [ "${CHANGELOG_DISPLAYED_6}" != "true" ]; then
33
+ if [ -f "/var/lib/smdevc/changelog" ]; then
34
+ printf "\n"
35
+ toilet -f term -t -F border:metal "Latest Changes"
36
+ cat /var/lib/smdevc/changelog
37
+ fi
38
+
39
+ CHANGELOG_DISPLAYED_6="true"
40
+ fi
41
+
42
+ echo -e "\
43
+ BUNDLE_ALREADY_INSTALLED=${BUNDLE_ALREADY_INSTALLED}\n\
44
+ CHANGELOG_DISPLAYED_6=${CHANGELOG_DISPLAYED_6}" > "${MARKER_FILE}"
45
+
46
+ printf "\n\n\e[38;2;252;163;17m"
47
+ toilet -f standard "Heavylog"
48
+ printf "\nEnvironment prepared! Get ready to code!\n\n"
49
+ printf "\e[0m"
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "Heavylog",
3
+ "dockerComposeFile": "docker-compose.yml",
4
+ "service": "app",
5
+ "workspaceFolder": "/workspaces/heavylog",
6
+ "containerEnv": {
7
+ "RUBY_YJIT_ENABLE": "true",
8
+ "MALLOC_ARENA_MAX": "2",
9
+ "BUNDLE_JOBS": "8",
10
+ "DEVC_WORKSPACE": "${containerWorkspaceFolder}"
11
+ },
12
+ "mounts": [
13
+ "source=bundle,target=/usr/local/bundle,type=volume",
14
+ "source=rubylsp,target=${containerWorkspaceFolder}/.ruby-lsp,type=volume"
15
+ ],
16
+ "onCreateCommand": ".devcontainer/boot.sh"
17
+ }
@@ -0,0 +1,10 @@
1
+ services:
2
+ app:
3
+ image: harbor.signmax.cloud/public/devcontainer:rails-3.4.5-14
4
+ volumes:
5
+ - ..:/workspaces/heavylog:cached
6
+ shm_size: "1gb"
7
+ # Overrides default command so things don't shut down after the process ends.
8
+ command: sleep infinity
9
+ # Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
10
+ # (Adding the "ports" property to this file will not forward from a Codespace.)
@@ -0,0 +1,20 @@
1
+ name: Test
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ test:
7
+ name: Tests
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v1
12
+ - name: Set up Ruby
13
+ uses: ruby/setup-ruby@v1
14
+ with:
15
+ bundler-cache: true
16
+ ruby-version: 3.4
17
+ - name: Install dependencies
18
+ run: bundle install
19
+ - name: Run tests
20
+ run: bundle exec rspec
@@ -0,0 +1,177 @@
1
+ name: Publish release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+ packages: write # required for GitHub Packages publishing
10
+ id-token: write # required for trusted publishing
11
+
12
+ concurrency:
13
+ group: publish-${{ github.ref }}
14
+ cancel-in-progress: false
15
+
16
+ jobs:
17
+ verify:
18
+ name: Verify versions match tag
19
+ runs-on: ubuntu-latest
20
+ if: ${{ !github.event.release.prerelease }}
21
+ steps:
22
+ - name: Checkout
23
+ uses: actions/checkout@v4
24
+ - name: Extract versions
25
+ id: versions
26
+ shell: bash
27
+ run: |
28
+ TAG="${GITHUB_REF_NAME}"
29
+ # Allow tags like v1.2.3 or 1.2.3
30
+ TAG_NO_V=${TAG#v}
31
+ echo "tag=${TAG_NO_V}" >> "$GITHUB_OUTPUT"
32
+
33
+ # version.rb version
34
+ GEM_VER=$(sed -n 's/^[[:space:]]*VERSION[[:space:]]*=[[:space:]]*"\(.*\)"[[:space:]]*$/\1/p' lib/heavylog/version.rb)
35
+ echo "gem=${GEM_VER}" >> "$GITHUB_OUTPUT"
36
+
37
+ echo "Tag: $TAG_NO_V"
38
+ echo "RubyGems: $GEM_VER"
39
+
40
+ if [[ "$GEM_VER" != "$TAG_NO_V" ]]; then
41
+ echo "Version mismatch: tag=$TAG_NO_V, gem=$GEM_VER" >&2
42
+ exit 1
43
+ fi
44
+ verify_prerelease:
45
+ name: Verify prerelease versions match tag
46
+ runs-on: ubuntu-latest
47
+ if: github.event.release.prerelease
48
+ steps:
49
+ - name: Checkout
50
+ uses: actions/checkout@v4
51
+ - name: Extract and verify versions
52
+ shell: bash
53
+ run: |
54
+ TAG="${GITHUB_REF_NAME}"
55
+ TAG_NO_V=${TAG#v}
56
+
57
+ # Ensure the tag contains a prerelease identifier (e.g. 0.0.13-beta.1)
58
+ if [[ ! "$TAG_NO_V" =~ ^[0-9]+\.[0-9]+\.[0-9]+-.+ ]]; then
59
+ echo "Tag '$TAG_NO_V' does not look like a valid prerelease version" >&2
60
+ exit 1
61
+ fi
62
+
63
+ BASE_VERSION=${TAG_NO_V%%-*}
64
+ GEM_VER=$(sed -n 's/^[[:space:]]*VERSION[[:space:]]*=[[:space:]]*"\(.*\)"[[:space:]]*$/\1/p' lib/heavylog/version.rb)
65
+
66
+ echo "Tag: $TAG_NO_V"
67
+ echo "Base version: $BASE_VERSION"
68
+ echo "RubyGems: $GEM_VER"
69
+
70
+ if [[ "$GEM_VER" != "$BASE_VERSION" ]]; then
71
+ echo "Version mismatch: tag base=$BASE_VERSION, gem=$GEM_VER" >&2
72
+ exit 1
73
+ fi
74
+ publish_npm:
75
+ name: Publish npm package
76
+ needs: verify
77
+ if: ${{ !github.event.release.prerelease }}
78
+ runs-on: ubuntu-latest
79
+ steps:
80
+ - uses: actions/checkout@v4
81
+ - name: Setup Node.js
82
+ uses: actions/setup-node@v4
83
+ with:
84
+ node-version: "24"
85
+ registry-url: "https://registry.npmjs.org"
86
+ - name: Ensure modern npm for OIDC trusted publishing
87
+ run: npm install -g npm@latest
88
+ - name: Publish package
89
+ run: npm publish --access public
90
+ publish_npm_canary:
91
+ name: Publish npm canary
92
+ needs: verify_prerelease
93
+ if: github.event.release.prerelease
94
+ runs-on: ubuntu-latest
95
+ steps:
96
+ - uses: actions/checkout@v4
97
+ - name: Setup Node.js
98
+ uses: actions/setup-node@v4
99
+ with:
100
+ node-version: "22"
101
+ registry-url: "https://registry.npmjs.org"
102
+ - name: Ensure modern npm for OIDC trusted publishing
103
+ run: npm install -g npm@latest
104
+ - name: Set canary version from tag
105
+ run: |
106
+ TAG_VERSION="${GITHUB_REF_NAME#v}"
107
+ echo "Setting canary version: $TAG_VERSION"
108
+ npm version "$TAG_VERSION" --no-git-tag-version
109
+ - name: Publish canary
110
+ run: npm publish --tag canary --access public
111
+ publish_gem:
112
+ name: Publish Ruby gem
113
+ needs: verify
114
+ if: ${{ !github.event.release.prerelease }}
115
+ runs-on: ubuntu-latest
116
+ steps:
117
+ - uses: actions/checkout@v4
118
+ - name: Set up Ruby
119
+ uses: ruby/setup-ruby@v1
120
+ with:
121
+ bundler-cache: true
122
+ ruby-version: "3.4"
123
+ - name: Build gem package
124
+ run: |
125
+ rm -f heavylog-*.gem
126
+ gem build heavylog.gemspec
127
+ - name: Configure trusted publishing credentials
128
+ uses: rubygems/configure-rubygems-credentials@v1.0.0
129
+ - name: Publish gem
130
+ run: |
131
+ GEM_FILE=$(ls -t heavylog-*.gem 2>/dev/null | head -n 1 || true)
132
+ if [ -z "$GEM_FILE" ]; then
133
+ echo "Gem file not found" >&2
134
+ exit 1
135
+ fi
136
+
137
+ gem push "$GEM_FILE"
138
+ publish_gem_prerelease:
139
+ name: Publish prerelease gem
140
+ needs: verify_prerelease
141
+ if: github.event.release.prerelease
142
+ runs-on: ubuntu-latest
143
+ steps:
144
+ - uses: actions/checkout@v4
145
+ - name: Set up Ruby
146
+ uses: ruby/setup-ruby@v1
147
+ with:
148
+ bundler-cache: false
149
+ ruby-version: "3.4"
150
+ - name: Install dependencies
151
+ run: bundle install
152
+ - name: Set prerelease version from tag
153
+ run: |
154
+ TAG_VERSION="${GITHUB_REF_NAME#v}"
155
+ # Ruby gem versions use dots instead of hyphens (e.g. 0.0.12.beta.1)
156
+ GEM_VERSION="${TAG_VERSION//-/.}"
157
+
158
+ echo "Setting prerelease version: $GEM_VERSION"
159
+ sed -i "s/VERSION = \".*\"/VERSION = \"${GEM_VERSION}\"/" lib/heavylog/version.rb
160
+ cat lib/heavylog/version.rb
161
+ - name: Update Gemfile.lock
162
+ run: bundle install
163
+ - name: Build prerelease gem package
164
+ run: |
165
+ rm -f heavylog-*.gem
166
+ gem build heavylog.gemspec
167
+ - name: Configure trusted publishing credentials
168
+ uses: rubygems/configure-rubygems-credentials@v1.0.0
169
+ - name: Publish prerelease gem
170
+ run: |
171
+ GEM_FILE=$(ls -t heavylog-*.gem 2>/dev/null | head -n 1 || true)
172
+ if [ -z "$GEM_FILE" ]; then
173
+ echo "Gem file not found" >&2
174
+ exit 1
175
+ fi
176
+
177
+ gem push "$GEM_FILE"
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
 
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
+ /.devcontainer/.bootdone
data/.rubocop.yml CHANGED
@@ -1,152 +1,3 @@
1
- require:
2
- - rubocop-performance
3
-
4
- AllCops:
5
- TargetRubyVersion: 3.0
6
-
7
- # # Commonly used screens these days easily fit more than 80 characters.
8
- Layout/LineLength:
9
- Max: 120
10
-
11
- # Too short methods lead to extraction of single-use methods, which can make
12
- # the code easier to read (by naming things), but can also clutter the class
13
- Metrics/MethodLength:
14
- Enabled: false
15
-
16
- # The guiding principle of classes is SRP, SRP can't be accurately measured by LoC
17
- Metrics/ClassLength:
18
- Enabled: false
19
-
20
- Metrics/AbcSize:
21
- Enabled: false
22
-
23
- Metrics/CyclomaticComplexity:
24
- Enabled: false
25
-
26
- Metrics/PerceivedComplexity:
27
- Enabled: false
28
-
29
- Metrics/ParameterLists:
30
- Enabled: false
31
-
32
- Metrics/ModuleLength:
33
- Enabled: false
34
-
35
- Metrics/BlockLength:
36
- Enabled: false
37
-
38
- # Mixing the styles looks just silly.
39
- Style/HashSyntax:
40
- EnforcedStyle: ruby19_no_mixed_keys
41
-
42
- # Single quotes being faster is hardly measurable and only affects parse time.
43
- # Enforcing double quotes reduces the times where you need to change them
44
- # when introducing an interpolation. Use single quotes only if their semantics
45
- # are needed.
46
- Style/StringLiterals:
47
- EnforcedStyle: double_quotes
48
-
49
- Style/StringLiteralsInInterpolation:
50
- EnforcedStyle: double_quotes
51
-
52
- # We do not need to support Ruby 1.9, so this is good to use.
53
- Style/SymbolArray:
54
- Enabled: true
55
-
56
- # String#% is by far the least verbose and only object oriented variant.
57
- Style/FormatString:
58
- EnforcedStyle: percent
59
-
60
- # Fail is an alias of raise. Avoid aliases, it's more cognitive load for no gain.
61
- # The argument that fail should be used to abort the program is wrong too,
62
- # there's Kernel#abort for that.
63
- Style/SignalException:
64
- EnforcedStyle: only_raise
65
-
66
- # { ... } for multi-line blocks is okay, follow Weirichs rule instead:
67
- # https://web.archive.org/web/20140221124509/http://onestepback.org/index.cgi/Tech/Ruby/BraceVsDoEnd.rdoc
68
- Style/BlockDelimiters:
69
- Enabled: false
70
-
71
- # do / end blocks should be used for side effects,
72
- # methods that run a block for side effects and have
73
- # a useful return value are rare, assign the return
74
- # value to a local variable for those cases.
75
- Style/MethodCalledOnDoEndBlock:
76
- Enabled: true
77
-
78
- Style/Documentation:
79
- Enabled: false
80
-
81
- Style/MethodDefParentheses:
82
- Enabled: true
83
-
84
- Style/TrailingCommaInHashLiteral:
85
- EnforcedStyleForMultiline: comma
86
-
87
- Style/TrailingCommaInArrayLiteral:
88
- EnforcedStyleForMultiline: comma
89
-
90
- Style/NumericLiterals:
91
- Enabled: false
92
-
93
- Style/NumericPredicate:
94
- EnforcedStyle: comparison
95
-
96
- Style/ClassAndModuleChildren:
97
- Enabled: false
98
-
99
- Style/DoubleNegation:
100
- Enabled: false
101
-
102
- Style/AsciiComments:
103
- Enabled: false
104
-
105
- # Most readable form.
106
- Layout/HashAlignment:
107
- EnforcedHashRocketStyle: table
108
- EnforcedColonStyle: table
109
-
110
- Layout/BlockEndNewline:
111
- Enabled: false
112
-
113
- # No space makes the method definition shorter and differentiates
114
- # from a regular assignment.
115
- Layout/SpaceAroundEqualsInParameterDefault:
116
- EnforcedStyle: no_space
117
-
118
- Layout/IndentationConsistency:
119
- EnforcedStyle: normal
120
-
121
- Layout/MultilineMethodCallIndentation:
122
- EnforcedStyle: indented_relative_to_receiver
123
-
124
- # Suppressing exceptions can be perfectly fine, and be it to avoid to
125
- # explicitly type nil into the rescue since that's what you want to return,
126
- # or suppressing LoadError for optional dependencies
127
- Lint/SuppressedException:
128
- Enabled: false
129
-
130
- # This is just silly. Calling the argument `other` in all cases makes no sense.
131
- Naming/BinaryOperatorParameterName:
132
- Enabled: false
133
-
134
- Naming/MethodParameterName:
135
- AllowedNames:
136
- - io
137
- - id
138
- - to
139
- - by
140
- - on
141
- - in
142
- - at
143
- - ip
144
- - db
145
- - x
146
- - y
147
-
148
- Bundler/OrderedGems:
149
- Enabled: false
150
-
151
- Gemspec/OrderedDependencies:
152
- Enabled: false
1
+ inherit_gem:
2
+ skyltmax_config:
3
+ - rubocop.yml
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # Change Log
2
+
3
+ ### Unreleased
4
+
5
+ - build: Github actions automatic publishing
6
+
7
+ ### [0.1.0] - 2026-02-10
8
+
9
+ - Start of changelog