jekyll-theme-zer0 0.21.0 → 0.21.2

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: 6efa1fb4e9fdc23aa63e90c94762e62c2f568a379133ca8674f78b6c2ed19046
4
- data.tar.gz: c9eba9e9cff455d23cdeebdbc92facbafc0a6ec6063c366cfeb7819a044a3cc6
3
+ metadata.gz: d7be7cd1499d69e545391f406a6e1513450da6b32f33584fcafc54af445bd49d
4
+ data.tar.gz: 53028dfe191e909adf5afba86a5ed51f382eb5e455daa440b015564de8a8090b
5
5
  SHA512:
6
- metadata.gz: e9a4fa8676d4589896c9feaa8fd9e440e6bb1c76e686c5b5860d3a9112e873ac2cb4f98543391495456236e689bce451a1de36285de122c6793210914baa62c9
7
- data.tar.gz: da070bafa01bfd3a7507da4160a31f396b94c1163299c788cab1aeaa011291f1e6955ddf29128c4045425821feea34a83bf62290f7c75183fd411e48099deece
6
+ metadata.gz: 7083e5fc1b13c31ee8989abd710166eb3c006dd5187383660f876a69be7ff696f9eb7a28565869bb793e4214f7b3fe9e4c04b54d173cf9f987399d6f78e9ec2a
7
+ data.tar.gz: 84617ee1e7b5510596744ff7111df43ea2d23bcbe5fc0b413873354072e18e17ac8a77fe286fbd4c16705edf2f73bf8414331e8216ac1e5613175e0cb2fb240f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.21.2] - 2026-03-21
4
+
5
+ ### Changed
6
+ - Version bump: patch release
7
+ - Release tooling: RubyGems publishing now supports API-key auth via `.env` (`RUBY_API_KEY` mapped to `GEM_HOST_API_KEY`)
8
+
9
+ ### Commits in this release
10
+ - 34bed37 chore(deps): update Ruby gem dependencies (#31)
11
+ - 50ebdd4 chore(deps): update Ruby gem dependencies (#32)
12
+
13
+ ## [0.21.1] - 2026-03-13
14
+
15
+ ### Changed
16
+ - Version bump: patch release
17
+
18
+ ### Commits in this release
19
+ - 9665afd feat(templates): add README.md for templates directory and usage instructions
20
+ - cc81bd9 chore(deps): update Ruby gem dependencies (#24)
21
+
22
+
3
23
  ## [0.21.0] - 2026-02-01
4
24
 
5
25
  ### Added
@@ -108,6 +108,60 @@ require_file() {
108
108
  debug "Found required file: $file"
109
109
  }
110
110
 
111
+ # Load simple KEY=VALUE pairs from an env file
112
+ load_env_file() {
113
+ local env_file="$1"
114
+
115
+ if [[ ! -f "$env_file" ]]; then
116
+ return 0
117
+ fi
118
+
119
+ debug "Loading environment from $env_file"
120
+
121
+ while IFS= read -r line || [[ -n "$line" ]]; do
122
+ # Trim leading whitespace for easier parsing.
123
+ line="${line#"${line%%[![:space:]]*}"}"
124
+
125
+ [[ -z "$line" ]] && continue
126
+ [[ "$line" == \#* ]] && continue
127
+ [[ "$line" != *=* ]] && continue
128
+
129
+ local key="${line%%=*}"
130
+ local value="${line#*=}"
131
+
132
+ # Trim whitespace around key/value.
133
+ key="${key#"${key%%[![:space:]]*}"}"
134
+ key="${key%"${key##*[![:space:]]}"}"
135
+ value="${value#"${value%%[![:space:]]*}"}"
136
+ value="${value%"${value##*[![:space:]]}"}"
137
+
138
+ # Only export valid shell identifiers.
139
+ [[ "$key" =~ ^[A-Za-z_][A-Za-z0-9_]*$ ]] || continue
140
+
141
+ # Remove surrounding single/double quotes if present.
142
+ if [[ "$value" =~ ^\".*\"$ ]]; then
143
+ value="${value:1:${#value}-2}"
144
+ elif [[ "$value" =~ ^\'.*\'$ ]]; then
145
+ value="${value:1:${#value}-2}"
146
+ fi
147
+
148
+ export "$key=$value"
149
+ done < "$env_file"
150
+ }
151
+
152
+ # Prefer API-key auth from environment for RubyGems publish operations.
153
+ prepare_rubygems_api_key() {
154
+ local repo_root
155
+ repo_root="$(get_repo_root)"
156
+
157
+ load_env_file "$repo_root/.env"
158
+
159
+ if [[ -z "${GEM_HOST_API_KEY:-}" ]] && [[ -n "${RUBY_API_KEY:-}" ]]; then
160
+ export GEM_HOST_API_KEY="$RUBY_API_KEY"
161
+ debug "Mapped RUBY_API_KEY to GEM_HOST_API_KEY for RubyGems publishing"
162
+ fi
163
+ }
164
+
111
165
  # Get script directory
112
166
  get_script_dir() {
113
167
  local script_path="${BASH_SOURCE[0]}"
@@ -150,5 +204,6 @@ print_summary() {
150
204
  export -f log info step success warn error debug
151
205
  export -f confirm dry_run_exec
152
206
  export -f command_exists require_command require_file
207
+ export -f load_env_file prepare_rubygems_api_key
153
208
  export -f get_script_dir get_repo_root
154
209
  export -f print_header print_summary
data/scripts/lib/gem.sh CHANGED
@@ -101,6 +101,13 @@ publish_gem() {
101
101
  if [[ ! -f "$gem_file" ]]; then
102
102
  error "Gem file not found: $gem_file (run build first)"
103
103
  fi
104
+
105
+ # Load API-key auth from environment or .env before publish.
106
+ prepare_rubygems_api_key
107
+
108
+ if [[ -z "${GEM_HOST_API_KEY:-}" ]] && [[ ! -f ~/.gem/credentials ]]; then
109
+ error "RubyGems authentication missing. Set GEM_HOST_API_KEY (or RUBY_API_KEY in .env) or run 'gem signin'."
110
+ fi
104
111
 
105
112
  # Check if version already exists
106
113
  if gem_version_exists "$version"; then
@@ -69,9 +69,17 @@ validate_rubygems_auth() {
69
69
  fi
70
70
 
71
71
  debug "Validating RubyGems authentication..."
72
+
73
+ # Load API key from environment or .env when available.
74
+ prepare_rubygems_api_key
75
+
76
+ if [[ -n "${GEM_HOST_API_KEY:-}" ]]; then
77
+ debug "✓ RubyGems API key available via GEM_HOST_API_KEY"
78
+ return 0
79
+ fi
72
80
 
73
81
  if [[ ! -f ~/.gem/credentials ]]; then
74
- error "Not authenticated with RubyGems. Run 'gem signin' first."
82
+ error "RubyGems authentication missing. Set GEM_HOST_API_KEY (or RUBY_API_KEY in .env) or run 'gem signin'."
75
83
  fi
76
84
 
77
85
  debug "✓ RubyGems authentication present"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-zer0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.21.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amr Abdel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-02 00:00:00.000000000 Z
11
+ date: 2026-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll