contentstack 0.8.4 → 0.8.5

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: b496abfa2bddd87690df60b5271eedbbe2b3803e888ee9de01cd2dbdf28b3f4f
4
- data.tar.gz: e156a8022a32343d42ab8b28ebf48a9e48cbc31bf2d188eca936059443d703cc
3
+ metadata.gz: c608b1247b89cb28b9519fbf9e0814879aab951953ca8a82902df4dcf4a38b7b
4
+ data.tar.gz: 0cf04ec05622ffbbb963fb94794da5a80eec6d66fda8609747d2d11312e4808f
5
5
  SHA512:
6
- metadata.gz: 1aec5d7f59a1a56903a7d31d59671f0dc6daaf52dec83d8fe52b2c9653e40b1341b03cbf2f52f60761e26e4a0ffaa50387f5c8f529a6011afe35ead5ba17d434
7
- data.tar.gz: 6994156034d105442de60df1091d3b26aa7eae02c7ce9cfaf68315bfd868710626c3cfba08f3e69cc83dd4944695b8ad40cbb5761feac2fb52097f1a05bb3464
6
+ metadata.gz: e423a49545eae6ce37d39857877a6fcbf2ba65cbba41a6fb3cd9ec7520d7a3d64cae7ba5d660b0b2726bd53050ea566559d392145bf00413a1c2d7055b345969
7
+ data.tar.gz: e27142598452a529289a8d63e51387ad8f0d89295540fa146651bb623f5bda88962088a9d53cde1fd958f4c8674062bac95fdf5783fac7046a374ac8b445371e
@@ -0,0 +1,54 @@
1
+ name: Back-merge master to development
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+ pull-requests: write
12
+
13
+ jobs:
14
+ open-back-merge-pr:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v4
19
+ with:
20
+ fetch-depth: 0
21
+
22
+ - name: Open back-merge PR if needed
23
+ env:
24
+ GH_TOKEN: ${{ github.token }}
25
+ run: |
26
+ set -euo pipefail
27
+ BASE_BRANCH="development"
28
+ SOURCE_BRANCH="master"
29
+
30
+ git fetch origin "$BASE_BRANCH" "$SOURCE_BRANCH"
31
+
32
+ if ! git show-ref --verify --quiet "refs/remotes/origin/$BASE_BRANCH"; then
33
+ echo "Base branch '$BASE_BRANCH' does not exist on origin; skipping."
34
+ exit 0
35
+ fi
36
+
37
+ SOURCE_SHA=$(git rev-parse "origin/$SOURCE_BRANCH")
38
+ BASE_SHA=$(git rev-parse "origin/$BASE_BRANCH")
39
+
40
+ if [ "$SOURCE_SHA" = "$BASE_SHA" ]; then
41
+ echo "$SOURCE_BRANCH and $BASE_BRANCH are at the same commit; nothing to back-merge."
42
+ exit 0
43
+ fi
44
+
45
+ EXISTING=$(gh pr list --repo "${{ github.repository }}" --base "$BASE_BRANCH" --head "$SOURCE_BRANCH" --state open --json number --jq 'length')
46
+
47
+ if [ "$EXISTING" -gt 0 ]; then
48
+ echo "An open PR from $SOURCE_BRANCH to $BASE_BRANCH already exists; skipping."
49
+ exit 0
50
+ fi
51
+
52
+ gh pr create --repo "${{ github.repository }}" --base "$BASE_BRANCH" --head "$SOURCE_BRANCH" --title "chore: back-merge $SOURCE_BRANCH into $BASE_BRANCH" --body "Automated back-merge after changes landed on \\`$SOURCE_BRANCH\\`. Review and merge to keep \\`$BASE_BRANCH\\` in sync."
53
+
54
+ echo "Created back-merge PR $SOURCE_BRANCH -> $BASE_BRANCH."
@@ -0,0 +1,79 @@
1
+ name: Check Version Bump
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ version-bump:
8
+ name: Version & Changelog bump
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Checkout
12
+ uses: actions/checkout@v4
13
+ with:
14
+ fetch-depth: 0
15
+
16
+ - name: Detect changed files and version bump
17
+ id: detect
18
+ run: |
19
+ if git rev-parse HEAD^2 >/dev/null 2>&1; then
20
+ FILES=$(git diff --name-only HEAD^1 HEAD^2)
21
+ else
22
+ FILES=$(git diff --name-only HEAD~1 HEAD)
23
+ fi
24
+ VERSION_FILES_CHANGED=false
25
+ echo "$FILES" | grep -qx 'lib/contentstack/version.rb' && VERSION_FILES_CHANGED=true
26
+ echo "$FILES" | grep -qx 'CHANGELOG.md' && VERSION_FILES_CHANGED=true
27
+ echo "version_files_changed=$VERSION_FILES_CHANGED" >> $GITHUB_OUTPUT
28
+ # Only lib/ counts as release-affecting; .github/ and spec/ do not
29
+ CODE_CHANGED=false
30
+ echo "$FILES" | grep -qE '^lib/' && CODE_CHANGED=true
31
+ echo "code_changed=$CODE_CHANGED" >> $GITHUB_OUTPUT
32
+
33
+ - name: Skip when only test/docs/.github changed
34
+ if: steps.detect.outputs.code_changed != 'true'
35
+ run: |
36
+ echo "No release-affecting files changed (e.g. only spec/docs/.github). Skipping version-bump check."
37
+ exit 0
38
+
39
+ - name: Fail when version bump was missed
40
+ if: steps.detect.outputs.code_changed == 'true' && steps.detect.outputs.version_files_changed != 'true'
41
+ run: |
42
+ echo "::error::This PR has code changes but no version bump. Please bump the version in lib/contentstack/version.rb and add an entry in CHANGELOG.md."
43
+ exit 1
44
+
45
+ - name: Check version bump
46
+ if: steps.detect.outputs.code_changed == 'true' && steps.detect.outputs.version_files_changed == 'true'
47
+ run: |
48
+ set -e
49
+ GEM_VERSION=$(sed -n 's/.*VERSION = "\(.*\)".*/\1/p' lib/contentstack/version.rb)
50
+ if [ -z "$GEM_VERSION" ]; then
51
+ echo "::error::Could not read version from lib/contentstack/version.rb"
52
+ exit 1
53
+ fi
54
+ git fetch --tags --force 2>/dev/null || true
55
+ LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || true)
56
+ if [ -z "$LATEST_TAG" ]; then
57
+ echo "No existing tags found. Skipping version-bump check (first release)."
58
+ exit 0
59
+ fi
60
+ LATEST_VERSION="${LATEST_TAG#v}"
61
+ LATEST_VERSION="${LATEST_VERSION%%-*}"
62
+ if [ "$(printf '%s\n' "$LATEST_VERSION" "$GEM_VERSION" | sort -V | tail -1)" != "$GEM_VERSION" ]; then
63
+ echo "::error::Version bump required: lib/contentstack/version.rb ($GEM_VERSION) is not greater than latest tag ($LATEST_TAG). Please bump Contentstack::VERSION."
64
+ exit 1
65
+ fi
66
+ if [ "$GEM_VERSION" = "$LATEST_VERSION" ]; then
67
+ echo "::error::Version bump required: lib/contentstack/version.rb ($GEM_VERSION) equals latest tag ($LATEST_TAG). Please bump Contentstack::VERSION."
68
+ exit 1
69
+ fi
70
+ CHANGELOG_VERSION=$(sed -nE 's/^## Version ([0-9]+\.[0-9]+\.[0-9]+).*/\1/p' CHANGELOG.md | head -1)
71
+ if [ -z "$CHANGELOG_VERSION" ]; then
72
+ echo "::error::Could not find a version entry in CHANGELOG.md (expected line like '## Version 1.0.0')."
73
+ exit 1
74
+ fi
75
+ if [ "$CHANGELOG_VERSION" != "$GEM_VERSION" ]; then
76
+ echo "::error::CHANGELOG version mismatch: CHANGELOG.md top version ($CHANGELOG_VERSION) does not match lib/contentstack/version.rb ($GEM_VERSION). Please add or update the CHANGELOG entry for $GEM_VERSION."
77
+ exit 1
78
+ fi
79
+ echo "Version bump check passed: lib/contentstack/version.rb and CHANGELOG.md are at $GEM_VERSION (latest tag: $LATEST_TAG)."
data/.gitignore CHANGED
@@ -4,6 +4,7 @@ test
4
4
  doc
