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.52.1 lib/pact_broker/config/repository.rb
pact_broker-2.52.0 lib/pact_broker/config/repository.rb
pact_broker-2.51.0 lib/pact_broker/config/repository.rb
pact_broker-2.50.1 lib/pact_broker/config/repository.rb
pact_broker-2.50.0 lib/pact_broker/config/repository.rb
pact_broker-2.49.0 lib/pact_broker/config/repository.rb
pact_broker-2.48.0 lib/pact_broker/config/repository.rb
pact_broker-2.47.1 lib/pact_broker/config/repository.rb
pact_broker-2.47.0 lib/pact_broker/config/repository.rb
pact_broker-2.46.0 lib/pact_broker/config/repository.rb
pact_broker-2.45.0 lib/pact_broker/config/repository.rb
pact_broker-2.44.0 lib/pact_broker/config/repository.rb
pact_broker-2.43.0 lib/pact_broker/config/repository.rb
pact_broker-2.42.0 lib/pact_broker/config/repository.rb
pact_broker-2.41.0 lib/pact_broker/config/repository.rb
pact_broker-2.40.0 lib/pact_broker/config/repository.rb
pact_broker-2.39.0 lib/pact_broker/config/repository.rb
pact_broker-2.38.1 lib/pact_broker/config/repository.rb
pact_broker-2.38.0 lib/pact_broker/config/repository.rb
pact_broker-2.37.0 lib/pact_broker/config/repository.rb