googleapis / googleapis/google-api-ruby-client

google-apis-core: ClientSecrets#to_json raises NameError

Aperta
#27,757 0 commenti 0 reazioni 1 assegnatario Rivendicata da @quartzmo Vedi su GitHub
Lingua principale
Ruby
Stelle
2.9k
Fork
888
Merge medio
6m
PR unite (30g)
218

Descrizione

`Google::APIClient::ClientSecrets#to_json` calls `Json.dump`, but no `Json` constant exists, so the documented serialization method raises `NameError`.

Minimal reproduction on google-apis-core 1.2.5/current:
```ruby
require "google/api_client/client_secrets"
Google::APIClient::ClientSecrets.new("installed" => {"client_id" => "id"}).to_json
# NameError: uninitialized constant Google::APIClient::ClientSecrets::Json
```

A focused correction uses `JSON.generate(to_hash, *args)`, which also preserves the `JSON.generate(secrets)` callback signature. The candidate passes the focused model, 88 targeted examples, and the cumulative 509-example core suite on Ruby 4.0.6.

I found no open issue/PR overlap. I have a minimal patch ready and can submit it after maintainer acceptance per CONTRIBUTING. The source audit and candidate preparation used AI assistance; I reviewed and verified the result.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.