kronk 1.7.1 → 1.7.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.
@@ -1,4 +1,4 @@
1
- === 1.7.0 / 2011-10-10
1
+ === 1.7.2 / 2011-10-10
2
2
 
3
3
  * Bugfixes:
4
4
 
@@ -14,7 +14,7 @@ require 'yaml'
14
14
  class Kronk
15
15
 
16
16
  # This gem's version.
17
- VERSION = '1.7.1'
17
+ VERSION = '1.7.2'
18
18
 
19
19
  require 'kronk/constants'
20
20
  require 'kronk/queue_runner'
@@ -80,7 +80,7 @@ class Kronk
80
80
  end
81
81
 
82
82
  File.open Kronk::DEFAULT_CONFIG_FILE, "w+" do |file|
83
- file << Kronk::DEFAULT_CONFIG.to_yaml
83
+ file << new_config.to_yaml
84
84
  end
85
85
  end
86
86
 
@@ -129,12 +129,12 @@ Parse and run diffs against data from live and cached http responses.
129
129
  STR
130
130
 
131
131
  opt.on('--ascii', 'Return ascii formatted diff') do
132
- Kronk.config[:diff_format] = :ascii_diff
132
+ Kronk.config[:diff_format] = 'ascii'
133
133
  end
134
134
 
135
135
 
136
136
  opt.on('--color', 'Return color formatted diff') do
137
- Kronk.config[:diff_format] = :color_diff
137
+ Kronk.config[:diff_format] = 'color'
138
138
  end
139
139
 
140
140
 
@@ -84,7 +84,7 @@ class Kronk
84
84
  :context => 3,
85
85
  :cookies_file => DEFAULT_COOKIES_FILE,
86
86
  :default_host => "http://localhost:3000",
87
- :diff_format => :ascii_diff,
87
+ :diff_format => 'ascii',
88
88
  :history_file => DEFAULT_HISTORY_FILE,
89
89
  :indentation => 1,
90
90
  :requires => [],
@@ -75,7 +75,12 @@ class TestCmd < Test::Unit::TestCase
75
75
  Kronk::Cmd.make_config_file
76
76
  mock_file.rewind
77
77
 
78
- assert_equal Kronk::DEFAULT_CONFIG.to_yaml, mock_file.read
78
+ new_config = {}
79
+ Kronk::DEFAULT_CONFIG.each do |key, value|
80
+ new_config[key.to_s] = value
81
+ end
82
+
83
+ assert_equal new_config.to_yaml, mock_file.read
79
84
  end
80
85
 
81
86
 
@@ -89,7 +94,12 @@ class TestCmd < Test::Unit::TestCase
89
94
  Kronk::Cmd.make_config_file
90
95
  mock_file.rewind
91
96
 
92
- assert_equal Kronk::DEFAULT_CONFIG.to_yaml, mock_file.read
97
+ new_config = {}
98
+ Kronk::DEFAULT_CONFIG.each do |key, value|
99
+ new_config[key.to_s] = value
100
+ end
101
+
102
+ assert_equal new_config.to_yaml, mock_file.read
93
103
  end
94
104
 
95
105
 
@@ -162,13 +172,13 @@ class TestCmd < Test::Unit::TestCase
162
172
  def test_parse_args_diff_format_mapping
163
173
  with_config Hash.new do
164
174
  opts = Kronk::Cmd.parse_args %w{uri --ascii}
165
- assert_equal :ascii_diff, Kronk.config[:diff_format]
175
+ assert_equal 'ascii', Kronk.config[:diff_format]
166
176
 
167
177
  opts = Kronk::Cmd.parse_args %w{uri --color}
168
- assert_equal :color_diff, Kronk.config[:diff_format]
169
-
170
- opts = Kronk::Cmd.parse_args %w{uri --format color}
171
178
  assert_equal 'color', Kronk.config[:diff_format]
179
+
180
+ opts = Kronk::Cmd.parse_args %w{uri --format color_diff}
181
+ assert_equal 'color_diff', Kronk.config[:diff_format]
172
182
  end
173
183
  end
174
184
 
@@ -17,7 +17,7 @@ class TestKronk < Test::Unit::TestCase
17
17
  :history_file => Kronk::DEFAULT_HISTORY_FILE,
18
18
  :indentation => 1,
19
19
  :default_host => "http://localhost:3000",
20
- :diff_format => :ascii_diff,
20
+ :diff_format => 'ascii',
21
21
  :show_lines => false,
22
22
  :use_cookies => true,
23
23
  :requires => [],
@@ -72,7 +72,7 @@ class TestKronk < Test::Unit::TestCase
72
72
  },
73
73
  :context => 3,
74
74
  :default_host => "http://localhost:3000",
75
- :diff_format => :ascii_diff,
75
+ :diff_format => 'ascii',
76
76
  :cache_file => Kronk::DEFAULT_CACHE_FILE,
77
77
  :cookies_file => Kronk::DEFAULT_COOKIES_FILE,
78
78
  :history_file => Kronk::DEFAULT_HISTORY_FILE,
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: kronk
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.7.1
5
+ version: 1.7.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jeremie Castagna