ciquantum 0.0.18 → 0.0.19
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.
- data/lib/ciquantum/adapter/gitlab.rb +7 -3
- data/lib/ciquantum/adapter/unfuddle.rb +2 -3
- data/lib/ciquantum/git.rb +1 -0
- data/lib/ciquantum/server.rb +3 -2
- data/lib/ciquantum/version.rb +1 -1
- metadata +2 -2
@@ -22,9 +22,13 @@ module CIQuantum
|
|
22
22
|
return config[command]
|
23
23
|
end
|
24
24
|
|
25
|
-
def commit_from_request
|
26
|
-
|
27
|
-
|
25
|
+
def commit_from_request body
|
26
|
+
begin
|
27
|
+
hash = JSON.parse body
|
28
|
+
return (hash["repository"]["name"] == config.project) ? hash["after"] : nil
|
29
|
+
rescue
|
30
|
+
nil
|
31
|
+
end
|
28
32
|
end
|
29
33
|
|
30
34
|
end
|
@@ -23,10 +23,9 @@ module CIQuantum
|
|
23
23
|
return config[command]
|
24
24
|
end
|
25
25
|
|
26
|
-
def commit_from_request
|
26
|
+
def commit_from_request body
|
27
27
|
begin
|
28
|
-
|
29
|
-
return Changeset.new(xml).commit
|
28
|
+
return Changeset.new(body).commit
|
30
29
|
rescue Unfuddle::ChangesetError => e
|
31
30
|
nil
|
32
31
|
end
|
data/lib/ciquantum/git.rb
CHANGED
data/lib/ciquantum/server.rb
CHANGED
@@ -82,8 +82,9 @@ module CIQuantum
|
|
82
82
|
end
|
83
83
|
|
84
84
|
post '/push' do
|
85
|
-
|
86
|
-
|
85
|
+
str = request.body.read.strip
|
86
|
+
puts "Request received on push:\n#{str}"
|
87
|
+
commit = quantum.adapter.commit_from_request str
|
87
88
|
if quantum.git.current_branch_contains_commit? commit
|
88
89
|
quantum.build
|
89
90
|
end
|
data/lib/ciquantum/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ciquantum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-07-
|
14
|
+
date: 2012-07-06 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|