ci-psw 1.0.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +23 -0
- data/README.md +57 -0
- data/Rakefile +1 -0
- data/ci/pipeline-config.json +89 -0
- data/ci-psw.gemspec +32 -0
- data/lib/ci/psw/task_loader.rb +32 -0
- data/lib/ci/psw/tasks/psw-cookbooks.rake +102 -0
- data/lib/ci/psw/version.rb +5 -0
- data/lib/ci/psw.rb +7 -0
- data/spec/psw-repo_spec.rb +113 -0
- data/spec/spec_helper.rb +20 -0
- metadata +132 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 353073b4715911d5f0610c0911496d2f482559c7
|
4
|
+
data.tar.gz: 6cdb7433656d255e5676fa8936b5028cf1366a37
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 525dc21c305d0b9b722d999a4e1f2b78ac7f580112eb5204f8ae31197c0e543a3cbdaab57800c89c89cc849289a2cce6a7061f00d3dac99e3852769bbe9a8d4c
|
7
|
+
data.tar.gz: 5c46741abaebb3640058e56fe3f8cc2c23cbe3630926e87ecc186df2b40b091537cdff33bfe7ff30581b2a80f3dfb95fd0dbcfb1304e6c067588676f98e05263
|
data/.gitignore
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.0.0-p247
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Copyright (c) 2013 Lexmark International Technology S.A. All rights reserved.
|
2
|
+
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
4
|
+
modification, are permitted provided that the following conditions are met:
|
5
|
+
* Redistributions of source code must retain the above copyright
|
6
|
+
notice, this list of conditions and the following disclaimer.
|
7
|
+
* Redistributions in binary form must reproduce the above copyright
|
8
|
+
notice, this list of conditions and the following disclaimer in the
|
9
|
+
documentation and/or other materials provided with the distribution.
|
10
|
+
* Neither the name of Lexmark International Technology S.A. nor the
|
11
|
+
names of its contributors may be used to endorse or promote products
|
12
|
+
derived from this software without specific prior written permission.
|
13
|
+
|
14
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
15
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
16
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
17
|
+
DISCLAIMED. IN NO EVENT SHALL Lexmark International Technology S.A. BE LIABLE FOR ANY
|
18
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
19
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
20
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
21
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
22
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
23
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# Ci::Psw
|
2
|
+
|
3
|
+
This gem contains Rake tasks that can be utilized with a Continuous Integration system (i.e. Jenkins).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'rake', '> 2.0.0'
|
10
|
+
gem 'ci_reporter', :git => 'git://github.com/nicksieger/ci_reporter.git'
|
11
|
+
gem 'nokogiri'
|
12
|
+
gem 'ci-psw'
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install ci-psw
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
``` shell
|
25
|
+
$ bundle exec rake -T
|
26
|
+
```
|
27
|
+
|
28
|
+
``` ruby
|
29
|
+
# Rakefile
|
30
|
+
|
31
|
+
# Gem include(s):
|
32
|
+
require 'ci/psw'
|
33
|
+
|
34
|
+
# or require just what you need
|
35
|
+
require 'ci/psw/task_loader'
|
36
|
+
```
|
37
|
+
## Tasks
|
38
|
+
|
39
|
+
### ci:psw_rspec
|
40
|
+
The psw_rspec task is designed to run rspec tests and convert their output to a format in which the JUnit
|
41
|
+
Jenkins plugin can understand (XML).
|
42
|
+
|
43
|
+
``` shell
|
44
|
+
$ bundle exec rake ci:psw_rspec --trace
|
45
|
+
```
|
46
|
+
|
47
|
+
### ci:psw_update_cookbook_version
|
48
|
+
The psw_update_cookbook_version task is designed to update the patch version number of a Chef cookbook,
|
49
|
+
based on a CI build number (which is passed in).
|
50
|
+
|
51
|
+
``` shell
|
52
|
+
$ bundle exec rake ci:psw_update_cookbook_version[${BUILD_NUMBER}] --trace
|
53
|
+
```
|
54
|
+
|
55
|
+
## License
|
56
|
+
|
57
|
+
2013 Lexmark International Technology S.A. All rights reserved.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,89 @@
|
|
1
|
+
{
|
2
|
+
"project_name" : "ci-psw",
|
3
|
+
"stages" : {
|
4
|
+
"compile" : {
|
5
|
+
"matrix_based_security_rules" : {
|
6
|
+
"nrussell" : {
|
7
|
+
"job" : [ "delete", "configure", "read", "discover", "build", "workspace", "cancel" ],
|
8
|
+
"run" : [ "delete", "update" ],
|
9
|
+
"scm" : [ "tag" ]
|
10
|
+
},
|
11
|
+
"jday" : "all",
|
12
|
+
"msawka" : "all",
|
13
|
+
"jmarple" : {
|
14
|
+
"job" : [ "configure", "read", "discover", "build", "workspace", "cancel" ]
|
15
|
+
},
|
16
|
+
"orpheus" : "all"
|
17
|
+
},
|
18
|
+
"next_stage" : "unit_test"
|
19
|
+
},
|
20
|
+
"unit_test" : {
|
21
|
+
"matrix_based_security_rules" : {
|
22
|
+
"nrussell" : {
|
23
|
+
"job" : [ "delete", "configure", "read", "discover", "build", "workspace", "cancel" ],
|
24
|
+
"run" : [ "delete", "update" ],
|
25
|
+
"scm" : [ "tag" ]
|
26
|
+
},
|
27
|
+
"jday" : "all",
|
28
|
+
"msawka" : "all",
|
29
|
+
"jmarple" : {
|
30
|
+
"job" : [ "configure", "read", "discover", "build", "workspace", "cancel" ]
|
31
|
+
},
|
32
|
+
"orpheus" : "all"
|
33
|
+
},
|
34
|
+
"next_stage" : "integration_test"
|
35
|
+
},
|
36
|
+
"integration_test" : {
|
37
|
+
"matrix_based_security_rules" : {
|
38
|
+
"nrussell" : {
|
39
|
+
"job" : [ "delete", "configure", "read", "discover", "build", "workspace", "cancel" ],
|
40
|
+
"run" : [ "delete", "update" ],
|
41
|
+
"scm" : [ "tag" ]
|
42
|
+
},
|
43
|
+
"jday" : "all",
|
44
|
+
"msawka" : "all",
|
45
|
+
"jmarple" : {
|
46
|
+
"job" : [ "configure", "read", "discover", "build", "workspace", "cancel" ]
|
47
|
+
},
|
48
|
+
"orpheus" : "all"
|
49
|
+
},
|
50
|
+
"next_stage" : "branch"
|
51
|
+
},
|
52
|
+
"branch" : {
|
53
|
+
"matrix_based_security_rules" : {
|
54
|
+
"nrussell" : {
|
55
|
+
"job" : [ "delete", "configure", "read", "discover", "build", "workspace", "cancel" ],
|
56
|
+
"run" : [ "delete", "update" ],
|
57
|
+
"scm" : [ "tag" ]
|
58
|
+
},
|
59
|
+
"jday" : "all",
|
60
|
+
"msawka" : "all",
|
61
|
+
"jmarple" : {
|
62
|
+
"job" : [ "configure", "read", "discover", "build", "workspace", "cancel" ]
|
63
|
+
},
|
64
|
+
"orpheus" : "all"
|
65
|
+
}
|
66
|
+
},
|
67
|
+
"deploy_to_rubygems" : {
|
68
|
+
"matrix_based_security_rules" : {
|
69
|
+
"nrussell" : {
|
70
|
+
"job" : [ "delete", "configure", "read", "discover", "build", "workspace", "cancel" ],
|
71
|
+
"run" : [ "delete", "update" ],
|
72
|
+
"scm" : [ "tag" ]
|
73
|
+
},
|
74
|
+
"jday" : "all",
|
75
|
+
"msawka" : "all",
|
76
|
+
"jmarple" : {
|
77
|
+
"job" : [ "configure", "read", "discover", "build", "workspace", "cancel" ]
|
78
|
+
},
|
79
|
+
"orpheus" : "all"
|
80
|
+
}
|
81
|
+
},
|
82
|
+
"default_values" : {
|
83
|
+
"scm_git_tool" : "CCDP04",
|
84
|
+
"scm_config_name" : "orpheus",
|
85
|
+
"scm_config_email" : "orpheus@perceptivesoftware.com"
|
86
|
+
}
|
87
|
+
},
|
88
|
+
"email_notification_recipient_list" : "trantordevonly@perceptivesoftware.com"
|
89
|
+
}
|
data/ci-psw.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'ci/psw/version'
|
5
|
+
require 'rake'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = "ci-psw"
|
9
|
+
spec.version = Ci::Psw::VERSION
|
10
|
+
spec.authors = ["Lexmark International Technology S.A"]
|
11
|
+
spec.email = ["matt.sawka@perceptivesoftware.com"]
|
12
|
+
spec.description = %q{This gem contains Rake tasks that can be utilized with a Continuous Integration system}
|
13
|
+
spec.summary = %q{Contains CI Rake tasks}
|
14
|
+
spec.homepage = "http://www.perceptivesoftware.com/"
|
15
|
+
spec.license = "3-Clause BSD"
|
16
|
+
|
17
|
+
|
18
|
+
spec.files = FileList['lib/ci/psw/psw.rb',
|
19
|
+
'lib/ci/psw/version.rb',
|
20
|
+
'lib/ci/psw/tasks/psw-cookbooks.rake'].to_a
|
21
|
+
spec.files = `git ls-files`.split($/)
|
22
|
+
|
23
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
24
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
25
|
+
spec.require_paths = ["lib", "lib/ci/psw/tasks/"]
|
26
|
+
|
27
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
28
|
+
spec.add_dependency "rspec", "> 2.0.0"
|
29
|
+
spec.add_dependency "nokogiri"
|
30
|
+
spec.add_dependency "ci_reporter"#, :git => 'git://github.com/nicksieger/ci_reporter.git'
|
31
|
+
spec.add_dependency "rake"
|
32
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# == task_loader.rb
|
2
|
+
#
|
3
|
+
# This module provides a generic Rake task loader (*.rake files). Tasks that are
|
4
|
+
# found in a directory ending with 'psw/tasks/' will be loaded and
|
5
|
+
# made available to Rake.
|
6
|
+
#
|
7
|
+
# == Contact
|
8
|
+
#
|
9
|
+
# Author:: Lexmark International Technology S.A.
|
10
|
+
# Copyright:: 2013 Lexmark International Technology S.A. All rights reserved.
|
11
|
+
# License:: 3-Clause BSD
|
12
|
+
|
13
|
+
require 'rake'
|
14
|
+
|
15
|
+
module Capistrano
|
16
|
+
module Psw
|
17
|
+
module TaskLoader
|
18
|
+
puts "Loading custom Rake tasks..."
|
19
|
+
|
20
|
+
$LOAD_PATH.each do |dir|
|
21
|
+
if (dir.end_with?("psw/tasks/"))
|
22
|
+
Dir.foreach(dir) do |task|
|
23
|
+
if (task.end_with?(".rake"))
|
24
|
+
puts "Loading task #{task}..."
|
25
|
+
load task
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# == psw-cookbooks.rake
|
2
|
+
#
|
3
|
+
# Contains the rake tasks needed to run cookbooks through the PSW CI build pipeline
|
4
|
+
#
|
5
|
+
# == Tasks
|
6
|
+
#
|
7
|
+
# === ci:pre_ci
|
8
|
+
# This task preps the directory for running rspec tests and verifying the output
|
9
|
+
#
|
10
|
+
# === ci:review_test_results
|
11
|
+
# This task will review the rspec test results and convert them into XML that the
|
12
|
+
# Jenkins JUnit plugin understands (i.e. successes, failures, etc...)
|
13
|
+
#
|
14
|
+
# === ci:psw_rspec
|
15
|
+
# Executes the following tasks: local_clone_repo, upload_repo. The psw_rspec task is
|
16
|
+
# designed to run rspec tests and convert their output to a format in which the JUnit
|
17
|
+
# Jenkins plugin can understand (XML).
|
18
|
+
#
|
19
|
+
# == Contact
|
20
|
+
#
|
21
|
+
# Author:: Lexmark International Technology S.A.
|
22
|
+
# Copyright:: 2013 Lexmark International Technology S.A. All rights reserved.
|
23
|
+
# License:: 3-Clause BSD
|
24
|
+
|
25
|
+
require 'rake'
|
26
|
+
require 'rspec/core/rake_task'
|
27
|
+
require 'ci/reporter/rake/rspec' # use this if you're using RSpec
|
28
|
+
require 'nokogiri'
|
29
|
+
|
30
|
+
namespace :ci do
|
31
|
+
|
32
|
+
def rspec_report_path
|
33
|
+
"./spec/reports"
|
34
|
+
end
|
35
|
+
|
36
|
+
@suite = RSpec::Core::RakeTask.new("setup:rspec") do |t|
|
37
|
+
t.pattern = './spec/*_spec.rb'
|
38
|
+
t.fail_on_error=false
|
39
|
+
end
|
40
|
+
|
41
|
+
desc "Run before executing CI tests"
|
42
|
+
task :pre_ci do
|
43
|
+
Rake::Task['ci:setup:spec_report_cleanup'].invoke
|
44
|
+
|
45
|
+
puts "Executing pre_ci..."
|
46
|
+
ci_reports_file = ENV['CI_REPORTS'] = rspec_report_path
|
47
|
+
puts "ci reports are here:" + ci_reports_file
|
48
|
+
|
49
|
+
Dir.mkdir("spec/reports") unless File.directory? rspec_report_path
|
50
|
+
|
51
|
+
puts "Executing rspec tests..."
|
52
|
+
end
|
53
|
+
|
54
|
+
desc "Reviews test result XML for failures and will fail the rake task(s) if found"
|
55
|
+
task :review_test_results => [ 'ci:setup:rspec' ] do
|
56
|
+
# This will run after all those tasks have run
|
57
|
+
puts "Reviewing test results..."
|
58
|
+
if (!Dir.exists?(rspec_report_path))
|
59
|
+
fail "Unable to find the test results in #{rspec_report_path}!"
|
60
|
+
end
|
61
|
+
|
62
|
+
Dir.foreach("#{rspec_report_path}") do |filename|
|
63
|
+
filepath="#{rspec_report_path}/#{filename}"
|
64
|
+
if (filename.to_s.end_with? ".xml")
|
65
|
+
puts "Reviewing #{filepath}..."
|
66
|
+
|
67
|
+
begin
|
68
|
+
doc = Nokogiri.XML(File.open(filepath))
|
69
|
+
|
70
|
+
root_node = doc.root
|
71
|
+
failure_cnt = root_node.attribute('failures')
|
72
|
+
if (failure_cnt == nil || failure_cnt.to_s.empty? || failure_cnt.to_s.to_i != 0)
|
73
|
+
fail "There are test failures in #{filename}! Please review the test logs..."
|
74
|
+
end
|
75
|
+
rescue Nokogiri::XML::SyntaxError => e
|
76
|
+
fail "Caught an XML syntax exception: #{e}"
|
77
|
+
end
|
78
|
+
else
|
79
|
+
puts "#{filename} is not an XML file..."
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
desc "Execute The PSW CI build's rspec process..."
|
85
|
+
task :psw_rspec => [:pre_ci, "ci:setup:rspec", :review_test_results]
|
86
|
+
|
87
|
+
desc "Update the build version of a cookbook"
|
88
|
+
task :psw_update_cookbook_version, :build_number do |t, args|
|
89
|
+
puts "Updating Cookbook metadata with build number #{args[:build_number]}..."
|
90
|
+
text = File.read("metadata.rb")
|
91
|
+
|
92
|
+
version_array = text.scan(/version\s*'(\d+).(\d+).(\d+)'/)
|
93
|
+
original_version = version_array[0].join('.')
|
94
|
+
version_array[0][2]=args[:build_number]
|
95
|
+
new_version = version_array[0].join('.')
|
96
|
+
|
97
|
+
puts "Updating version from #{original_version} to #{new_version}..."
|
98
|
+
contents = text.sub(original_version, new_version)
|
99
|
+
File.open("metadata.rb", "w+") { |f| f.write(contents) }
|
100
|
+
puts "Update complete!"
|
101
|
+
end
|
102
|
+
end
|
data/lib/ci/psw.rb
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
require "rake"
|
2
|
+
require File.expand_path('../spec_helper.rb', __FILE__)
|
3
|
+
|
4
|
+
|
5
|
+
describe "ci:" do
|
6
|
+
describe "pre_ci" do
|
7
|
+
let(:rake) { Rake::Application.new }
|
8
|
+
subject { rake["ci:pre_ci"] }
|
9
|
+
|
10
|
+
before(:each) do
|
11
|
+
Rake.application = rake
|
12
|
+
Rake.application.add_import("./lib/ci/psw/tasks/psw-cookbooks.rake")
|
13
|
+
Rake.application.load_imports()
|
14
|
+
|
15
|
+
Dir.stub(:mkdir)
|
16
|
+
end
|
17
|
+
|
18
|
+
it "has 'no prerequisites" do
|
19
|
+
subject.prerequisites.should be_empty
|
20
|
+
|
21
|
+
Dir.should_receive(:mkdir).with("spec/reports")
|
22
|
+
subject.invoke
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe "review_test_results" do
|
27
|
+
let(:rake) { Rake::Application.new }
|
28
|
+
subject { rake["ci:review_test_results"] }
|
29
|
+
|
30
|
+
before do
|
31
|
+
Rake.application = rake
|
32
|
+
Rake.application.add_import("./lib/ci/psw/tasks/psw-cookbooks.rake")
|
33
|
+
Rake.application.load_imports()
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
it "has 'setup' as a prerequisite" do
|
38
|
+
subject.prerequisites.should include('ci:setup:rspec')
|
39
|
+
#subject.invoke
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
describe "psw_update_cookbook_version" do
|
44
|
+
let(:rake) { Rake::Application.new }
|
45
|
+
subject { rake["ci:psw_update_cookbook_version"] }
|
46
|
+
|
47
|
+
before do
|
48
|
+
Rake.application = rake
|
49
|
+
Rake.application.add_import("./lib/ci/psw/tasks/psw-cookbooks.rake")
|
50
|
+
Rake.application.load_imports()
|
51
|
+
|
52
|
+
metadata =<<eos
|
53
|
+
name 'perceptive_role_peppr'
|
54
|
+
maintainer 'Trantor'
|
55
|
+
maintainer_email 'rad.trantor@perceptivesoftware.com'
|
56
|
+
license 'All rights reserved'
|
57
|
+
description 'Installs/Configures perceptive_role_peppr'
|
58
|
+
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
59
|
+
version '0.1.0'
|
60
|
+
|
61
|
+
depends 'sudo', '2.2.0'
|
62
|
+
depends 'build-essential', '1.4.0'
|
63
|
+
depends 'git', '2.6.0'
|
64
|
+
depends 'python', '1.3.6'
|
65
|
+
depends 'perceptive_python', '0.1.0'
|
66
|
+
depends 'nodejs', '1.3.0'
|
67
|
+
depends 'rbenv', '1.6.5'
|
68
|
+
depends 'nginx', '1.8.0'
|
69
|
+
depends 'perceptive_apache2', '0.1.0'
|
70
|
+
depends 'sqlite', '1.0.0'
|
71
|
+
depends 'redisio', '1.7.0'
|
72
|
+
depends 'postgresql', '3.0.4'
|
73
|
+
depends 'database', '1.4.0'
|
74
|
+
|
75
|
+
eos
|
76
|
+
File.stub(:read).with("metadata.rb"){ metadata }
|
77
|
+
end
|
78
|
+
|
79
|
+
it "has 'no prerequisites" do
|
80
|
+
subject.prerequisites.should be_empty
|
81
|
+
|
82
|
+
updatedMetadata =<<eos
|
83
|
+
name 'perceptive_role_peppr'
|
84
|
+
maintainer 'Trantor'
|
85
|
+
maintainer_email 'rad.trantor@perceptivesoftware.com'
|
86
|
+
license 'All rights reserved'
|
87
|
+
description 'Installs/Configures perceptive_role_peppr'
|
88
|
+
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
89
|
+
version '0.1.42'
|
90
|
+
|
91
|
+
depends 'sudo', '2.2.0'
|
92
|
+
depends 'build-essential', '1.4.0'
|
93
|
+
depends 'git', '2.6.0'
|
94
|
+
depends 'python', '1.3.6'
|
95
|
+
depends 'perceptive_python', '0.1.0'
|
96
|
+
depends 'nodejs', '1.3.0'
|
97
|
+
depends 'rbenv', '1.6.5'
|
98
|
+
depends 'nginx', '1.8.0'
|
99
|
+
depends 'perceptive_apache2', '0.1.0'
|
100
|
+
depends 'sqlite', '1.0.0'
|
101
|
+
depends 'redisio', '1.7.0'
|
102
|
+
depends 'postgresql', '3.0.4'
|
103
|
+
depends 'database', '1.4.0'
|
104
|
+
|
105
|
+
eos
|
106
|
+
file = mock('file')
|
107
|
+
File.should_receive(:open).with("metadata.rb", "w+").and_yield(file)
|
108
|
+
file.should_receive(:write).with(updatedMetadata)
|
109
|
+
|
110
|
+
subject.invoke(42)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
class Object
|
2
|
+
def fetch(key, default=nil)
|
3
|
+
@env_vars = Hash.new unless @env_vars != nil
|
4
|
+
@env_vars[key]
|
5
|
+
end
|
6
|
+
|
7
|
+
def set(key, value)
|
8
|
+
@env_vars = Hash.new unless @env_vars != nil
|
9
|
+
@env_vars[key] = value
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
#module SharedTestMethods
|
14
|
+
# def get_auth_header
|
15
|
+
|
16
|
+
# expiration = Time.now.to_i + 1000
|
17
|
+
# peppr_token = PepprAuthToken.build_token_from_oauth_provider("access_token=1/fFBGRNJru1FQd44AzqT3Zg&email=matt.sawka@perceptivesoftware.com&expiration=#{expiration}")
|
18
|
+
# "OAuth #{peppr_token.get_token_string}"
|
19
|
+
# end
|
20
|
+
#end
|
metadata
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ci-psw
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.pre1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Lexmark International Technology S.A
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-10-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>'
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.0.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>'
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.0.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: nokogiri
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: ci_reporter
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: This gem contains Rake tasks that can be utilized with a Continuous Integration
|
84
|
+
system
|
85
|
+
email:
|
86
|
+
- matt.sawka@perceptivesoftware.com
|
87
|
+
executables: []
|
88
|
+
extensions: []
|
89
|
+
extra_rdoc_files: []
|
90
|
+
files:
|
91
|
+
- .gitignore
|
92
|
+
- .ruby-version
|
93
|
+
- Gemfile
|
94
|
+
- LICENSE.txt
|
95
|
+
- README.md
|
96
|
+
- Rakefile
|
97
|
+
- ci-psw.gemspec
|
98
|
+
- ci/pipeline-config.json
|
99
|
+
- lib/ci/psw.rb
|
100
|
+
- lib/ci/psw/task_loader.rb
|
101
|
+
- lib/ci/psw/tasks/psw-cookbooks.rake
|
102
|
+
- lib/ci/psw/version.rb
|
103
|
+
- spec/psw-repo_spec.rb
|
104
|
+
- spec/spec_helper.rb
|
105
|
+
homepage: http://www.perceptivesoftware.com/
|
106
|
+
licenses:
|
107
|
+
- 3-Clause BSD
|
108
|
+
metadata: {}
|
109
|
+
post_install_message:
|
110
|
+
rdoc_options: []
|
111
|
+
require_paths:
|
112
|
+
- lib
|
113
|
+
- lib/ci/psw/tasks/
|
114
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - '>='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - '>'
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: 1.3.1
|
124
|
+
requirements: []
|
125
|
+
rubyforge_project:
|
126
|
+
rubygems_version: 2.0.3
|
127
|
+
signing_key:
|
128
|
+
specification_version: 4
|
129
|
+
summary: Contains CI Rake tasks
|
130
|
+
test_files:
|
131
|
+
- spec/psw-repo_spec.rb
|
132
|
+
- spec/spec_helper.rb
|