Skip to content
Browse files

Remove dependency on uuidtools and the automatic addition of an id at…

…tribute to commands
  • Loading branch information...
1 parent 98cb989 commit 784c5b83cb77a1f44517a7dc86efb14503f3849b @karmajunkie committed Aug 4, 2012
Showing with 5 additions and 8 deletions.
  1. +4 −0 Gemfile
  2. +0 −4 imperator.gemspec
  3. +0 −2 lib/imperator/command.rb
  4. +1 −2 spec/imperator/command_spec.rb
View
4 Gemfile
@@ -4,3 +4,7 @@ source "http://rubygems.org"
gemspec
gem "pry", :group => [:test, :development]
+group :test do
+ gem "rspec"
+ gem "rspec-mocks"
+end
View
4 imperator.gemspec
@@ -19,9 +19,5 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]
# specify any dependencies here; for example:
- s.add_development_dependency "rspec"
- # s.add_runtime_dependency "rest-client"
- s.add_runtime_dependency "uuidtools"
- s.add_runtime_dependency "activemodel"
s.add_runtime_dependency "virtus"
end
View
2 lib/imperator/command.rb
@@ -1,4 +1,3 @@
-require 'uuidtools'
require 'active_model'
require 'virtus'
class Imperator::Command
@@ -16,7 +15,6 @@ class Imperator::Command
define_model_callbacks :create, :perform, :initialize
- attribute :id, String, :default => proc { UUIDTools::UUID.timestamp_create.to_s }
def self.action(&block)
define_method(:action, &block)
View
3 spec/imperator/command_spec.rb
@@ -66,8 +66,7 @@ class AttributeCommand < Imperator::Command
it "will create attributes as json" do
command = AttributeCommand.new
- command.as_json.should == {"id" => command.id,
- "gets_default" => "foo",
+ command.as_json.should == { "gets_default" => "foo",
"declared_attr" => nil}
end
end

0 comments on commit 784c5b8

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