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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f0b1c1245d2440e381f652465e18755d0789f20
4
- data.tar.gz: 023407634d2c25cb66f94372aad69b3b94ee2c1a
3
+ metadata.gz: 72f2e838e6737f8f6e70ea7ec1d24858c4a314ac
4
+ data.tar.gz: ee6290714b6ab3e9d103f76d18fb6a490af726e9
5
5
  SHA512:
6
- metadata.gz: 2979293b024643ee57fd826be4c7f34b9b4255513a153ae63a5968ae20afb6640e0233cd8a039bbe30f25588d89746b9c0f27f79372ce9cba1dd336b2bb92463
7
- data.tar.gz: a0ea755c1b4cf881fd8454d5804f7e992c97c8e002a2836b8f6ed85008020edc9b009283b34b3052947d6b2de121323d76f90a1b10e176c56de29fb0f93c3a57
6
+ metadata.gz: b5381e070059513af9bac415be99757a0b21c54e77a8e52a3d309c97813a4d361dfcd1a11c99f0f935e7d5a992ed20150bfcd6ab1a21661f9720cc8cde1a97f3
7
+ data.tar.gz: 12be078877cf6aeadcaf9a01896dfe7f3d826f71462664602e7314fe653d031dc3000acc3441e4ee94fda40db89319db673c0a0f0b82b8c45cc6e8cf0ec10775
data/.gems ADDED
@@ -0,0 +1 @@
1
+ cutest -v 1.2.2
@@ -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, :password_confirmation
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",
@@ -1,7 +1,7 @@
1
1
  require_relative "scrivener/validations"
2
2
 
3
3
  class Scrivener
4
- VERSION = "0.4.0"
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(:"#{key}=", val)
39
+ send("#{key}=", val)
40
40
  end
41
41
  end
42
42
 
@@ -0,0 +1,4 @@
1
+ .PHONY: test
2
+
3
+ test:
4
+ cutest test/**/*.rb
@@ -1,21 +1,16 @@
1
1
  require "./lib/scrivener"
2
2
 
3
3
  Gem::Specification.new do |s|
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.files = Dir[
12
- "LICENSE",
13
- "AUTHORS",
14
- "README.md",
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.0
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-01-21 00:00:00.000000000 Z
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
- - LICENSE
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: []
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- task :test do
2
- require "cutest"
3
- Cutest.run(Dir["test/*.rb"])
4
- end
5
-
6
- task :default => :test