spicerack 0.20.4 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spicerack.rb +5 -2
- data/lib/spicerack/objects/output.rb +1 -1
- data/lib/spicerack/objects/status.rb +21 -0
- data/lib/spicerack/{stateful_object.rb → output_object.rb} +3 -1
- data/lib/spicerack/version.rb +1 -1
- metadata +18 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b82da445e51f86bcd96b4731bd3efeb9a4b40464a065d54c817f9c71771da121
|
4
|
+
data.tar.gz: '0797642aa3bd51c69ab9194a7998ace4ac03727aa332d6ebdb335f4eae811df0'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 227f2dab6ac34ee78daf9e0bef7d4cbb8807d7452603d58b743e85198ebe2f187e8709bc695195359dc77580a6ccccc7cb344088eae5b50ae33f49a7090ce89b
|
7
|
+
data.tar.gz: 834d0d355fe257192f1ea7c28d45cf5f04618c00fd7f61414eedb06297e41a72e9c4970c57350e06e70ace4c9c6e9f2c544df39eab7400a962920842f602e1ca
|
data/lib/spicerack.rb
CHANGED
@@ -22,6 +22,9 @@ require "spicerack/attribute_object"
|
|
22
22
|
require "spicerack/input_object"
|
23
23
|
require "spicerack/input_model"
|
24
24
|
require "spicerack/configurable"
|
25
|
-
require "spicerack/
|
25
|
+
require "spicerack/output_object"
|
26
26
|
|
27
|
-
module Spicerack
|
27
|
+
module Spicerack
|
28
|
+
class Error < StandardError; end
|
29
|
+
class NotValidatedError < Error; end
|
30
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Spicerack
|
4
|
+
module Objects
|
5
|
+
module Status
|
6
|
+
extend ActiveSupport::Concern
|
7
|
+
|
8
|
+
included do
|
9
|
+
after_validation { self.was_validated = errors.empty? }
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
attr_accessor :was_validated
|
14
|
+
end
|
15
|
+
|
16
|
+
def validated?
|
17
|
+
was_validated.present?
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -1,9 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "objects/status"
|
3
4
|
require_relative "objects/output"
|
4
5
|
|
5
6
|
module Spicerack
|
6
|
-
class
|
7
|
+
class OutputObject < InputModel
|
8
|
+
include Objects::Status
|
7
9
|
include Objects::Output
|
8
10
|
end
|
9
11
|
end
|
data/lib/spicerack/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spicerack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Garside
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2020-01-
|
14
|
+
date: 2020-01-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: around_the_world
|
@@ -19,70 +19,70 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
22
|
+
version: 0.21.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.21.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: redis_hash
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
34
|
- - '='
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.
|
36
|
+
version: 0.21.0
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - '='
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.
|
43
|
+
version: 0.21.0
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: short_circu_it
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
48
|
- - '='
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 0.
|
50
|
+
version: 0.21.0
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - '='
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: 0.
|
57
|
+
version: 0.21.0
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: technologic
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
62
|
- - '='
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 0.
|
64
|
+
version: 0.21.0
|
65
65
|
type: :runtime
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - '='
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version: 0.
|
71
|
+
version: 0.21.0
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
73
|
name: tablesalt
|
74
74
|
requirement: !ruby/object:Gem::Requirement
|
75
75
|
requirements:
|
76
76
|
- - '='
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version: 0.
|
78
|
+
version: 0.21.0
|
79
79
|
type: :runtime
|
80
80
|
prerelease: false
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
83
|
- - '='
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 0.
|
85
|
+
version: 0.21.0
|
86
86
|
- !ruby/object:Gem::Dependency
|
87
87
|
name: bundler
|
88
88
|
requirement: !ruby/object:Gem::Requirement
|
@@ -207,28 +207,28 @@ dependencies:
|
|
207
207
|
requirements:
|
208
208
|
- - '='
|
209
209
|
- !ruby/object:Gem::Version
|
210
|
-
version: 0.
|
210
|
+
version: 0.21.0
|
211
211
|
type: :development
|
212
212
|
prerelease: false
|
213
213
|
version_requirements: !ruby/object:Gem::Requirement
|
214
214
|
requirements:
|
215
215
|
- - '='
|
216
216
|
- !ruby/object:Gem::Version
|
217
|
-
version: 0.
|
217
|
+
version: 0.21.0
|
218
218
|
- !ruby/object:Gem::Dependency
|
219
219
|
name: spicerack-styleguide
|
220
220
|
requirement: !ruby/object:Gem::Requirement
|
221
221
|
requirements:
|
222
222
|
- - '='
|
223
223
|
- !ruby/object:Gem::Version
|
224
|
-
version: 0.
|
224
|
+
version: 0.21.0
|
225
225
|
type: :development
|
226
226
|
prerelease: false
|
227
227
|
version_requirements: !ruby/object:Gem::Requirement
|
228
228
|
requirements:
|
229
229
|
- - '='
|
230
230
|
- !ruby/object:Gem::Version
|
231
|
-
version: 0.
|
231
|
+
version: 0.21.0
|
232
232
|
- !ruby/object:Gem::Dependency
|
233
233
|
name: will_paginate
|
234
234
|
requirement: !ruby/object:Gem::Requirement
|
@@ -308,6 +308,8 @@ files:
|
|
308
308
|
- lib/spicerack/objects/defaults.rb
|
309
309
|
- lib/spicerack/objects/options.rb
|
310
310
|
- lib/spicerack/objects/output.rb
|
311
|
+
- lib/spicerack/objects/status.rb
|
312
|
+
- lib/spicerack/output_object.rb
|
311
313
|
- lib/spicerack/redis_model.rb
|
312
314
|
- lib/spicerack/root_object.rb
|
313
315
|
- lib/spicerack/rspec/configurable/dsl.rb
|
@@ -324,7 +326,6 @@ files:
|
|
324
326
|
- lib/spicerack/rspec/shared_examples/an_input_object_with_a_class_collection_attribute.rb
|
325
327
|
- lib/spicerack/rspec/shoulda_matcher_helper.rb
|
326
328
|
- lib/spicerack/spec_helper.rb
|
327
|
-
- lib/spicerack/stateful_object.rb
|
328
329
|
- lib/spicerack/version.rb
|
329
330
|
homepage: https://github.com/Freshly/spicerack
|
330
331
|
licenses:
|