Sha256: a26f804e113c10286cd137e2a89baa17cbc26dd3693b53c3165c2f253e20af25

Contents?: true

Size: 557 Bytes

Versions: 17

Compression:

Stored size: 557 Bytes

Contents

# frozen_string_literal: true

module Bullion
  module RSpec
    module ChallengeClients
      # A test DNS challenge client resolver for RSpec
      class DNS < ::Bullion::ChallengeClients::DNS
        FakeDNSRecord = Struct.new("FakeDNSRecord", :strings)

        def records_for(name, _nameserver = nil)
          return [] unless name == "_acme-challenge.#{identifier}"

          [
            FakeDNSRecord.new(
              digest_value("#{challenge.token}.#{challenge.thumbprint}")
            )
          ]
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
bullion-0.7.3 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.7.2 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.7.1 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.7.0 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.6.2 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.6.1 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.6.0 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.5.1 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.5.0 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.4.3 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.4.2 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.4.1 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.4.0 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.3.3 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.3.2 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.3.1 lib/bullion/rspec/challenge_clients/dns.rb
bullion-0.3.0 lib/bullion/rspec/challenge_clients/dns.rb