shellshot 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -30,6 +30,10 @@ The whole thing would probably not work in Windows. Not my first time I guess.
30
30
  end
31
31
 
32
32
 
33
+ == HISTORY:
34
+ - 0.2.0 Switched to SystemTimer (*not* system_timer) for timeouts. The original was not working after all. Fixed one comment stating the wrong unit.
35
+ - 0.1.0 Initial release.
36
+
33
37
  == LICENSE:
34
38
 
35
39
  (The MIT License)
data/Rakefile CHANGED
@@ -14,6 +14,7 @@ begin
14
14
  gem.homepage = "http://github.com/underlog/shellshot"
15
15
  gem.authors = ["Petyo Ivanov"]
16
16
  gem.add_development_dependency "rspec"
17
+ gem.add_dependency 'SystemTimer'
17
18
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
18
19
  end
19
20
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
data/lib/shellshot.rb CHANGED
@@ -1,4 +1,5 @@
1
- require 'english'
1
+ require 'rubygems'
2
+ require 'system_timer'
2
3
 
3
4
  module Shellshot
4
5
 
@@ -6,7 +7,7 @@ module Shellshot
6
7
 
7
8
  alias_method :system_exec, :exec
8
9
 
9
- DEFAULT_TIMEOUT = 60 #minutes
10
+ DEFAULT_TIMEOUT = 60 * 60 # 1 hour
10
11
 
11
12
  attr_accessor :pid, :status
12
13
 
@@ -27,9 +28,9 @@ module Shellshot
27
28
  private
28
29
 
29
30
  def wait_for(seconds)
30
- Timeout.timeout(seconds) do
31
+ SystemTimer.timeout(seconds) do
31
32
  Process.wait(pid)
32
- self.status = $CHILD_STATUS
33
+ self.status = $?
33
34
  end
34
35
  end
35
36
 
data/shellshot.gemspec ADDED
@@ -0,0 +1,59 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
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{shellshot}
8
+ s.version = "0.2.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Petyo Ivanov"]
12
+ s.date = %q{2009-10-27}
13
+ s.description = %q{
14
+ A small library dealing with the obscurities of shell commands, piping and timeouts.
15
+ Most of the stuff comes from bad experience in http://beanstalkapp.com.
16
+ }
17
+ s.email = %q{underlog@gmail.com}
18
+ s.extra_rdoc_files = [
19
+ "LICENSE",
20
+ "README.rdoc"
21
+ ]
22
+ s.files = [
23
+ ".document",
24
+ ".gitignore",
25
+ "LICENSE",
26
+ "README.rdoc",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "lib/shellshot.rb",
30
+ "shellshot.gemspec",
31
+ "spec/shellshot_spec.rb",
32
+ "spec/spec_helper.rb"
33
+ ]
34
+ s.homepage = %q{http://github.com/underlog/shellshot}
35
+ s.rdoc_options = ["--charset=UTF-8"]
36
+ s.require_paths = ["lib"]
37
+ s.rubygems_version = %q{1.3.4}
38
+ s.summary = %q{ruby proxy handling the complexities of system invocations}
39
+ s.test_files = [
40
+ "spec/shellshot_spec.rb",
41
+ "spec/spec_helper.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::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
49
+ s.add_development_dependency(%q<rspec>, [">= 0"])
50
+ s.add_runtime_dependency(%q<SystemTimer>, [">= 0"])
51
+ else
52
+ s.add_dependency(%q<rspec>, [">= 0"])
53
+ s.add_dependency(%q<SystemTimer>, [">= 0"])
54
+ end
55
+ else
56
+ s.add_dependency(%q<rspec>, [">= 0"])
57
+ s.add_dependency(%q<SystemTimer>, [">= 0"])
58
+ end
59
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shellshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petyo Ivanov
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-12 00:00:00 +03:00
12
+ date: 2009-10-27 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -22,6 +22,16 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: "0"
24
24
  version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: SystemTimer
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
25
35
  description: "\n A small library dealing with the obscurities of shell commands, piping and timeouts. \n Most of the stuff comes from bad experience in http://beanstalkapp.com.\n "
26
36
  email: underlog@gmail.com
27
37
  executables: []
@@ -39,6 +49,7 @@ files:
39
49
  - Rakefile
40
50
  - VERSION
41
51
  - lib/shellshot.rb
52
+ - shellshot.gemspec
42
53
  - spec/shellshot_spec.rb
43
54
  - spec/spec_helper.rb
44
55
  has_rdoc: true