baby-bro 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc CHANGED
@@ -1 +1 @@
1
- rvm use system
1
+ rvm use ree-1.8.7-2011.03@babybro
data/Gemfile ADDED
@@ -0,0 +1 @@
1
+ gem 'baby-bro', :path => '/Users/billdoughty/src/capitalthought/baby-bro'
@@ -0,0 +1,13 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ baby-bro (0.0.15)
5
+
6
+ GEM
7
+ specs:
8
+
9
+ PLATFORMS
10
+ ruby
11
+
12
+ DEPENDENCIES
13
+ baby-bro!
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.15
1
+ 0.0.16
Binary file
@@ -1,75 +1,74 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{baby-bro}
8
- s.version = "0.0.15"
8
+ s.version = "0.0.16"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Bill Doughty"]
12
- s.date = %q{2011-05-18}
12
+ s.date = %q{2011-11-29}
13
13
  s.default_executable = %q{bro}
14
14
  s.description = %q{Baby Bro monitors timestamp changes of files and and estimates time spent actively working in project directories.}
15
15
  s.email = %q{billdoughty@capitalthought.com}
16
16
  s.executables = ["bro"]
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE",
19
- "README.rdoc"
19
+ "README.rdoc"
20
20
  ]
21
21
  s.files = [
22
- ".gitignore",
23
- ".rvmrc",
24
- "History.txt",
25
- "LICENSE",
26
- "Manifest.txt",
27
- "PostInstall.txt",
28
- "README.rdoc",
29
- "Rakefile",
30
- "VERSION",
31
- "baby-bro.gemspec",
32
- "bin/bro",
33
- "config/babybrorc.example",
34
- "lib/baby-bro.rb",
35
- "lib/baby-bro/base_config.rb",
36
- "lib/baby-bro/exec.rb",
37
- "lib/baby-bro/files.rb",
38
- "lib/baby-bro/hash_object.rb",
39
- "lib/baby-bro/monitor.rb",
40
- "lib/baby-bro/monitor_config.rb",
41
- "lib/baby-bro/project.rb",
42
- "lib/baby-bro/reporter.rb",
43
- "lib/baby-bro/session.rb",
44
- "lib/extensions/fixnum.rb",
45
- "script/console",
46
- "script/destroy",
47
- "script/generate",
48
- "spec/baby-bro_spec.rb",
49
- "spec/spec.opts",
50
- "spec/spec_helper.rb",
51
- "tasks/rspec.rake"
22
+ ".rvmrc",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "History.txt",
26
+ "LICENSE",
27
+ "Manifest.txt",
28
+ "PostInstall.txt",
29
+ "README.rdoc",
30
+ "Rakefile",
31
+ "VERSION",
32
+ "baby-bro-0.0.15.gem",
33
+ "baby-bro.gemspec",
34
+ "bin/bro",
35
+ "config/babybrorc.example",
36
+ "lib/baby-bro.rb",
37
+ "lib/baby-bro/base_config.rb",
38
+ "lib/baby-bro/exec.rb",
39
+ "lib/baby-bro/files.rb",
40
+ "lib/baby-bro/hash_object.rb",
41
+ "lib/baby-bro/monitor.rb",
42
+ "lib/baby-bro/monitor_config.rb",
43
+ "lib/baby-bro/project.rb",
44
+ "lib/baby-bro/reporter.rb",
45
+ "lib/baby-bro/session.rb",
46
+ "lib/extensions/fixnum.rb",
47
+ "script/console",
48
+ "script/destroy",
49
+ "script/generate",
50
+ "spec/baby-bro_spec.rb",
51
+ "spec/spec.opts",
52
+ "spec/spec_helper.rb",
53
+ "tasks/rspec.rake"
52
54
  ]