5
5
  spec-integration
6
6
  coverage
7
+ spec/.env.test
7
8
  \.yardoc
8
9
  .DS_Store
9
10
  .bundle/
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ## Version 0.8.5
4
+ ### Date: 5th-June-2026
5
+ ### Deprecated
6
+ - `Query#include_draft` is deprecated. The Content Delivery API returns published content only; the `include_draft` query parameter has no effect. Use Live Preview with the Preview Service to preview unpublished entries, or the Content Management API to work with draft content.
7
+
3
8
  ## Version 0.8.4
4
9
  ### Date: 15th-April-2026
5
10
  ### Security and Compatibility
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- contentstack (0.8.4)
4
+ contentstack (0.8.5)
5
5
  activesupport (>= 3.2)
6
6
  contentstack_utils (~> 1.2)
7
7
 
@@ -24,7 +24,7 @@ GEM
24
24
  addressable (2.9.0)
25
25
  public_suffix (>= 2.0.2, < 8.0)
26
26
  base64 (0.3.0)
27
- bigdecimal (4.1.1)
27
+ bigdecimal (4.1.2)
28
28
  concurrent-ruby (1.3.6)
29
29
  connection_pool (3.0.2)
30
30
  contentstack_utils (1.2.3)
@@ -39,12 +39,26 @@ GEM
39
39
  hashdiff (1.2.1)
