ci_in_a_can 0.2.2 → 0.2.3
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 +7 -0
- data/README.md +3 -2
- data/assets/CI_in_a_Can01.jpg +0 -0
- data/assets/CI_in_a_Can01.png +0 -0
- data/assets/CI_in_a_Can02.jpg +0 -0
- data/assets/CI_in_a_Can02.png +0 -0
- data/assets/smalllogo.png +0 -0
- data/bin/ciinacan +3 -93
- data/lib/ci_in_a_can/cli/files.rb +90 -0
- data/lib/ci_in_a_can/cli/structure_builder.rb +59 -0
- data/lib/ci_in_a_can/cli.rb +21 -0
- data/lib/ci_in_a_can/file_system.rb +15 -0
- data/lib/ci_in_a_can/github.rb +4 -1
- data/lib/ci_in_a_can/test_result.rb +6 -0
- data/lib/ci_in_a_can/version.rb +1 -1
- data/spec/ci_in_a_can/cli/structure_builder_spec.rb +82 -0
- data/spec/ci_in_a_can/cli_spec.rb +38 -0
- data/spec/ci_in_a_can/github_spec.rb +13 -2
- data/spec/ci_in_a_can/test_result_spec.rb +64 -0
- metadata +46 -69
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 97eff7ac024e13813c95198c74372212b0e2fe62
|
4
|
+
data.tar.gz: 43d0618c07dcf7263aa9b291bc241ea00db7f1e2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8b24c32692852775affaabe29f7223379745b069413805a3651b6043420f2bb63d0a2db16e9c8613ca321f6573f8e1a0da601d937840c2362879c13238da3105
|
7
|
+
data.tar.gz: 81d03078ca9b1d4eeca3cfcf8d6d46401522c1ae665b7c7c4ffdf9c38819c294cbc82fc9471a4e445b642542eecf1198d0b5c89154216780be0f16f8a694fc4d
|
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+

