BibOpsworks 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +14 -0
- data/.travis.yml +2 -2
- data/BibOpsworks.gemspec +12 -11
- data/Rakefile +2 -3
- data/lib/bib/opsworks/composer.rb +10 -11
- data/lib/bib/opsworks/google.rb +12 -14
- data/lib/bib/opsworks/logging.rb +3 -3
- data/lib/bib/opsworks/newrelic.rb +14 -16
- data/lib/bib/opsworks/qafoo.rb +45 -0
- data/lib/bib/opsworks/version.rb +1 -1
- data/lib/bib/opsworks.rb +7 -2
- data/tests/composer_test.rb +4 -4
- data/tests/google_test.rb +10 -14
- data/tests/newrelic_test.rb +16 -4
- data/tests/qafoo_test.rb +52 -0
- metadata +21 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce3593a1f38211fa4b846668df48654fe75c448d
|
4
|
+
data.tar.gz: c2e847d8c304006942a1013d9b6554559c9372e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 655ec8a261a781c57d5d5d60cdae9803533e9ab8f6e82a059b58adf769c0e2f423e45ba575aa1a48cb226b08cb1ff51703a0e0f99ed1c550cf1e25d332c70d5a
|
7
|
+
data.tar.gz: 3f478d6db3ad9ae1f72fad904ffcd0203a10eecd3994abfdbaf54655bea496f8c106116cde734c06e96d5fb63ef4e1cb77bc795bfcdcce8130bbb9ef2d9636da
|
data/.rubocop.yml
ADDED
data/.travis.yml
CHANGED
data/BibOpsworks.gemspec
CHANGED
@@ -4,24 +4,25 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'bib/opsworks/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'BibOpsworks'
|
8
8
|
spec.version = Bib::Opsworks::VERSION
|
9
|
-
spec.authors =
|
10
|
-
spec.email = [
|
11
|
-
spec.homepage =
|
12
|
-
spec.summary =
|
9
|
+
spec.authors = %w(fh tillk gilleyj)
|
10
|
+
spec.email = ['fh-gem@fholzhauer.de']
|
11
|
+
spec.homepage = 'https://github.com/easybiblabs/bib-opsworks'
|
12
|
+
spec.summary = 'Tools wrapper for AWS Opsworks Deploys'
|
13
13
|
|
14
14
|
spec.license = 'BSD-2-Clause'
|
15
15
|
|
16
|
-
spec.files = `git ls-files`.split(
|
16
|
+
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = [
|
19
|
+
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
spec.add_dependency 'json'
|
22
22
|
|
23
|
-
spec.add_development_dependency
|
24
|
-
spec.add_development_dependency
|
25
|
-
spec.add_development_dependency
|
26
|
-
spec.add_development_dependency
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
24
|
+
spec.add_development_dependency 'rake'
|
25
|
+
spec.add_development_dependency 'minitest', '~> 5.0.8'
|
26
|
+
spec.add_development_dependency 'coveralls'
|
27
|
+
spec.add_development_dependency 'rubocop'
|
27
28
|
end
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
require
|
1
|
+
require 'coveralls'
|
2
2
|
Coveralls.wear!
|
3
3
|
|
4
|
-
require
|
4
|
+
require 'bundler/gem_tasks'
|
5
5
|
|
6
6
|
Encoding.default_external = Encoding::UTF_8
|
7
7
|
Encoding.default_internal = Encoding::UTF_8
|
@@ -12,4 +12,3 @@ task :test do
|
|
12
12
|
require f
|
13
13
|
end
|
14
14
|
end
|
15
|
-
|
@@ -5,7 +5,6 @@ require 'bib/opsworks/logging'
|
|
5
5
|
module Bib
|
6
6
|
module Opsworks
|
7
7
|
class Composer
|
8
|
-
|
9
8
|
include Logging
|
10
9
|
|
11
10
|
def copy_vendor(release_path, deploy_user)
|
@@ -16,35 +15,35 @@ module Bib
|
|
16
15
|
deploy_group = deploy_user['group']
|
17
16
|
|
18
17
|
release_vendor = "#{release_path}/vendor"
|
19
|
-
|
20
|
-
|
21
|
-
if ::File.exists?(vendor_dir)
|
18
|
+
|
19
|
+
if ::File.exist?(vendor_dir)
|
22
20
|
fileutils_output = StringIO.new
|
23
21
|
::FileUtils.fileutils_output = fileutils_output
|
24
22
|
log.debug("Copy Vendor: Copying from #{vendor_dir} to #{release_vendor}")
|
25
|
-
::FileUtils.cp_r vendor_dir, release_vendor, :
|
23
|
+
::FileUtils.cp_r vendor_dir, release_vendor, verbose: true
|
26
24
|
log.debug(fileutils_output.string)
|
27
25
|
else
|
28
26
|
log.info("Vendor dir #{vendor_dir} does not exist")
|
29
27
|
end
|
30
|
-
|
31
|
-
if ::File.
|
28
|
+
|
29
|
+
if ::File.exist?(release_vendor)
|
32
30
|
fileutils_output = StringIO.new
|
33
31
|
::FileUtils.fileutils_output = fileutils_output
|
34
32
|
log.debug("Chown Vendor #{release_vendor} to #{deploy_username}.#{deploy_group}")
|
35
33
|
::FileUtils.fileutils_output = fileutils_output
|
36
|
-
result = ::FileUtils.chown_R deploy_username, deploy_group, release_vendor, :
|
34
|
+
result = ::FileUtils.chown_R deploy_username, deploy_group, release_vendor, verbose: true
|
37
35
|
log.debug(fileutils_output.string)
|
38
36
|
else
|
39
37
|
log.info("Release vendor dir #{release_vendor} does not exist")
|
40
38
|
end
|
39
|
+
result
|
41
40
|
end
|
42
41
|
end
|
43
42
|
end
|
44
43
|
end
|
45
44
|
|
46
45
|
module FileUtils
|
47
|
-
|
48
|
-
|
46
|
+
class << self
|
47
|
+
attr_writer :fileutils_output
|
49
48
|
end
|
50
|
-
end
|
49
|
+
end
|
data/lib/bib/opsworks/google.rb
CHANGED
@@ -3,11 +3,9 @@ require 'net/http'
|
|
3
3
|
module Bib
|
4
4
|
module Opsworks
|
5
5
|
class Google
|
6
|
-
|
7
6
|
include Logging
|
8
|
-
|
7
|
+
|
9
8
|
def publish_deployment(app_name, deploy_data, google_ident)
|
10
|
-
|
11
9
|
google_params = prepare_publishing_data(app_name, deploy_data)
|
12
10
|
|
13
11
|
label = "#{google_params['deployment[user]']}-#{google_params['deployment[revision]']}"
|
@@ -16,34 +14,34 @@ module Bib
|
|
16
14
|
url = URI.parse(google_url)
|
17
15
|
|
18
16
|
request = Net::HTTP::Get.new(url.request_uri)
|
19
|
-
log.debug(
|
20
|
-
|
17
|
+
log.debug('Google Analytics: sending data: ' + google_url)
|
18
|
+
|
21
19
|
http = Net::HTTP.new(url.host, url.port)
|
22
20
|
http.use_ssl = false
|
23
21
|
resp = http.request(request)
|
24
|
-
log.debug(
|
22
|
+
log.debug('Google Analytics Response: ' + resp.code + ' ' + resp.message)
|
25
23
|
resp.is_a? Net::HTTPSuccess
|
26
24
|
end
|
27
25
|
|
28
26
|
def prepare_publishing_data(app_name, deploy_data)
|
29
|
-
scm_revision = deploy_data[
|
27
|
+
scm_revision = deploy_data['scm']['revision']
|
30
28
|
|
31
|
-
if deploy_data[
|
32
|
-
deployment_user =
|
29
|
+
if deploy_data['deploying_user'].nil? || deploy_data['deploying_user'].empty?
|
30
|
+
deployment_user = 'opsworks'
|
33
31
|
else
|
34
|
-
deployment_user = deploy_data[
|
32
|
+
deployment_user = deploy_data['deploying_user'].split('/')[1]
|
35
33
|
end
|
36
34
|
|
37
35
|
google_params = {}
|
38
36
|
{
|
39
|
-
:
|
40
|
-
:
|
41
|
-
:
|
37
|
+
app_name: app_name,
|
38
|
+
user: deployment_user,
|
39
|
+
revision: scm_revision
|
42
40
|
}.each do |k, v|
|
43
41
|
google_params["deployment[#{k}]"] = v unless v.nil? || v == ''
|
44
42
|
end
|
45
43
|
google_params
|
46
|
-
end
|
44
|
+
end
|
47
45
|
end
|
48
46
|
end
|
49
47
|
end
|
data/lib/bib/opsworks/logging.rb
CHANGED
@@ -4,10 +4,10 @@ module Bib
|
|
4
4
|
module Opsworks
|
5
5
|
module Logging
|
6
6
|
def log
|
7
|
-
if
|
7
|
+
if defined?(Chef::Log)
|
8
8
|
Chef::Log
|
9
9
|
else
|
10
|
-
unless
|
10
|
+
unless @logger
|
11
11
|
require 'logger'
|
12
12
|
@logger = Logger.new(STDOUT)
|
13
13
|
end
|
@@ -16,4 +16,4 @@ module Bib
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
19
|
-
end
|
19
|
+
end
|
@@ -3,47 +3,45 @@ require 'net/http'
|
|
3
3
|
module Bib
|
4
4
|
module Opsworks
|
5
5
|
class Newrelic
|
6
|
-
|
7
6
|
include Logging
|
8
|
-
|
7
|
+
|
9
8
|
def publish_deployment(app_name, deploy_data, newrelic_api_key)
|
10
|
-
|
11
9
|
newrelic_params = prepare_publishing_data(app_name, deploy_data)
|
12
10
|
|
13
|
-
newrelic_url =
|
11
|
+
newrelic_url = 'https://rpm.newrelic.com/deployments.xml'
|
14
12
|
url = URI.parse(newrelic_url)
|
15
13
|
request = Net::HTTP::Post.new(url.request_uri)
|
16
14
|
request.add_field('X-Api-Key', newrelic_api_key)
|
17
15
|
request.set_form_data(newrelic_params)
|
18
|
-
|
19
|
-
log.debug(
|
20
|
-
|
16
|
+
|
17
|
+
log.debug('Newrelic sending data: ' + newrelic_params.inspect)
|
18
|
+
|
21
19
|
http = Net::HTTP.new(url.host, url.port)
|
22
20
|
http.use_ssl = true
|
23
21
|
resp = http.request(request)
|
24
|
-
log.debug(
|
22
|
+
log.debug('Newrelic Response: ' + resp.code + ' ' + resp.message)
|
25
23
|
resp.is_a? Net::HTTPSuccess
|
26
24
|
end
|
27
25
|
|
28
26
|
def prepare_publishing_data(app_name, deploy_data)
|
29
|
-
scm_revision = deploy_data[
|
27
|
+
scm_revision = deploy_data['scm']['revision']
|
30
28
|
|
31
|
-
if deploy_data[
|
32
|
-
deployment_user =
|
29
|
+
if deploy_data['deploying_user'].nil? || deploy_data['deploying_user'].empty?
|
30
|
+
deployment_user = 'opsworks'
|
33
31
|
else
|
34
|
-
deployment_user = deploy_data[
|
32
|
+
deployment_user = deploy_data['deploying_user'].split('/')[1]
|
35
33
|
end
|
36
34
|
|
37
35
|
newrelic_params = {}
|
38
36
|
{
|
39
|
-
:
|
40
|
-
:
|
41
|
-
:
|
37
|
+
app_name: app_name,
|
38
|
+
user: deployment_user,
|
39
|
+
revision: scm_revision
|
42
40
|
}.each do |k, v|
|
43
41
|
newrelic_params["deployment[#{k}]"] = v unless v.nil? || v == ''
|
44
42
|
end
|
45
43
|
newrelic_params
|
46
|
-
end
|
44
|
+
end
|
47
45
|
end
|
48
46
|
end
|
49
47
|
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
|
3
|
+
module Bib
|
4
|
+
module Opsworks
|
5
|
+
class Qafoo
|
6
|
+
include Logging
|
7
|
+
|
8
|
+
def publish_deployment(app_name, deploy_data, qafoo_api_key)
|
9
|
+
qafoo_params = prepare_publishing_data(app_name, deploy_data)
|
10
|
+
qafoo_params['apiKey'] = qafoo_api_key
|
11
|
+
|
12
|
+
qafoo_url = 'https://app.tideways.io/api/events'
|
13
|
+
url = URI.parse(qafoo_url)
|
14
|
+
request = Net::HTTP::Post.new(url.request_uri)
|
15
|
+
request.body = qafoo_params.to_json
|
16
|
+
|
17
|
+
log.debug('qafoo sending data: ' + qafoo_params.to_json)
|
18
|
+
|
19
|
+
http = Net::HTTP.new(url.host, url.port)
|
20
|
+
http.use_ssl = true
|
21
|
+
resp = http.request(request)
|
22
|
+
log.debug('qafoo Response: ' + resp.code + ' ' + resp.message)
|
23
|
+
resp.is_a? Net::HTTPSuccess
|
24
|
+
end
|
25
|
+
|
26
|
+
def prepare_publishing_data(app_name, deploy_data)
|
27
|
+
scm_revision = deploy_data['scm']['revision']
|
28
|
+
|
29
|
+
if deploy_data['deploying_user'].nil? || deploy_data['deploying_user'].empty?
|
30
|
+
deployment_user = 'opsworks'
|
31
|
+
else
|
32
|
+
deployment_user = deploy_data['deploying_user'].split('/')[1]
|
33
|
+
end
|
34
|
+
|
35
|
+
name_text = "#{scm_revision} by #{deployment_user}"
|
36
|
+
|
37
|
+
qafoo_params = {}
|
38
|
+
qafoo_params['name'] = name_text
|
39
|
+
qafoo_params['environment'] = app_name
|
40
|
+
qafoo_params['type'] = 'release'
|
41
|
+
qafoo_params
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/bib/opsworks/version.rb
CHANGED
data/lib/bib/opsworks.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
require 'bib/opsworks/composer'
|
2
2
|
require 'bib/opsworks/newrelic'
|
3
|
+
require 'bib/opsworks/qafoo'
|
3
4
|
require 'bib/opsworks/google'
|
4
5
|
require 'bib/opsworks/version'
|
5
6
|
|
6
7
|
class BibOpsworks
|
7
|
-
|
8
8
|
def initialize
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
def copy_composer(release_path, deploy_user)
|
12
12
|
composer = Bib::Opsworks::Composer.new
|
13
13
|
composer.copy_vendor(release_path, deploy_user)
|
@@ -18,6 +18,11 @@ class BibOpsworks
|
|
18
18
|
newrelic.publish_deployment(app_name, deploy_data, newrelic_api_key)
|
19
19
|
end
|
20
20
|
|
21
|
+
def qafoo_publish_deployment(app_name, deploy_data, qafoo_api_key)
|
22
|
+
qafoo = Bib::Opsworks::Qafoo.new
|
23
|
+
qafoo.publish_deployment(app_name, deploy_data, qafoo_api_key)
|
24
|
+
end
|
25
|
+
|
21
26
|
def google_publish_deployment(app_name, deploy_data, google_ident)
|
22
27
|
google = Bib::Opsworks::Google.new
|
23
28
|
google.publish_deployment(app_name, deploy_data, google_ident)
|
data/tests/composer_test.rb
CHANGED
@@ -5,9 +5,9 @@ require 'bib/opsworks/composer'
|
|
5
5
|
|
6
6
|
class ComposerTest < Minitest::Test
|
7
7
|
def setup
|
8
|
-
@fixtures_path ||= Pathname.new(File.expand_path('../tmp-fixtures/', __FILE__)).tap
|
8
|
+
@fixtures_path ||= Pathname.new(File.expand_path('../tmp-fixtures/', __FILE__)).tap do |path|
|
9
9
|
FileUtils.mkdir_p path.to_s
|
10
|
-
|
10
|
+
end
|
11
11
|
|
12
12
|
@release_path = Pathname.new(File.expand_path('releases/123/', @fixtures_path))
|
13
13
|
FileUtils.mkdir_p @release_path
|
@@ -21,10 +21,10 @@ class ComposerTest < Minitest::Test
|
|
21
21
|
def test_composer_copy
|
22
22
|
composervendor = Bib::Opsworks::Composer.new
|
23
23
|
|
24
|
-
#do not use www-data, or the test will fail on systems without that user
|
24
|
+
# do not use www-data, or the test will fail on systems without that user
|
25
25
|
deploy_user = { 'user' => Process.uid, 'group' => Process.gid }
|
26
26
|
|
27
27
|
composervendor.copy_vendor(@release_path, deploy_user)
|
28
|
-
assert_equal(true
|
28
|
+
assert_equal(true, ::File.exist?(File.expand_path('releases/123/vendor/some-lib', @fixtures_path)))
|
29
29
|
end
|
30
30
|
end
|
data/tests/google_test.rb
CHANGED
@@ -4,7 +4,6 @@ require 'minitest/autorun'
|
|
4
4
|
require 'bib/opsworks/google'
|
5
5
|
|
6
6
|
class GoogleTest < Minitest::Test
|
7
|
-
|
8
7
|
def test_publish_deployment_user
|
9
8
|
google = Bib::Opsworks::Google.new
|
10
9
|
|
@@ -12,7 +11,11 @@ class GoogleTest < Minitest::Test
|
|
12
11
|
app_name = 'unittest'
|
13
12
|
|
14
13
|
result = google.prepare_publishing_data(app_name, deploy_data)
|
15
|
-
expected = {
|
14
|
+
expected = {
|
15
|
+
'deployment[app_name]' => 'unittest',
|
16
|
+
'deployment[user]' => 'gemtest',
|
17
|
+
'deployment[revision]' => 'rev1'
|
18
|
+
}
|
16
19
|
assert_equal(expected, result)
|
17
20
|
end
|
18
21
|
|
@@ -23,18 +26,11 @@ class GoogleTest < Minitest::Test
|
|
23
26
|
app_name = 'unittest'
|
24
27
|
|
25
28
|
result = google.prepare_publishing_data(app_name, deploy_data)
|
26
|
-
expected = {
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
google = Bib::Opsworks::Google.new
|
32
|
-
|
33
|
-
deploy_data = { 'deploying_user' => 'arn:aws:iam::123456:user/gemtest', 'scm' => { 'revision' => 'rev1' } }
|
34
|
-
app_name = 'unittest'
|
35
|
-
google_ident = 'UA-1869721-12'
|
36
|
-
result = google.publish_deployment(app_name, deploy_data, google_ident)
|
37
|
-
expected = true
|
29
|
+
expected = {
|
30
|
+
'deployment[app_name]' => 'unittest',
|
31
|
+
'deployment[user]' => 'opsworks',
|
32
|
+
'deployment[revision]' => 'rev1'
|
33
|
+
}
|
38
34
|
assert_equal(expected, result)
|
39
35
|
end
|
40
36
|
end
|
data/tests/newrelic_test.rb
CHANGED
@@ -4,15 +4,23 @@ require 'minitest/autorun'
|
|
4
4
|
require 'bib/opsworks/newrelic'
|
5
5
|
|
6
6
|
class NewrelicTest < Minitest::Test
|
7
|
-
|
8
7
|
def test_publish_deployment
|
9
8
|
newrelic = Bib::Opsworks::Newrelic.new
|
10
9
|
|
11
|
-
deploy_data = {
|
10
|
+
deploy_data = {
|
11
|
+
'deploying_user' => 'arn:aws:iam::123456:user/gemtest',
|
12
|
+
'scm' => {
|
13
|
+
'revision' => 'rev1'
|
14
|
+
}
|
15
|
+
}
|
12
16
|
app_name = 'unittest'
|
13
17
|
|
14
18
|
result = newrelic.prepare_publishing_data(app_name, deploy_data)
|
15
|
-
expected = {
|
19
|
+
expected = {
|
20
|
+
'deployment[app_name]' => 'unittest',
|
21
|
+
'deployment[user]' => 'gemtest',
|
22
|
+
'deployment[revision]' => 'rev1'
|
23
|
+
}
|
16
24
|
assert_equal(expected, result)
|
17
25
|
end
|
18
26
|
|
@@ -23,7 +31,11 @@ class NewrelicTest < Minitest::Test
|
|
23
31
|
app_name = 'unittest'
|
24
32
|
|
25
33
|
result = newrelic.prepare_publishing_data(app_name, deploy_data)
|
26
|
-
expected = {
|
34
|
+
expected = {
|
35
|
+
'deployment[app_name]' => 'unittest',
|
36
|
+
'deployment[user]' => 'opsworks',
|
37
|
+
'deployment[revision]' => 'rev1'
|
38
|
+
}
|
27
39
|
assert_equal(expected, result)
|
28
40
|
end
|
29
41
|
end
|
data/tests/qafoo_test.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
gem 'minitest'
|
2
|
+
|
3
|
+
require 'minitest/autorun'
|
4
|
+
require 'bib/opsworks/qafoo'
|
5
|
+
|
6
|
+
class QafooTest < Minitest::Test
|
7
|
+
def test_publish_deployment_user
|
8
|
+
qafoo = Bib::Opsworks::Qafoo.new
|
9
|
+
|
10
|
+
deploy_data = { 'deploying_user' => 'arn:aws:iam::123456:user/gemtest', 'scm' => { 'revision' => 'rev1' } }
|
11
|
+
app_name = 'unittest'
|
12
|
+
|
13
|
+
scm_revision = deploy_data['scm']['revision']
|
14
|
+
if deploy_data['deploying_user'].nil? || deploy_data['deploying_user'].empty?
|
15
|
+
deployment_user = 'opsworks'
|
16
|
+
else
|
17
|
+
deployment_user = deploy_data['deploying_user'].split('/')[1]
|
18
|
+
end
|
19
|
+
name_text = "#{scm_revision} by #{deployment_user}"
|
20
|
+
|
21
|
+
result = qafoo.prepare_publishing_data(app_name, deploy_data)
|
22
|
+
expected = {
|
23
|
+
'name' => name_text,
|
24
|
+
'environment' => 'unittest',
|
25
|
+
'type' => 'release'
|
26
|
+
}
|
27
|
+
assert_equal(expected, result)
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_publish_deployment_nouser
|
31
|
+
qafoo = Bib::Opsworks::Qafoo.new
|
32
|
+
|
33
|
+
deploy_data = { 'scm' => { 'revision' => 'rev1' } }
|
34
|
+
app_name = 'unittest'
|
35
|
+
|
36
|
+
scm_revision = deploy_data['scm']['revision']
|
37
|
+
if deploy_data['deploying_user'].nil? || deploy_data['deploying_user'].empty?
|
38
|
+
deployment_user = 'opsworks'
|
39
|
+
else
|
40
|
+
deployment_user = deploy_data['deploying_user'].split('/')[1]
|
41
|
+
end
|
42
|
+
name_text = "#{scm_revision} by #{deployment_user}"
|
43
|
+
|
44
|
+
result = qafoo.prepare_publishing_data(app_name, deploy_data)
|
45
|
+
expected = {
|
46
|
+
'name' => name_text,
|
47
|
+
'environment' => 'unittest',
|
48
|
+
'type' => 'release'
|
49
|
+
}
|
50
|
+
assert_equal(expected, result)
|
51
|
+
end
|
52
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: BibOpsworks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fh
|
8
8
|
- tillk
|
9
|
+
- gilleyj
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2015-
|
13
|
+
date: 2015-04-09 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: json
|
@@ -81,6 +82,20 @@ dependencies:
|
|
81
82
|
- - ">="
|
82
83
|
- !ruby/object:Gem::Version
|
83
84
|
version: '0'
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: rubocop
|
87
|
+
requirement: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
type: :development
|
93
|
+
prerelease: false
|
94
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
84
99
|
description:
|
85
100
|
email:
|
86
101
|
- fh-gem@fholzhauer.de
|
@@ -89,6 +104,7 @@ extensions: []
|
|
89
104
|
extra_rdoc_files: []
|
90
105
|
files:
|
91
106
|
- ".gitignore"
|
107
|
+
- ".rubocop.yml"
|
92
108
|
- ".travis.yml"
|
93
109
|
- BibOpsworks.gemspec
|
94
110
|
- Gemfile
|
@@ -100,10 +116,12 @@ files:
|
|
100
116
|
- lib/bib/opsworks/google.rb
|
101
117
|
- lib/bib/opsworks/logging.rb
|
102
118
|
- lib/bib/opsworks/newrelic.rb
|
119
|
+
- lib/bib/opsworks/qafoo.rb
|
103
120
|
- lib/bib/opsworks/version.rb
|
104
121
|
- tests/composer_test.rb
|
105
122
|
- tests/google_test.rb
|
106
123
|
- tests/newrelic_test.rb
|
124
|
+
- tests/qafoo_test.rb
|
107
125
|
homepage: https://github.com/easybiblabs/bib-opsworks
|
108
126
|
licenses:
|
109
127
|
- BSD-2-Clause
|
@@ -124,9 +142,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
142
|
version: '0'
|
125
143
|
requirements: []
|
126
144
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.
|
145
|
+
rubygems_version: 2.4.3
|
128
146
|
signing_key:
|
129
147
|
specification_version: 4
|
130
148
|
summary: Tools wrapper for AWS Opsworks Deploys
|
131
149
|
test_files: []
|
132
|
-
has_rdoc:
|