rohbau 0.2.1 → 0.3.0

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: a6649cf14d7ab87b32c3daef3312ad0787da2094
4
- data.tar.gz: d561748d16c16e5d7ca7f8bb5ae64a3e7ef417c6
3
+ metadata.gz: 6324e4ad3194b1f9b394c39f9d94c9cd321defd7
4
+ data.tar.gz: e94b32beeec4bb254c9731911644d39d402d2bfc
5
5
  SHA512:
6
- metadata.gz: 1048283aeb2498a565acbaeb1986fa3db1a64b48cc905a522c3a4fbfcaf274ed8501967534952e25feca85d445602cccd1776ea63228f7a748b82c2e2a119ad4
7
- data.tar.gz: 51f0098a5a8e6f5ba47da651c12e2e0c67079bb573d2f8dd4d4c5e845dd5b1784fd824aca1f0b67866df44297a81f11b1d2590d7731a9991a203532f76ed4077
6
+ metadata.gz: e803f3c6e4c460e126acf857c90874cd040ea3a009e2c37dd9a10da2883538301425e4073e438ea4d2ff09c4ef3751788c20fa4c30e38a4abf4bdba0f3f7067e
7
+ data.tar.gz: a26dc351af0515c20a34998f9b7bb95bc336d0fdb931e2ceaa637a3f7e33dc9634f5483108ff9c8b019254151f55a6fbf3756f041f46697210759f282739fe4a
data/README.md CHANGED
@@ -344,7 +344,7 @@ To this:
344
344
  require 'rohbau/interface'
345
345
  require 'user_service/create_user_use_case'
346
346
 
347
- interface = Rohbau::Interface.new
347
+ interface = Rohbau::Interface.instance
348
348
  interface.user_service :create_user, :user_data => {
349
349
  :nickname => 'Bob'
350
350
  }
@@ -397,7 +397,7 @@ These requirements can be realized by passing the following keys to your use cas
397
397
  require 'rohbau/interface'
398
398
 
399
399
  describe 'stubbing use case return values' do
400
- let(:interface) { Rohbau::Interface.new }
400
+ let(:interface) { Rohbau::Interface.instance }
401
401
 
402
402
  it 'returns subsequent calls to the same use case as stubs' do