|
2
|
+
|
1
3
|
# CI In a Can
|
2
4
|
|
3
5
|
Super-easy continuous integration. With one command, you can turn a cloud server (AWS, Digital Ocean) into a CI server for Ruby apps. Others (like node, .Net) coming soon.
|
@@ -25,8 +27,7 @@ Run:
|
|
25
27
|
````
|
26
28
|
ciinacan create YOUR_NAME
|
27
29
|
cd YOUR_NAME
|
28
|
-
rake start
|
29
|
-
disown
|
30
|
+
rake start
|
30
31
|
````
|
31
32
|
|
32
33
|
This will create a directory named YOUR_NAME, start up a Sinatra app on port 80, and start a backend service for running builds. **You now have a running CI server.**
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/bin/ciinacan
CHANGED
@@ -1,96 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
#!/usr/bin/env rake
|
3
|
+
#require 'ci_in_a_can'
|
4
|
+
require_relative '../lib/ci_in_a_can'
|
6
5
|
|
7
|
-
|
8
|
-
task :start do
|
9
|
-
location = File.expand_path(File.dirname(__FILE__))
|
10
|
-
system "ruby service/service.rb start"
|
11
|
-
system "ruby web/stay_alive.rb start"
|
12
|
-
end
|
13
|
-
|
14
|
-
desc "Stop #{id}"
|
15
|
-
task :stop do
|
16
|
-
location = File.expand_path(File.dirname(__FILE__))
|
17
|
-
system "ruby service/service.rb stop"
|
18
|
-
end
|
19
|
-
EOF
|
20
|
-
end
|
21
|
-
|
22
|
-
def web_daemon id
|
23
|
-
<<EOF
|
24
|
-
require 'daemons'
|
25
|
-
|
26
|
-
this_directory = File.expand_path(File.dirname(__FILE__))
|
27
|
-
|
28
|
-
::Daemons.run_proc('#{id}_ci_web') do
|
29
|
-
loop do
|
30
|
-
exec "cd \#{this_directory};rackup -p 80"
|
31
|
-
end
|
32
|
-
end
|
33
|
-
EOF
|
34
|
-
end
|
35
|
-
|
36
|
-
def web_file
|
37
|
-
<<EOF
|
38
|
-
require 'ci_in_a_can'
|
39
|
-
|
40
|
-
this_directory = File.expand_path(File.dirname(__FILE__) + '/../')
|
41
|
-
|
42
|
-
eval("CiInACan::App.jobs_location = '\#{this_directory}' + '/jobs'")
|
43
|
-
eval("CiInACan.results_location = '\#{this_directory}' + '/results'")
|
44
|
-
|
45
|
-
use CiInACan::App
|
46
|
-
run Sinatra::Application
|
47
|
-
EOF
|
48
|
-
end
|
49
|
-
|
50
|
-
def service_file id
|
51
|
-
<<EOF
|
52
|
-
require 'ci_in_a_can'
|
53
|
-
require 'daemons'
|
54
|
-
|
55
|
-
this_directory = File.expand_path(File.dirname(__FILE__) + '/../')
|
56
|
-
|
57
|
-
eval("CiInACan.results_location = '\#{this_directory}' + '/results'")
|
58
|
-
|
59
|
-
::Daemons.run_proc('#{id}_ci_server') do
|
60
|
-
loop do
|
61
|
-
options = {
|
62
|
-
access_token: ENV['GITHUB_AUTH_TOKEN'],
|
63
|
-
working_location: this_directory + "/repos",
|
64
|
-
watching_location: this_directory + "/jobs",
|
65
|
-
site_url: ENV['SITE_URL']
|
66
|
-
}
|
67
|
-
CiInACan::Daemon.start options
|
68
|
-
sleep
|
69
|
-
end
|
70
|
-
end
|
71
|
-
EOF
|
72
|
-
end
|
73
|
-
|
74
|
-
|
75
|
-
puts ARGV[0]
|
76
|
-
puts ARGV[1]
|
77
|
-
|
78
|
-
puts Dir.pwd
|
79
|
-
|
80
|
-
case ARGV[0].to_s.downcase
|
81
|
-
when 'create'
|
82
|
-
|
83
|
-
root = "#{Dir.pwd}/#{ARGV[1]}"
|
84
|
-
|
85
|
-
id = root.split('/').pop
|
86
|
-
|
87
|
-
directories_to_create = [root, "#{root}/jobs", "#{root}/repos", "#{root}/web", "#{root}/service", "#{root}/results"]
|
88
|
-
|
89
|
-
directories_to_create.each { |d| Dir.mkdir(d) unless File.exists?(d) }
|
90
|
-
|
91
|
-
File.open("#{root}/Rakefile", 'w') { |f| f.write rake_file(id) }
|
92
|
-
File.open("#{root}/service/service.rb", 'w') { |f| f.write service_file(id) }
|
93
|
-
File.open("#{root}/web/stay_alive.rb", 'w') { |f| f.write web_daemon(id) }
|
94
|
-
File.open("#{root}/web/config.ru", 'w') { |f| f.write web_file }
|
95
|
-
|
96
|
-
end
|
6
|
+
CiInACan::Cli.run ARGV
|
@@ -0,0 +1,90 @@
|
|
1
|
+
module CiInACan
|
2
|
+
|
3
|
+
module Cli
|
4
|
+
|
5
|
+
class Files
|
6
|
+
|
7
|
+
params_constructor
|
8
|
+
|
9
|
+
attr_accessor :id, :root
|
10
|
+
|
11
|
+
def self.for id, root
|
12
|
+
new(id: id, root: root)
|
13
|
+
end
|
14
|
+
|
15
|
+
def rake_file
|
16
|
+
<<EOF
|
17
|
+
#!/usr/bin/env rake
|
18
|
+
|
19
|
+
desc "Start #{@id}"
|
20
|
+
task :start do
|
21
|
+
location = File.expand_path(File.dirname(__FILE__))
|
22
|
+
system "ruby service/service.rb start"
|
23
|
+
system "ruby web/stay_alive.rb start"
|
24
|
+
end
|
25
|
+
|
26
|
+
desc "Stop #{@id}"
|
27
|
+
task :stop do
|
28
|
+
location = File.expand_path(File.dirname(__FILE__))
|
29
|
+
system "ruby service/service.rb stop"
|
30
|
+
end
|
31
|
+
EOF
|
32
|
+
end
|
33
|
+
|
34
|
+
def web_daemon
|
35
|
+
<<EOF
|
36
|
+
require 'daemons'
|
37
|
+
|
38
|
+
this_directory = File.expand_path(File.dirname(__FILE__))
|
39
|
+
|
40
|
+
::Daemons.run_proc('#{@id}_ci_web') do
|
41
|
+
loop do
|
42
|
+
exec "cd \#{this_directory};rackup -p 80"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
EOF
|
46
|
+
end
|
47
|
+
|
48
|
+
def web_file
|
49
|
+
<<EOF
|
50
|
+
require 'ci_in_a_can'
|
51
|
+
|
52
|
+
this_directory = File.expand_path(File.dirname(__FILE__) + '/../')
|
53
|
+
|
54
|
+
eval("CiInACan::App.jobs_location = '\#{this_directory}' + '/jobs'")
|
55
|
+
eval("CiInACan.results_location = '\#{this_directory}' + '/results'")
|
56
|
+
|
57
|
+
use CiInACan::App
|
58
|
+
run Sinatra::Application
|
59
|
+
EOF
|
60
|
+
end
|
61
|
+
|
62
|
+
def service_file
|
63
|
+
<<EOF
|
64
|
+
require 'ci_in_a_can'
|
65
|
+
require 'daemons'
|
66
|
+
|
67
|
+
this_directory = File.expand_path(File.dirname(__FILE__) + '/../')
|
68
|
+
|
69
|
+
eval("CiInACan.results_location = '\#{this_directory}' + '/results'")
|
70
|
+
|
71
|
+
::Daemons.run_proc('#{@id}_ci_server') do
|
72
|
+
loop do
|
73
|
+
options = {
|
74
|
+
access_token: ENV['GITHUB_AUTH_TOKEN'],
|
75
|
+
working_location: this_directory + "/repos",
|
76
|
+
watching_location: this_directory + "/jobs",
|
77
|
+
site_url: ENV['SITE_URL']
|
78
|
+
}
|
79
|
+
CiInACan::Daemon.start options
|
80
|
+
sleep
|
81
|
+
end
|
82
|
+
end
|
83
|
+
EOF
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
module CiInACan
|
2
|
+
|
3
|
+
module Cli
|
4
|
+
|
5
|
+
class StructureBuilder
|
6
|
+
|
7
|
+
params_constructor
|
8
|
+
|
9
|
+
attr_accessor :root, :id
|
10
|
+
|
11
|
+
def create
|
12
|
+
create_the_directories
|
13
|
+
create_the_files
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def create_the_directories
|
19
|
+
create_directories directories_to_create
|
20
|
+
end
|
21
|
+
|
22
|
+
def create_the_files
|
23
|
+
files_to_create.each { |file, content| create_file file, content }
|
24
|
+
end
|
25
|
+
|
26
|
+
def directories_to_create
|
27
|
+
["#{@root}",
|
28
|
+
"#{@root}/jobs",
|
29
|
+
"#{@root}/repos",
|
30
|
+
"#{@root}/web",
|
31
|
+
"#{@root}/service",
|
32
|
+
"#{@root}/results"]
|
33
|
+
end
|
34
|
+
|
35
|
+
def files_to_create
|
36
|
+
files = ::CiInACan::Cli::Files.for @id, @root
|
37
|
+
{
|
38
|
+
"#{@root}/Rakefile" => files.rake_file,
|
39
|
+
"#{@root}/service/service.rb" => files.service_file,
|
40
|
+
"#{@root}/web/stay_alive.rb" => files.web_daemon,
|
41
|
+
"#{@root}/web/config.ru" => files.web_file
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
def create_directories directories
|
46
|
+
directories.each { |d| create_directory d }
|
47
|
+
end
|
48
|
+
|
49
|
+
def create_directory directory
|
50
|
+
CiInACan::FileSystem.create_directory directory
|
51
|
+
end
|
52
|
+
|
53
|
+
def create_file file, content
|
54
|
+
CiInACan::FileSystem.create_file file, content
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module CiInACan
|
2
|
+
|
3
|
+
module Cli
|
4
|
+
|
5
|
+
def self.run args
|
6
|
+
|
7
|
+
case args[0].to_s.downcase
|
8
|
+
when 'create'
|
9
|
+
root = "#{Dir.pwd}/#{args[1]}"
|
10
|
+
id = root.split('/').pop
|
11
|
+
|
12
|
+
CiInACan::Cli::StructureBuilder.new(root: root, id: id).create
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
Dir[File.dirname(__FILE__) + '/cli/*.rb'].each { |file| require file }
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module CiInACan
|
2
|
+
|
3
|
+
module FileSystem
|
4
|
+
|
5
|
+
def self.create_file file, content
|
6
|
+
File.open(file, 'w') { |f| f.write content }
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.create_directory directory
|
10
|
+
Dir.mkdir(directory) unless File.exists?(directory)
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
data/lib/ci_in_a_can/github.rb
CHANGED
@@ -22,7 +22,10 @@ module CiInACan
|
|
22
22
|
return nil unless client
|
23
23
|
client.create_status(build.repo, build.sha,
|
24
24
|
complete_status_from(test_result),
|
25
|
-
{
|
25
|
+
{
|
26
|
+
target_url: target_url_for(test_result),
|
27
|
+
description: test_result.output_summary
|
28
|
+
} )
|
26
29
|
end
|
27
30
|
|
28
31
|
private
|
data/lib/ci_in_a_can/version.rb
CHANGED
@@ -0,0 +1,82 @@
|
|
1
|
+
require_relative '../../spec_helper'
|
2
|
+
|
3
|
+
describe CiInACan::Cli::StructureBuilder do
|
4
|
+
|
5
|
+
it "should have a root id and an id" do
|
6
|
+
id = Object.new
|
7
|
+
root = Object.new
|
8
|
+
builder = CiInACan::Cli::StructureBuilder.new(id: id, root: root)
|
9
|
+
builder.id.must_be_same_as id
|
10
|
+
builder.root.must_be_same_as root
|
11
|
+
end
|
12
|
+
|
13
|
+
[:id, :root].to_objects {[
|
14
|
+
[nil, 'b'],
|
15
|
+
[nil, 'c']
|
16
|
+
]}.each do |data|
|
17
|
+
|
18
|
+
describe "create" do
|
19
|
+
|
20
|
+
let(:builder) do
|
21
|
+
b = CiInACan::Cli::StructureBuilder.new(id: data.id, root: data.root)
|
22
|
+
b.stubs(:create_directories)
|
23
|
+
b
|
24
|
+
end
|
25
|
+
|
26
|
+
let(:files) do
|
27
|
+
f = Object.new
|
28
|
+
f.stubs(:rake_file).returns Object.new
|
29
|
+
f.stubs(:service_file).returns Object.new
|
30
|
+
f.stubs(:web_daemon).returns Object.new
|
31
|
+
f.stubs(:web_file).returns Object.new
|
32
|
+
f
|
33
|
+
end
|
34
|
+
|
35
|
+
before do
|
36
|
+
::CiInACan::FileSystem.stubs(:create_file)
|
37
|
+
::CiInACan::Cli::Files.stubs(:for).with(data.id, data.root).returns files
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should create the proper directories" do
|
41
|
+
builder.expects(:create_directories).with ["#{data.root}", "#{data.root}/jobs", "#{data.root}/repos", "#{data.root}/web", "#{data.root}/service", "#{data.root}/results"]
|
42
|
+
builder.create
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should create the rake file" do
|
46
|
+
CiInACan::FileSystem.expects(:create_file).with "#{data.root}/Rakefile", files.rake_file
|
47
|
+
builder.create
|
48
|
+
end
|
49
|
+
|
50
|
+
it "should create the service file" do
|
51
|
+
CiInACan::FileSystem.expects(:create_file).with "#{data.root}/service/service.rb", files.service_file
|
52
|
+
builder.create
|
53
|
+
end
|
54
|
+
|
55
|
+
it "should create the web daemon file" do
|
56
|
+
CiInACan::FileSystem.expects(:create_file).with "#{data.root}/web/stay_alive.rb", files.web_daemon
|
57
|
+
builder.create
|
58
|
+
end
|
59
|
+
|
60
|
+
it "should create the web file" do
|
61
|
+
CiInACan::FileSystem.expects(:create_file).with "#{data.root}/web/config.ru", files.web_file
|
62
|
+
builder.create
|
63
|
+
end
|
64
|
+
|
65
|
+
it "should not create any files until the directories are created" do
|
66
|
+
directories_created = false
|
67
|
+
builder.stubs(:create_directories).with do |directories|
|
68
|
+
directories_created = true
|
69
|
+
true
|
70
|
+
end
|
71
|
+
CiInACan::FileSystem.stubs(:create_file).with do |file|
|
72
|
+
directories_created.must_equal true
|
73
|
+
true
|
74
|
+
end
|
75
|
+
builder.create
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
describe CiInACan::Cli do
|
4
|
+
|
5
|
+
describe "run" do
|
6
|
+
|
7
|
+
[:args, :pwd].to_objects {[
|
8
|
+
[['create', 'ok'], 'directory_a'],
|
9
|
+
[['create', 'ko'], 'directory_b']
|
10
|
+
]}.each do |test|
|
11
|
+
|
12
|
+
describe "create" do
|
13
|
+
|
14
|
+
before do
|
15
|
+
Dir.stubs(:pwd).returns test.pwd
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should use the structure builder to create the app" do
|
19
|
+
|
20
|
+
structure_builder = Object.new
|
21
|
+
structure_builder.expects(:create)
|
22
|
+
|
23
|
+
CiInACan::Cli::StructureBuilder.stubs(:new)
|
24
|
+
.with(root: "#{test.pwd}/#{test.args[1]}",
|
25
|
+
id: test.args[1])
|
26
|
+
.returns structure_builder
|
27
|
+
|
28
|
+
CiInACan::Cli.run test.args
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
@@ -83,6 +83,7 @@ describe CiInACan::Github do
|
|
83
83
|
test_result = Object.new
|
84
84
|
test_result.stubs(:id).returns UUID.new.generate
|
85
85
|
test_result.stubs(:passed).returns true
|
86
|
+
test_result.stubs(:output_summary).returns Object.new
|
86
87
|
test_result
|
87
88
|
end
|
88
89
|
|
@@ -90,7 +91,11 @@ describe CiInACan::Github do
|
|
90
91
|
client = Object.new
|
91
92
|
CiInACan::Github.stubs(:client).returns client
|
92
93
|
|
93
|
-
|
94
|
+
options = {
|
95
|
+
target_url: expected_url,
|
96
|
+
description: test_result.output_summary
|
97
|
+
}
|
98
|
+
client.expects(:create_status).with(build.repo, build.sha, 'success', options)
|
94
99
|
|
95
100
|
CiInACan::Github.report_complete_status_for build, test_result
|
96
101
|
end
|
@@ -103,6 +108,7 @@ describe CiInACan::Github do
|
|
103
108
|
test_result = Object.new
|
104
109
|
test_result.stubs(:passed).returns false
|
105
110
|
test_result.stubs(:id).returns UUID.new.generate
|
111
|
+
test_result.stubs(:output_summary).returns Object.new
|
106
112
|
test_result
|
107
113
|
end
|
108
114
|
|
@@ -110,7 +116,12 @@ describe CiInACan::Github do
|
|
110
116
|
client = Object.new
|
111
117
|
CiInACan::Github.stubs(:client).returns client
|
112
118
|
|
113
|
-
|
119
|
+
options = {
|
120
|
+
target_url: expected_url,
|
121
|
+
description: test_result.output_summary
|
122
|
+
}
|
123
|
+
client.expects(:create_status)
|
124
|
+
.with(build.repo, build.sha, 'failure', options)
|
114
125
|
|
115
126
|
CiInACan::Github.report_complete_status_for build, test_result
|
116
127
|
end
|
@@ -113,4 +113,68 @@ describe CiInACan::TestRunner do
|
|
113
113
|
end
|
114
114
|
end
|
115
115
|
|
116
|
+
describe "output summary" do
|
117
|
+
|
118
|
+
describe "simple example" do
|
119
|
+
let(:output) do
|
120
|
+
<<EOF
|
121
|
+
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
|
122
|
+
|
123
|
+
Finished tests in 561452783.341560s, 0.0000 tests/s, 0.0000 assertions/s.
|
124
|
+
|
125
|
+
2013 tests, 6058 assertions, 0 failures, 0 errors, 0 skips
|
126
|
+
|
127
|
+
EOF
|
128
|
+
end
|
129
|
+
|
130
|
+
it "should return the last line of the output that includes some numbers" do
|
131
|
+
test_result = CiInACan::TestResult.new(output: output)
|
132
|
+
test_result.output_summary.must_equal '2013 tests, 6058 assertions, 0 failures, 0 errors, 0 skips'
|
133
|
+
end
|
134
|
+
|
135
|
+
end
|
136
|
+
|
137
|
+
describe "another simple example" do
|
138
|
+
let(:output) do
|
139
|
+
<<EOF
|
140
|
+
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
|
141
|
+
|
142
|
+
Finished tests in 561452783.341560s, 0.0000 tests/s, 0.0000 assertions/s.
|
143
|
+
|
144
|
+
xxxx tests
|
145
|
+
|
146
|
+
|
147
|
+
EOF
|
148
|
+
end
|
149
|
+
|
150
|
+
it "should return the last line of the output that includes some numbers" do
|
151
|
+
test_result = CiInACan::TestResult.new(output: output)
|
152
|
+
test_result.output_summary.must_equal 'xxxx tests'
|
153
|
+
end
|
154
|
+
|
155
|
+
end
|
156
|
+
|
157
|
+
describe "an example with whitespace" do
|
158
|
+
let(:output) do
|
159
|
+
<<EOF
|
160
|
+
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
|
161
|
+
|
162
|
+
Finished tests in 561452783.341560s, 0.0000 tests/s, 0.0000 assertions/s.
|
163
|
+
|
164
|
+
whitespace below
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
EOF
|
169
|
+
end
|
170
|
+
|
171
|
+
it "should return the last line of the output that includes some numbers" do
|
172
|
+
test_result = CiInACan::TestResult.new(output: output)
|
173
|
+
test_result.output_summary.must_equal 'whitespace below'
|
174
|
+
end
|
175
|
+
|
176
|
+
end
|
177
|
+
|
178
|
+
end
|
179
|
+
|
116
180
|
end
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ci_in_a_can
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Darren Cauthon
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-25 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,209 +27,183 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: mocha
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: subtle
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: contrast
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: timecop
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - '>='
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: rake
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - '>='
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
102
90
|
type: :runtime
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - '>='
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: sinatra
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - '>='
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0'
|
118
104
|
type: :runtime
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - '>='
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '0'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: json
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
|
-
- -
|
115
|
+
- - '>='
|
132
116
|
- !ruby/object:Gem::Version
|
133
117
|
version: '0'
|
134
118
|
type: :runtime
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
|
-
- -
|
122
|
+
- - '>='
|
140
123
|
- !ruby/object:Gem::Version
|
141
124
|
version: '0'
|
142
125
|
- !ruby/object:Gem::Dependency
|
143
126
|
name: uuid
|
144
127
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
128
|
requirements:
|
147
|
-
- -
|
129
|
+
- - '>='
|
148
130
|
- !ruby/object:Gem::Version
|
149
131
|
version: '0'
|
150
132
|
type: :runtime
|
151
133
|
prerelease: false
|
152
134
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
135
|
requirements:
|
155
|
-
- -
|
136
|
+
- - '>='
|
156
137
|
- !ruby/object:Gem::Version
|
157
138
|
version: '0'
|
158
139
|
- !ruby/object:Gem::Dependency
|
159
140
|
name: listen
|
160
141
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
142
|
requirements:
|
163
|
-
- -
|
143
|
+
- - '>='
|
164
144
|
- !ruby/object:Gem::Version
|
165
145
|
version: '0'
|
166
146
|
type: :runtime
|
167
147
|
prerelease: false
|
168
148
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
149
|
requirements:
|
171
|
-
- -
|
150
|
+
- - '>='
|
172
151
|
- !ruby/object:Gem::Version
|
173
152
|
version: '0'
|
174
153
|
- !ruby/object:Gem::Dependency
|
175
154
|
name: octokit
|
176
155
|
requirement: !ruby/object:Gem::Requirement
|
177
|
-
none: false
|
178
156
|
requirements:
|
179
|
-
- -
|
157
|
+
- - '>='
|
180
158
|
- !ruby/object:Gem::Version
|
181
159
|
version: '0'
|
182
160
|
type: :runtime
|
183
161
|
prerelease: false
|
184
162
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
163
|
requirements:
|
187
|
-
- -
|
164
|
+
- - '>='
|
188
165
|
- !ruby/object:Gem::Version
|
189
166
|
version: '0'
|
190
167
|
- !ruby/object:Gem::Dependency
|
191
168
|
name: daemons
|
192
169
|
requirement: !ruby/object:Gem::Requirement
|
193
|
-
none: false
|
194
170
|
requirements:
|
195
|
-
- -
|
171
|
+
- - '>='
|
196
172
|
- !ruby/object:Gem::Version
|
197
173
|
version: '0'
|
198
174
|
type: :runtime
|
199
175
|
prerelease: false
|
200
176
|
version_requirements: !ruby/object:Gem::Requirement
|
201
|
-
none: false
|
202
177
|
requirements:
|
203
|
-
- -
|
178
|
+
- - '>='
|
204
179
|
- !ruby/object:Gem::Version
|
205
180
|
version: '0'
|
206
181
|
- !ruby/object:Gem::Dependency
|
207
182
|
name: subtle
|
208
183
|
requirement: !ruby/object:Gem::Requirement
|
209
|
-
none: false
|
210
184
|
requirements:
|
211
|
-
- -
|
185
|
+
- - '>='
|
212
186
|
- !ruby/object:Gem::Version
|
213
187
|
version: '0'
|
214
188
|
type: :runtime
|
215
189
|
prerelease: false
|
216
190
|
version_requirements: !ruby/object:Gem::Requirement
|
217
|
-
none: false
|
218
191
|
requirements:
|
219
|
-
- -
|
192
|
+
- - '>='
|
220
193
|
- !ruby/object:Gem::Version
|
221
194
|
version: '0'
|
222
195
|
- !ruby/object:Gem::Dependency
|
223
196
|
name: systemu
|
224
197
|
requirement: !ruby/object:Gem::Requirement
|
225
|
-
none: false
|
226
198
|
requirements:
|
227
|
-
- -
|
199
|
+
- - '>='
|
228
200
|
- !ruby/object:Gem::Version
|
229
201
|
version: '0'
|
230
202
|
type: :runtime
|
231
203
|
prerelease: false
|
232
204
|
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
none: false
|
234
205
|
requirements:
|
235
|
-
- -
|
206
|
+
- - '>='
|
236
207
|
- !ruby/object:Gem::Version
|
237
208
|
version: '0'
|
238
209
|
description: Fast CI. Still a WIP.
|
@@ -248,6 +219,11 @@ files:
|
|
248
219
|
- LICENSE.txt
|
249
220
|
- README.md
|
250
221
|
- Rakefile
|
222
|
+
- assets/CI_in_a_Can01.jpg
|
223
|
+
- assets/CI_in_a_Can01.png
|
224
|
+
- assets/CI_in_a_Can02.jpg
|
225
|
+
- assets/CI_in_a_Can02.png
|
226
|
+
- assets/smalllogo.png
|
251
227
|
- bin/ciinacan
|
252
228
|
- ci_in_a_can.gemspec
|
253
229
|
- lib/ci_in_a_can.rb
|
@@ -255,8 +231,12 @@ files:
|
|
255
231
|
- lib/ci_in_a_can/bash.rb
|
256
232
|
- lib/ci_in_a_can/bash_result.rb
|
257
233
|
- lib/ci_in_a_can/build.rb
|
234
|
+
- lib/ci_in_a_can/cli.rb
|
235
|
+
- lib/ci_in_a_can/cli/files.rb
|
236
|
+
- lib/ci_in_a_can/cli/structure_builder.rb
|
258
237
|
- lib/ci_in_a_can/cloner.rb
|
259
238
|
- lib/ci_in_a_can/daemon.rb
|
239
|
+
- lib/ci_in_a_can/file_system.rb
|
260
240
|
- lib/ci_in_a_can/github.rb
|
261
241
|
- lib/ci_in_a_can/github_build_parser.rb
|
262
242
|
- lib/ci_in_a_can/persistence.rb
|
@@ -276,6 +256,8 @@ files:
|
|
276
256
|
- spec/ci_in_a_can/bash_result_spec.rb
|
277
257
|
- spec/ci_in_a_can/bash_spec.rb
|
278
258
|
- spec/ci_in_a_can/build_spec.rb
|
259
|
+
- spec/ci_in_a_can/cli/structure_builder_spec.rb
|
260
|
+
- spec/ci_in_a_can/cli_spec.rb
|
279
261
|
- spec/ci_in_a_can/cloner_spec.rb
|
280
262
|
- spec/ci_in_a_can/github_build_parser_spec.rb
|
281
263
|
- spec/ci_in_a_can/github_spec.rb
|
@@ -292,38 +274,33 @@ files:
|
|
292
274
|
homepage: ''
|
293
275
|
licenses:
|
294
276
|
- MIT
|
277
|
+
metadata: {}
|
295
278
|
post_install_message:
|
296
279
|
rdoc_options: []
|
297
280
|
require_paths:
|
298
281
|
- lib
|
299
282
|
required_ruby_version: !ruby/object:Gem::Requirement
|
300
|
-
none: false
|
301
283
|
requirements:
|
302
|
-
- -
|
284
|
+
- - '>='
|
303
285
|
- !ruby/object:Gem::Version
|
304
286
|
version: '0'
|
305
|
-
segments:
|
306
|
-
- 0
|
307
|
-
hash: 1791188646681337785
|
308
287
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
309
|
-
none: false
|
310
288
|
requirements:
|
311
|
-
- -
|
289
|
+
- - '>='
|
312
290
|
- !ruby/object:Gem::Version
|
313
291
|
version: '0'
|
314
|
-
segments:
|
315
|
-
- 0
|
316
|
-
hash: 1791188646681337785
|
317
292
|
requirements: []
|
318
293
|
rubyforge_project:
|
319
|
-
rubygems_version: 1.
|
294
|
+
rubygems_version: 2.1.11
|
320
295
|
signing_key:
|
321
|
-
specification_version:
|
296
|
+
specification_version: 4
|
322
297
|
summary: Fast CI. Still a WIP.
|
323
298
|
test_files:
|
324
299
|
- spec/ci_in_a_can/bash_result_spec.rb
|
325
300
|
- spec/ci_in_a_can/bash_spec.rb
|
326
301
|
- spec/ci_in_a_can/build_spec.rb
|
302
|
+
- spec/ci_in_a_can/cli/structure_builder_spec.rb
|
303
|
+
- spec/ci_in_a_can/cli_spec.rb
|
327
304
|
- spec/ci_in_a_can/cloner_spec.rb
|
328
305
|
- spec/ci_in_a_can/github_build_parser_spec.rb
|
329
306
|
- spec/ci_in_a_can/github_spec.rb
|