integration_wrapper 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49,7 +49,7 @@ $:.unshift(File.dirname(__FILE__)) unless
49
49
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
50
50
 
51
51
  module IntegrationWrapper
52
- VERSION = '0.0.4'
52
+ VERSION = '0.0.5'
53
53
  end
54
54
 
55
55
  if defined?(Rails)
@@ -59,14 +59,11 @@ module IntegrationWrapper
59
59
  def method_missing sym, *args, &block
60
60
  # First check if the method we're trying to call is available.
61
61
  name = "#{sym}_#{@@mode}"
62
- # Now send
63
- begin
62
+
63
+ if self.respond_to?(name)
64
64
  self.send name, *args, &block
65
- rescue NoMethodError => e
66
- puts "Error trying to call method #{name}. Maybe you forgot to add it? I need all methods to be suffixed with either #{IntegrationWrapper::Base::MODE_ONLINE} or #{IntegrationWrapper::Base::MODE_OFFLINE}. Example: foo_online. Methods: #{methods.inspect}. Error was: #{e}."
67
- puts "Trace:"
68
- puts e.backtrace
69
- raise e
65
+ else
66
+ super
70
67
  end
71
68
  end
72
69
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: integration_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-01 00:00:00.000000000 Z
12
+ date: 2013-04-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc