warden_skeleton_key 1.0.0 → 1.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 +4 -4
- data/README.md +33 -4
- data/lib/warden_skeleton_key/version.rb +1 -1
- data/warden_skeleton_key.gemspec +7 -5
- metadata +29 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2edae75ec18a1e257e1102d2b1f11d3cfb3d303f
|
4
|
+
data.tar.gz: 07df5dcb3f0fc03b0e01222369de4c92f2122924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc5106a8f67118cf473075692db9f64a036b3f8bed15f38ec6f6d438decd840a9a9e5dace20188e47c11648bbebd4305f5858c89a5b62ac396d7c4d5b579e83c
|
7
|
+
data.tar.gz: f362799cb22db265621996c5c9c485c0ab76d3c5dce51dcb2de86d06c4b33148efbfe40c71d5ad945ec8868f1b188da9740bc830cef0c5f14b60782455435490
|
data/README.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# WardenSkeletonKey
|
2
2
|
|
3
|
-
|
3
|
+
[](http://badge.fury.io/rb/warden_skeleton_key)
|
4
|
+
|
5
|
+
WardenSkeletonKey is a Rack middleware to automatically log you into
|
6
|
+
your development environment. Saving you seconds and from forgetting
|
7
|
+
those testing passwords. Was it "test123"?
|
4
8
|
|
5
9
|
## Installation
|
6
10
|
|
@@ -14,13 +18,38 @@ And then execute:
|
|
14
18
|
|
15
19
|
$ bundle
|
16
20
|
|
17
|
-
|
21
|
+
Add the middleware to your Rails development environment:
|
18
22
|
|
19
|
-
|
23
|
+
```ruby
|
24
|
+
# config/environments/development.rb
|
25
|
+
|
26
|
+
Application.configure do
|
27
|
+
# ...
|
28
|
+
|
29
|
+
if ENV["SKIP_SKELETON_KEY"].blank?
|
30
|
+
config.middleware.use WardenSkeletonKey do
|
31
|
+
# Return a user object to log in
|
32
|
+
developer_email = `git config user.email`.chomp
|
33
|
+
User.find_by email: [developer_email, 'admin@example.com']
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
```
|
20
38
|
|
21
39
|
## Usage
|
22
40
|
|
23
|
-
|
41
|
+
The block provided to WardenSkeletonKey must return a valid user object.
|
42
|
+
How that user is located is up to you because every system is different.
|
43
|
+
Above we're using the current user's git email address and falling
|
44
|
+
back to the default "admin@example.com".
|
45
|
+
|
46
|
+
With the above configuration
|
47
|
+
it is possible to skip the middleware entirely using ENV variables
|
48
|
+
when you want to restore the log in functionality:
|
49
|
+
|
50
|
+
```shell
|
51
|
+
$ SKIP_SKELETON_KEY=true rails server # skip the middleware
|
52
|
+
```
|
24
53
|
|
25
54
|
## Contributing
|
26
55
|
|
data/warden_skeleton_key.gemspec
CHANGED
@@ -6,17 +6,19 @@ require 'warden_skeleton_key/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "warden_skeleton_key"
|
8
8
|
spec.version = WardenSkeletonKey::VERSION
|
9
|
-
spec.authors = ["
|
10
|
-
spec.email = ["
|
11
|
-
spec.summary = %q{
|
12
|
-
spec.description = %q{
|
13
|
-
spec.homepage = ""
|
9
|
+
spec.authors = ["Jason Stumbaugh", "Charles Maresh"]
|
10
|
+
spec.email = ["jason.stumbaugh@orm-tech.com", "charles.maresh@orm-tech.com"]
|
11
|
+
spec.summary = %q{WardenSkeletonKey is a Rack middleware to automatically log you into your development environment.}
|
12
|
+
spec.description = %q{WardenSkeletonKey is a Rack middleware to automatically log you into your development environment. Saving you seconds and from forgetting those testing passwords. Was it "test123"?}
|
13
|
+
spec.homepage = "https://github.com/ormtech/warden_skeleton_key"
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0")
|
16
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
+
spec.add_dependency "railties", "< 5.0"
|
21
|
+
|
20
22
|
# spec.add_development_dependency "bundler", "~> 1.7"
|
21
23
|
# spec.add_development_dependency "rake", "~> 10.0"
|
22
24
|
end
|
metadata
CHANGED
@@ -1,25 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: warden_skeleton_key
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Jason Stumbaugh
|
8
8
|
- Charles Maresh
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
dependencies:
|
14
|
-
|
12
|
+
date: 2017-12-28 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: railties
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "<"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '5.0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "<"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '5.0'
|
28
|
+
description: WardenSkeletonKey is a Rack middleware to automatically log you into
|
29
|
+
your development environment. Saving you seconds and from forgetting those testing
|
30
|
+
passwords. Was it "test123"?
|
15
31
|
email:
|
16
|
-
-
|
32
|
+
- jason.stumbaugh@orm-tech.com
|
17
33
|
- charles.maresh@orm-tech.com
|
18
34
|
executables: []
|
19
35
|
extensions: []
|
20
36
|
extra_rdoc_files: []
|
21
37
|
files:
|
22
|
-
- .gitignore
|
38
|
+
- ".gitignore"
|
23
39
|
- Gemfile
|
24
40
|
- LICENSE.txt
|
25
41
|
- README.md
|
@@ -27,7 +43,7 @@ files:
|
|
27
43
|
- lib/warden_skeleton_key.rb
|
28
44
|
- lib/warden_skeleton_key/version.rb
|
29
45
|
- warden_skeleton_key.gemspec
|
30
|
-
homepage:
|
46
|
+
homepage: https://github.com/ormtech/warden_skeleton_key
|
31
47
|
licenses: []
|
32
48
|
metadata: {}
|
33
49
|
post_install_message:
|
@@ -36,18 +52,19 @@ require_paths:
|
|
36
52
|
- lib
|
37
53
|
required_ruby_version: !ruby/object:Gem::Requirement
|
38
54
|
requirements:
|
39
|
-
- -
|
55
|
+
- - ">="
|
40
56
|
- !ruby/object:Gem::Version
|
41
57
|
version: '0'
|
42
58
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
43
59
|
requirements:
|
44
|
-
- -
|
60
|
+
- - ">="
|
45
61
|
- !ruby/object:Gem::Version
|
46
62
|
version: '0'
|
47
63
|
requirements: []
|
48
64
|
rubyforge_project:
|
49
|
-
rubygems_version: 2.
|
65
|
+
rubygems_version: 2.5.2.1
|
50
66
|
signing_key:
|
51
67
|
specification_version: 4
|
52
|
-
summary:
|
68
|
+
summary: WardenSkeletonKey is a Rack middleware to automatically log you into your
|
69
|
+
development environment.
|
53
70
|
test_files: []
|