gollum-auth 0.4.0 → 0.5.0
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 +7 -4
- data/lib/gollum/auth/user.rb +5 -4
- data/lib/gollum/auth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5cbd79ba09fbb336544e7ef52c1000a385b748c2
|
|
4
|
+
data.tar.gz: d6a259ada4ef14639d287edeaefeb8e9dad93b38
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: adae779482ba1f8b3e5698591658078086132bf1c28d6c5b71cafe9604256f4b984379285940c19c001ab1be29b0fcb26ecc4dd8cade1470955b59285786ec4f
|
|
7
|
+
data.tar.gz: f42ee673c27678a7aadaa42bee5e64ba659dd46f4a02886205cfdeb27c75e15976a6acab34213a7918a208e8b74716a3300b2745a610321ea345c0419e6d8118
|
data/README.md
CHANGED
|
@@ -45,15 +45,18 @@ require 'rubygems'
|
|
|
45
45
|
require 'gollum/auth' # Don't forget to load the gem!
|
|
46
46
|
require 'gollum/app'
|
|
47
47
|
|
|
48
|
-
# Define list of authorized users
|
|
49
|
-
# and
|
|
48
|
+
# Define list of authorized users.
|
|
49
|
+
# Each user must have a username, password, name and email.
|
|
50
|
+
# Example:
|
|
50
51
|
users = YAML.load %q{
|
|
51
52
|
---
|
|
52
|
-
-
|
|
53
|
+
- username: rick
|
|
53
54
|
password: asdf754&1129-@lUZw
|
|
55
|
+
name: Rick Sanchez
|
|
54
56
|
email: rick@example.com
|
|
55
|
-
-
|
|
57
|
+
- username: morty
|
|
56
58
|
password: 12345
|
|
59
|
+
name: Morty Smith
|
|
57
60
|
email: morty@example.com
|
|
58
61
|
}
|
|
59
62
|
|
data/lib/gollum/auth/user.rb
CHANGED
|
@@ -5,13 +5,14 @@ module Gollum::Auth
|
|
|
5
5
|
class User
|
|
6
6
|
include ActiveModel::Model
|
|
7
7
|
|
|
8
|
-
attr_accessor :
|
|
8
|
+
attr_accessor :username, :password, :name, :email
|
|
9
9
|
|
|
10
|
-
validates_presence_of :
|
|
10
|
+
validates_presence_of :username, :password, :name, :email
|
|
11
|
+
validates_format_of :username, with: /\A[\w\.-]+\Z/
|
|
11
12
|
|
|
12
13
|
class << self
|
|
13
|
-
def find(
|
|
14
|
-
all.select { |u| u.
|
|
14
|
+
def find(username)
|
|
15
|
+
all.select { |u| u.username == username }.first
|
|
15
16
|
end
|
|
16
17
|
|
|
17
18
|
def all
|
data/lib/gollum/auth/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gollum-auth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Björn Albers
|
|
@@ -168,5 +168,5 @@ rubyforge_project:
|
|
|
168
168
|
rubygems_version: 2.6.10
|
|
169
169
|
signing_key:
|
|
170
170
|
specification_version: 4
|
|
171
|
-
summary: gollum-auth-0.
|
|
171
|
+
summary: gollum-auth-0.5.0
|
|
172
172
|
test_files: []
|