planetscale_rails 0.2.9 → 0.2.10

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: daf913803fb37b2cca87b9b72a196b4bb62a66143657ac7f7566bb915a7d9ca0
4
- data.tar.gz: cf29f4137f4a36860cb918b653e88ff859509a0138638070ca7f08e82b3fb59f
3
+ metadata.gz: 2931af7118563daf471a6cb841092414d1f97f30d63422f9b820793263514505
4
+ data.tar.gz: da1a9e9be575f8b700a9bc03f89a7e2ea37965fdbcccef8d10503575b69f8bd2
5
5
  SHA512:
6
- metadata.gz: 7bf9630285fa1e18a55e0f63c65295a97a7cc4a6d307b8437018c047a0cd6b0e6f492dce48b20e09c7c519b7628e37ffe7359f1902c0764c7188d6c5123aba32
7
- data.tar.gz: c00fc461c965bdf6181b49faff03c8e2f5ba159dcd29398500bf9a1306f2edc83300d22cf172613a5ce02db319133011f1b047d857a09851aecc1a49730581d7
6
+ metadata.gz: 9ff57fc84afdec5532f9cf64b7303f29132697669480946897339adc3b05fc69de7d960ac2ab7f8e0d36667c0d9d97fc4cf3a1bb3a649e5ecce8672dd1f3e5a9
7
+ data.tar.gz: aedbf2e8e9be49963a76cab44b0c4791496ad8a6924734d61002b24ffb3c1407df27ead18900816dbb818048151894f63782adaece35beb28fe1e5fe28796d37
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- planetscale_rails (0.2.7)
4
+ planetscale_rails (0.2.9)
5
5
  colorize (~> 1.0)
6
6
  rails (>= 6.0, < 9)
7
7
 
data/actions-example.md CHANGED
@@ -79,8 +79,8 @@ jobs:
79
79
  run: |
80
80
  bundle exec rails psdb:migrate > migration-output.txt
81
81
  env:
82
- PSCALE_SERVICE_TOKEN_ID: ${{ secrets.PLANETSCALE_SERVICE_TOKEN_ID }}
83
- PSCALE_SERVICE_TOKEN: ${{ secrets.PLANETSCALE_SERVICE_TOKEN }}
82
+ PLANETSCALE_SERVICE_TOKEN_ID: ${{ secrets.PLANETSCALE_SERVICE_TOKEN_ID }}
83
+ PLANETSCALE_SERVICE_TOKEN: ${{ secrets.PLANETSCALE_SERVICE_TOKEN }}
84
84
  - name: Open DR if migrations
85
85
  run: |
86
86
  if grep -q "migrated" migration-output.txt; then
@@ -72,11 +72,20 @@ end
72
72
 
73
73
  namespace :psdb do
74
74
  task check_ci: :environment do
75
- use_service_token = ENV["PSCALE_SERVICE_TOKEN"] && ENV["PSCALE_SERVICE_TOKEN_ID"]
75
+ service_token = ENV["PSCALE_SERVICE_TOKEN"] || ENV["PLANETSCALE_SERVICE_TOKEN"]
76
+ service_token_id = ENV["PSCALE_SERVICE_TOKEN_ID"] || ENV["PLANETSCALE_SERVICE_TOKEN_ID"]
77
+ service_token_available = service_token && service_token_id
78
+
76
79
  if ENV["CI"]
77
- raise "For CI, you can only authenticate using service tokens." unless use_service_token
80
+ unless service_token_available
81
+ missing_vars = []
82
+ missing_vars << "PLANETSCALE_SERVICE_TOKEN" unless service_token
83
+ missing_vars << "PLANETSCALE_SERVICE_TOKEN_ID" unless service_token_id
84
+
85
+ raise "Unable to authenticate to PlanetScale. Missing environment variables: #{missing_vars.join(", ")}"
86
+ end
78
87
 
79
- service_token_config = "--service-token #{ENV["PSCALE_SERVICE_TOKEN"]} --service-token-id #{ENV["PSCALE_SERVICE_TOKEN_ID"]}"
88
+ service_token_config = "--service-token #{service_token} --service-token-id #{service_token_id}"
80
89
 
81
90
  ENV["SERVICE_TOKEN_CONFIG"] = service_token_config
82
91
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PlanetscaleRails
4
- VERSION = "0.2.9"
4
+ VERSION = "0.2.10"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: planetscale_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Coutermarsh
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2025-02-26 00:00:00.000000000 Z
12
+ date: 2025-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize