tumbz 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tumbz/middleware/auth.rb +1 -1
- data/lib/tumbz/user.rb +3 -3
- data/lib/tumbz/version.rb +1 -1
- data/tumbz.gemspec +1 -0
- metadata +24 -3
@@ -7,7 +7,7 @@ module Tumbz
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def call(env)
|
10
|
-
env[:request_headers]["Authorization"] = "OAuth #{
|
10
|
+
env[:request_headers]["Authorization"] = "OAuth #{Thread.current[:tumbz_access_token]}" unless Thread.current[:tumbz_access_token].nil?
|
11
11
|
@app.call(env)
|
12
12
|
end
|
13
13
|
end
|
data/lib/tumbz/user.rb
CHANGED
@@ -7,13 +7,13 @@ module Tumbz
|
|
7
7
|
|
8
8
|
def self.sign_in!(email, password)
|
9
9
|
post_raw("auth", :email => email, :password => password) do |parsed_data|
|
10
|
-
|
10
|
+
Thread.current[:tumbz_access_token] = parsed_data[:data][:access_token]
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.sign_out!
|
15
|
-
|
16
|
-
|
15
|
+
Thread.current[:tumbz_access_token] = nil
|
16
|
+
Thread.current[:tumbz_access_token].nil?
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
data/lib/tumbz/version.rb
CHANGED
data/tumbz.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tumbz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
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: 2012-12-
|
12
|
+
date: 2012-12-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: her
|
@@ -27,6 +27,22 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
30
46
|
description: Ruby wrapper for the Tum.bz API
|
31
47
|
email:
|
32
48
|
- remi@exomel.com
|
@@ -66,12 +82,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
82
|
- - ! '>='
|
67
83
|
- !ruby/object:Gem::Version
|
68
84
|
version: '0'
|
85
|
+
segments:
|
86
|
+
- 0
|
87
|
+
hash: -101402708347055379
|
69
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
89
|
none: false
|
71
90
|
requirements:
|
72
91
|
- - ! '>='
|
73
92
|
- !ruby/object:Gem::Version
|
74
93
|
version: '0'
|
94
|
+
segments:
|
95
|
+
- 0
|
96
|
+
hash: -101402708347055379
|
75
97
|
requirements: []
|
76
98
|
rubyforge_project:
|
77
99
|
rubygems_version: 1.8.23
|
@@ -79,4 +101,3 @@ signing_key:
|
|
79
101
|
specification_version: 3
|
80
102
|
summary: Ruby wrapper for the Tum.bz API
|
81
103
|
test_files: []
|
82
|
-
has_rdoc:
|