Sha256: b8226127bff8edc21a729c8f764aaadf94e7e996554174cdb05246ea2c214390

Contents?: true

Size: 681 Bytes

Versions: 58

Compression:

Stored size: 681 Bytes

Contents

module Datahen
  module Client
    class EnvVar < Datahen::Client::Base

      def find(name)
        self.class.get("/env_vars/#{name}", @options)
      end

      def all(opts={})
        params = @options.merge opts
        self.class.get("/env_vars", params)
      end

      def set(name, value, opts={})
        body = {}
        body[:value] = value
        body[:secret] = opts[:secret] if opts[:secret]
        params = @options.merge({body: body.to_json})
        self.class.put("/env_vars/#{name}", params)
      end

      def unset(name, opts={})
        params = @options.merge(opts)
        self.class.delete("/env_vars/#{name}", params)
      end
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
datahen-1.6.3 lib/datahen/client/env_var.rb
datahen-1.6.2 lib/datahen/client/env_var.rb
datahen-1.6.1 lib/datahen/client/env_var.rb
datahen-1.6.0 lib/datahen/client/env_var.rb
datahen-1.5.3 lib/datahen/client/env_var.rb
datahen-1.5.2 lib/datahen/client/env_var.rb
datahen-1.5.1 lib/datahen/client/env_var.rb
datahen-1.4.0 lib/datahen/client/env_var.rb
datahen-1.3.2 lib/datahen/client/env_var.rb
datahen-1.3.1 lib/datahen/client/env_var.rb
datahen-1.3.0 lib/datahen/client/env_var.rb
datahen-1.2.3 lib/datahen/client/env_var.rb
datahen-1.2.2 lib/datahen/client/env_var.rb
datahen-1.2.1 lib/datahen/client/env_var.rb
datahen-1.1.2 lib/datahen/client/env_var.rb
datahen-1.1.1 lib/datahen/client/env_var.rb
datahen-1.0.3 lib/datahen/client/env_var.rb
datahen-1.0.2 lib/datahen/client/env_var.rb
datahen-1.0.1 lib/datahen/client/env_var.rb
datahen-1.0.0 lib/datahen/client/env_var.rb