kpm 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c2ef2e9949503e0e3a521c60b1a8ee567677dceb
4
- data.tar.gz: 62dccfbc0b243504d7c41f254302b3bb655f57aa
3
+ metadata.gz: 0217943b6184aee07239fa618195b86a1b48c4b7
4
+ data.tar.gz: 00bbb9ccdb2cc60ccd6a7e2a4996b1d2bf756abc
5
5
  SHA512:
6
- metadata.gz: e478dbf85449739ff90b0eff025556c23dcacb9dddc66a7df4a2bcbf1b2b9a03f0240c507c2c861ed0f8879b7d13278e7ba219bae46538664e62236bb3d58dc6
7
- data.tar.gz: 222605891555eb6dcea0b3c7d6f7ed9f7a3775ccf472a075a2468f451bcd4b16ccc3d4812239a0c37f977f313c3582c716b74de171330d1143290e70e6083dd9
6
+ metadata.gz: 9b3352cda886cf9d8a1344025afa0447ebea58cb816439969250729883429335c72e0015591e5c186ec0f2742430bac3cb9e348738e76a713a11a86e72e51977
7
+ data.tar.gz: 488037941b893049c70e6f3d27a28ff638129dcdbed86e17ebe14c57624973caf36d8055417c3acd1dd737c6dca74fbc76e98adb00703ec75643c7462210d236
data/lib/kpm.rb CHANGED
@@ -7,6 +7,7 @@ module KPM
7
7
  autoload :Installer, 'kpm/installer'
8
8
  autoload :Tasks, 'kpm/tasks'
9
9
  autoload :Cli, 'kpm/cli'
10
+ autoload :PluginsDirectory, 'kpm/plugins_directory'
10
11
 
11
12
  class << self
12
13
  def root
@@ -0,0 +1,34 @@
1
+ require 'net/http'
2
+ require 'yaml'
3
+
4
+ module KPM
5
+ class PluginsDirectory
6
+ def self.all(latest=false)
7
+ if latest
8
+ # Look at GitHub (source of truth)
9
+ uri = URI('https://raw.githubusercontent.com/killbill/killbill-cloud/master/kpm/lib/kpm/plugins_directory.yml')
10
+ source = Net::HTTP.get(uri)
11
+ YAML.load(source)
12
+ else
13
+ source = File.join(File.expand_path(File.dirname(__FILE__)), 'plugins_directory.yml')
14
+ YAML.load_file(source)
15
+ end
16
+ end
17
+
18
+ def self.lookup(plugin_name, latest=false)
19
+ plugin = all(latest)[plugin_name.to_s.downcase.to_sym]
20
+ return nil if plugin.nil?
21
+
22
+ type = plugin[:type]
23
+ is_ruby = type == :ruby
24
+
25
+ group_id = plugin[:group_id] || (is_ruby ? KPM::BaseArtifact::KILLBILL_RUBY_PLUGIN_GROUP_ID : KPM::BaseArtifact::KILLBILL_JAVA_PLUGIN_GROUP_ID)
26
+ artifact_id = plugin[:artifact_id] || "#{plugin.to_s}-plugin"
27
+ packaging = plugin[:packaging] || (is_ruby ? KPM::BaseArtifact::KILLBILL_RUBY_PLUGIN_PACKAGING : KPM::BaseArtifact::KILLBILL_JAVA_PLUGIN_PACKAGING)
28
+ classifier = plugin[:classifier] || (is_ruby ? KPM::BaseArtifact::KILLBILL_RUBY_PLUGIN_CLASSIFIER : KPM::BaseArtifact::KILLBILL_JAVA_PLUGIN_CLASSIFIER)
29
+ version = plugin[:stable_version] || 'LATEST'
30
+
31
+ [group_id, artifact_id, packaging, classifier, version, type]
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,34 @@
1
+ ---
2
+ :bitpay:
3
+ :type: :ruby
4
+ :artifact_id: bitpay-plugin
5
+ :stable_version: 0.0.1
6
+ :coinbase:
7
+ :type: :ruby
8
+ :artifact_id: coinbase-plugin
9
+ :stable_version: 0.0.1
10
+ :cybersource:
11
+ :type: :ruby
12
+ :artifact_id: cybersource-plugin
13
+ :stable_version: 0.0.4
14
+ :require:
15
+ - :login
16
+ - :password
17
+ :litle:
18
+ :type: :ruby
19
+ :artifact_id: litle-plugin
20
+ :stable_version: 1.10.0
21
+ :paypal:
22
+ :type: :ruby
23
+ :artifact_id: paypal-express-plugin
24
+ :stable_version: 1.7.1
25
+ :require:
26
+ - :signature
27
+ - :login
28
+ - :password
29
+ :stripe:
30
+ :type: :ruby
31
+ :artifact_id: stripe-plugin
32
+ :stable_version: 0.2.0
33
+ :require:
34
+ - :api_secret_key
@@ -1,3 +1,3 @@
1
1
  module KPM
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-17 00:00:00.000000000 Z
11
+ date: 2014-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
@@ -101,6 +101,8 @@ files:
101
101
  - lib/kpm/kaui_artifact.rb
102
102
  - lib/kpm/killbill_plugin_artifact.rb
103
103
  - lib/kpm/killbill_server_artifact.rb
104
+ - lib/kpm/plugins_directory.rb
105
+ - lib/kpm/plugins_directory.yml
104
106
  - lib/kpm/tasks.rb
105
107
  - lib/kpm/utils.rb
106
108
  - lib/kpm/version.rb