kronk 1.6.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc CHANGED
@@ -1,3 +1,9 @@
1
+ === 1.6.1 / 2011-09-12
2
+
3
+ * Enhancements:
4
+
5
+ * Support for diff paths on both sides when they are different.
6
+
1
7
  === 1.6.0 / 2011-09-11
2
8
 
3
9
  * Major Enhancements:
data/lib/kronk.rb CHANGED
@@ -14,7 +14,7 @@ require 'yaml'
14
14
  class Kronk
15
15
 
16
16
  # This gem's version.
17
- VERSION = '1.6.0'
17
+ VERSION = '1.6.1'
18
18
 
19
19
  require 'kronk/constants'
20
20
  require 'kronk/player'
data/lib/kronk/diff.rb CHANGED
@@ -93,6 +93,13 @@ class Kronk
93
93
  diff_ary << [left, right] unless left.empty? && right.empty?
94
94
 
95
95
  # add common
96
+ arr1[c[1], c[0]].each_with_index do |str1, i|
97
+ str2 = arr2[c[2]+i]
98
+ next unless str1.respond_to?(:meta) && str2.respond_to?(:meta) &&
99
+ str1.meta.first != str2.meta.first
100
+
101
+ str1.meta[0] = [str1.meta[0], str2.meta[0]]
102
+ end
96
103
  diff_ary.concat arr1[c[1], c[0]]
97
104
 
98
105
  last_i1 = c[1] + c[0]
@@ -81,6 +81,12 @@ class Kronk::Diff
81
81
  str = str[0][0] if Array === str
82
82
  info = str.meta[0] if str.respond_to?(:meta)
83
83
 
84
+ if Array === info && !info.empty?
85
+ cleft << " " << info[0]
86
+ cright << " " << info[1]
87
+ info = nil
88
+ end
89
+
84
90
  @output[start,0] = @format.context cleft, cright, info
85
91
  false
86
92
 
metadata CHANGED
@@ -1,96 +1,98 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: kronk
3
- version: !ruby/object:Gem::Version
4
- version: 1.6.0
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 1.6.1
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Jeremie Castagna
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-11 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
12
+
13
+ date: 2011-09-12 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
15
16
  name: json
16
- requirement: &2154385240 !ruby/object:Gem::Requirement
17
+ prerelease: false
18
+ requirement: &id001 !ruby/object:Gem::Requirement
17
19
  none: false
18
- requirements:
20
+ requirements:
19
21
  - - ~>
20
- - !ruby/object:Gem::Version
21
- version: '1.5'
22
+ - !ruby/object:Gem::Version
23
+ version: "1.5"
22
24
  type: :runtime
23
- prerelease: false
24
- version_requirements: *2154385240
25
- - !ruby/object:Gem::Dependency
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
26
27
  name: cookiejar
27
- requirement: &2154384820 !ruby/object:Gem::Requirement
28
+ prerelease: false
29
+ requirement: &id002 !ruby/object:Gem::Requirement
28
30
  none: false
29
- requirements:
31
+ requirements:
30
32
  - - ~>
31
- - !ruby/object:Gem::Version
33
+ - !ruby/object:Gem::Version
32
34
  version: 0.3.0
33
35
  type: :runtime
34
- prerelease: false
35
- version_requirements: *2154384820
36
- - !ruby/object:Gem::Dependency
36
+ version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
37
38
  name: plist
38
- requirement: &2154384400 !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id003 !ruby/object:Gem::Requirement
39
41
  none: false
40
- requirements:
42
+ requirements:
41
43
  - - ~>
42
- - !ruby/object:Gem::Version
44
+ - !ruby/object:Gem::Version
43
45
  version: 3.1.0
44
46
  type: :development
45
- prerelease: false
46
- version_requirements: *2154384400
47
- - !ruby/object:Gem::Dependency
47
+ version_requirements: *id003
48
+ - !ruby/object:Gem::Dependency
48
49
  name: nokogiri
49
- requirement: &2154413140 !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id004 !ruby/object:Gem::Requirement
50
52
  none: false
