This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.beans.factory.InitializingBean | |
import org.zeromq.ZMQ | |
class ParseService implements InitializingBean { | |
def pullSocket | |
def pubSocket | |
def running = true | |
def pollingRate = 200 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# prevent the use of `` in tests | |
Spec::Runner.configure do |configuration| | |
backtick = nil # establish the variable in this scope | |
saved_system = nil | |
configuration.prepend_before(:all) do | |
# raise an exception if Kernel#` or Kernel#system is used | |
# in our tests, we want to ensure we're fully self-contained | |
Kernel.instance_eval do | |
backtick = instance_method(:'`') | |
saved_system = instance_method(:system) |
NewerOlder