Sha256: d4bda03873117b22425823586569b3b7b110e1650d8a4d05d3833910b29fd995

Contents?: true

Size: 1.94 KB

Versions: 3

Compression:

Stored size: 1.94 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

describe KPM::PluginsDirectory do
  it 'should parse the plugins directory' do
    directory = KPM::PluginsDirectory.all(false)
    directory.size.should > 0
  end

  it 'should lookup plugins' do
    group_id, artifact_id, packaging, classifier, version, type = KPM::PluginsDirectory.lookup('analytics', false, '0.20.11')
    group_id.should eq 'org.kill-bill.billing.plugin.java'
    artifact_id.should eq 'analytics-plugin'
    packaging.should eq 'jar'
    classifier.should be_nil
    version.should eq '6.0.1'
    type.should eq :java

    group_id, artifact_id, packaging, classifier, version, type = KPM::PluginsDirectory.lookup('analytics', false, '0.20.11-SNAPSHOT')
    group_id.should eq 'org.kill-bill.billing.plugin.java'
    artifact_id.should eq 'analytics-plugin'
    packaging.should eq 'jar'
    classifier.should be_nil
    version.should eq '6.0.1'
    type.should eq :java

    group_id, artifact_id, packaging, classifier, version, type = KPM::PluginsDirectory.lookup('analytics', false, '0.20')
    group_id.should eq 'org.kill-bill.billing.plugin.java'
    artifact_id.should eq 'analytics-plugin'
    packaging.should eq 'jar'
    classifier.should be_nil
    version.should eq '6.0.1'
    type.should eq :java

    group_id, artifact_id, packaging, classifier, version, type = KPM::PluginsDirectory.lookup('analytics', false, 'LATEST')
    group_id.should eq 'org.kill-bill.billing.plugin.java'
    artifact_id.should eq 'analytics-plugin'
    packaging.should eq 'jar'
    classifier.should be_nil
    version.should eq 'LATEST'
    type.should eq :java

    group_id, artifact_id, packaging, classifier, version, type = KPM::PluginsDirectory.lookup('analytics', false, '0.42')
    group_id.should eq 'org.kill-bill.billing.plugin.java'
    artifact_id.should eq 'analytics-plugin'
    packaging.should eq 'jar'
    classifier.should be_nil
    version.should eq 'LATEST'
    type.should eq :java
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kpm-0.8.2 spec/kpm/unit/plugins_directory_spec.rb
kpm-0.8.1 spec/kpm/unit/plugins_directory_spec.rb
kpm-0.8.0 spec/kpm/unit/plugins_directory_spec.rb