53
55
  s.homepage = %q{http://github.com/capitalthought/baby-bro}
54
- s.rdoc_options = ["--charset=UTF-8"]
55
56
  s.require_paths = ["lib"]
56
- s.rubygems_version = %q{1.3.7}
57
+ s.rubygems_version = %q{1.6.2}
57
58
  s.summary = %q{File activity monitor for time tracking.}
58
- s.test_files = [
59
- "spec/baby-bro_spec.rb",
60
- "spec/spec_helper.rb"
61
- ]
62
59
 
63
60
  if s.respond_to? :specification_version then
64
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
65
61
  s.specification_version = 3
66
62
 
67
63
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
64
+ s.add_runtime_dependency(%q<baby-bro>, [">= 0"])
68
65
  s.add_development_dependency(%q<rspec>, [">= 1.3.1"])
69
66
  else
67
+ s.add_dependency(%q<baby-bro>, [">= 0"])
70
68
  s.add_dependency(%q<rspec>, [">= 1.3.1"])
71
69
  end
72
70
  else
71
+ s.add_dependency(%q<baby-bro>, [">= 0"])
73
72
  s.add_dependency(%q<rspec>, [">= 1.3.1"])
74
73
  end
75
74
  end
@@ -11,7 +11,7 @@ module BabyBro
11
11
  def initialize( options )
12
12
  load_config( options )
13
13
  end
14
-
14
+
15
15
  def start
16
16
  if pid = active_pid && !( @config.force_start )
17
17
  puts "ERROR: PID file detected. Cannot start baby-bro."
@@ -24,7 +24,7 @@ module BabyBro
24
24
  Kernel.trap( "SIGINT" ) do
25
25
  print "Baby Bro monitor is shutting down..."
26
26
  $stdout.flush
27
- @continue = false;
27
+ @continue = false;
28
28
  if @previous_SIGINT_handler != "DEFAULT" && @previous_SIGINT_handler != "IGNORE"
29
29
  Kernel.trap( "SIGINT" ) { @previous_SIGINT_handler.call }
30
30
  end
@@ -41,7 +41,7 @@ module BabyBro
41
41
  end
42
42
  return true
43
43
  end
44
-
44
+
45
45
  def stop
46
46
  unless pid = active_pid
47
47
  puts "ERROR: No pid file found for Baby Bro (#{pid_file})."
@@ -63,7 +63,7 @@ module BabyBro
63
63
  sleep 0.1
64
64
  sleep_time -= 0.1
65
65
  if sleep_time == 0
66
- Process.kill( "SIGKILL", pid )
66
+ Process.kill( "SIGKILL", pid )
67
67
  puts "Baby Bro monitor process #{pid} not responding to SIGINT."
68
68
  puts "Sending SIGKILL to Baby Bro monitor process #{pid}."
69
69
  end
@@ -81,7 +81,7 @@ module BabyBro
81
81
  Process.kill( 0, pid ) # check if the process is still alive, raises Errno::ESRCH if not
82
82
  puts "Baby Bro monitor process is running with PID #{pid}."
83
83
  rescue Errno::ESRCH
84
- puts "PID file #{pidfile} found, but no Baby Bro monitor process is running with PID #{pid}."
84
+ puts "PID file #{pid_file} found, but no Baby Bro monitor process is running with PID #{pid}."
85
85
  remove_pid_file
86
86
  puts "PID file removed."
87
87
  end
@@ -89,7 +89,7 @@ module BabyBro
89
89
  puts "Baby Bro monitor process is not running."
90
90
  end
91
91
  end
92
-
92
+
93
93
  private
94
94
  def main
95
95
  while( @continue )
@@ -103,25 +103,25 @@ module BabyBro
103
103
  remove_pid_file
104
104
  puts "complete."
105
105
  end
106
-
106
+
107
107
  def active_pid
108
108
  File.exist?( pid_file ) && File.read(pid_file).to_i
109
109
  end
110
-
110
+
111
111
  def pid_file
112
112
  self.config.data.pid_file
113
113
  end
114
-
114
+
115
115
  def remove_pid_file
116
116
  File.delete( pid_file )
117
117
  end
118
-
118
+
119
119
  def create_pid_file( pid )
120
120
  File.open( pid_file, 'w' ) do |f|
121
121
  f.write( pid.to_s )
122
122
  end
123
123
  end
124
-
124
+
125
125
  def load_config( options )
126
126
  @config = HashObject.new( process_base_config( options ), true )
127
127
  process_monitor_config( @config )
@@ -131,10 +131,10 @@ module BabyBro
131
131
  def tron string
132
132
  $stdout.puts if @config && @config.tron
133
133
  end
134
-
134
+
135
135
  def interruptable_sleep sleep_time, guard_interval=1
136
136
  if block_given?
137
- while( yield && sleep_time > 0 )
137
+ while( yield && sleep_time > 0 )
138
138
  sleep guard_interval
139
139
  sleep_time -= guard_interval
140
140
  end
@@ -142,6 +142,6 @@ module BabyBro
142
142
  sleep sleep_time
143
143
  end
144
144
  end
145
-
145
+
146
146
  end
147
147
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baby-bro
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
5
- prerelease: false
4
+ hash: 63
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 15
10
- version: 0.0.15
9
+ - 16
10
+ version: 0.0.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - Bill Doughty
@@ -15,13 +15,26 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-18 00:00:00 -05:00
18
+ date: 2011-11-29 00:00:00 -06:00
19
19
  default_executable: bro
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: rspec
23
- prerelease: false
22
+ type: :runtime
24
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ name: baby-bro
33
+ version_requirements: *id001
34
+ prerelease: false
35
+ - !ruby/object:Gem::Dependency
36
+ type: :development
37
+ requirement: &id002 !ruby/object:Gem::Requirement
25
38
  none: false
26
39
  requirements:
27
40
  - - ">="
@@ -32,8 +45,9 @@ dependencies:
32
45
  - 3
33
46
  - 1
34
47
  version: 1.3.1
35
- type: :development
36
- version_requirements: *id001
48
+ name: rspec
49
+ version_requirements: *id002
50
+ prerelease: false
37
51
  description: Baby Bro monitors timestamp changes of files and and estimates time spent actively working in project directories.
38
52
  email: billdoughty@capitalthought.com
39
53
  executables:
@@ -44,8 +58,9 @@ extra_rdoc_files:
44
58
  - LICENSE
45
59
  - README.rdoc
46
60
  files:
47
- - .gitignore
48
61
  - .rvmrc
62
+ - Gemfile
63
+ - Gemfile.lock
49
64
  - History.txt
50
65
  - LICENSE
51
66
  - Manifest.txt
@@ -53,6 +68,7 @@ files:
53
68
  - README.rdoc
54
69
  - Rakefile
55
70
  - VERSION
71
+ - baby-bro-0.0.15.gem
56
72
  - baby-bro.gemspec
57
73
  - bin/bro
58
74
  - config/babybrorc.example
@@ -79,8 +95,8 @@ homepage: http://github.com/capitalthought/baby-bro
79
95
  licenses: []
80
96
 
81
97
  post_install_message:
82
- rdoc_options:
83
- - --charset=UTF-8
98
+ rdoc_options: []
99
+
84
100
  require_paths:
85
101
  - lib
86
102
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -104,10 +120,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
120
  requirements: []
105
121
 
106
122
  rubyforge_project:
107
- rubygems_version: 1.3.7
123
+ rubygems_version: 1.6.2
108
124
  signing_key:
109
125
  specification_version: 3
110
126
  summary: File activity monitor for time tracking.
111
- test_files:
112
- - spec/baby-bro_spec.rb
113
- - spec/spec_helper.rb
127
+ test_files: []
128
+
data/.gitignore DELETED
@@ -1 +0,0 @@
1
- pkg