tumbz 0.0.3 → 0.0.4
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
- metadata +3 -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 #{Tumbz.access_token}" unless 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
|
+
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
|
+
Tumbz.access_token = nil
|
16
|
+
Tumbz.access_token.nil?
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
data/lib/tumbz/version.rb
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.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -84,7 +84,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
84
84
|
version: '0'
|
85
85
|
segments:
|
86
86
|
- 0
|
87
|
-
hash:
|
87
|
+
hash: 1882409269895347375
|
88
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
89
|
none: false
|
90
90
|
requirements:
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
version: '0'
|
94
94
|
segments:
|
95
95
|
- 0
|
96
|
-
hash:
|
96
|
+
hash: 1882409269895347375
|
97
97
|
requirements: []
|
98
98
|
rubyforge_project:
|
99
99
|
rubygems_version: 1.8.23
|