moonmaster9000-dupe 0.2.0 → 0.2.1

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.
@@ -8,7 +8,7 @@ class Dupe
8
8
  end
9
9
 
10
10
  def method_missing(method_name, *args, &block)
11
- set_config_option(method_name.to_sym, args)
11
+ set_config_option(method_name.to_sym, method_name.to_s.plural? ? args : args.first)
12
12
  end
13
13
 
14
14
 
@@ -1,5 +1,5 @@
1
1
  After do |scenario| #:nodoc:
2
- if Dupe.global_configuration.config[:debug] == [true]
2
+ if Dupe.global_configuration.config[:debug] == true
3
3
  ActiveResource::Connection.print_request_log
4
4
  ActiveResource::Connection.flush_request_log
5
5
  end
@@ -0,0 +1,9 @@
1
+ class String
2
+ def plural?
3
+ self.to_s == pluralize
4
+ end
5
+
6
+ def singular?
7
+ self.to_s == singularize
8
+ end
9
+ end
data/lib/dupe.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'active_resource'
2
2
  require 'active_resource/http_mock'
3
+ require 'dupe/string'
3
4
  require 'dupe/dupe'
4
5
  require 'dupe/sequence'
5
6
  require 'dupe/mock_service_response'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moonmaster9000-dupe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Parker
@@ -51,6 +51,7 @@ files:
51
51
  - lib/dupe/mock_service_response.rb
52
52
  - lib/dupe/record.rb
53
53
  - lib/dupe/sequence.rb
54
+ - lib/dupe/string.rb
54
55
  has_rdoc: false
55
56
  homepage: http://github.com/moonmaster9000/dupe
56
57
  licenses: