devise_browserid_authenticatable 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
- .idea/
1
+ .idea/
2
+ test/tmp
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 1.3.0
2
+
3
+ * Fixed a typo in the README.me - thanks @narr
4
+ * move browserid_url to initializer - thanks @ccarruitero
5
+ * add some generators - thanks @ccarruitero
6
+
1
7
  # 1.2.0
2
8
 
3
9
  * Fixed an indentation typo in the readme - thanks to @pjambet
data/README.md CHANGED
@@ -4,7 +4,7 @@ devise_browserid_authenticatable
4
4
  Written by Dennis Schubert
5
5
 
6
6
  devise_browserid_authenticatable is a module to add [BrowserID/Persona](https://persona.org)
7
- authentication support tp [Devise](http://github.com/plataformatec/devise) applications.
7
+ authentication support to [Devise](http://github.com/plataformatec/devise) applications.
8
8
 
9
9
  The warden strategy was written for use in Rails 3.1 and Devise 2 application, but they should
10
10
  work in other configurations, too.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new do |task|
5
+ task.libs << 'lib'
6
+ task.libs << 'test'
7
+ task.pattern = 'test/**/*_test.rb'
8
+ task.warning = true
9
+ task.verbose = true
10
+ end
11
+
12
+ task default: :test
@@ -10,7 +10,9 @@ Gem::Specification.new do |s|
10
10
  s.files = `git ls-files`.split("\n")
11
11
  s.require_paths = ["lib"]
12
12
 
13
- s.version = "1.2.0"
13
+ s.version = "1.3.0"
14
14
 
15
- s.add_dependency "devise", "~> 2.1"
15
+ s.add_dependency 'devise', '>= 2.1'
16
+ s.add_development_dependency 'minitest'
17
+ s.add_development_dependency 'rake'
16
18
  end
@@ -1,2 +1,3 @@
1
+ require "devise_browserid_authenticatable/config"
1
2
  require "devise_browserid_authenticatable/strategy"
2
- require "devise_browserid_authenticatable/railtie"
3
+ require "devise_browserid_authenticatable/railtie"
@@ -0,0 +1,5 @@
1
+ require 'devise'
2
+
3
+ module Devise
4
+ mattr_accessor :browserid_url
5
+ end
@@ -33,11 +33,7 @@ class Devise::Strategies::BrowseridAuthenticatable < Devise::Strategies::Authent
33
33
  end
34
34
 
35
35
  def self.browserid_url
36
- if Rails.env.production?
37
- "login.persona.org"
38
- else
39
- "login.dev.anosrep.org"
40
- end
36
+ Devise.browserid_url
41
37
  end
42
38
  end
43
39
 
@@ -0,0 +1,12 @@
1
+ module BrowserId
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+ desc 'Install browser_id'
5
+ source_root File.expand_path('../../templates', __FILE__)
6
+
7
+ def copy_initializer
8
+ template 'devise_browserid.rb', 'config/initializers/browser_id.rb'
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,6 @@
1
+ Devise.setup do |config|
2
+ config.warden do |manager|
3
+ manager.default_strategies(:scope => :user).unshift :browserid_authenticatable
4
+ end
5
+ config.browserid_url = "login.persona.org"
6
+ end
@@ -0,0 +1,15 @@
1
+ require 'test_helper'
2
+ require 'rails/generators/test_case'
3
+ require 'generators/browser_id/install_generator'
4
+
5
+ class InstallGeneratorTest < Rails::Generators::TestCase
6
+ tests BrowserId::Generators::InstallGenerator
7
+ destination File.expand_path('../../tmp', __FILE__ )
8
+ setup :prepare_destination
9
+
10
+ test 'create initializer' do
11
+ run_generator
12
+
13
+ assert_file "config/initializers/browser_id.rb"
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ require 'bundler/setup'
2
+ require 'minitest/autorun'
3
+ require 'minitest/pride'
4
+ require 'devise'
5
+ require 'devise_browserid_authenticatable'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_browserid_authenticatable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,14 +9,14 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-19 00:00:00.000000000 Z
12
+ date: 2013-07-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: devise
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ~>
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: '2.1'
22
22
  type: :runtime
@@ -24,9 +24,41 @@ dependencies:
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ~>
27
+ - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '2.1'
30
+ - !ruby/object:Gem::Dependency
31
+ name: minitest
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'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
30
62
  description: Mozilla BrowserID/Persona authentication module that works with Rails
31
63
  3.1+ and Devise 2.1+
32
64
  email: gems@schub.io
@@ -38,11 +70,17 @@ files:
38
70
  - CHANGELOG.md
39
71
  - LICENSE
40
72
  - README.md
73
+ - Rakefile
41
74
  - devise_browserid_authenticatable.gemspec
42
75
  - lib/devise_browserid_authenticatable.rb
76
+ - lib/devise_browserid_authenticatable/config.rb
43
77
  - lib/devise_browserid_authenticatable/railtie.rb
44
78
  - lib/devise_browserid_authenticatable/strategy.rb
45
79
  - lib/devise_browserid_authenticatable/view_helpers.rb
80
+ - lib/generators/browser_id/install_generator.rb
81
+ - lib/generators/templates/devise_browserid.rb
82
+ - test/generators/install_generator_test.rb
83
+ - test/test_helper.rb
46
84
  homepage: https://github.com/denschub/devise_browserid_authenticatable
47
85
  licenses: []
48
86
  post_install_message:
@@ -63,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
101
  version: '0'
64
102
  requirements: []
65
103
  rubyforge_project:
66
- rubygems_version: 1.8.24
104
+ rubygems_version: 1.8.25
67
105
  signing_key:
68
106
  specification_version: 3
69
107
  summary: BrowserID/Persona authentication for Devise 2+