refinery 0.9.7 → 0.9.8

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.7
1
+ 0.9.8
@@ -17,7 +17,7 @@ module Refinery #:nodoc:
17
17
  # Publish the message. The message will be converted to JSON and pushed
18
18
  # into the queue associated with the publisher.
19
19
  def publish(message)
20
- logger.debug "Message: #{message.to_json}"
20
+ logger.debug "Publisher #{self.class.name} sending message: #{message.to_json}"
21
21
  waiting_queue.send_message(Base64.encode64(message.to_json))
22
22
  end
23
23
  end
@@ -16,6 +16,7 @@ module Refinery #:nodoc:
16
16
  @logger ||= begin
17
17
  logger = Logger.new(STDOUT)
18
18
  logger.level = Logger::WARN
19
+ logger.formatter = CustomFormatter.new
19
20
  logger
20
21
  end
21
22
  end
@@ -85,4 +86,16 @@ module Refinery #:nodoc:
85
86
  end
86
87
  end
87
88
  end
89
+
90
+ class CustomFormatter
91
+ def format
92
+ @format ||= "%s, [%s#%d][%s] %5s -- %s: %s\n"
93
+ end
94
+ def call(severity, time, progname, msg)
95
+ format % [severity[0..0], format_datetime(time), $$, Thread.current.object_id.to_s, severity, progname, msg.to_s]
96
+ end
97
+ def format_datetime(time)
98
+ time.strftime("%Y-%m-%dT%H:%M:%S.") << "%06d " % time.usec
99
+ end
100
+ end
88
101
  end
data/lib/refinery.rb CHANGED
@@ -69,6 +69,16 @@ module Refinery
69
69
  end
70
70
  end
71
71
 
72
+ require 'net/http'
73
+ class Net::HTTP
74
+ alias_method :old_initialize, :initialize
75
+ def initialize(*args)
76
+ old_initialize(*args)
77
+ @ssl_context = OpenSSL::SSL::SSLContext.new
78
+ @ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE
79
+ end
80
+ end
81
+
72
82
  Refinery::require_libraries
73
83
  Refinery::require_optional_libraries
74
84
  Refinery::require_internals
data/refinery.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{refinery}
5
- s.version = "0.9.7"
5
+ s.version = "0.9.8"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Anthony Eden"]
9
- s.date = %q{2009-07-06}
9
+ s.date = %q{2009-07-07}
10
10
  s.description = %q{Process data in a distributed fashion.}
11
11
  s.email = %q{anthonyeden@gmail.com}
12
12
  s.executables = ["epub", "monitor", "pubnow", "refinery"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.7
4
+ version: 0.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Eden
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-06 00:00:00 -04:00
12
+ date: 2009-07-07 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15