40
40
  i18n (1.14.8)
41
41
  concurrent-ruby (~> 1.0)
42
- json (2.19.3)
42
+ json (2.19.7)
43
43
  logger (1.7.0)
44
- minitest (6.0.4)
44
+ minitest (6.0.6)
45
45
  drb (~> 2.0)
46
46
  prism (~> 1.5)
47
- nokogiri (1.19.2-arm64-darwin)
47
+ nokogiri (1.19.3-aarch64-linux-gnu)
48
+ racc (~> 1.4)
49
+ nokogiri (1.19.3-aarch64-linux-musl)
50
+ racc (~> 1.4)
51
+ nokogiri (1.19.3-arm-linux-gnu)
52
+ racc (~> 1.4)
53
+ nokogiri (1.19.3-arm-linux-musl)
54
+ racc (~> 1.4)
55
+ nokogiri (1.19.3-arm64-darwin)
56
+ racc (~> 1.4)
57
+ nokogiri (1.19.3-x86_64-darwin)
58
+ racc (~> 1.4)
59
+ nokogiri (1.19.3-x86_64-linux-gnu)
60
+ racc (~> 1.4)
61
+ nokogiri (1.19.3-x86_64-linux-musl)
48
62
  racc (~> 1.4)
49
63
  prism (1.9.0)
50
64
  public_suffix (7.0.5)
@@ -77,12 +91,17 @@ GEM
77
91
  addressable (>= 2.8.0)
78
92
  crack (>= 0.3.2)
79
93
  hashdiff (>= 0.4.0, < 2.0.0)
80
- yard (0.9.41)
94
+ yard (0.9.44)
81
95
 
82
96
  PLATFORMS
83
- arm64-darwin-22
84
- arm64-darwin-24
85
- arm64-darwin-25
97
+ aarch64-linux-gnu
98
+ aarch64-linux-musl
99
+ arm-linux-gnu
100
+ arm-linux-musl
101
+ arm64-darwin
102
+ x86_64-darwin
103
+ x86_64-linux-gnu
104
+ x86_64-linux-musl
86
105
 
