scrivener 0.4.0 → 0.4.1
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/.gitignore +1 -0
- data/README.md +1 -9
- data/lib/scrivener.rb +2 -2
- data/makefile +4 -0
- data/scrivener.gemspec +11 -16
- metadata +9 -6
- data/Rakefile +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72f2e838e6737f8f6e70ea7ec1d24858c4a314ac
|
4
|
+
data.tar.gz: ee6290714b6ab3e9d103f76d18fb6a490af726e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5381e070059513af9bac415be99757a0b21c54e77a8e52a3d309c97813a4d361dfcd1a11c99f0f935e7d5a992ed20150bfcd6ab1a21661f9720cc8cde1a97f3
|
7
|
+
data.tar.gz: 12be078877cf6aeadcaf9a01896dfe7f3d826f71462664602e7314fe653d031dc3000acc3441e4ee94fda40db89319db673c0a0f0b82b8c45cc6e8cf0ec10775
|
data/.gems
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
cutest -v 1.2.2
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
/pkg
|
data/README.md
CHANGED
@@ -115,10 +115,6 @@ publish = Publish.new(status: "published", title: "foo")
|
|
115
115
|
#=> NoMethodError: undefined method `title=' for #<Publish...>
|
116
116
|
```
|
117
117
|
|
118
|
-
It's important to note that using Scrivener implies a greater risk than using
|
119
|
-
the model validations. Having a central repository of mass assignable
|
120
|
-
attributes and validations is more secure in most scenarios.
|
121
|
-
|
122
118
|
Slices
|
123
119
|
------
|
124
120
|
|
@@ -135,13 +131,9 @@ class SignUp < Scrivener
|
|
135
131
|
assert_email :email
|
136
132
|
|
137
133
|
if assert_present :password
|
138
|
-
assert_equal :password,
|
134
|
+
assert_equal :password, password_confirmation
|
139
135
|
end
|
140
136
|
end
|
141
|
-
|
142
|
-
def assert_equal(f1, f2)
|
143
|
-
assert send(f1) == send(f2), [f1, f2, :not_equal]
|
144
|
-
end
|
145
137
|
end
|
146
138
|
|
147
139
|
filter = SignUp.new(email: "info@example.com",
|
data/lib/scrivener.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative "scrivener/validations"
|
2
2
|
|
3
3
|
class Scrivener
|
4
|
-
VERSION = "0.4.
|
4
|
+
VERSION = "0.4.1"
|
5
5
|
|
6
6
|
include Validations
|
7
7
|
|
@@ -36,7 +36,7 @@ class Scrivener
|
|
36
36
|
# post.save
|
37
37
|
def initialize(atts)
|
38
38
|
atts.each do |key, val|
|
39
|
-
send(
|
39
|
+
send("#{key}=", val)
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
data/makefile
ADDED
data/scrivener.gemspec
CHANGED
@@ -1,21 +1,16 @@
|
|
1
1
|
require "./lib/scrivener"
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
|
-
s.name
|
5
|
-
s.version
|
6
|
-
s.summary
|
7
|
-
s.description
|
8
|
-
s.authors
|
9
|
-
s.email
|
10
|
-
s.homepage
|
11
|
-
s.
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
"Rakefile",
|
16
|
-
"lib/**/*.rb",
|
17
|
-
"*.gemspec",
|
18
|
-
"test/**/*.rb"
|
19
|
-
]
|
4
|
+
s.name = "scrivener"
|
5
|
+
s.version = Scrivener::VERSION
|
6
|
+
s.summary = "Validation frontend for models."
|
7
|
+
s.description = "Scrivener removes the validation responsibility from models and acts as a filter for whitelisted attributes."
|
8
|
+
s.authors = ["Michel Martens"]
|
9
|
+
s.email = ["michel@soveran.com"]
|
10
|
+
s.homepage = "http://github.com/soveran/scrivener"
|
11
|
+
s.license = "MIT"
|
12
|
+
|
13
|
+
s.files = `git ls-files`.split("\n")
|
14
|
+
|
20
15
|
s.add_development_dependency "cutest"
|
21
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrivener
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michel Martens
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cutest
|
@@ -32,16 +32,19 @@ executables: []
|
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
|
-
-
|
35
|
+
- .gems
|
36
|
+
- .gitignore
|
36
37
|
- AUTHORS
|
38
|
+
- LICENSE
|
37
39
|
- README.md
|
38
|
-
- Rakefile
|
39
|
-
- lib/scrivener/validations.rb
|
40
40
|
- lib/scrivener.rb
|
41
|
+
- lib/scrivener/validations.rb
|
42
|
+
- makefile
|
41
43
|
- scrivener.gemspec
|
42
44
|
- test/scrivener_test.rb
|
43
45
|
homepage: http://github.com/soveran/scrivener
|
44
|
-
licenses:
|
46
|
+
licenses:
|
47
|
+
- MIT
|
45
48
|
metadata: {}
|
46
49
|
post_install_message:
|
47
50
|
rdoc_options: []
|