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 CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- patch: 2
3
2
  major: 0
3
+ patch: 3
4
4
  minor: 1
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!(%r(sqlite3:///var/integrity.db), "sqlite3://#{root}/integrity.db")
52
- config.gsub!(%r(/path/to/scm/exports), "#{root}/builds")
53
- File.open(root / "config.yml", "w") {|f| f.puts config }
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!(%r(/apps/integrity), root)
59
+ config.gsub! %r(/apps/integrity), root
59
60
  File.open(root / 'thin.yml', 'w') { |f| f.puts config }
60
61
  end
61
62
 
@@ -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.2"
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-20}
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.2.0}
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 current_version >= 3 then
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
- current_dir = File.expand_path(File.dirname(__FILE__))
2
- vendor_lib_directories = Dir[File.join(current_dir, '..', 'vendor/**/lib')]
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 => STDOUT,
42
- :base_uri => 'http://localhost:8910',
43
- :use_basic_auth => false }
40
+ :log => STDOUT,
41
+ :base_uri => 'http://localhost:8910',
42
+ :use_basic_auth => false }
44
43
  end
45
44
 
46
45
  def self.config
@@ -80,6 +80,7 @@ module Integrity
80
80
  begin
81
81
  notifier.notify_of_build last_build
82
82
  rescue Timeout::Error
83
+ Integrity.logger.info "#{notifier.name} notifier timed out"
83
84
  next
84
85
  end
85
86
  end
@@ -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.2
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-20 00:00:00 -08:00
13
+ date: 2008-11-22 00:00:00 -08:00
14
14
  default_executable: integrity
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency