Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drhuffman12/upgrade to crystal 1.1.1 #1

Conversation

drhuffman12
Copy link

@drhuffman12 drhuffman12 commented Sep 6, 2021

-[x] Add dependency of crystal-lang/json_mapping.cr/ (JSON.mapping was deprecated and moved to shard.)

-[x] Add more environment variables for database connection settings with defaults.

  • For now, just for tests:
      un = ENV.keys.includes?("TEST_DB_UN") ? ENV["TEST_DB_UN"] : "admin"
      pw = ENV.keys.includes?("TEST_DB_PW") ? ENV["TEST_DB_PW"] : "password"
      ip = ENV.keys.includes?("TEST_DB_IP") ? ENV["TEST_DB_IP"] : "localhost"
      port = ENV.keys.includes?("TEST_DB_PORT") ? ENV["TEST_DB_PORT"] : "5984"
      couchdb_url = ENV.keys.includes?("TEST_DB") ? ENV["TEST_DB"] : "http://#{un}:#{pw}@#{ip}:#{port}"
    

-[x] DEPRECATION: Use ServerInfo#version instead of Vendor#version.
As of v3.x (or earlier?), a call to the server's root (e.g.: GET http://127.0.0.1:5984/)
no longer returns version inside vendor.
In v3.x, response will instead look like:

{
  "couchdb":"Welcome",
  "version":"3.1.1",
  "git_sha":"ce596c65d",
  "uuid":"SOME_UUID_GOES_HERE",
  "features":["access-ready","partitioned","pluggable-storage-engines","reshard","scheduler"],
  "vendor":{"name":"The Apache Software Foundation"}
}

-[x] Allow 3.x.x versions of CouchDB.

  • Add is_v2? and is_v3? methods to CouchDB::Response::ServerInfo.

-[x] Remove hard-coded crystal key/version from shard.yml (for now).

-[x] Bump version of this shard to 0.4.0

  • Set CouchDB::VERSION based on shard version value in from shard.yml (to avoid out-of-sync issues).

@drhuffman12
Copy link
Author

Closing; replace by #2 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant