Sha256: c86322dd8d4d49eb306b2e0f7ed6df5a3984b6b03ef0d635cdcb44b934ba0ae4

Contents?: true

Size: 1.37 KB

Versions: 11

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_app_id: ["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
            [:errbit_app_id]
          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

11 entries across 11 versions & 1 rubygems

Version Path
houston-core-0.6.3 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.6.2 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.6.1 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.6.0 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.5.6 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.5.5 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.5.4 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.5.3 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.5.2 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.5.1 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb
houston-core-0.5.0 app/adapters/houston/adapters/error_tracker/errbit_adapter.rb