BibOpsworks 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: 3842cfa5128aca6d0c8d4fcc7f1a76483e14b71c
4
- data.tar.gz: 6b588ae21b647cc8e5d606796cdcaea2eca10972
3
+ metadata.gz: 265e8d38d3a905d61c6383dddf5c60777cb6f251
4
+ data.tar.gz: 976027a7d01b175292cab859f3eaeee6a906e282
5
5
  SHA512:
6
- metadata.gz: 095284f9424a97dabfc9db9f0cd0e0b5ef2c9c4873b5c8ed58bbfa868f0bd69c03997cef87e69f8aca8db14646a0b81138b42a63d199ecc8bea13aa43350da20
7
- data.tar.gz: 117cbcbc2acee961ef471ecd65fe9adfc4523a4d78ed6b4233965b5e2892db00e0f58ecc70477b5a8a911dee5949052bddd1119d7b9114fa0cc1a150a3986b82
6
+ metadata.gz: f4fdc2b24a93d645c0dd35bdeeede21b7a4a3e5392ff01408d6f408120570d627e16c418963f2c49e592fb0358dcdfdcedb2c6c0f11f827d9bf366386e91ee7f
7
+ data.tar.gz: d49e6abdfef4eb2fa28a584ed7d24955f4e07d11656dfae6cf854d8a2d5375c335d8c44b796f53d7d35ce9fb6f2a621b7d4e081dd6daf5d91b8fb7f8779555a6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- BibOpsworks (0.0.8)
4
+ BibOpsworks (0.0.9)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,10 +1,18 @@
1
1
  require 'fileutils'
2
+ require 'logger'
2
3
 
3
4
  module Bib
4
5
  module Opsworks
5
6
  class Composer
6
7
 
7
8
  def copy_vendor(release_path, deploy_user)
9
+
10
+ log_file = File.new('/tmp/test-copy-vendor.log', 'a')
11
+ log = Logger.new(log_file, 'weekly')
12
+ $stderr = log_file
13
+ $stdout = log_file
14
+
15
+
8
16
  app_current = ::File.expand_path("#{release_path}/../../current")
9
17
  vendor_dir = "#{app_current}/vendor"
10
18
 
@@ -19,19 +27,6 @@ module Bib
19
27
  log.debug("Chown Vendor #{release_vendor} to #{deploy_username}.#{deploy_group}")
20
28
  result = ::FileUtils.chown_R deploy_username, deploy_group, release_vendor, :verbose => true if ::File.exists?(release_vendor)
21
29
  end
22
-
23
- def log
24
- if(defined?(Chef))
25
- Chef::Log
26
- else
27
- unless(@logger)
28
- require 'logger'
29
- @logger = Logger.new($stdout)
30
- end
31
- @logger
32
- end
33
- end
34
-
35
30
  end
36
31
  end
37
32
  end
@@ -1,10 +1,16 @@
1
1
  require 'net/http'
2
+ require 'logger'
2
3
 
3
4
  module Bib
4
5
  module Opsworks
5
6
  class Newrelic
6
7
 
7
8
  def publish_deployment(app_name, deploy_data, newrelic_api_key)
9
+ log_file = File.new('/tmp/test-publish-deployment.log', 'a')
10
+ log = Logger.new(log_file, 'weekly')
11
+ $stderr = log_file
12
+ $stdout = log_file
13
+
8
14
  newrelic_params = prepare_publishing_data(app_name, deploy_data)
9
15
 
10
16
  newrelic_url = "https://rpm.newrelic.com/deployments.xml"
@@ -12,11 +18,13 @@ module Bib
12
18
  request = Net::HTTP::Post.new(url.request_uri)
13
19
  request.add_field('X-Api-Key', newrelic_api_key)
14
20
  request.set_form_data(newrelic_params)
15
-
21
+
22
+ log.debug("Newrelic Data: " + newrelic_params.inspect)
23
+
16
24
  http = Net::HTTP.new(url.host, url.port)
17
25
  http.use_ssl = true
18
26
  resp = http.request(request)
19
-
27
+ log.debug("Newrelic Response: " + resp.inspect )
20
28
  resp.is_a? Net::HTTPSuccess
21
29
  end
22
30
 
@@ -38,7 +46,7 @@ module Bib
38
46
  newrelic_params["deployment[#{k}]"] = v unless v.nil? || v == ''
39
47
  end
40
48
  newrelic_params
41
- end
49
+ end
42
50
  end
43
51
  end
44
52
  end
@@ -1,5 +1,5 @@
1
1
  module Bib
2
2
  module Opsworks
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: BibOpsworks
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
  - fh