sinclair 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +5 -3
- data/.rubocop.yml +20 -4
- data/Dockerfile +8 -4
- data/README.md +1 -1
- data/config/yardstick.yml +10 -35
- data/lib/sinclair.rb +87 -18
- data/lib/sinclair/config.rb +3 -0
- data/lib/sinclair/config/methods_builder.rb +15 -1
- data/lib/sinclair/config_builder.rb +1 -0
- data/lib/sinclair/config_class.rb +1 -0
- data/lib/sinclair/config_factory.rb +15 -0
- data/lib/sinclair/configurable.rb +1 -0
- data/lib/sinclair/matchers.rb +20 -6
- data/lib/sinclair/matchers/add_class_method.rb +56 -0
- data/lib/sinclair/matchers/add_class_method_to.rb +98 -0
- data/lib/sinclair/matchers/add_instance_method.rb +85 -0
- data/lib/sinclair/matchers/add_instance_method_to.rb +119 -0
- data/lib/sinclair/matchers/add_method.rb +11 -73
- data/lib/sinclair/matchers/add_method_to.rb +13 -111
- data/lib/sinclair/method_definition.rb +18 -58
- data/lib/sinclair/method_definition/block_definition.rb +37 -6
- data/lib/sinclair/method_definition/class_block_definition.rb +22 -0
- data/lib/sinclair/method_definition/class_method_definition.rb +50 -0
- data/lib/sinclair/method_definition/class_string_definition.rb +24 -0
- data/lib/sinclair/method_definition/instance_block_definition.rb +22 -0
- data/lib/sinclair/method_definition/instance_method_definition.rb +48 -0
- data/lib/sinclair/method_definition/instance_string_definition.rb +24 -0
- data/lib/sinclair/method_definition/string_definition.rb +39 -5
- data/lib/sinclair/method_definitions.rb +28 -0
- data/lib/sinclair/options_parser.rb +5 -0
- data/lib/sinclair/version.rb +1 -1
- data/sinclair.gemspec +16 -10
- data/spec/integration/yard/sinclair/matchers/add_class_method_spec.rb +23 -0
- data/spec/integration/yard/sinclair/matchers/add_class_method_to_spec.rb +19 -0
- data/spec/integration/yard/sinclair/matchers/{add_method_spec.rb → add_instance_method_spec.rb} +3 -3
- data/spec/integration/yard/sinclair/matchers/{add_method_to_spec.rb → add_instance_method_to_spec.rb} +1 -1
- data/spec/integration/yard/sinclair/method_definition/class_block_definition_spec.rb +34 -0
- data/spec/integration/yard/sinclair/method_definition/class_method_definition_spec.rb +28 -0
- data/spec/integration/yard/sinclair/method_definition/class_string_definition_spec.rb +23 -0
- data/spec/integration/yard/sinclair/method_definition/{block_definition_spec.rb → instance_block_definition_spec.rb} +2 -2
- data/spec/integration/yard/sinclair/method_definition/instance_method_definition_spec.rb +35 -0
- data/spec/integration/yard/sinclair/method_definition/{string_definition_spec.rb → instance_string_definition_spec.rb} +1 -1
- data/spec/integration/yard/sinclair_spec.rb +32 -5
- data/spec/lib/sinclair/matchers/add_class_method_spec.rb +36 -0
- data/spec/lib/sinclair/matchers/add_class_method_to_spec.rb +77 -0
- data/spec/lib/sinclair/matchers/{add_method_spec.rb → add_instance_method_spec.rb} +11 -4
- data/spec/lib/sinclair/matchers/{add_method_to_spec.rb → add_instance_method_to_spec.rb} +2 -2
- data/spec/lib/sinclair/matchers_spec.rb +17 -2
- data/spec/lib/sinclair/method_definition/class_block_definition_spec.rb +29 -0
- data/spec/lib/sinclair/method_definition/class_string_definition_spec.rb +27 -0
- data/spec/lib/sinclair/method_definition/{block_definition_spec.rb → instance_block_definition_spec.rb} +2 -2
- data/spec/lib/sinclair/method_definition/{string_definition_spec.rb → instance_string_definition_spec.rb} +2 -2
- data/spec/lib/sinclair/method_definition_spec.rb +52 -6
- data/spec/lib/sinclair_spec.rb +83 -0
- data/spec/support/models/dummy_class_builder.rb +11 -0
- data/spec/support/shared_examples/class_method_definition.rb +96 -0
- data/spec/support/shared_examples/{method_definition.rb → instance_method_definition.rb} +0 -0
- metadata +148 -45
- data/scripts/check_readme.sh +0 -6
- data/scripts/rubycritic.sh +0 -10
- data/spec/integration/sinclair/matchers_spec.rb +0 -99
- data/spec/integration/yard/sinclair/method_definition_spec.rb +0 -56
data/spec/lib/sinclair_spec.rb
CHANGED
|
@@ -149,4 +149,87 @@ describe Sinclair do
|
|
|
149
149
|
end
|
|
150
150
|
end
|
|
151
151
|
end
|
|
152
|
+
|
|
153
|
+
describe '#add_class_method' do
|
|
154
|
+
context 'when extending the class' do
|
|
155
|
+
let(:builder_class) { described_class::DummyClassBuilder }
|
|
156
|
+
|
|
157
|
+
before do
|
|
158
|
+
builder.init
|
|
159
|
+
builder.build
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
context 'when describing a method with block' do
|
|
163
|
+
it 'creates a method with the block' do
|
|
164
|
+
expect(dummy_class.blocked).to eq(1)
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
context 'when describing a method with string' do
|
|
169
|
+
it 'creates a method using the string definition' do
|
|
170
|
+
expect(dummy_class.defined).to eq(1)
|
|
171
|
+
expect(dummy_class.defined).to eq(2)
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
context 'when passing options' do
|
|
176
|
+
let(:options) { { increment: 2 } }
|
|
177
|
+
|
|
178
|
+
it 'parses the options' do
|
|
179
|
+
expect(dummy_class.defined).to eq(2)
|
|
180
|
+
expect(dummy_class.defined).to eq(4)
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
context 'when using the builder without extending' do
|
|
186
|
+
context 'when declaring a method with a block' do
|
|
187
|
+
before do
|
|
188
|
+
builder.add_class_method(:blocked) { 1 }
|
|
189
|
+
builder.add_class_method(:blocked) { 2 }
|
|
190
|
+
builder.build
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
it 'respect the order of method addtion' do
|
|
194
|
+
expect(dummy_class.blocked).to eq(2)
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
context 'when declaring a method string' do
|
|
199
|
+
before do
|
|
200
|
+
builder.add_class_method(:string, '1')
|
|
201
|
+
builder.add_class_method(:string, '2')
|
|
202
|
+
builder.build
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
it 'respect the order of method addtion' do
|
|
206
|
+
expect(dummy_class.string).to eq(2)
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
context 'when declaring block and string' do
|
|
211
|
+
before do
|
|
212
|
+
builder.add_class_method(:value) { 1 }
|
|
213
|
+
builder.add_class_method(:value, '2')
|
|
214
|
+
builder.build
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
it 'respect the order of method addtion' do
|
|
218
|
+
expect(dummy_class.value).to eq(2)
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
context 'when declaring string and block' do
|
|
223
|
+
before do
|
|
224
|
+
builder.add_class_method(:value, '1')
|
|
225
|
+
builder.add_class_method(:value) { 2 }
|
|
226
|
+
builder.build
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
it 'respect the order of method addtion' do
|
|
230
|
+
expect(dummy_class.value).to eq(2)
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
end
|
|
152
235
|
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class Sinclair
|
|
4
|
+
class DummyClassBuilder < Sinclair
|
|
5
|
+
def init
|
|
6
|
+
add_class_method(:blocked) { 1 }
|
|
7
|
+
add_class_method(:defined, "@value = value + #{options_object&.increment || 1}")
|
|
8
|
+
add_class_method(:value, '@value ||= 0')
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
shared_examples 'ClassMethodDefinition#build' do
|
|
4
|
+
it do
|
|
5
|
+
expect { method_definition.build(klass) }
|
|
6
|
+
.to add_class_method(method_name).to(klass)
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
describe 'after build' do
|
|
10
|
+
before do
|
|
11
|
+
method_definition.build(klass)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it 'adds the method to the klass' do
|
|
15
|
+
expect(klass).to respond_to(method_name)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it 'evaluates return of the method within the klass context' do
|
|
19
|
+
expect(klass.the_method).to eq(1)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it 'evaluates in the context of the klass' do
|
|
23
|
+
expect { klass.the_method }
|
|
24
|
+
.to change { klass.instance_variable_get(:@x) }
|
|
25
|
+
.from(nil).to(1)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
shared_examples 'ClassMethodDefinition#build without cache' do
|
|
31
|
+
it_behaves_like 'ClassMethodDefinition#build'
|
|
32
|
+
|
|
33
|
+
it 'creates a dynamic class method' do
|
|
34
|
+
method_definition.build(klass)
|
|
35
|
+
expect { klass.the_method }.to change(klass, :the_method)
|
|
36
|
+
.from(1).to(3)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
shared_examples 'ClassMethodDefinition#build with cache' do
|
|
41
|
+
it_behaves_like 'ClassMethodDefinition#build'
|
|
42
|
+
|
|
43
|
+
it 'creates a semi-dynamic method' do
|
|
44
|
+
method_definition.build(klass)
|
|
45
|
+
expect { klass.the_method }.not_to change(klass, :the_method)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
it 'sets the instance variable' do
|
|
49
|
+
method_definition.build(klass)
|
|
50
|
+
expect { klass.the_method }
|
|
51
|
+
.to change { klass.instance_variable_get("@#{method_name}") }
|
|
52
|
+
.from(nil).to(1)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
shared_examples 'ClassMethodDefinition#build with cache options' do
|
|
57
|
+
context 'when cached is true' do
|
|
58
|
+
let(:cached_option) { true }
|
|
59
|
+
|
|
60
|
+
it_behaves_like 'ClassMethodDefinition#build with cache'
|
|
61
|
+
|
|
62
|
+
context 'when instance variable has been set as nil' do
|
|
63
|
+
before do
|
|
64
|
+
method_definition.build(klass)
|
|
65
|
+
klass.instance_variable_set(:@the_method, nil)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
it 'returns a new value' do
|
|
69
|
+
expect(klass.the_method).to eq(1)
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
context 'when cached is full' do
|
|
75
|
+
let(:cached_option) { :full }
|
|
76
|
+
|
|
77
|
+
it_behaves_like 'ClassMethodDefinition#build with cache'
|
|
78
|
+
|
|
79
|
+
context 'when instance variable has been set as nil' do
|
|
80
|
+
before do
|
|
81
|
+
method_definition.build(klass)
|
|
82
|
+
klass.instance_variable_set(:@the_method, nil)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
it 'returns always nil' do
|
|
86
|
+
expect(klass.the_method).to be_nil
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
context 'when cached is false' do
|
|
92
|
+
let(:cached_option) { false }
|
|
93
|
+
|
|
94
|
+
it_behaves_like 'ClassMethodDefinition#build without cache'
|
|
95
|
+
end
|
|
96
|
+
end
|
|
File without changes
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sinclair
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- DarthJee
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-08-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -38,130 +38,214 @@ dependencies:
|
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: 1.16.1
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: pry
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - '='
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: 0.12.2
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - '='
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: 0.12.2
|
|
41
55
|
- !ruby/object:Gem::Dependency
|
|
42
56
|
name: pry-nav
|
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
|
44
58
|
requirements:
|
|
45
|
-
- -
|
|
59
|
+
- - '='
|
|
46
60
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0.
|
|
61
|
+
version: 0.3.0
|
|
48
62
|
type: :development
|
|
49
63
|
prerelease: false
|
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
65
|
requirements:
|
|
52
|
-
- -
|
|
66
|
+
- - '='
|
|
53
67
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 0.
|
|
68
|
+
version: 0.3.0
|
|
55
69
|
- !ruby/object:Gem::Dependency
|
|
56
70
|
name: rake
|
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
|
58
72
|
requirements:
|
|
59
|
-
- -
|
|
73
|
+
- - '='
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: 12.3.3
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - '='
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: 12.3.3
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: reek
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - '='
|
|
60
88
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
89
|
+
version: 5.4.0
|
|
62
90
|
type: :development
|
|
63
91
|
prerelease: false
|
|
64
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
93
|
requirements:
|
|
66
|
-
- -
|
|
94
|
+
- - '='
|
|
67
95
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
96
|
+
version: 5.4.0
|
|
69
97
|
- !ruby/object:Gem::Dependency
|
|
70
98
|
name: rspec
|
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
|
72
100
|
requirements:
|
|
73
|
-
- -
|
|
101
|
+
- - '='
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: 3.8.0
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - '='
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: 3.8.0
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: rspec-core
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - '='
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: 3.8.0
|
|
118
|
+
type: :development
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - '='
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: 3.8.0
|
|
125
|
+
- !ruby/object:Gem::Dependency
|
|
126
|
+
name: rspec-expectations
|
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
|
128
|
+
requirements:
|
|
129
|
+
- - '='
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: 3.8.3
|
|
132
|
+
type: :development
|
|
133
|
+
prerelease: false
|
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
- - '='
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: 3.8.3
|
|
139
|
+
- !ruby/object:Gem::Dependency
|
|
140
|
+
name: rspec-mocks
|
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - '='
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: 3.8.0
|
|
146
|
+
type: :development
|
|
147
|
+
prerelease: false
|
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
+
requirements:
|
|
150
|
+
- - '='
|
|
151
|
+
- !ruby/object:Gem::Version
|
|
152
|
+
version: 3.8.0
|
|
153
|
+
- !ruby/object:Gem::Dependency
|
|
154
|
+
name: rspec-support
|
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
|
156
|
+
requirements:
|
|
157
|
+
- - '='
|
|
74
158
|
- !ruby/object:Gem::Version
|
|
75
|
-
version:
|
|
159
|
+
version: 3.8.0
|
|
76
160
|
type: :development
|
|
77
161
|
prerelease: false
|
|
78
162
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
163
|
requirements:
|
|
80
|
-
- -
|
|
164
|
+
- - '='
|
|
81
165
|
- !ruby/object:Gem::Version
|
|
82
|
-
version:
|
|
166
|
+
version: 3.8.0
|
|
83
167
|
- !ruby/object:Gem::Dependency
|
|
84
168
|
name: rubocop
|
|
85
169
|
requirement: !ruby/object:Gem::Requirement
|
|
86
170
|
requirements:
|
|
87
171
|
- - '='
|
|
88
172
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: 0.
|
|
173
|
+
version: 0.73.0
|
|
90
174
|
type: :development
|
|
91
175
|
prerelease: false
|
|
92
176
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
177
|
requirements:
|
|
94
178
|
- - '='
|
|
95
179
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: 0.
|
|
180
|
+
version: 0.73.0
|
|
97
181
|
- !ruby/object:Gem::Dependency
|
|
98
182
|
name: rubocop-rspec
|
|
99
183
|
requirement: !ruby/object:Gem::Requirement
|
|
100
184
|
requirements:
|
|
101
185
|
- - '='
|
|
102
186
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: 1.
|
|
187
|
+
version: 1.33.0
|
|
104
188
|
type: :development
|
|
105
189
|
prerelease: false
|
|
106
190
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
191
|
requirements:
|
|
108
192
|
- - '='
|
|
109
193
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: 1.
|
|
194
|
+
version: 1.33.0
|
|
111
195
|
- !ruby/object:Gem::Dependency
|
|
112
196
|
name: rubycritic
|
|
113
197
|
requirement: !ruby/object:Gem::Requirement
|
|
114
198
|
requirements:
|
|
115
|
-
- -
|
|
199
|
+
- - '='
|
|
116
200
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: 4.0
|
|
201
|
+
version: 4.1.0
|
|
118
202
|
type: :development
|
|
119
203
|
prerelease: false
|
|
120
204
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
205
|
requirements:
|
|
122
|
-
- -
|
|
206
|
+
- - '='
|
|
123
207
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: 4.0
|
|
208
|
+
version: 4.1.0
|
|
125
209
|
- !ruby/object:Gem::Dependency
|
|
126
210
|
name: simplecov
|
|
127
211
|
requirement: !ruby/object:Gem::Requirement
|
|
128
212
|
requirements:
|
|
129
|
-
- -
|
|
213
|
+
- - '='
|
|
130
214
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: 0.
|
|
215
|
+
version: 0.17.0
|
|
132
216
|
type: :development
|
|
133
217
|
prerelease: false
|
|
134
218
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
219
|
requirements:
|
|
136
|
-
- -
|
|
220
|
+
- - '='
|
|
137
221
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: 0.
|
|
222
|
+
version: 0.17.0
|
|
139
223
|
- !ruby/object:Gem::Dependency
|
|
140
224
|
name: yard
|
|
141
225
|
requirement: !ruby/object:Gem::Requirement
|
|
142
226
|
requirements:
|
|
143
|
-
- -
|
|
227
|
+
- - '='
|
|
144
228
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: 0.9.
|
|
229
|
+
version: 0.9.19
|
|
146
230
|
type: :development
|
|
147
231
|
prerelease: false
|
|
148
232
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
233
|
requirements:
|
|
150
|
-
- -
|
|
234
|
+
- - '='
|
|
151
235
|
- !ruby/object:Gem::Version
|
|
152
|
-
version: 0.9.
|
|
236
|
+
version: 0.9.19
|
|
153
237
|
- !ruby/object:Gem::Dependency
|
|
154
238
|
name: yardstick
|
|
155
239
|
requirement: !ruby/object:Gem::Requirement
|
|
156
240
|
requirements:
|
|
157
|
-
- -
|
|
241
|
+
- - '='
|
|
158
242
|
- !ruby/object:Gem::Version
|
|
159
243
|
version: 0.9.9
|
|
160
244
|
type: :development
|
|
161
245
|
prerelease: false
|
|
162
246
|
version_requirements: !ruby/object:Gem::Requirement
|
|
163
247
|
requirements:
|
|
164
|
-
- -
|
|
248
|
+
- - '='
|
|
165
249
|
- !ruby/object:Gem::Version
|
|
166
250
|
version: 0.9.9
|
|
167
251
|
description: Gem for easy concern creation
|
|
@@ -194,15 +278,24 @@ files:
|
|
|
194
278
|
- lib/sinclair/config_factory.rb
|
|
195
279
|
- lib/sinclair/configurable.rb
|
|
196
280
|
- lib/sinclair/matchers.rb
|
|
281
|
+
- lib/sinclair/matchers/add_class_method.rb
|
|
282
|
+
- lib/sinclair/matchers/add_class_method_to.rb
|
|
283
|
+
- lib/sinclair/matchers/add_instance_method.rb
|
|
284
|
+
- lib/sinclair/matchers/add_instance_method_to.rb
|
|
197
285
|
- lib/sinclair/matchers/add_method.rb
|
|
198
286
|
- lib/sinclair/matchers/add_method_to.rb
|
|
199
287
|
- lib/sinclair/method_definition.rb
|
|
200
288
|
- lib/sinclair/method_definition/block_definition.rb
|
|
289
|
+
- lib/sinclair/method_definition/class_block_definition.rb
|
|
290
|
+
- lib/sinclair/method_definition/class_method_definition.rb
|
|
291
|
+
- lib/sinclair/method_definition/class_string_definition.rb
|
|
292
|
+
- lib/sinclair/method_definition/instance_block_definition.rb
|
|
293
|
+
- lib/sinclair/method_definition/instance_method_definition.rb
|
|
294
|
+
- lib/sinclair/method_definition/instance_string_definition.rb
|
|
201
295
|
- lib/sinclair/method_definition/string_definition.rb
|
|
296
|
+
- lib/sinclair/method_definitions.rb
|
|
202
297
|
- lib/sinclair/options_parser.rb
|
|
203
298
|
- lib/sinclair/version.rb
|
|
204
|
-
- scripts/check_readme.sh
|
|
205
|
-
- scripts/rubycritic.sh
|
|
206
299
|
- sinclair.gemspec
|
|
207
300
|
- sinclair.jpg
|
|
208
301
|
- spec/integration/readme/my_class_spec.rb
|
|
@@ -210,18 +303,22 @@ files:
|
|
|
210
303
|
- spec/integration/readme/sinclair/configurable_spec.rb
|
|
211
304
|
- spec/integration/readme/sinclair/matchers_spec.rb
|
|
212
305
|
- spec/integration/readme/sinclair_spec.rb
|
|
213
|
-
- spec/integration/sinclair/matchers_spec.rb
|
|
214
306
|
- spec/integration/yard/my_builder_spec.rb
|
|
215
307
|
- spec/integration/yard/sinclair/config_builder_spec.rb
|
|
216
308
|
- spec/integration/yard/sinclair/config_class_spec.rb
|
|
217
309
|
- spec/integration/yard/sinclair/config_factory_spec.rb
|
|
218
310
|
- spec/integration/yard/sinclair/config_spec.rb
|
|
219
311
|
- spec/integration/yard/sinclair/configurable_spec.rb
|
|
220
|
-
- spec/integration/yard/sinclair/matchers/
|
|
221
|
-
- spec/integration/yard/sinclair/matchers/
|
|
222
|
-
- spec/integration/yard/sinclair/
|
|
223
|
-
- spec/integration/yard/sinclair/
|
|
224
|
-
- spec/integration/yard/sinclair/
|
|
312
|
+
- spec/integration/yard/sinclair/matchers/add_class_method_spec.rb
|
|
313
|
+
- spec/integration/yard/sinclair/matchers/add_class_method_to_spec.rb
|
|
314
|
+
- spec/integration/yard/sinclair/matchers/add_instance_method_spec.rb
|
|
315
|
+
- spec/integration/yard/sinclair/matchers/add_instance_method_to_spec.rb
|
|
316
|
+
- spec/integration/yard/sinclair/method_definition/class_block_definition_spec.rb
|
|
317
|
+
- spec/integration/yard/sinclair/method_definition/class_method_definition_spec.rb
|
|
318
|
+
- spec/integration/yard/sinclair/method_definition/class_string_definition_spec.rb
|
|
319
|
+
- spec/integration/yard/sinclair/method_definition/instance_block_definition_spec.rb
|
|
320
|
+
- spec/integration/yard/sinclair/method_definition/instance_method_definition_spec.rb
|
|
321
|
+
- spec/integration/yard/sinclair/method_definition/instance_string_definition_spec.rb
|
|
225
322
|
- spec/integration/yard/sinclair/options_parser_spec.rb
|
|
226
323
|
- spec/integration/yard/sinclair_spec.rb
|
|
227
324
|
- spec/lib/sinclair/config/methods_builder_spec.rb
|
|
@@ -230,11 +327,15 @@ files:
|
|
|
230
327
|
- spec/lib/sinclair/config_factory_spec.rb
|
|
231
328
|
- spec/lib/sinclair/config_spec.rb
|
|
232
329
|
- spec/lib/sinclair/configurable_spec.rb
|
|
233
|
-
- spec/lib/sinclair/matchers/
|
|
234
|
-
- spec/lib/sinclair/matchers/
|
|
330
|
+
- spec/lib/sinclair/matchers/add_class_method_spec.rb
|
|
331
|
+
- spec/lib/sinclair/matchers/add_class_method_to_spec.rb
|
|
332
|
+
- spec/lib/sinclair/matchers/add_instance_method_spec.rb
|
|
333
|
+
- spec/lib/sinclair/matchers/add_instance_method_to_spec.rb
|
|
235
334
|
- spec/lib/sinclair/matchers_spec.rb
|
|
236
|
-
- spec/lib/sinclair/method_definition/
|
|
237
|
-
- spec/lib/sinclair/method_definition/
|
|
335
|
+
- spec/lib/sinclair/method_definition/class_block_definition_spec.rb
|
|
336
|
+
- spec/lib/sinclair/method_definition/class_string_definition_spec.rb
|
|
337
|
+
- spec/lib/sinclair/method_definition/instance_block_definition_spec.rb
|
|
338
|
+
- spec/lib/sinclair/method_definition/instance_string_definition_spec.rb
|
|
238
339
|
- spec/lib/sinclair/method_definition_spec.rb
|
|
239
340
|
- spec/lib/sinclair/options_parser_spec.rb
|
|
240
341
|
- spec/lib/sinclair_spec.rb
|
|
@@ -246,6 +347,7 @@ files:
|
|
|
246
347
|
- spec/support/models/default_value_builder.rb
|
|
247
348
|
- spec/support/models/default_valueable.rb
|
|
248
349
|
- spec/support/models/dummy_builder.rb
|
|
350
|
+
- spec/support/models/dummy_class_builder.rb
|
|
249
351
|
- spec/support/models/dummy_config.rb
|
|
250
352
|
- spec/support/models/dummy_configurable.rb
|
|
251
353
|
- spec/support/models/dummy_options_parser.rb
|
|
@@ -265,9 +367,10 @@ files:
|
|
|
265
367
|
- spec/support/models/server.rb
|
|
266
368
|
- spec/support/models/server_config.rb
|
|
267
369
|
- spec/support/models/validator_builder.rb
|
|
370
|
+
- spec/support/shared_examples/class_method_definition.rb
|
|
268
371
|
- spec/support/shared_examples/config.rb
|
|
269
372
|
- spec/support/shared_examples/config_factory.rb
|
|
270
|
-
- spec/support/shared_examples/
|
|
373
|
+
- spec/support/shared_examples/instance_method_definition.rb
|
|
271
374
|
homepage: https://github.com/darthjee/sinclair
|
|
272
375
|
licenses: []
|
|
273
376
|
metadata: {}
|