51
- requirements:
53
+ requirements:
52
54
  - - ~>
53
- - !ruby/object:Gem::Version
54
- version: '1.4'
55
+ - !ruby/object:Gem::Version
56
+ version: "1.4"
55
57
  type: :development
56
- prerelease: false
57
- version_requirements: *2154413140
58
- - !ruby/object:Gem::Dependency
58
+ version_requirements: *id004
59
+ - !ruby/object:Gem::Dependency
59
60
  name: mocha
60
- requirement: &2154412720 !ruby/object:Gem::Requirement
61
+ prerelease: false
62
+ requirement: &id005 !ruby/object:Gem::Requirement
61
63
  none: false
62
- requirements:
64
+ requirements:
63
65
  - - ~>
64
- - !ruby/object:Gem::Version
66
+ - !ruby/object:Gem::Version
65
67
  version: 0.9.12
66
68
  type: :development
67
- prerelease: false
68
- version_requirements: *2154412720
69
- - !ruby/object:Gem::Dependency
69
+ version_requirements: *id005
70
+ - !ruby/object:Gem::Dependency
70
71
  name: hoe
71
- requirement: &2154412300 !ruby/object:Gem::Requirement
72
+ prerelease: false
73
+ requirement: &id006 !ruby/object:Gem::Requirement
72
74
  none: false
73
- requirements:
74
- - - ~>
75
- - !ruby/object:Gem::Version
76
- version: '2.11'
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: 2.9.1
77
79
  type: :development
78
- prerelease: false
79
- version_requirements: *2154412300
80
- description: ! 'Kronk runs diffs against data from live and cached http responses.
81
-
82
- Kronk was made possible by the sponsoring of AT&T Interactive.'
83
- email:
80
+ version_requirements: *id006
81
+ description: |-
82
+ Kronk runs diffs against data from live and cached http responses.
83
+ Kronk was made possible by the sponsoring of AT&T Interactive.
84
+ email:
84
85
  - yaksnrainbows@gmail.com
85
- executables:
86
+ executables:
86
87
  - kronk
87
88
  extensions: []
88
- extra_rdoc_files:
89
+
90
+ extra_rdoc_files:
89
91
  - Manifest.txt
90
92
  - History.rdoc
91
93
  - README.rdoc
92
94
  - TODO.rdoc
93
- files:
95
+ files:
94
96
  - .autotest
95
97
  - History.rdoc
96
98
  - Manifest.txt
@@ -155,34 +157,36 @@ files:
155
157
  - .gemtest
156
158
  homepage: https://github.com/yaksnrainbows/kronk
157
159
  licenses: []
160
+
158
161
  post_install_message:
159
- rdoc_options:
162
+ rdoc_options:
160
163
  - --main
161
164
  - README.rdoc
162
- require_paths:
165
+ require_paths:
163
166
  - lib
164
- required_ruby_version: !ruby/object:Gem::Requirement
167
+ required_ruby_version: !ruby/object:Gem::Requirement
165
168
  none: false
166
- requirements:
167
- - - ! '>='
168
- - !ruby/object:Gem::Version
169
- version: '0'
170
- segments:
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ hash: 2162238022894922072
173
+ segments:
171
174
  - 0
172
- hash: 768057654813654441
173
- required_rubygems_version: !ruby/object:Gem::Requirement
175
+ version: "0"
176
+ required_rubygems_version: !ruby/object:Gem::Requirement
174
177
  none: false
175
- requirements:
176
- - - ! '>='
177
- - !ruby/object:Gem::Version
178
- version: '0'
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: "0"
179
182
  requirements: []
183
+
180
184
  rubyforge_project: kronk
181
- rubygems_version: 1.8.7
185
+ rubygems_version: 1.8.6
182
186
  signing_key:
183
187
  specification_version: 3
184
188
  summary: Kronk runs diffs against data from live and cached http responses
185
- test_files:
189
+ test_files:
186
190
  - test/test_assertions.rb
187
191
  - test/test_cmd.rb
188
192
  - test/test_core_ext.rb