diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..de6d2c2 --- /dev/null +++ b/Gemfile @@ -0,0 +1,14 @@ +source "http://rubygems.org" +# Add dependencies required to use your gem here. +# Example: +# gem "activesupport", ">= 2.3.5" +gem 'json' +gem 'mongo' +# Add dependencies to develop your gem here. +# Include everything needed to run rake, tests, features, etc. +group :development do + gem "shoulda", ">= 0" + gem "bundler", "~> 1.0.0" + gem "jeweler", "~> 1.6.2" + gem "rcov", ">= 0" +end diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..50c2490 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,26 @@ +GEM + remote: http://rubygems.org/ + specs: + bson (1.3.1) + git (1.2.5) + jeweler (1.6.2) + bundler (~> 1.0) + git (>= 1.2.5) + rake + json (1.5.3) + mongo (1.3.1) + bson (>= 1.3.1) + rake (0.9.2) + rcov (0.9.9) + shoulda (2.11.3) + +PLATFORMS + ruby + +DEPENDENCIES + bundler (~> 1.0.0) + jeweler (~> 1.6.2) + json + mongo + rcov + shoulda diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..4c459d2 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright (c) 2011 TelegramSam + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.rdoc b/README.rdoc index 0ca780c..01e56e3 100644 --- a/README.rdoc +++ b/README.rdoc @@ -38,7 +38,7 @@ queue items. There are no keys or reserved values in the body of an item. Pass i options = { :duplicate_key => 'match' } - + body = "foo" body = 5 body = { @@ -78,7 +78,7 @@ but not confirmed. * Items are de-duplicated * No reserved words in item body -==== TODO +=== TODO * Adjust auto generated duplication_key to be more accurate. * Full examples \ No newline at end of file diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..326b46f --- /dev/null +++ b/Rakefile @@ -0,0 +1,36 @@ +# encoding: utf-8 + +require 'rubygems' +require 'bundler' +begin + Bundler.setup(:default, :development) +rescue Bundler::BundlerError => e + $stderr.puts e.message + $stderr.puts "Run `bundle install` to install missing gems" + exit e.status_code +end +require 'rake' + +require 'jeweler' +Jeweler::Tasks.new do |gem| + # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options + gem.name = "mongo-dequeue" + gem.homepage = "http://github.com/TelegramSam/Dequeue" + gem.license = "MIT" + gem.summary = %Q{Mongo based de-duplicating pritority queue} + gem.description = %Q{A de-duplicating priority queue that uses mongodb as the storage engine.} + gem.email = "telegramsam@gmail.com" + gem.authors = ["TelegramSam"] + # dependencies defined in Gemfile +end +Jeweler::RubygemsDotOrgTasks.new + +require 'rake/rdoctask' +Rake::RDocTask.new do |rdoc| + version = File.exist?('VERSION') ? File.read('VERSION') : "" + + rdoc.rdoc_dir = 'rdoc' + rdoc.title = "mongo-dequeue #{version}" + rdoc.rdoc_files.include('README*') + rdoc.rdoc_files.include('lib/**/*.rb') +end diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..6c6aa7c --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.1.0 \ No newline at end of file diff --git a/lib/mongo_dequeue.rb b/lib/mongo-dequeue.rb similarity index 100% rename from lib/mongo_dequeue.rb rename to lib/mongo-dequeue.rb diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 68e1b1c..c3beb2b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,4 +3,4 @@ require 'rubygems' require 'mongo' -require 'mongo_dequeue' \ No newline at end of file +require 'mongo-dequeue' \ No newline at end of file