newrelic_plugins_hive 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9412df14095d17ce8ef8065078492f9a7c678a05
4
- data.tar.gz: cab39085f767e25c05c5f7144efd4f83913e85d5
3
+ metadata.gz: 4c55f9dec6d89f1b0fce66210319f964b359b40a
4
+ data.tar.gz: a455ca4005482944454c831e96f521b5a59b946a
5
5
  SHA512:
6
- metadata.gz: 07538bbec308287e464606f7ab13deadc5cc2bd56d6cbdffacb146f29d3e9147e992910ffdb5004129d348b402965362ed6c1ae108c9f239057a0f4fdc8ef190
7
- data.tar.gz: 033919c135f86f0fbdec5e25dcd0f89796ee18889bdd47af70c096f2d69c5bf3a349ba90ad3f16c8301f6c7b9a9973d2fe36b3d9c5f11d9d2d27e6a79b22311e
6
+ metadata.gz: ba7eaf1c1d07c7b7449bf40a09537e42c13741c83dc5e219c04aaadad081f916e239e359f126455280216c4f0d570752d94acaed5e04193c1b4877551209dfbc
7
+ data.tar.gz: 0c695ea6c60111803ffb2368ea75cd0069b4f90b43659dd66736e321192e32cd2f6eb0eb6a096e1b29020ad9665c500004cf90a01a2090fed6ccadaf6df193ad
data/bin/hive CHANGED
@@ -1,7 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- require 'rubygems'
3
- require 'bundler/setup'
4
-
5
2
  require 'daemons'
6
3
  require 'slop'
7
4
 
@@ -10,7 +10,7 @@ module NewRelicPluginsHive
10
10
  def install_plugin(name, options)
11
11
  puts "Installing plugin #{name}..."
12
12
 
13
- validate_plugin_source
13
+ validate_plugin_source(options)
14
14
  download_and_extract(name, options)
15
15
  end
16
16
 
@@ -20,7 +20,7 @@ module NewRelicPluginsHive
20
20
  raise "Wget must be installed on your machine. For more help: http://www.gnu.org/software/wget/" unless `wget -V` =~ /^GNU Wget/
21
21
  end
22
22
 
23
- def validate_plugin_source
23
+ def validate_plugin_source(options)
24
24
  raise "\tMust specify github source for plugin #{name}" unless options[:github] =~ /^https:\/\/github.com/
25
25
  end
26
26
 
@@ -32,7 +32,7 @@ module NewRelicPluginsHive
32
32
 
33
33
  raise "\tAgent path must exists and be unique in plugin" unless full_agent_path.size == 1
34
34
 
35
- `unzip -p temp/#{name}.zip "#{full_agent_path.first}" > plugins/#{options[:agent_path]}`
35
+ `unzip -p temp/#{name}.zip "#{full_agent_path.first}" > plugins/#{name}.rb`
36
36
  end
37
37
  end
38
38
 
@@ -1,3 +1,3 @@
1
1
  module NewRelicPluginsHive
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -21,11 +21,11 @@ module NewRelicPluginsHive
21
21
  end
22
22
 
23
23
  def run
24
- Dir['plugins/*'].each { |file| require file }
24
+ Dir['plugins/*'].each { |file| require "#{Dir.pwd}/#{file}" }
25
25
 
26
26
  require "newrelic_plugin"
27
27
 
28
- NewRelic::Plugin::Config.config_file = File.dirname(__FILE__) + "/config/newrelic_plugin.yml"
28
+ NewRelic::Plugin::Config.config_file = Dir.pwd + "/config/newrelic_plugin.yml"
29
29
  NewRelic::Plugin::Run.orig_setup_and_run
30
30
  end
31
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_plugins_hive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elad Maimon