ultra_marathon 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8225719b7d1b1c43162a163d33bc7c3ebf03be5
4
- data.tar.gz: f194c974595a922b4f33d7dc9666e70869e07f98
3
+ metadata.gz: 63bf0e38f13501dc54a2a38519b3e1c6e9518a5e
4
+ data.tar.gz: f4fd72b54e12591735846b34e7f849a759153573
5
5
  SHA512:
6
- metadata.gz: c945bed22739aeb22407234ac12da19b5fc9a12912f1a4255c8d48e153fa86e36dca07278cbd52bf0525c637f95ede2d053d2d0ab90ae49a4e6d6069266642dd
7
- data.tar.gz: 183b2985c9366a663139a244d0eee485b012448d383ec4b23c9add579dac13ade4395be7cb4bc8ae85dfa65add94b966936c79153febf542d0e1af774f81e093
6
+ metadata.gz: 374d6b7a8e9a040c24887ba955fbaf7687674facc9b98d4ecf6777430ee33eeef376f1fa3cde02c1bb784c3ae0424efcf8cd1c28f4bedf109e4c51402a54201d
7
+ data.tar.gz: 92b4f378f7d85867258c58a414812402df74a6908bca46f9e3eae283a5767937283bd85425ccfd57ed4151a12baf594c071bab85f3dba1b9b09584d28275e016
data/README.md CHANGED
@@ -4,6 +4,12 @@ Fault tolerant platform for long running jobs.
4
4
 
5
5
  ## Usage
6
6
 
7
+ `gem install ultra_marathon`
8
+
9
+ or with bundler:
10
+
11
+ `gem 'ultra_marathon'`
12
+
7
13
  The `UltraMarathon::AbstractRunner` class itself provides the functionality for
8
14
  running complex jobs. It is best inheirited to fully customize.
9
15
 
@@ -27,12 +27,13 @@ module UltraMarathon
27
27
  end
28
28
 
29
29
  private
30
+
31
+ ## Private Instance Methods
32
+
30
33
  def format_time(time)
31
34
  sprintf(TIME_FORMAT, time.hour, time.min, time.sec)
32
35
  end
33
36
 
34
- ## Private Instance Methods
35
-
36
37
  # Instruments given block, setting its start time and end time
37
38
  # Returns the result of the block
38
39
  def instrument(&block)
@@ -53,9 +53,9 @@ module UltraMarathon
53
53
  def log_formatted_error(error)
54
54
  info error.message
55
55
  formatted_backtrace = error.backtrace.map.with_index do |backtrace_line, line_number|
56
- sprintf('%03i) %s', line_number, backtrace_line)
56
+ sprintf('%03i) %s', line_number + 1, backtrace_line)
57
57
  end
58
- info formatted_backtrace.join("\n")
58
+ info formatted_backtrace.join(NEW_LINE)
59
59
  end
60
60
  end
61
61
  end
@@ -81,12 +81,13 @@ module UltraMarathon
81
81
  define_singleton_method :call, &run_block.bind(self)
82
82
  end
83
83
 
84
- # If the original context responds, delegate to it
84
+ # If the original context responds, including private methods,
85
+ # delegate to it
85
86
  def method_missing(method, *args, &block)
86
- if context.respond_to? method
87
+ if context.respond_to?(method, true)
87
88
  context.send(method, *args, &block)
88
89
  else
89
- super
90
+ raise NoMethodError.new("undefined local variable or method `#{method.to_s}' for #{context.class.name}")
90
91
  end
91
92
  end
92
93
  end
@@ -2,7 +2,7 @@ module UltraMarathon
2
2
  class Version
3
3
  MAJOR = 0 unless defined? MAJOR
4
4
  MINOR = 0 unless defined? MINOR
5
- PATCH = 1 unless defined? PATCH
5
+ PATCH = 3 unless defined? PATCH
6
6
  PRE = nil unless defined? PRE
7
7
 
8
8
  class << self
@@ -9,6 +9,8 @@ describe UltraMarathon::SubRunner do
9
9
  @bubble_count ||= 0
10
10
  end
11
11
 
12
+ private
13
+
12
14
  def increment_bubbles
13
15
  self.bubble_count += 1
14
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultra_marathon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Maddox