chickadee 5.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/chickadee.gemspec +0 -1
- data/lib/chickadee/domain/repository.rb +4 -0
- data/lib/chickadee/version.rb +1 -1
- data/spec/domain/repository_spec.rb +48 -0
- metadata +3 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 871e65cb068b6e2eb467213a26ea40286830e230
|
4
|
+
data.tar.gz: f230411964c0057999e89a1c57d31eb7d46c2814
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 392759454c5da3fcbd8923c17a303b0cfd8f9491051d67ac2e85ab81a96b6dba1fe43e03128361d1d73ce71366f7e4c94002ec37a165f85544ada8c8617c5cd8
|
7
|
+
data.tar.gz: 4ebd961899eacc991a7fa985b68b3a936c08146a6e32c89bfecfdd7196a2c095a12c53b34ea2075c1cc12d6db8fe5a61c88ab00ae4c32c34ad281b386dc65194
|
data/chickadee.gemspec
CHANGED
data/lib/chickadee/version.rb
CHANGED
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'chickadee/domain/repository'
|
3
|
+
|
4
|
+
describe Chickadee::Repository do
|
5
|
+
describe '::set_hydrator' do
|
6
|
+
it 'assigns hydrator' do
|
7
|
+
hydrator = stub
|
8
|
+
klass = define_repository_class
|
9
|
+
klass.set_hydrator(hydrator)
|
10
|
+
klass.hydrator.must_equal(hydrator)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe '::hydrator' do
|
15
|
+
it 'returns hydrator' do
|
16
|
+
hydrator = stub
|
17
|
+
klass = define_repository_class
|
18
|
+
klass.set_hydrator(hydrator)
|
19
|
+
klass.hydrator.must_equal(hydrator)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'can inherit hydrator' do
|
24
|
+
hydrator = stub
|
25
|
+
class1 = Class.new do
|
26
|
+
include Chickadee::Repository
|
27
|
+
set_hydrator(hydrator)
|
28
|
+
end
|
29
|
+
class2 = Class.new(class1)
|
30
|
+
class2.hydrator.must_equal(hydrator)
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'doesnt share hydrator across classes implementing the module' do
|
34
|
+
hydrator = stub
|
35
|
+
class1 = Class.new do
|
36
|
+
include Chickadee::Repository
|
37
|
+
set_hydrator(hydrator)
|
38
|
+
end
|
39
|
+
class2 = Class.new do
|
40
|
+
include Chickadee::Repository
|
41
|
+
end
|
42
|
+
class2.hydrator.must_be_nil
|
43
|
+
end
|
44
|
+
|
45
|
+
def define_repository_class
|
46
|
+
Class.new{include Chickadee::Repository}
|
47
|
+
end
|
48
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chickadee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Lott
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 1.0.0
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: guard-minitest
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 2.2.0
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 2.2.0
|
83
69
|
description: Lightweight domain driven design library
|
84
70
|
email:
|
85
71
|
- erik.lott@evrium.com
|
@@ -99,6 +85,7 @@ files:
|
|
99
85
|
- lib/chickadee/domain/repository.rb
|
100
86
|
- lib/chickadee/exceptions.rb
|
101
87
|
- lib/chickadee/version.rb
|
88
|
+
- spec/domain/repository_spec.rb
|
102
89
|
- spec/spec_helper.rb
|
103
90
|
homepage: ''
|
104
91
|
licenses:
|
@@ -125,4 +112,5 @@ signing_key:
|
|
125
112
|
specification_version: 4
|
126
113
|
summary: Lightweight domain driven design library
|
127
114
|
test_files:
|
115
|
+
- spec/domain/repository_spec.rb
|
128
116
|
- spec/spec_helper.rb
|