Sha256: daf25fc426ea523f376e11d3fbbad8cbcfd24643c2f26d7c3657de5ef5295a80

Contents?: true

Size: 494 Bytes

Versions: 5

Compression:

Stored size: 494 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? and 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

5 entries across 5 versions & 1 rubygems

Version Path
avo-0.5.0.beta9 lib/avo/licensing/license_manager.rb
avo-0.5.0.beta8 lib/avo/licensing/license_manager.rb
avo-0.5.0.beta7 lib/avo/licensing/license_manager.rb
avo-0.5.0.beta6 lib/avo/licensing/license_manager.rb
avo-0.5.0.beta5 lib/avo/licensing/license_manager.rb