Skip to content

Commit

Permalink
remove virtus
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanRada committed May 27, 2014
1 parent 9938beb commit eb59bdf
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 64 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ gemspec


gem 'wash_out', git: 'git://github.com/inossidabile/wash_out.git'
gem 'virtus'
gem 'wasabi'
gem 'savon'
gem 'httpi'
Expand Down
2 changes: 1 addition & 1 deletion lib/washout_builder/document/exception_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def self.extract_nested_complex_types(complex_class, complex_types)
param_class.send :extend, WashoutBuilder::Document::ExceptionModel
param_class.get_fault_class_ancestors( complex_types)
elsif param_class.present? && !WashoutBuilder::Type.valid_fault_class?(param_class)
raise RuntimeError, "Non-existent use of `#{param_class}` type name or this class does not use Virtus.model. Consider using classified types that include Virtus.mode for exception atribute types."
raise RuntimeError, "Non-existent use of `#{param_class}` type name or this class does not inherit from SoapError. Consider using classified types that include SoapError for exception classes."
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ class SOAPError < WashOut::Dispatcher::SOAPError

end

describe WashoutBuilder::Document::VirtusModel do
describe WashoutBuilder::Document::ExceptionModel do

let(:subject) { SOAPError}



it "gets the strcuture" do
subject.get_virtus_model_structure.should eq({"code"=>{:primitive=>"Integer", :member_type=>nil}, "message"=>{:primitive=>"String", :member_type=>nil}, "backtrace"=>{:primitive=>"String", :member_type=>nil}})
subject.get_virtus_model_structure.should eq({"code"=>{:primitive=>"integer", :member_type=>nil}, "message"=>{:primitive=>"string", :member_type=>nil}, "backtrace"=>{:primitive=>"string", :member_type=>nil}})
end

it "gets the member type for arrays" do
Expand All @@ -29,7 +29,7 @@ class SOAPError < WashOut::Dispatcher::SOAPError


it "gets the strcuture" do
subject.remove_fault_type_inheritable_elements(["code"]).should eq({ "message"=>{:primitive=>"String", :member_type=>nil}, "backtrace"=>{:primitive=>"String", :member_type=>nil}})
subject.remove_fault_type_inheritable_elements(["code"]).should eq({ "message"=>{:primitive=>"string", :member_type=>nil}, "backtrace"=>{:primitive=>"string", :member_type=>nil}})
end

end
3 changes: 0 additions & 3 deletions spec/lib/washout_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -595,9 +595,6 @@ def bad

end

it "intanstiates correctly a custom exception" do
soap_exception.attributes.should eq({:code=>error_code, :message=>error_message, :backtrace=>nil})
end
end


Expand Down
7 changes: 0 additions & 7 deletions spec/support/exceptions/another_exception.rb

This file was deleted.

15 changes: 0 additions & 15 deletions spec/support/exceptions/base_exception.rb

This file was deleted.

7 changes: 0 additions & 7 deletions spec/support/exceptions/custom2.rb

This file was deleted.

8 changes: 0 additions & 8 deletions spec/support/exceptions/ex_model.rb

This file was deleted.

5 changes: 0 additions & 5 deletions spec/support/exceptions/name_mod.rb

This file was deleted.

5 changes: 0 additions & 5 deletions spec/support/exceptions/name_model.rb

This file was deleted.

8 changes: 0 additions & 8 deletions spec/support/exceptions/value_object_model.rb

This file was deleted.

1 change: 0 additions & 1 deletion washout_builder.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ Gem::Specification.new do |s|
s.test_files = s.files.grep(/^(spec)/)
s.require_paths = ["lib"]
s.add_runtime_dependency 'wash_out', '~> 0.9', '>= 0.9.1'
#s.add_runtime_dependency 'virtus', '~> 1.0', '>= 1.0.0'
end

0 comments on commit eb59bdf

Please sign in to comment.