Sha256: 3d67e96da1b227a3c6c45c8777c8e266f3e71dc0b0bd19249f94ed2966effc6a

Contents?: true

Size: 495 Bytes

Versions: 43

Compression:

Stored size: 495 Bytes

Contents

module Avo
  module Licensing
    class LicenseManager
      def initialize(hq_response)
        @hq_response = hq_response
      end

      def license
        return NullLicense.new if Rails.env.test? && (ENV["RUN_WITH_NULL_LICENSE"] == "1")

        case @hq_response["id"]
        when "community"
          CommunityLicense.new @hq_response
        when "pro"
          ProLicense.new @hq_response
        else
          NullLicense.new @hq_response
        end
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
avo-1.2.9 lib/avo/licensing/license_manager.rb
avo-1.2.8 lib/avo/licensing/license_manager.rb
avo-1.2.7 lib/avo/licensing/license_manager.rb
avo-1.2.6 lib/avo/licensing/license_manager.rb
avo-1.2.6.pre.1 lib/avo/licensing/license_manager.rb
avo-1.2.5 lib/avo/licensing/license_manager.rb
avo-1.2.4 lib/avo/licensing/license_manager.rb
avo-1.2.3 lib/avo/licensing/license_manager.rb
avo-1.3.0.pre.1 lib/avo/licensing/license_manager.rb
avo-1.2.2 lib/avo/licensing/license_manager.rb
avo-1.1.0 lib/avo/licensing/license_manager.rb
avo-1.1.0.pre.1 lib/avo/licensing/license_manager.rb
avo-1.0.5 lib/avo/licensing/license_manager.rb
avo-1.0.4 lib/avo/licensing/license_manager.rb
avo-1.0.2 lib/avo/licensing/license_manager.rb
avo-1.0.1 lib/avo/licensing/license_manager.rb
avo-1.0.0 lib/avo/licensing/license_manager.rb
avo-0.5.0.beta15 lib/avo/licensing/license_manager.rb
avo-0.5.0.beta14 lib/avo/licensing/license_manager.rb
avo-0.5.0.beta13 lib/avo/licensing/license_manager.rb