87
106
  DEPENDENCIES
88
107
  contentstack!
@@ -92,5 +111,49 @@ DEPENDENCIES
92
111
  webmock (~> 3.26.0)
93
112
  yard (~> 0.9.38)
94
113
 
114
+ CHECKSUMS
115
+ activesupport (8.1.3) sha256=21a5e0dfbd4c3ddd9e1317ec6a4d782fa226e7867dc70b0743acda81a1dca20e
116
+ addressable (2.9.0) sha256=7fdf6ac3660f7f4e867a0838be3f6cf722ace541dd97767fa42bc6cfa980c7af
117
+ base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
118
+ bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
119
+ concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab
120
+ connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
121
+ contentstack (0.8.5)
122
+ contentstack_utils (1.2.3) sha256=cf2f5f996eb487559fd2d7d48a99262710f53dec62c84c6e325b9a598cd31ba7
123
+ crack (1.0.1) sha256=ff4a10390cd31d66440b7524eb1841874db86201d5b70032028553130b6d4c7e
124
+ diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
125
+ docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
126
+ drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
127
+ hashdiff (1.2.1) sha256=9c079dbc513dfc8833ab59c0c2d8f230fa28499cc5efb4b8dd276cf931457cd1
128
+ i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5
129
+ json (2.19.7) sha256=fe432c8639f6efff69f9d73b518a3705d9581ab93156f981ea72806e1e5bcc3e
130
+ logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
131
+ minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
132
+ nokogiri (1.19.3-aarch64-linux-gnu) sha256=46b89e5d7b9e844c2ee360794240c6ea2a4e6fa0c5892a4ed487db621224b639
133
+ nokogiri (1.19.3-aarch64-linux-musl) sha256=8392dfdcd21be7a94dbbe9ccc138dea01b97b24cb2dc02a114ca98bfb1d9a0b7
134
+ nokogiri (1.19.3-arm-linux-gnu) sha256=3919d5ffc334ad778a4a9eb88fda7dcb8b1fb58c8a52ac640c6dcd2f038e774f
135
+ nokogiri (1.19.3-arm-linux-musl) sha256=9ce1cb6346bb9c67b1550eb537aa183ead91e4b6eadb2f36ade02d8dd2a79fb6
136
+ nokogiri (1.19.3-arm64-darwin) sha256=71b9bd424b1b7abc18b05052a1a3cfd3627abdca62be280854cc411791357e42
137
+ nokogiri (1.19.3-x86_64-darwin) sha256=77f3fba57d46c53ab31e62fc6c28f705109d1bf6264356c76f132b2be5728d4d
138
+ nokogiri (1.19.3-x86_64-linux-gnu) sha256=2f5078620fe12e83669b5b17311b32532a8153d02eee7ad06948b926d6080976
139
+ nokogiri (1.19.3-x86_64-linux-musl) sha256=248c906d2166eca5efb56d52fdee5f9a1f51d69a72e2b64fdac647b4ce39ea3f
140
+ prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
141
+ public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623
142
+ racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
143
+ rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142
144
+ rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
145
+ rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
146
+ rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
147
+ rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47
148
+ rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
149
+ securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
150
+ simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
151
+ simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246
152
+ simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
153
+ tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
154
+ uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
155
+ webmock (3.26.2) sha256=774556f2ea6371846cca68c01769b2eac0d134492d21f6d0ab5dd643965a4c90
156
+ yard (0.9.44) sha256=eb087e9b631ccd887b049f303d489963945452d5e2a7eb49a5a74a7cf6887f28
157
+
95
158
  BUNDLED WITH
96
- 2.3.13
159
+ 4.0.11
@@ -565,16 +565,19 @@ module Contentstack
565
565
  self
566
566
  end
567
567
 
