chute 2.1.1 → 2.1.2

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.
data/chute.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "chute"
8
- s.version = "2.1.1"
8
+ s.version = "2.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Darko Grozdanovski", "Chris Burkhart", "Petr Bela"]
data/lib/chute/client.rb CHANGED
@@ -6,10 +6,11 @@ module Chute
6
6
  Chute.configure do |config|
7
7
  config.access_token = token
8
8
  end
9
- yield block
9
+ resp = yield block
10
10
  Chute.configure do |config|
11
11
  config.access_token = temp_token
12
12
  end
13
+ resp
13
14
  end
14
15
 
15
16
  class Client
data/lib/chute/version.rb CHANGED
@@ -2,7 +2,7 @@ module Chute
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 1
5
- PATCH = 1
5
+ PATCH = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
@@ -68,6 +68,13 @@ describe Chute::Client do
68
68
  end
69
69
  Chute.access_token.should_not == 'abc'
70
70
  end
71
+
72
+ it 'should return the contents of the block rather than the oauth token' do
73
+ resp = Chute.as 'abc' do
74
+ 'not the token'
75
+ end
76
+ resp.should == 'not the token'
77
+ end
71
78
  end
72
79
 
73
80
  describe "client request methods" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chute
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -240,7 +240,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
240
240
  version: '0'
241
241
  segments:
242
242
  - 0
243
- hash: -1266505296512320884
243
+ hash: -4345887724898428816
244
244
  required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  none: false
246
246
  requirements: