Skip to content
Browse files

Speccing, initial commit.

  • Loading branch information...
1 parent 8a40e8c commit 48ec248f75c208351d01e6403ef4b8aad306e7b9 @vishnugopal vishnugopal committed Nov 11, 2011
Showing with 134 additions and 1 deletion.
  1. +8 −0 .gitignore
  2. +2 −0 .rspec
  3. +1 −0 .rvmrc
  4. +28 −0 Gemfile
  5. +65 −0 Gemfile.lock
  6. +6 −0 Guardfile
  7. +6 −1 redis-queue.rb → lib/mobme/infrastructure/redis_queue.rb
  8. +7 −0 spec/mobme/infrastructure/redis_queue_spec.rb
  9. +11 −0 spec/spec_helper.rb
View
8 .gitignore
@@ -0,0 +1,8 @@
+vendor/
+.bundle/
+coverage/
+spec/reports
+*.log
+.yardoc
+*.gem
+*.swp
View
2 .rspec
@@ -0,0 +1,2 @@
+--color
+--profile
View
1 .rvmrc
@@ -0,0 +1 @@
+rvm ruby-1.9.2
View
28 Gemfile
@@ -0,0 +1,28 @@
+source "http://gems.mobme.in"
+source :rubygems
+
+group :development do
+ gem "rake"
+ gem "rspec"
+ gem "guard"
+ gem "guard-rspec"
+ gem "simplecov"
+ gem "flog"
+ gem "yard"
+ gem "ci_reporter"
+ gem "simplecov-rcov"
+ gem "diff-lcs"
+end
+
+group :osx do
+ gem "growl"
+ gem 'rb-fsevent'
+end
+
+group :linux do
+ gem "rb-inotify"
+ gem "libnotify"
+end
+
+gem "hiredis", "~> 0.3.1"
+gem "redis", "~> 2.2.0", :require => ["redis/connection/hiredis", "redis"]
View
65 Gemfile.lock
@@ -0,0 +1,65 @@
+GEM
+ remote: http://gems.mobme.in/
+ remote: http://rubygems.org/
+ specs:
+ builder (3.0.0)
+ ci_reporter (1.6.5)
+ builder (>= 2.1.2)
+ diff-lcs (1.1.3)
+ ffi (1.0.10)
+ flog (2.5.3)
+ ruby_parser (~> 2.0)
+ sexp_processor (~> 3.0)
+ growl (1.0.3)
+ guard (0.8.8)
+ thor (~> 0.14.6)
+ guard-rspec (0.5.3)
+ guard (>= 0.8.4)
+ hiredis (0.3.2)
+ libnotify (0.5.9)
+ multi_json (1.0.3)
+ rake (0.9.2.2)
+ rb-fsevent (0.4.3.1)
+ rb-inotify (0.8.8)
+ ffi (>= 0.5.0)
+ redis (2.2.2)
+ rspec (2.7.0)
+ rspec-core (~> 2.7.0)
+ rspec-expectations (~> 2.7.0)
+ rspec-mocks (~> 2.7.0)
+ rspec-core (2.7.1)
+ rspec-expectations (2.7.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.7.0)
+ ruby_parser (2.3.1)
+ sexp_processor (~> 3.0)
+ sexp_processor (3.0.7)
+ simplecov (0.5.4)
+ multi_json (~> 1.0.3)
+ simplecov-html (~> 0.5.3)
+ simplecov-html (0.5.3)
+ simplecov-rcov (0.2.3)
+ simplecov (>= 0.4.1)
+ thor (0.14.6)
+ yard (0.7.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ ci_reporter
+ diff-lcs
+ flog
+ growl
+ guard
+ guard-rspec
+ hiredis (~> 0.3.1)
+ libnotify
+ rake
+ rb-fsevent
+ rb-inotify
+ redis (~> 2.2.0)
+ rspec
+ simplecov
+ simplecov-rcov
+ yard
View
6 Guardfile
@@ -0,0 +1,6 @@
+
+guard 'rspec', :version => 2 do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+end
View
7 redis-queue.rb → lib/mobme/infrastructure/redis_queue.rb
@@ -2,9 +2,14 @@
require 'redis'
require 'json'
+module MobME
+ module Infrastructure
+ end
+end
+
# RedisQueue is a simple queueing system built on Redis
# Adapted from: https://gist.github.com/616837 and restmq.com
-class RedisQueue
+class MobME::Infrastructure::RedisQueue
# The namespace that all redis queue keys live inside Redis
NAMESPACE = 'redis:queue:'
View
7 spec/mobme/infrastructure/redis_queue_spec.rb
@@ -0,0 +1,7 @@
+require_relative '../../spec_helper'
+
+describe MobME::Infrastructure::RedisQueue do
+ it "exists" do
+ MobME::Infrastructure::RedisQueue.new
+ end
+end
View
11 spec/spec_helper.rb
@@ -0,0 +1,11 @@
+require 'simplecov'
+require 'simplecov-rcov'
+
+SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
+SimpleCov.start do
+ add_filter "vendor"
+ add_filter "examples"
+ add_filter "spec"
+end if ENV["COVERAGE"]
+
+require 'mobme/infrastructure/redis_queue'

0 comments on commit 48ec248

Please sign in to comment.
Something went wrong with that request. Please try again.