Sha256: c2d633eabc6a444434a1f16fe20f5da6ec8938a488123096484cc13df9452ee2

Contents?: true

Size: 430 Bytes

Versions: 67

Compression:

Stored size: 430 Bytes

Contents

require 'pact_broker/config/setting'

module PactBroker
  module Config
    class Repository
      def create_or_update_setting(setting_name, setting_value)
        setting = Setting.find(name: setting_name.to_s) || Setting.new(name: setting_name.to_s)
        setting.set_value_from(setting_value).save
      end

      def class_supported?(setting_value)
        !!Setting.get_db_type(setting_value)
      end
    end
  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
pact_broker-2.79.1 lib/pact_broker/config/repository.rb
pact_broker-2.79.0 lib/pact_broker/config/repository.rb
pact_broker-2.78.1 lib/pact_broker/config/repository.rb
pact_broker-2.78.0 lib/pact_broker/config/repository.rb
pact_broker-2.77.0 lib/pact_broker/config/repository.rb
pact_broker-2.76.2 lib/pact_broker/config/repository.rb
pact_broker-2.76.1 lib/pact_broker/config/repository.rb
pact_broker-2.76.0 lib/pact_broker/config/repository.rb
pact_broker-2.75.0 lib/pact_broker/config/repository.rb
pact_broker-2.74.1 lib/pact_broker/config/repository.rb
pact_broker-2.74.0 lib/pact_broker/config/repository.rb
pact_broker-2.73.0 lib/pact_broker/config/repository.rb
pact_broker-2.72.0 lib/pact_broker/config/repository.rb
pact_broker-2.71.0 lib/pact_broker/config/repository.rb
pact_broker-2.70.0 lib/pact_broker/config/repository.rb
pact_broker-2.69.0 lib/pact_broker/config/repository.rb
pact_broker-2.68.1 lib/pact_broker/config/repository.rb
pact_broker-2.68.0 lib/pact_broker/config/repository.rb
pact_broker-2.67.0 lib/pact_broker/config/repository.rb
pact_broker-2.66.0 lib/pact_broker/config/repository.rb