Permalink
Browse files

Switch from uuid gem to uuidtools

uuid gem depends on macaddr, which raises an error on our IPv6 servers:
macaddr-1.0.0/lib/macaddr.rb:52:in `addr': no mac address candidates (RuntimeError)
  • Loading branch information...
1 parent 6339715 commit 580a52071982c78ae983c5e45c6c2cae01a52052 @brynary brynary committed Sep 28, 2010
Showing with 7 additions and 8 deletions.
  1. +1 −1 Gemfile
  2. +2 −4 Gemfile.lock
  3. +1 −1 Rakefile
  4. +2 −2 lib/e20/ops/middleware/transaction_id_middleware.rb
  5. +1 −0 spec/ops/revision_spec.rb
View
@@ -3,6 +3,6 @@ source :rubyforge
gem "jeweler", "~> 1.4.0"
gem "rspec", "~> 1.3.0"
gem "rake", "~> 0.8.7"
-gem "uuid", "~> 2.1.0"
+gem "uuidtools"
gem "activesupport", "~> 2.3.8"
gem "json_pure", "= 1.4.3"
View
@@ -9,13 +9,11 @@ GEM
git (>= 1.2.5)
rubyforge (>= 2.0.0)
json_pure (1.4.3)
- macaddr (1.0.0)
rake (0.8.7)
rspec (1.3.0)
rubyforge (2.0.4)
json_pure (>= 1.1.7)
- uuid (2.1.1)
- macaddr (~> 1.0)
+ uuidtools (2.1.1)
PLATFORMS
ruby
@@ -26,4 +24,4 @@ DEPENDENCIES
json_pure (= 1.4.3)
rake (~> 0.8.7)
rspec (~> 1.3.0)
- uuid (~> 2.1.0)
+ uuidtools
View
@@ -11,7 +11,7 @@ Jeweler::Tasks.new do |gem|
gem.homepage = "http://github.com/efficiency20/ops_middleware"
gem.description = "Adds middleware for debugging purposes"
gem.authors = ["Efficiency 2.0"]
- gem.add_dependency "uuid", "~> 2.1.0"
+ gem.add_dependency "uuidtools", "~> 2.1"
gem.add_development_dependency "rspec", "~> 1.3.0"
end
@@ -1,4 +1,4 @@
-require "uuid"
+require "uuidtools"
require "logger"
module E20
@@ -8,7 +8,7 @@ class TransactionIdMiddleware
def initialize(app, options = {})
@app = app
- @uuid_generator = options[:uuid_generator] || UUID.new.method(:generate)
+ @uuid_generator = options[:uuid_generator] || UUIDTools::UUID.method(:random_create)
@logger = options[:logger] || Logger.new(STDOUT)
end
@@ -1,4 +1,5 @@
require "spec_helper"
+require "tmpdir"
describe E20::Ops::Revision do
context "when a REVISION file is present" do

0 comments on commit 580a520

Please sign in to comment.