tyrant 0.0.2 → 0.0.3
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/CHANGES.md +3 -0
- data/README.md +1 -1
- data/lib/tyrant/railtie.rb +2 -1
- data/lib/tyrant/sign_up.rb +5 -1
- data/lib/tyrant/version.rb +1 -1
- data/tyrant.gemspec +2 -1
- metadata +21 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae6e5bc3c5f10b700b4fa7a1b9367bdb38dab643
|
4
|
+
data.tar.gz: e4bfa297faa7fbab867970e1ef4e9498a4fd12ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abbd72e5015f4cb98c20e27cba271c8ec62346faeaf5d20da9b8d7ea27a7e411cb91fa627d7b97c3b2e5e21bdeb67fd5373c3870f4d6d237f3ac84cb3f5bb300
|
7
|
+
data.tar.gz: 016cf7f97167627ca66ee74e771791dbc91176a0340e17ae2840908e76e33b1c3f2c1922851d8dce50c49e0948e711349b999eac406b5251edb76341558d91f2
|
data/CHANGES.md
ADDED
data/README.md
CHANGED
@@ -43,7 +43,7 @@ You can also run the public API in any other Ruby environment, e.g. a console or
|
|
43
43
|
Tyrant::SignIn.run(params)
|
44
44
|
```
|
45
45
|
|
46
|
-
Tyrant provides forms for all workflow steps. using Reform objects that are embedded into the operations.
|
46
|
+
Tyrant provides forms for all workflow steps. using [Reform](https://github.com/apotonick/reform) objects that are embedded into the operations.
|
47
47
|
|
48
48
|
|
49
49
|
=> Customize with inheritance, or override. Or just don't use the operation and write your own "step".
|
data/lib/tyrant/railtie.rb
CHANGED
@@ -3,13 +3,14 @@ module Tyrant
|
|
3
3
|
require "warden"
|
4
4
|
|
5
5
|
# DISCUSS: it will be configurable what user class etc. and might be moved to Ops.
|
6
|
+
# DISCUSS: this should actually use Tyrant::Session to log in and out user?
|
6
7
|
config.app_middleware.use Warden::Manager do |config|
|
7
8
|
Warden::Manager.serialize_into_session do |user|
|
8
9
|
user.id
|
9
10
|
end
|
10
11
|
|
11
12
|
Warden::Manager.serialize_from_session do |id|
|
12
|
-
User.find_by(id: id)
|
13
|
+
User.find_by(id: id) # Session.sign_in!(user) or something!
|
13
14
|
end
|
14
15
|
end
|
15
16
|
end
|
data/lib/tyrant/sign_up.rb
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
require "trailblazer/operation"
|
2
|
+
require "trailblazer/operation/model"
|
2
3
|
require "active_model"
|
3
4
|
require "reform/form/active_model/validations" # TODO: this will get replaced with Lotus.
|
4
5
|
require "reform/form/validation/unique_validator.rb"
|
6
|
+
|
7
|
+
|
8
|
+
|
5
9
|
module Tyrant
|
6
10
|
# SignUp will come and implement to-be-confirmed sign up.
|
7
11
|
class SignUp < Trailblazer::Operation
|
8
12
|
class Confirmed < Trailblazer::Operation
|
9
|
-
include
|
13
|
+
include Model
|
10
14
|
model User, :create
|
11
15
|
|
12
16
|
contract do
|
data/lib/tyrant/version.rb
CHANGED
data/tyrant.gemspec
CHANGED
@@ -24,9 +24,10 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.add_development_dependency "activemodel"
|
26
26
|
|
27
|
-
spec.add_dependency "trailblazer"
|
27
|
+
spec.add_dependency "trailblazer", "~> 1.0"
|
28
28
|
spec.add_dependency "reform", "~> 2.0"
|
29
29
|
spec.add_dependency "disposable", ">= 0.1.11"
|
30
30
|
|
31
|
+
spec.add_dependency "warden"
|
31
32
|
spec.add_dependency "bcrypt"
|
32
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tyrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: trailblazer
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
75
|
+
version: '1.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
82
|
+
version: '1.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: reform
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 0.1.11
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: warden
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: bcrypt
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,6 +145,7 @@ extra_rdoc_files: []
|
|
131
145
|
files:
|
132
146
|
- ".gitignore"
|
133
147
|
- ".travis.yml"
|
148
|
+
- CHANGES.md
|
134
149
|
- Gemfile
|
135
150
|
- LICENSE.txt
|
136
151
|
- README.md
|
@@ -167,4 +182,3 @@ signing_key:
|
|
167
182
|
specification_version: 4
|
168
183
|
summary: Agnostic authorization for Trailblazer.
|
169
184
|
test_files: []
|
170
|
-
has_rdoc:
|