clintegracon 0.7.0 → 0.8.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8783eed598a5361fc795faf244dbd22fe60a35f1
4
- data.tar.gz: a030a86de14cb5a5a4a9e686b5943a6a1c8fb864
3
+ metadata.gz: 3c17fd4d5c73064214f1007dfa1961972b132447
4
+ data.tar.gz: e220fc292b54eb3aba9cebcf70d620bf64e663a8
5
5
  SHA512:
6
- metadata.gz: 6fca68914e6029a04788fb6c99e37abaa8c392fc541f86219a213c6594ae86c848d05e193199179071b66ac90f79a88de8716993510b3592bf6cb27ed3c1b139
7
- data.tar.gz: 3db0cd2ef3d3dcc8ab501db629bf0121d8587fcb44a765a6c8be18b6cb0488862c543dee168d02750ed8241baf564b52b3beaf8ca41620817ef8865520b4de14
6
+ metadata.gz: 7235e9a6e47498e3402dba680c34a782a99af5bc03656c8e2fcdfbdb29eb2a36bea73829db48003fda6513693a2932cf42c964e6e171885793e670f41ab445cc
7
+ data.tar.gz: 364d59fac04a223bc6e54819e0991f26e877615bdd7772caa4680e655bf1e4a6fe3270eca75bebba87505a1f167cdf41026419ceabcbaf234c06baa429d79e46
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- clintegracon (0.7.0)
4
+ clintegracon (0.8.0)
5
5
  colored (~> 1.2)
6
6
  diffy
7
7
 
@@ -60,3 +60,6 @@ DEPENDENCIES
60
60
  inch
61
61
  mocha-on-bacon
62
62
  rake
63
+
64
+ BUNDLED WITH
65
+ 1.10.6
@@ -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(temp_path) do
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 temporary
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 = temp_path
190
+ destination = temp_transformed_path
174
191
 
175
192
  if has_base?
176
- FileUtils.cp_r("#{base_spec.after_path}/.", destination)
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 = temp_path + relative_path
245
+ produced = temp_transformed_path + relative_path
229
246
  Diff.new(expected, produced, relative_path, &block)
230
247
  end
231
248
 
@@ -1,3 +1,3 @@
1
1
  module CLIntegracon
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
@@ -1,2 +1,3 @@
1
1
  class Affogato < BrewedCoffee
2
+ @milk = true
2
3
  @sweetner = honey
@@ -1,2 +1,3 @@
1
1
  class RedTux < BrewedCoffee
2
- @sweetner = sugar
2
+ @milk = true
3
+ @sweetner = honey
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.7.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-05-07 00:00:00.000000000 Z
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.2.2
219
+ rubygems_version: 2.4.5
220
220
  signing_key:
221
221
  specification_version: 4
222
222
  summary: Integration specs for your CLI