twigg-app 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/twigg-app/app/version.rb +1 -1
- data/lib/twigg-app/command/app.rb +29 -0
- data/lib/twigg-app.rb +5 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef82e0c0afead33d8d9bdae1f09ee2295e7a088c
|
4
|
+
data.tar.gz: b3b8edb7ebead9f68e373b8bb002599a1a68f5c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bd4d845ae1f6d331efd37ee3f4a35aec7fc5fc627de97dfb8a80a4749cd6ffaefa6e44bcd7bdba629acddf23e8ebc96d2a80c83aaa9de957abac3cd03aa8fac
|
7
|
+
data.tar.gz: 21885331285a2c4eaaf44a97694e17d571d171414b960598397daee45f77b70208e6f3630153ece4e7e4ee91704b1fe76128da0ab71cfe7d9ccfc3c62e250ca1
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Twigg
|
2
|
+
class Command
|
3
|
+
class App < Command
|
4
|
+
def initialize(*args)
|
5
|
+
super
|
6
|
+
@daemon = @args.delete('-D') || @args.delete('--daemon')
|
7
|
+
@pidfile = consume_option(%w[-P --pidfile], @args)
|
8
|
+
@pidfile_path = File.expand_path(@pidfile) if @pidfile
|
9
|
+
ignore @args
|
10
|
+
end
|
11
|
+
|
12
|
+
def run
|
13
|
+
stderr 'Daemonizing...' if @daemon
|
14
|
+
stderr "Will write to pidfile #{@pidfile}" if @pidfile_path
|
15
|
+
die 'Pidfile already exists' if File.exist?(@pidfile_path)
|
16
|
+
|
17
|
+
Process.daemon if @daemon
|
18
|
+
|
19
|
+
if @pidfile_path
|
20
|
+
flags = File::WRONLY | File::CREAT | File::EXCL
|
21
|
+
File.open(@pidfile_path, flags) { |f| f.write Process.pid }
|
22
|
+
at_exit { File.unlink(@pidfile_path) }
|
23
|
+
end
|
24
|
+
|
25
|
+
::Twigg::App::Server.run!
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/twigg-app.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twigg-app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Causes Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.0.
|
131
|
+
version: 0.0.3
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.0.
|
138
|
+
version: 0.0.3
|
139
139
|
description: Twigg provides stats for activity in Git repositories. This is the web-based
|
140
140
|
interface.
|
141
141
|
email:
|
@@ -165,6 +165,7 @@ files:
|
|
165
165
|
- lib/twigg-app/app/server.rb
|
166
166
|
- lib/twigg-app/app/version.rb
|
167
167
|
- lib/twigg-app/app.rb
|
168
|
+
- lib/twigg-app/command/app.rb
|
168
169
|
- lib/twigg-app.rb
|
169
170
|
- public/favicon.ico
|
170
171
|
- public/favicon.png
|