auto-hyde 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -0,0 +1,84 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{auto-hyde}
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Mike Mayo"]
12
+ s.date = %q{2010-12-10}
13
+ s.description = %q{}
14
+ s.email = %q{gotmayonase@gmail.com}
15
+ s.executables = ["auto-hyde", "auto-hyde"]
16
+ s.extra_rdoc_files = [
17
+ "LICENSE.txt",
18
+ "README.textile"
19
+ ]
20
+ s.files = [
21
+ ".document",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.textile",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "auto-hyde.gemspec",
29
+ "bin/auto-hyde",
30
+ "lib/auto-hyde.rb",
31
+ "test/helper.rb",
32
+ "test/test_auto-hyde.rb"
33
+ ]
34
+ s.homepage = %q{http://github.com/gotmayonase/auto-hyde}
35
+ s.licenses = ["MIT"]
36
+ s.require_paths = ["lib"]
37
+ s.rubygems_version = %q{1.3.7}
38
+ s.summary = %q{A simple sinatra app exposing a url for github post-receive hooks to hit and trigger a rebuild of a Jekyll site.}
39
+ s.test_files = [
40
+ "test/helper.rb",
41
+ "test/test_auto-hyde.rb"
42
+ ]
43
+
44
+ if s.respond_to? :specification_version then
45
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
46
+ s.specification_version = 3
47
+
48
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
+ s.add_runtime_dependency(%q<sinatra>, [">= 1.1.0"])
50
+ s.add_runtime_dependency(%q<systemu>, [">= 1.2.0"])
51
+ s.add_runtime_dependency(%q<pony>, [">= 1.1"])
52
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
53
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
54
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
55
+ s.add_development_dependency(%q<rcov>, [">= 0"])
56
+ s.add_runtime_dependency(%q<sinatra>, [">= 1.1.0"])
57
+ s.add_runtime_dependency(%q<systemu>, [">= 1.2.0"])
58
+ s.add_runtime_dependency(%q<pony>, [">= 1.1"])
59
+ else
60
+ s.add_dependency(%q<sinatra>, [">= 1.1.0"])
61
+ s.add_dependency(%q<systemu>, [">= 1.2.0"])
62
+ s.add_dependency(%q<pony>, [">= 1.1"])
63
+ s.add_dependency(%q<shoulda>, [">= 0"])
64
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
65
+ s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
66
+ s.add_dependency(%q<rcov>, [">= 0"])
67
+ s.add_dependency(%q<sinatra>, [">= 1.1.0"])
68
+ s.add_dependency(%q<systemu>, [">= 1.2.0"])
69
+ s.add_dependency(%q<pony>, [">= 1.1"])
70
+ end
71
+ else
72
+ s.add_dependency(%q<sinatra>, [">= 1.1.0"])
73
+ s.add_dependency(%q<systemu>, [">= 1.2.0"])
74
+ s.add_dependency(%q<pony>, [">= 1.1"])
75
+ s.add_dependency(%q<shoulda>, [">= 0"])
76
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
77
+ s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
78
+ s.add_dependency(%q<rcov>, [">= 0"])
79
+ s.add_dependency(%q<sinatra>, [">= 1.1.0"])
80
+ s.add_dependency(%q<systemu>, [">= 1.2.0"])
81
+ s.add_dependency(%q<pony>, [">= 1.1"])
82
+ end
83
+ end
84
+
@@ -20,7 +20,9 @@ options = {
20
20
  :jekyll_dir => './',
21
21
  :pygments => false,
22
22
  :email => nil,
23
- :jekyll_bin => jekyll_bin
23
+ :jekyll_bin => jekyll_bin,
24
+ :log_file => 'log/auto-hyde.log',
25
+ :error_file => 'log/auto-hyde-err.log'
24
26
  }
25
27
 
26
28
  option_parser = OptionParser.new do |opts|
@@ -35,14 +37,20 @@ option_parser = OptionParser.new do |opts|
35
37
  end
36
38
  option_parser.parse!
37
39
 
40
+ logfile = options.delete :log_file
41
+ errfile = options.delete :error_file
42
+
43
+ FileUtils.mkdir_p(File.dirname(logfile))
44
+ FileUtils.mkdir_p(File.dirname(errfile))
45
+
38
46
  options.each do |key, value|
39
47
  AutoHyde.set key, value
40
48
  end
41
49
 
42
50
  pid = fork do
43
51
  Signal.trap('HUP', 'IGNORE') # Don't die upon logout
44
- STDOUT.reopen "/dev/null"
45
- STDERR.reopen "/dev/null"
52
+ STDOUT.reopen File.new(logfile, 'a')
53
+ STDERR.reopen File.new(logfile, 'a')
46
54
  at_exit {
47
55
  File.unlink('auto-hyde.pid')
48
56
  }
@@ -6,7 +6,9 @@ require 'sinatra/base'
6
6
  # =====================================================================================================================
7
7
 
8
8
  class AutoHyde < Sinatra::Base
9
-
9
+
10
+ set :logging, true
11
+
10
12
  EMAIL_TEMPLATE = <<-EMAIL
11
13
  Your Jekyll rebuild failed at #{Time.now} with the following error:
12
14
  #{@error}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto-hyde
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mike Mayo
@@ -190,6 +190,7 @@ files:
190
190
  - README.textile
191
191
  - Rakefile
192
192
  - VERSION
193
+ - auto-hyde.gemspec
193
194
  - bin/auto-hyde
194
195
  - lib/auto-hyde.rb
195
196
  - test/helper.rb