568
- # Include objects in 'Draft' mode in response
569
- #
570
- # Example
571
- #
572
- # @query = @stack.content_type('product').query
573
- # @query.include_draft
574
- #
575
- # @return [Contentstack::Query]
576
- def include_draft(flag=true)
577
- @query[:include_draft] = flag
568
+ # @deprecated since 0.8.5 The Content Delivery API returns published content only.
569
+ # Unpublished or draft entries are not available through CDA queries. Use Live Preview
570
+ # with the Preview Service, or the Content Management API, to access unpublished content.
571
+ #
572
+ # @return [Contentstack::Query]
573
+ def include_draft(_flag=true)
574
+ warn(
575
+ "Contentstack: Query#include_draft is deprecated and has no effect on the Content " \
576
+ "Delivery API, which returns published content only. To preview unpublished entries, " \
577
+ "use Live Preview with the Preview Service. To manage or fetch draft entries, use " \
578
+ "the Content Management API.",
579
+ uplevel: 1
580
+ )
578
581
  self
579
582
  end
580
583
 
@@ -1,3 +1,3 @@
1
1
  module Contentstack
2
- VERSION = "0.8.4"
2
+ VERSION = "0.8.5"
3
3
  end
@@ -32,7 +32,7 @@ description: Use when authoring or reviewing a pull request for contentstack-rub
32
32
 
33
33
  ### Process notes
34
34
 
35
- - **`master`** is protected by **`.github/workflows/check-branch.yml`**; follow team flow (**`staging`** **`master`**) for production promotion.
35
+ - Follow direct release flow **`development` -> `master`** (no `staging` handoff in the release path).
36
36
  - Run **`bundle exec rspec`** locally; CI may not run the full suite on every PR in this repository.
37
37
 
38
38
  ## References
@@ -28,7 +28,7 @@ description: Use when setting up the repo, running tests or docs, choosing branc
28
28
 
29
29
  ### Branches and PRs
30
30
 
31
- - Default integration branch is typically **`development`** (confirm on GitHub). **`master`** merges are restricted: `.github/workflows/check-branch.yml` blocks PRs into `master` unless the head branch is **`staging`**—follow org process for promotion.
31
+ - Default integration branch is typically **`development`** (confirm on GitHub). Release PRs go directly **`development` -> `master`**; `staging` is not part of the release promotion flow.
32
32
  - Keep PRs focused; mention breaking API or Ruby version requirement changes in the description.
33
33
 
34
34
  ### Before you push
@@ -30,7 +30,7 @@ description: Use when writing or fixing RSpec examples, WebMock stubs, JSON fixt
30
30
 
31
31
  ### Helpers
32
32
 
33
- - **`create_client`** and **`create_preview_client`** in **`spec_helper`** build clients using **`ENV['API_KEY']`**, **`ENV['DELIVERY_TOKEN']`**, **`ENV['ENVIRONMENT']`** tests should not rely on real credentials; stubs supply responses.
33
+ - **`create_client`** and **`create_preview_client`** in **`spec_helper`** build clients using **`ENV['API_KEY']`**, **`ENV['DELIVERY_TOKEN']`**, **`ENV['ENVIRONMENT']`**. Copy **`spec/.env.test.example`** to **`spec/.env.test`** (gitignored) for local runs without exporting env vars; CLI/env values already set take precedence. Tests use WebMock stubs and do not require live API calls.
34
34
 
35
35
  ### Coverage
36
36
 
@@ -0,0 +1,10 @@
1
+ # Copy to spec/.env.test and fill in your stack credentials.
2
+ # spec/.env.test is gitignored — do not commit real tokens.
3
+ #
4
+ # bundle exec rspec
5
+
6
+ API_KEY=your_stack_api_key
7
+ DELIVERY_TOKEN=your_delivery_token
8
+ ENVIRONMENT=development
9
+ # Optional: only needed for custom CDN host tests
10
+ # HOST=cdn.contentstack.io
data/spec/query_spec.rb CHANGED
@@ -165,8 +165,13 @@ describe Contentstack::Query do
165
165
  expect(data.first.fields[:locale]).not_to be nil
166
166
  end
167
167
 
168
- it "should get data using `include_draft` method" do
169
- data = category_query.include_draft.fetch
168
+ it "warns when `include_draft` is called and does not send include_draft to the API" do
169
+ query = category_query
170
+ expect {
171
+ query.include_draft
172
+ }.to output(/Query#include_draft is deprecated/).to_stderr
173
+ expect(query.query).not_to have_key(:include_draft)
174
+ data = query.fetch
170
175
  expect(data.length).to eq 5
171
176
  end
172
177
 
data/spec/spec_helper.rb CHANGED
@@ -16,6 +16,8 @@
16
16
  require 'webmock/rspec'
17
17
  WebMock.disable_net_connect!(allow_localhost: true)
18
18
 
19
+ require_relative 'support/load_test_env'
20
+
19
21
  require 'simplecov'
20
22
  SimpleCov.start
21
23
 
@@ -0,0 +1,23 @@
1
+ # Loads optional local test credentials from spec/.env.test (gitignored).
2
+ # Existing ENV values are not overwritten, so CLI exports still take precedence.
3
+ module ContentstackTestEnv
4
+ ENV_FILE = File.expand_path("../.env.test", __dir__).freeze
5
+
6
+ def self.load!
7
+ return unless File.file?(ENV_FILE)
8
+
9
+ File.foreach(ENV_FILE) do |line|
10
+ line = line.strip
11
+ next if line.empty? || line.start_with?("#")
12
+
13
+ key, value = line.split("=", 2)
14
+ next if key.nil? || value.nil?
15
+
16
+ key = key.strip
17
+ value = value.strip.delete_prefix('"').delete_suffix('"')
18
+ ENV[key] = value unless ENV.key?(key) && !ENV[key].to_s.empty?
19
+ end
20
+ end
21
+ end
22
+
23
+ ContentstackTestEnv.load!
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentstack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Contentstack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-15 00:00:00.000000000 Z
11
+ date: 2026-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -102,7 +102,8 @@ extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
104
  - ".cursor/rules/README.md"
105
- - ".github/workflows/check-branch.yml"
105
+ - ".github/workflows/back-merge-pr.yml"
106
+ - ".github/workflows/check-version-bump.yml"
106
107
  - ".github/workflows/codeql-analysis.yml"
107
108
  - ".github/workflows/issues-jira.yml"
108
109
  - ".github/workflows/policy-scan.yml"
@@ -142,6 +143,7 @@ files:
142
143
  - skills/framework/SKILL.md
143
144
  - skills/ruby-style/SKILL.md
144
145
  - skills/testing/SKILL.md
146
+ - spec/.env.test.example
145
147
  - spec/asset_collection_spec.rb
146
148
  - spec/asset_spec.rb
147
149
  - spec/content_type_spec.rb
@@ -160,6 +162,7 @@ files:
160
162
  - spec/fixtures/sync_init.json
161
163
  - spec/query_spec.rb
162
164
  - spec/spec_helper.rb
165
+ - spec/support/load_test_env.rb
163
166
  - spec/sync_spec.rb
164
167
  homepage: https://github.com/contentstack/contentstack-ruby
165
168
  licenses:
@@ -1,20 +0,0 @@
1
- name: 'Check Branch'
2
-
3
- on:
4
- pull_request:
5
-
6
- jobs:
7
- check_branch:
8
- runs-on: ubuntu-latest
9
- steps:
10
- - name: Comment PR
11
- if: github.base_ref == 'master' && github.head_ref != 'staging'
12
- uses: thollander/actions-comment-pull-request@v2
13
- with:
14
- message: |
15
- We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the next branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch.
16
- - name: Check branch
17
- if: github.base_ref == 'master' && github.head_ref != 'staging'
18
- run: |
19
- echo "ERROR: We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the next branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch."
20
- exit 1