Sha256: f965827a9317c28d3f439bf1a6dfbb2c5b2b565a42291cc2a1a354c30504931b

Contents?: true

Size: 1.31 KB

Versions: 38

Compression:

Stored size: 1.31 KB

Contents

module Fog
  module Rackspace
    class Monitoring
      class Real

        def get_notification(notification_id)
          request(
            :expects  => [200],
            :method   => 'GET',
            :path     => "notifications/#{notification_id}"
          )
        end

      end

      class Mock
        def get_notification(notification_id)
          response = Excon::Response.new
          response.status = 200
          response.body = {
              "created_at" => 1378783452067,
              "details" => {
                  "address" => "test@test.com"
              },
              "id" => "ntnJN3MQrA",
              "label" => "my email update test",
              "type" => "email",
              "updated_at" => 1378784136307
          }
          
          response.headers = {
            "Date"=> Time.now.utc.to_s,
            "Content-Type"=>"application/json; charset=UTF-8",
            "X-RateLimit-Limit"=>"50000",
            "X-RateLimit-Remaining"=>"49627",
            "X-RateLimit-Window"=>"24 hours",
            "X-RateLimit-Type"=>"global",
            "X-Response-Id"=>"j23jlk234jl2j34j",
            "X-LB"=>"dfw1-maas-prod-api0",
            "Vary"=>"Accept-Encoding",
            "Transfer-Encoding"=>"chunked"
          }
          response
        end
      end
    end
  end
end


Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
fog-maestrodev-1.20.0.20140305101839 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-1.20.0 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-1.19.0 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.18.0.20131209090811 lib/fog/rackspace/requests/monitoring/get_notification.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/rackspace/requests/monitoring/get_notification.rb