foca-integrity 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/bin/integrity +5 -4
- data/config/config.sample.yml +3 -0
- data/integrity.gemspec +6 -4
- data/lib/integrity.rb +5 -6
- data/lib/integrity/project.rb +1 -0
- data/lib/integrity/scm/git.rb +8 -1
- metadata +2 -2
data/VERSION.yml
CHANGED
data/bin/integrity
CHANGED
@@ -48,14 +48,15 @@ class WithIntegrity < Thor
|
|
48
48
|
|
49
49
|
def edit_integrity_configuration
|
50
50
|
config = File.read(root / "config.yml")
|
51
|
-
config.gsub!
|
52
|
-
config.gsub!
|
53
|
-
|
51
|
+
config.gsub! %r(sqlite3:///var/integrity.db), "sqlite3://#{root}/integrity.db"
|
52
|
+
config.gsub! %r(/path/to/scm/exports), "#{root}/builds"
|
53
|
+
config.gsub! %r(/var/log), "#{root}/log"
|
54
|
+
File.open(root / "config.yml", "w") { |f| f.puts config }
|
54
55
|
end
|
55
56
|
|
56
57
|
def edit_thin_configuration
|
57
58
|
config = File.read(root / 'thin.yml')
|
58
|
-
config.gsub!
|
59
|
+
config.gsub! %r(/apps/integrity), root
|
59
60
|
File.open(root / 'thin.yml', 'w') { |f| f.puts config }
|
60
61
|
end
|
61
62
|
|
data/config/config.sample.yml
CHANGED
@@ -13,6 +13,9 @@
|
|
13
13
|
# writable by the user that runs Integrity.
|
14
14
|
:export_directory: /path/to/scm/exports
|
15
15
|
|
16
|
+
# Path to the integrity log file
|
17
|
+
:log: /var/log/integrity.log
|
18
|
+
|
16
19
|
# Enable or disable HTTP authentication for the app. BE AWARE that if you
|
17
20
|
# disable this anyone can delete and alter projects, so do it only if your
|
18
21
|
# app is running in a controlled environment (ie, behind your company's
|
data/integrity.gemspec
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
1
3
|
Gem::Specification.new do |s|
|
2
4
|
s.name = %q{integrity}
|
3
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.3"
|
4
6
|
|
5
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
8
|
s.authors = ["Nicol\303\241s Sanguinetti", "Simon Rozet"]
|
7
|
-
s.date = %q{2008-11-
|
9
|
+
s.date = %q{2008-11-22}
|
8
10
|
s.default_executable = %q{integrity}
|
9
11
|
s.description = %q{Your Friendly Continuous Integration server. Easy, fun and painless!}
|
10
12
|
s.email = %q{contacto@nicolassanguinetti.info}
|
@@ -14,14 +16,14 @@ Gem::Specification.new do |s|
|
|
14
16
|
s.post_install_message = %q{Run `integrity help` for information on how to setup Integrity.}
|
15
17
|
s.require_paths = ["lib"]
|
16
18
|
s.rubyforge_project = %q{integrity}
|
17
|
-
s.rubygems_version = %q{1.
|
19
|
+
s.rubygems_version = %q{1.3.1}
|
18
20
|
s.summary = %q{The easy and fun Continuous Integration server}
|
19
21
|
|
20
22
|
if s.respond_to? :specification_version then
|
21
23
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
22
24
|
s.specification_version = 2
|
23
25
|
|
24
|
-
if
|
26
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
25
27
|
s.add_runtime_dependency(%q<sinatra>, [">= 0.3.2"])
|
26
28
|
s.add_runtime_dependency(%q<haml>, [">= 0"])
|
27
29
|
s.add_runtime_dependency(%q<dm-core>, [">= 0.9.5"])
|
data/lib/integrity.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
$:.unshift File.join(current_dir, 'integrity'), *vendor_lib_directories
|
1
|
+
__DIR__ = File.dirname(__FILE__)
|
2
|
+
$:.unshift "#{__DIR__}/integrity", *Dir["#{__DIR__}/../vendor/**/lib"].to_a
|
4
3
|
|
5
4
|
require 'rubygems'
|
6
5
|
require 'json'
|
@@ -38,9 +37,9 @@ module Integrity
|
|
38
37
|
def self.default_configuration
|
39
38
|
@defaults ||= { :database_uri => 'sqlite3::memory:',
|
40
39
|
:export_directory => root / 'exports',
|
41
|
-
:log
|
42
|
-
:base_uri
|
43
|
-
:use_basic_auth
|
40
|
+
:log => STDOUT,
|
41
|
+
:base_uri => 'http://localhost:8910',
|
42
|
+
:use_basic_auth => false }
|
44
43
|
end
|
45
44
|
|
46
45
|
def self.config
|
data/lib/integrity/project.rb
CHANGED
data/lib/integrity/scm/git.rb
CHANGED
@@ -43,6 +43,7 @@ module Integrity
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def clone
|
46
|
+
log "Cloning #{uri} to #{working_directory}"
|
46
47
|
`git clone #{uri} #{working_directory}`
|
47
48
|
end
|
48
49
|
|
@@ -52,11 +53,13 @@ module Integrity
|
|
52
53
|
when local_branches.include?(branch) then branch
|
53
54
|
else "-b #{branch} origin/#{branch}"
|
54
55
|
end
|
55
|
-
|
56
|
+
|
57
|
+
log "Checking-out #{strategy}"
|
56
58
|
`cd #{working_directory} && git checkout #{strategy}`
|
57
59
|
end
|
58
60
|
|
59
61
|
def pull
|
62
|
+
log "Pull-ing in #{working_directory}"
|
60
63
|
`cd #{working_directory} && git pull`
|
61
64
|
end
|
62
65
|
|
@@ -71,6 +74,10 @@ module Integrity
|
|
71
74
|
def on_branch?
|
72
75
|
File.basename(`cd #{working_directory} && git symbolic-ref HEAD`).chomp == branch
|
73
76
|
end
|
77
|
+
|
78
|
+
def log(message)
|
79
|
+
Integrity.logger.info("Git") { message }
|
80
|
+
end
|
74
81
|
end
|
75
82
|
end
|
76
83
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foca-integrity
|
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
|
- "Nicol\xC3\xA1s Sanguinetti"
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2008-11-
|
13
|
+
date: 2008-11-22 00:00:00 -08:00
|
14
14
|
default_executable: integrity
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|