Sha256: 4d873bc74bccb44f4b6acc09190ca1d2c2fd04d05c39640dded3bd758f1d04cf

Contents?: true

Size: 1.37 KB

Versions: 6

Compression:

Stored size: 1.37 KB

Contents

module Houston
  module Adapters
    module ErrorTracker
      class ErrbitAdapter

        class << self

          def errors_with_parameters(project, app_id)
            return {"errbit.appId" => ["cannot be blank"]} if app_id.blank?

            # !todo: validate that the app exists
            # begin
            #   new_app(app_id).fetch!
            # rescue
            #   binding.pry
            # end

            {}
          end

          def build(project, app_id)
            return Houston::Adapters::ErrorTracker::NullApp if app_id.blank?
            new_app(app_id)
          end

          def parameters
            %w{errbit.appId}
          end



          def connection
            @connection ||= self::Connection.new
          end

          def open_problems(*args)
            connection.open_problems(*args)
          end

          def changed_problems(*args)
            connection.changed_problems(*args)
          end

          def all_problems(*args)
            connection.all_problems(*args)
          end

          def problems_during(*args)
            connection.problems_during(*args)
          end

          def notices_during(*args)
            connection.notices_during(*args)
          end



        private

          def new_app(project_id)
            self::App.new(connection, project_id)
          end

        end

      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
houston-core-0.8.0.pre app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.7.0 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.7.0.beta4 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.7.0.beta3 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.7.0.beta2 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.7.0.beta app/adapters/houston/adapters/error_tracker/errbit_adapter.rb