devise-token_authenticatable 0.1.0.beta1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ rvm:
3
+ - "1.9.3"
4
+ - "2.0.0"
5
+ - jruby-19mode # JRuby in 1.9 mode
6
+
7
+ env:
8
+ global:
9
+ - "JRUBY_OPTS=-Xcext.enabled=true"
10
+
11
+ script: bundle exec rspec
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # Devise::TokenAuthenticatable
2
2
 
3
- **Note that this gem is not ready for usage, yet!**
3
+ [![Gem Version](https://badge.fury.io/rb/devise-token_authenticatable.png)](http://badge.fury.io/rb/devise-token_authenticatable) [![Build Status](https://travis-ci.org/baschtl/devise-token_authenticatable.png?branch=master)](https://travis-ci.org/baschtl/devise-token_authenticatable) [![Code Climate](https://codeclimate.com/github/baschtl/devise-token_authenticatable.png)](https://codeclimate.com/github/baschtl/devise-token_authenticatable)
4
4
 
5
- TODO: Write a gem description
5
+ This gem provides the extracted Token Authenticatable module of devise. It includes the functionality that was also in [version 3.1.2](https://github.com/plataformatec/devise/tree/v3.1.2) of devise. With the inclusion of this module a user is able to sign in via an authentication token. This token can be given via a query string or HTTP Basic Authentication. This gem requires devise 3.2.0 or newer.
6
+
7
+ Use this gem as a starting point for your own token authentication mechanism for devise. Furthermore, if you need token authentication in connection with newer devise releases this gem might be an appropriate solution, too.
6
8
 
7
9
  ## Installation
8
10
 
@@ -20,12 +22,27 @@ Or install it yourself as:
20
22
 
21
23
  ## Usage
22
24
 
23
- TODO: Write usage instructions here
25
+ Add `:token_authenticatable` to your devise model:
26
+
27
+ class User < ActiveRecord::Base
28
+ devise :database_authenticatable, :token_authenticatable
29
+ end
30
+
31
+ The authentication key name used by this module defaults to `auth_token`. Use the following configuration (e.g., in a Rails initializer) to alter the name:
32
+
33
+ Devise::TokenAuthenticatable.setup do |config|
34
+ config.token_authentication_key = :other_key_name
35
+ end
36
+
37
+ ## Documentation
38
+
39
+ For your convenience there is also a [source code documentation](http://rubydoc.info/github/baschtl/devise-token_authenticatable/master/frames).
24
40
 
25
41
  ## Contributing
26
42
 
27
- 1. Fork it
28
- 2. Create your feature branch (`git checkout -b my-new-feature`)
29
- 3. Commit your changes (`git commit -am 'Add some feature'`)
30
- 4. Push to the branch (`git push origin my-new-feature`)
31
- 5. Create new Pull Request
43
+ 1. Fork it.
44
+ 2. Create your feature branch (`git checkout -b my-new-feature`).
45
+ 3. Commit your changes (`git commit -am 'Add some feature'`).
46
+ 4. Push to the branch (`git push origin my-new-feature`).
47
+ 5. Create new Pull Request.
48
+ 6. Get a thank you!
@@ -30,7 +30,13 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency "pry"
31
31
  spec.add_development_dependency "factory_girl_rails"
32
32
  spec.add_development_dependency "timecop"
33
- spec.add_development_dependency "sqlite3", "~> 1.3"
34
33
  spec.add_development_dependency "bundler", "~> 1.3"
35
34
  spec.add_development_dependency "rake"
35
+
36
+ # Fix database connection with sqlite3 and jruby
37
+ if RUBY_ENGINE == 'ruby'
38
+ spec.add_development_dependency "sqlite3", "~> 1.3"
39
+ elsif RUBY_ENGINE == 'jruby'
40
+ spec.add_development_dependency "activerecord-jdbcsqlite3-adapter"
41
+ end
36
42
  end
@@ -1,5 +1,5 @@
1
1
  module Devise
2
2
  module TokenAuthenticatable
3
- VERSION = "0.1.0.beta1".freeze
3
+ VERSION = "0.1.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-token_authenticatable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.beta1
5
- prerelease: 6
4
+ version: 0.1.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sebastian Oelke
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-20 00:00:00.000000000 Z
12
+ date: 2014-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: devise
@@ -124,7 +124,7 @@ dependencies:
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  - !ruby/object:Gem::Dependency
127
- name: sqlite3
127
+ name: bundler
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
@@ -140,37 +140,37 @@ dependencies:
140
140
  - !ruby/object:Gem::Version
141
141
  version: '1.3'
142
142
  - !ruby/object:Gem::Dependency
143
- name: bundler
143
+ name: rake
144
144
  requirement: !ruby/object:Gem::Requirement
145
145
  none: false
146
146
  requirements:
147
- - - ~>
147
+ - - ! '>='
148
148
  - !ruby/object:Gem::Version
149
- version: '1.3'
149
+ version: '0'
150
150
  type: :development
151
151
  prerelease: false
152
152
  version_requirements: !ruby/object:Gem::Requirement
153
153
  none: false
154
154
  requirements:
155
- - - ~>
155
+ - - ! '>='
156
156
  - !ruby/object:Gem::Version
157
- version: '1.3'
157
+ version: '0'
158
158
  - !ruby/object:Gem::Dependency
159
- name: rake
159
+ name: sqlite3
160
160
  requirement: !ruby/object:Gem::Requirement
161
161
  none: false
162
162
  requirements:
163
- - - ! '>='
163
+ - - ~>
164
164
  - !ruby/object:Gem::Version
165
- version: '0'
165
+ version: '1.3'
166
166
  type: :development
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
169
169
  none: false
170
170
  requirements:
171
- - - ! '>='
171
+ - - ~>
172
172
  - !ruby/object:Gem::Version
173
- version: '0'
173
+ version: '1.3'
174
174
  description: ! "This gem provides the extracted Token Authenticatable module of devise.\n
175
175
  \ It enables the user to sign in via an authentication token.
176
176
  This token\n can be given via a query string or HTTP Basic
@@ -182,6 +182,7 @@ extensions: []
182
182
  extra_rdoc_files: []
183
183
  files:
184
184
  - .gitignore
185
+ - .travis.yml
185
186
  - Gemfile
186
187
  - LICENSE
187
188
  - README.md
@@ -242,9 +243,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
242
243
  required_rubygems_version: !ruby/object:Gem::Requirement
243
244
  none: false
244
245
  requirements:
245
- - - ! '>'
246
+ - - ! '>='
246
247
  - !ruby/object:Gem::Version
247
- version: 1.3.1
248
+ version: '0'
248
249
  requirements: []
249
250
  rubyforge_project:
250
251
  rubygems_version: 1.8.23