satz 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gems +1 -0
- data/CHANGELOG +4 -0
- data/lib/satz.rb +3 -10
- data/satz.gemspec +2 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 527d7619ab15c936ca0bdf194f1a26c039df1308
|
4
|
+
data.tar.gz: 052df45b1c3496cef2af07ef95e2a5a1f2d78b09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c9bd5c8d92e1cc753943f2f7f564c64073dc72eff7e51360e84270169958ea3df45371b343da4267e8644fb5782674bf50d1a46d8c1e960276451654593669d
|
7
|
+
data.tar.gz: 387a0f85f1130dcc26109061b407830d6315a796c8dfa6d01a9a705f91da42c5457ce552b38603f12133647a297f020c073237119c13b511fdb373df01b31c00
|
data/.gems
CHANGED
data/CHANGELOG
CHANGED
data/lib/satz.rb
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
require "syro"
|
24
24
|
require "json"
|
25
|
-
require "
|
25
|
+
require "basica"
|
26
26
|
|
27
27
|
class Satz
|
28
28
|
|
@@ -56,7 +56,7 @@ class Satz
|
|
56
56
|
end
|
57
57
|
|
58
58
|
class Deck < Syro::Deck
|
59
|
-
|
59
|
+
include Basica
|
60
60
|
|
61
61
|
# Checks the Basic Auth headers and yields
|
62
62
|
# user and pass if credentials are provided.
|
@@ -75,14 +75,7 @@ class Satz
|
|
75
75
|
# end
|
76
76
|
#
|
77
77
|
def auth
|
78
|
-
|
79
|
-
return nil
|
80
|
-
end
|
81
|
-
|
82
|
-
cred = http_auth.split(" ")[1]
|
83
|
-
user, pass = Base64.decode64(cred).split(":")
|
84
|
-
|
85
|
-
yield(user, pass) || nil
|
78
|
+
basic_auth(env) { |user, pass| yield(user, pass) }
|
86
79
|
end
|
87
80
|
|
88
81
|
# Respond by default with JSON. The default charset
|
data/satz.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "satz"
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.4"
|
4
4
|
s.summary = "Framework for JSON microservices"
|
5
5
|
s.description = "Framework for JSON microservices"
|
6
6
|
s.authors = ["Michel Martens"]
|
@@ -11,6 +11,7 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.files = `git ls-files`.split("\n")
|
12
12
|
|
13
13
|
s.add_dependency "syro", "~> 2.0"
|
14
|
+
s.add_dependency "basica", "~> 1.0"
|
14
15
|
s.add_development_dependency "cutest"
|
15
16
|
s.add_development_dependency "rack-test"
|
16
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: satz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michel Martens
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: syro
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: basica
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: cutest
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|