clintegracon 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -1
- data/lib/CLIntegracon/adapter/bacon.rb +2 -1
- data/lib/CLIntegracon/file_tree_spec.rb +22 -5
- data/lib/CLIntegracon/version.rb +1 -1
- data/spec/integration/coffeemaker_no_milk_sweetner_honey/after/Affogato.brewed-coffee +1 -0
- data/spec/integration/coffeemaker_no_milk_sweetner_honey/after/RedTux.brewed-coffee +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c17fd4d5c73064214f1007dfa1961972b132447
|
4
|
+
data.tar.gz: e220fc292b54eb3aba9cebcf70d620bf64e663a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7235e9a6e47498e3402dba680c34a782a99af5bc03656c8e2fcdfbdb29eb2a36bea73829db48003fda6513693a2932cf42c964e6e171885793e670f41ab445cc
|
7
|
+
data.tar.gz: 364d59fac04a223bc6e54819e0991f26e877615bdd7772caa4680e655bf1e4a6fe3270eca75bebba87505a1f167cdf41026419ceabcbaf234c06baa429d79e46
|
data/Gemfile.lock
CHANGED
@@ -94,6 +94,7 @@ module CLIntegracon::Adapter::Bacon
|
|
94
94
|
status.success?
|
95
95
|
end
|
96
96
|
end
|
97
|
+
status.success?
|
97
98
|
end
|
98
99
|
end
|
99
100
|
|
@@ -130,7 +131,7 @@ module CLIntegracon::Adapter::Bacon
|
|
130
131
|
|
131
132
|
shared shared_name do
|
132
133
|
file_tree_spec_context.spec(spec_dir, based_on: based_on).run do |spec|
|
133
|
-
instance_eval &block
|
134
|
+
break unless instance_eval &block
|
134
135
|
|
135
136
|
formatter = spec.formatter.lazy
|
136
137
|
|
@@ -45,6 +45,18 @@ module CLIntegracon
|
|
45
45
|
context.temp_path + spec_folder
|
46
46
|
end
|
47
47
|
|
48
|
+
# @return [Pathname]
|
49
|
+
# The concrete temp raw directory for this spec
|
50
|
+
def temp_raw_path
|
51
|
+
temp_path + 'raw'
|
52
|
+
end
|
53
|
+
|
54
|
+
# @return [Pathname]
|
55
|
+
# The concrete transformed temp directory for this spec
|
56
|
+
def temp_transformed_path
|
57
|
+
temp_path + 'transformed'
|
58
|
+
end
|
59
|
+
|
48
60
|
# @return [String|NilClass]
|
49
61
|
# The name of an optional #base_spec.
|
50
62
|
attr_reader :base_spec_name
|
@@ -94,7 +106,7 @@ module CLIntegracon
|
|
94
106
|
|
95
107
|
copy_files!
|
96
108
|
|
97
|
-
Dir.chdir(
|
109
|
+
Dir.chdir(temp_transformed_path) do
|
98
110
|
block.call self
|
99
111
|
end
|
100
112
|
end
|
@@ -107,6 +119,9 @@ module CLIntegracon
|
|
107
119
|
# It will receive a Diff of each of the expected and produced files.
|
108
120
|
#
|
109
121
|
def compare(&diff_block)
|
122
|
+
# Get a copy of the outputs before any transformations are applied
|
123
|
+
FileUtils.cp_r("#{temp_transformed_path}/.", temp_raw_path)
|
124
|
+
|
110
125
|
transform_paths!
|
111
126
|
|
112
127
|
glob_all(after_path).each do |relative_path|
|
@@ -164,16 +179,18 @@ module CLIntegracon
|
|
164
179
|
|
165
180
|
temp_path.rmtree if temp_path.exist?
|
166
181
|
temp_path.mkdir
|
182
|
+
temp_raw_path.mkdir
|
183
|
+
temp_transformed_path.mkdir
|
167
184
|
end
|
168
185
|
|
169
|
-
# Copies the before subdirectory of the given tests folder in the
|
186
|
+
# Copies the before subdirectory of the given tests folder in the raw
|
170
187
|
# directory.
|
171
188
|
#
|
172
189
|
def copy_files!
|
173
|
-
destination =
|
190
|
+
destination = temp_transformed_path
|
174
191
|
|
175
192
|
if has_base?
|
176
|
-
FileUtils.cp_r("#{base_spec.
|
193
|
+
FileUtils.cp_r("#{base_spec.temp_raw_path}/.", destination)
|
177
194
|
end
|
178
195
|
|
179
196
|
begin
|
@@ -225,7 +242,7 @@ module CLIntegracon
|
|
225
242
|
# An object holding a diff
|
226
243
|
#
|
227
244
|
def diff_files(expected, relative_path, &block)
|
228
|
-
produced =
|
245
|
+
produced = temp_transformed_path + relative_path
|
229
246
|
Diff.new(expected, produced, relative_path, &block)
|
230
247
|
end
|
231
248
|
|
data/lib/CLIntegracon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clintegracon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marius Rackwitz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
216
|
version: '0'
|
217
217
|
requirements: []
|
218
218
|
rubyforge_project:
|
219
|
-
rubygems_version: 2.
|
219
|
+
rubygems_version: 2.4.5
|
220
220
|
signing_key:
|
221
221
|
specification_version: 4
|
222
222
|
summary: Integration specs for your CLI
|