devise-dummy_authenticable 0.0.1

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9e59731d9fdfc552178938f943deb483657eb5d3
4
+ data.tar.gz: 8bc03b85eced06584d62616b802d75f5c03789f4
5
+ SHA512:
6
+ metadata.gz: 55ffae8f29856e42055719a15624bbc1a29ac96732d84d0c488bfd619d645fb4c9242027b795d5b2af53e39d647b786ac04926baca799056e6d42118f6e2fb4f
7
+ data.tar.gz: f5842c4d634765e7a558072d4cae6aceff11ae3614c4b96470be8a2c97af6eadd99aae8272f80183597a34b51528fe4c6405dc971657065b2b03ad6532d07ca2
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in devise-dummy_authenticable.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Money Advice Service
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # Devise::DummyAuthenticable
2
+
3
+ Devise strategy for use with your Rails engine.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```sh
10
+ gem 'devise-dummy_authenticable'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ ```sh
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+
21
+ ```sh
22
+ $ gem install devise-dummy_authenticable
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ Add the `dummy_authenticatable` module to your model:
28
+
29
+ ```ruby
30
+ class User < ActiveRecord::Base
31
+ devise :dummy_authenticatable
32
+ end
33
+ ```
34
+
35
+ ## Contributing
36
+
37
+ 1. Fork it
38
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
39
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
40
+ 4. Push to the branch (`git push origin my-new-feature`)
41
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,21 @@
1
+ Gem::Specification.new do |spec|
2
+ spec.name = 'devise-dummy_authenticable'
3
+ spec.version = '0.0.1'
4
+ spec.authors = ['Andrew Garner', 'Gareth Visagie']
5
+ spec.email = ['Andrew.Garner@moneyadviceservice.org.uk',
6
+ 'Gareth.Visagie@moneyadviceservice.org.uk']
7
+ spec.description = %q{Devise strategy for use with your Rails engine}
8
+ spec.summary = %q{Devise strategy for use with your Rails engine}
9
+ spec.homepage = 'https://github.com/moneyadviceservice/devise-dummy_authenticable'
10
+ spec.license = 'MIT'
11
+
12
+ spec.files = `git ls-files`.split($/)
13
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
14
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
+ spec.require_paths = %w(lib)
16
+
17
+ spec.add_dependency 'devise', '>= 2.1.0'
18
+
19
+ spec.add_development_dependency 'bundler', '~> 1.3'
20
+ spec.add_development_dependency 'rake'
21
+ end
@@ -0,0 +1,7 @@
1
+ require 'devise/models/dummy_authenticable'
2
+ require 'devise/strategies/dummy_authenticable'
3
+
4
+ Devise.add_module(:dummy_authenticable, { strategy: true,
5
+ model: true,
6
+ controller: :sessions,
7
+ route: { session: :routes } })
@@ -0,0 +1,9 @@
1
+ require 'active_support/concern'
2
+
3
+ module Devise
4
+ module Models
5
+ module DummyAuthenticable
6
+ extend ActiveSupport::Concern
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,20 @@
1
+ require 'devise/strategies/authenticatable'
2
+
3
+ module Devise
4
+ module Strategies
5
+ class DummyAuthenticable < Authenticatable
6
+ def valid?
7
+ params['controller'] == 'sessions' && params['action'] == 'create'
8
+ end
9
+
10
+ def authenticate!
11
+ resource = mapping.to.first_or_create
12
+
13
+ success!(resource)
14
+ end
15
+ end
16
+ end
17
+ end
18
+
19
+ Warden::Strategies.add(:dummy_authenticable,
20
+ Devise::Strategies::DummyAuthenticable)
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: devise-dummy_authenticable
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Andrew Garner
8
+ - Gareth Visagie
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-09-09 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: devise
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - '>='
19
+ - !ruby/object:Gem::Version
20
+ version: 2.1.0
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - '>='
26
+ - !ruby/object:Gem::Version
27
+ version: 2.1.0
28
+ - !ruby/object:Gem::Dependency
29
+ name: bundler
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: '1.3'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ~>
40
+ - !ruby/object:Gem::Version
41
+ version: '1.3'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rake
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ description: Devise strategy for use with your Rails engine
57
+ email:
58
+ - Andrew.Garner@moneyadviceservice.org.uk
59
+ - Gareth.Visagie@moneyadviceservice.org.uk
60
+ executables: []
61
+ extensions: []
62
+ extra_rdoc_files: []
63
+ files:
64
+ - .gitignore
65
+ - Gemfile
66
+ - LICENSE.txt
67
+ - README.md
68
+ - Rakefile
69
+ - devise-dummy_authenticable.gemspec
70
+ - lib/devise-dummy_authenticable.rb
71
+ - lib/devise/models/dummy_authenticable.rb
72
+ - lib/devise/strategies/dummy_authenticable.rb
73
+ homepage: https://github.com/moneyadviceservice/devise-dummy_authenticable
74
+ licenses:
75
+ - MIT
76
+ metadata: {}
77
+ post_install_message:
78
+ rdoc_options: []
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ requirements: []
92
+ rubyforge_project:
93
+ rubygems_version: 2.0.3
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: Devise strategy for use with your Rails engine
97
+ test_files: []