403
403
  interface.user_service :create_user, :stub_result => {
@@ -437,7 +437,7 @@ Sometimes it's helpful to look into the use case and see some details about how
437
437
  require 'rohbau/interface'
438
438
 
439
439
  describe 'spying on tests' do
440
- let(:interface) { Rohbau::Interface.new }
440
+ let(:interface) { Rohbau::Interface.instance }
441
441
 
442
442
  it 'records passed arguments by use_case' do
443
443
  interface.user_service :create_user, :user_data => {
@@ -477,7 +477,7 @@ end
477
477
  ```ruby
478
478
  require 'rohbau/interface'
479
479
 
480
- let(:interface) { Rohbau::Interface.new }
480
+ let(:interface) { Rohbau::Interface.instance }
481
481
  it 'can clear all stubbed results' do
482
482
  interface.user_service :create_user, :stub_result => {
483
483
  :user_data => { :user_uid => 'something else' }
@@ -3,7 +3,9 @@ require_relative 'request_cache'
3
3
 
4
4
  module Rohbau
5
5
  class Interface
6
+ include Singleton
6
7
  include RequestCache
8
+
7
9
  def initialize
8
10
  @calls = Hash.new { |h, k| h[k] = nil }
9
11
  @call_count = Hash.new { |h, k| h[k] = 0 }
@@ -1,3 +1,3 @@
1
1
  module Rohbau
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -4,30 +4,26 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'rohbau/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "rohbau"
8
- spec.version = Rohbau::VERSION
9
- spec.authors = [
10
- "Jakob Holderbaum",
11
- "Peter Suschlik",
12
- "Dax",
13
- "Andreas Busold",
14
- "Jan Owiesniak"
15
- ]
16
- spec.email = [
17
- "rohbau@jakob.io",
18
- "ps@neopoly.de",
19
- "dd@neopoly.de",
20
- "ab@neopoly.de",
21
- "jo@neopoly.de"
7
+ spec.name = 'rohbau'
8
+ spec.version = Rohbau::VERSION
9
+
10
+ spec.authors = [
11
+ 'Jakob Holderbaum',
12
+ 'Peter Suschlik',
13
+ 'Dax',
14
+ 'Andreas Busold',
15
+ 'Jan Owiesniak'
22
16
  ]
23
- spec.summary = %q{Provides a set of patterns used in Domain Driven Design}
24
- spec.homepage = "http://www.neopoly.de/"
25
- spec.license = "MIT"
26
17
 
27
- spec.files = `git ls-files`.split($/)
28
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
29
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
30
- spec.require_paths = ["lib"]
18
+ spec.email = %w[rohbau@jakob.io ps@neopoly.de ab@neopoly.de jo@neopoly.de]
19
+
20
+ spec.summary = %q{Provides a set of patterns used in Domain Driven Design}
21
+ spec.homepage = 'http://www.neopoly.de/'
22
+ spec.license = 'MIT'
23
+ spec.files = `git ls-files`.split($/)
24
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
25
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
26
+ spec.require_paths = ['lib']
31
27
 
32
28
  spec.add_dependency 'thread_safe', '~> 0.3'
33
29
  spec.add_dependency 'bound', '~> 2.1'
@@ -3,7 +3,11 @@ require 'rohbau/interface'
3
3
  require 'bound'
4
4
 
5
5
  describe Rohbau::Interface do
6
- let(:interface) { Rohbau::Interface.new }
6
+ let(:interface) { Rohbau::Interface.instance }
7
+
8
+ after do
9
+ interface.clear_stubs
10
+ end
7
11
 
8
12
  module FakeDomain
9
13
  class Request
@@ -27,6 +31,10 @@ describe Rohbau::Interface do
27
31
  end
28
32
  end
29
33
 
34
+ it 'is a singleton' do
35
+ assert interface === Rohbau::Interface.instance
36
+ end
37
+
30
38
  it 'calls a use case' do
31
39
  result = interface.fake_domain :fake_use_case,
32
40
  :super_important_information => "23"
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+ require 'rohbau/index'
3
+
4
+ describe Rohbau::Index do
5
+ let(:index) { Rohbau::Index.new }
6
+
7
+ describe 'initialize' do
8
+ it 'has size 0' do
9
+ assert_equal 0, index.size
10
+ end
11
+
12
+ it 'does not contain any entities' do
13
+ assert_equal [], index.all
14
+ assert_equal [], index.each.to_a
15
+ end
16
+ end
17
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rohbau
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakob Holderbaum
@@ -12,97 +12,96 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-05-19 00:00:00.000000000 Z
15
+ date: 2016-04-30 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: thread_safe
19
19
  requirement: !ruby/object:Gem::Requirement
20
20
  requirements:
21
- - - ~>
21
+ - - "~>"
22
22
  - !ruby/object:Gem::Version
23
23
  version: '0.3'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - ~>
28
+ - - "~>"
29
29
  - !ruby/object:Gem::Version
30
30
  version: '0.3'
31
31
  - !ruby/object:Gem::Dependency
32
32
  name: bound
33
33
  requirement: !ruby/object:Gem::Requirement
34
34
  requirements:
35
- - - ~>
35
+ - - "~>"
36
36
  - !ruby/object:Gem::Version
37
37
  version: '2.1'
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  requirements:
42
- - - ~>
42
+ - - "~>"
43
43
  - !ruby/object:Gem::Version
44
44
  version: '2.1'
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: bundler
47
47
  requirement: !ruby/object:Gem::Requirement
48
48
  requirements:
49
- - - ~>
49
+ - - "~>"
50
50
  - !ruby/object:Gem::Version
51
51
  version: '1.7'
52
52
  type: :development
53
53
  prerelease: false
54
54
  version_requirements: !ruby/object:Gem::Requirement
55
55
  requirements:
56
- - - ~>
56
+ - - "~>"
57
57
  - !ruby/object:Gem::Version
58
58
  version: '1.7'
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: rake
61
61
  requirement: !ruby/object:Gem::Requirement
62
62
  requirements:
63
- - - ~>
63
+ - - "~>"
64
64
  - !ruby/object:Gem::Version
65
65
  version: '10.3'
66
66
  type: :development
67
67
  prerelease: false
68
68
  version_requirements: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - ~>
70
+ - - "~>"
71
71
  - !ruby/object:Gem::Version
72
72
  version: '10.3'
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: minitest
75
75
  requirement: !ruby/object:Gem::Requirement
76
76
  requirements:
77
- - - ~>
77
+ - - "~>"
78
78
  - !ruby/object:Gem::Version
79
79
  version: '5.4'
80
80
  type: :development
81
81
  prerelease: false
82
82
  version_requirements: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - ~>
84
+ - - "~>"
85
85
  - !ruby/object:Gem::Version
86
86
  version: '5.4'
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: simplecov
89
89
  requirement: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - '>='
91
+ - - ">="
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  type: :development
95
95
  prerelease: false
96
96
  version_requirements: !ruby/object:Gem::Requirement
97
97
  requirements:
98
- - - '>='
98
+ - - ">="
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  description:
102
102
  email:
103
103
  - rohbau@jakob.io
104
104
  - ps@neopoly.de
105
- - dd@neopoly.de
106
105
  - ab@neopoly.de
107
106
  - jo@neopoly.de
108
107
  executables:
@@ -110,10 +109,10 @@ executables:
110
109
  extensions: []
111
110
  extra_rdoc_files: []
112
111
  files:
113
- - .gitignore
114
- - .rubocop.yml
115
- - .rubocop_todo.yml
116
- - .travis.yml
112
+ - ".gitignore"
113
+ - ".rubocop.yml"
114
+ - ".rubocop_todo.yml"
115
+ - ".travis.yml"
117
116
  - Gemfile
118
117
  - LICENSE.txt
119
118
  - README.md
@@ -168,6 +167,7 @@ files:
168
167
  - spec/service_factory_spec.rb
169
168
  - spec/shared_spec_spec.rb
170
169
  - spec/spec_helper.rb
170
+ - spec/unit/rohbau/index_spec.rb
171
171
  homepage: http://www.neopoly.de/
172
172
  licenses:
173
173
  - MIT
@@ -178,17 +178,17 @@ require_paths:
178
178
  - lib
179
179
  required_ruby_version: !ruby/object:Gem::Requirement
180
180
  requirements:
181
- - - '>='
181
+ - - ">="
182
182
  - !ruby/object:Gem::Version
183
183
  version: '0'
184
184
  required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  requirements:
186
- - - '>='
186
+ - - ">="
187
187
  - !ruby/object:Gem::Version
188
188
  version: '0'
189
189
  requirements: []
190
190
  rubyforge_project:
191
- rubygems_version: 2.4.6
191
+ rubygems_version: 2.4.8
192
192
  signing_key:
193
193
  specification_version: 4
194
194
  summary: Provides a set of patterns used in Domain Driven Design
@@ -199,3 +199,4 @@ test_files:
199
199
  - spec/service_factory_spec.rb
200
200
  - spec/shared_spec_spec.rb
201
201
  - spec/spec_helper.rb
202
+ - spec/unit/rohbau/index_spec.rb