starling-starling 0.9.8.200810061510 → 0.9.9

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/CHANGELOG CHANGED
@@ -2,6 +2,8 @@
2
2
  * remove dependency on SyslogLogger so that starling works on windows.
3
3
  * fix config file loading so relative paths are expanded properly <jacob@jacobatzen.dk>
4
4
  * clean up redhat init.d script <gaffneyc@gmail.com>
5
+ * add a 'fetch' command that is non-blocking equivalent to 'get' <aaron.hawkins@shawkvalue.com>
6
+ * implement the 'delete' method to allow queues to be deleted <timshadel@gmail.com>
5
7
 
6
8
  == 0.9.8
7
9
  * add fix to enable relative paths <david@motorator.com>
data/Rakefile CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'rake/rdoctask'
3
3
  require 'spec/rake/spectask'
4
+ require File.join("lib", "starling", "server")
4
5
 
5
6
  task :default => :spec
6
7
 
@@ -14,9 +15,42 @@ Spec::Rake::SpecTask.new do |t|
14
15
  t.spec_files = FileList['spec/*_spec.rb']
15
16
  t.fail_on_error = true
16
17
  end
17
-
18
+
18
19
  Rake::RDocTask.new do |rd|
19
20
  rd.main = "README.rdoc"
20
21
  rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
21
22
  rd.rdoc_dir = 'doc'
22
23
  end
24
+
25
+ desc "Generate a gemspec"
26
+ task :gemspec do
27
+ gemspec =<<-EOF
28
+ # this file is automatically generated
29
+ Gem::Specification.new do |s|
30
+ s.name = "starling"
31
+ s.version = "#{StarlingServer::VERSION}"
32
+ s.authors = ["Blaine Cook", "Chris Wanstrath", "Britt Selvitelle", "Glenn Rempe", "Abdul-Rahman Advany", "Seth Fitzsimmons"]
33
+ s.email = ["blaine@twitter.com", "chris@ozmm.org", "abdulrahman@advany.com", "starlingmq@groups.google.com"]
34
+ s.homepage = "http://github.com/starling/starling/"
35
+ s.summary = "Starling is a lightweight, transactional, distributed queue server"
36
+ s.description = s.summary
37
+
38
+ s.files = #{Dir.glob("**/*").select { |f| File.file?(f) }.inspect}
39
+ s.executables = ["starling", "starling_top"]
40
+ s.require_paths = ["lib"]
41
+
42
+ s.has_rdoc = true
43
+ s.rdoc_options = ["--quiet", "--title", "starling documentation", "--opname", "index.html", "--line-numbers", "--main", "README.rdoc", "--inline-source"]
44
+ s.extra_rdoc_files = ["README.rdoc", "CHANGELOG", "LICENSE"]
45
+
46
+ s.add_dependency 'fiveruns-memcache-client'
47
+ s.add_dependency 'eventmachine', [">= 0.12.0"]
48
+ end
49
+ EOF
50
+
51
+ open("starling.gemspec", "w") do |f|
52
+ f << gemspec
53
+ end
54
+
55
+ puts "gemspec successfully created."
56
+ end
@@ -56,6 +56,7 @@ STAT queue_%s_age %d\r\n".freeze
56
56
 
57
57
  SHUTDOWN_COMMAND = /\Ashutdown\r\n/m
58
58
 
59
+ QUIT_COMMAND = /\Aquit\r\n/m
59
60
 
60
61
  @@next_session_id = 1
61
62
 
@@ -126,6 +127,9 @@ STAT queue_%s_age %d\r\n".freeze
126
127
  Runner::shutdown
127
128
  when DELETE_COMMAND
128
129
  delete $1
130
+ when QUIT_COMMAND
131
+ # ignore the command, client is closing connection.
132
+ return nil
129
133
  else
130
134
  logger.warn "Unknown command: #{data}."
131
135
  respond ERR_UNKNOWN_COMMAND
@@ -10,7 +10,7 @@ require File.join(here, 'handler')
10
10
 
11
11
  module StarlingServer
12
12
 
13
- VERSION = "0.9.8"
13
+ VERSION = "0.9.9"
14
14
 
15
15
  class Base
16
16
  attr_reader :logger
@@ -1,6 +1,9 @@
1
1
  require File.join(File.dirname(__FILE__), 'server')
2
+ require 'erb'
3
+ require 'fileutils'
2
4
  require 'optparse'
3
5
  require 'yaml'
6
+ require 'fileutils'
4
7
 
5
8
  module StarlingServer
6
9
  class Runner
@@ -34,7 +37,19 @@ module StarlingServer
34
37
  end
35
38
 
36
39
  def load_config_file(filename)
37
- YAML.load(File.open(filename))['starling'].each do |key, value|
40
+ config = YAML.load(ERB.new(File.read(filename)).result)
41
+
42
+ unless config.is_a?(Hash)
43
+ STDERR.puts "Config file does not contain a hash: #{filename}, exiting."
44
+ exit(1)
45
+ end
46
+
47
+ if config['starling'].nil?
48
+ STDERR.puts "Missing starling section in config file: #{filename}, exiting."
49
+ exit(1)
50
+ end
51
+
52
+ config['starling'].each do |key, value|
38
53
  # alias some keys
39
54
  case key
40
55
  when "queue_path" then key = "path"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: starling-starling
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8.200810061510
4
+ version: 0.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blaine Cook
@@ -9,15 +9,16 @@ authors:
9
9
  - Britt Selvitelle
10
10
  - Glenn Rempe
11
11
  - Abdul-Rahman Advany
12
+ - Seth Fitzsimmons
12
13
  autorequire:
13
14
  bindir: bin
14
15
  cert_chain: []
15
16
 
16
- date: 2008-10-09 00:00:00 -07:00
17
+ date: 2008-10-27 00:00:00 -07:00
17
18
  default_executable:
18
19
  dependencies:
19
20
  - !ruby/object:Gem::Dependency
20
- name: memcache-client
21
+ name: fiveruns-memcache-client
21
22
  version_requirement:
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
@@ -39,6 +40,7 @@ email:
39
40
  - blaine@twitter.com
40
41
  - chris@ozmm.org
41
42
  - abdulrahman@advany.com
43
+ - starlingmq@groups.google.com
42
44
  executables:
43
45
  - starling
44
46
  - starling_top
@@ -49,19 +51,22 @@ extra_rdoc_files:
49
51
  - CHANGELOG
50
52
  - LICENSE
51
53
  files:
52
- - README.rdoc
53
- - LICENSE
54
+ - bin/starling
55
+ - bin/starling_top
54
56
  - CHANGELOG
55
- - Rakefile
57
+ - etc/sample-config.yml
58
+ - etc/starling.redhat
59
+ - etc/starling.ubuntu
56
60
  - lib/starling/handler.rb
57
61
  - lib/starling/persistent_queue.rb
58
62
  - lib/starling/queue_collection.rb
59
- - lib/starling/server_runner.rb
60
63
  - lib/starling/server.rb
64
+ - lib/starling/server_runner.rb
61
65
  - lib/starling.rb
62
- - etc/starling.redhat
63
- - etc/starling.ubuntu
64
- - etc/sample-config.yml
66
+ - LICENSE
67
+ - Rakefile
68
+ - README.rdoc
69
+ - spec/starling_server_spec.rb
65
70
  has_rdoc: true
66
71
  homepage: http://github.com/starling/starling/
67
72
  post_install_message:
@@ -96,5 +101,5 @@ rubygems_version: 1.2.0
96
101
  signing_key:
97
102
  specification_version: 2
98
103
  summary: Starling is a lightweight, transactional, distributed queue server
99
- test_files:
100
- - spec/starling_server_spec.rb
104
+ test_files: []
105
+