ez_auth 0.0.1 → 0.0.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/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
data/README.md CHANGED
@@ -6,7 +6,7 @@ An easy(ish) way to use API tokens in your services
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- gem 'easy_auth'
9
+ gem 'ez_auth', :require => "easy_auth"
10
10
 
11
11
  And then execute:
12
12
 
@@ -14,7 +14,7 @@ And then execute:
14
14
 
15
15
  Or install it yourself as:
16
16
 
17
- $ gem install easy_auth
17
+ $ gem install ez_auth
18
18
 
19
19
  ## Usage
20
20
 
data/Rakefile CHANGED
@@ -1 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new
5
+
6
+ task :default => :spec
@@ -1,3 +1,3 @@
1
1
  module EasyAuth
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/easy_auth.rb CHANGED
@@ -16,7 +16,7 @@ module EasyAuth
16
16
  end
17
17
 
18
18
  def request_auth_token
19
- request.env['HTTP_X_API_TOKEN'] || params[:api_token]
19
+ request.headers['HTTP_X_API_TOKEN'] || request.env['HTTP_X_API_TOKEN'] || params[:api_token]
20
20
  end
21
21
 
22
22
  def authentication_token
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ez_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
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: 2013-12-12 00:00:00.000000000 Z
12
+ date: 2013-12-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -100,6 +100,7 @@ extra_rdoc_files: []
100
100
  files:
101
101
  - .gitignore
102
102
  - .rspec
103
+ - .travis.yml
103
104
  - Gemfile
104
105
  - LICENSE.txt
105
106
  - README.md