reviewed 0.1.21 → 0.1.22

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.
@@ -17,12 +17,7 @@ module Reviewed
17
17
 
18
18
  def resource(name)
19
19
  klass_string = "Reviewed::#{name.to_s.singularize.classify}"
20
-
21
- begin
22
- klass = klass_string.constantize
23
- rescue
24
- raise "Resource: #{klass_string} not found"
25
- end
20
+ klass_string.constantize rescue name
26
21
  end
27
22
 
28
23
  def method_missing(method, *args, &block)
@@ -1,4 +1,4 @@
1
1
  module Reviewed
2
- VERSION = "0.1.21"
2
+ VERSION = "0.1.22"
3
3
  API_VERSION = 'v1'
4
4
  end
data/spec/client_spec.rb CHANGED
@@ -43,10 +43,8 @@ describe Reviewed::Client do
43
43
 
44
44
  context 'constant does not exist' do
45
45
 
46
- it 'raises an error' do
47
- expect {
48
- client.resource("tester")
49
- }.to raise_error
46
+ it 'returns the string' do
47
+ client.resource("foobar").should eql("foobar")
50
48
  end
51
49
  end
52
50
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reviewed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.1.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: