json 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of json might be problematic. Click here for more details.
- data/CHANGES +5 -0
- data/Rakefile +11 -6
- data/VERSION +1 -1
- data/lib/json.rb +2 -2
- data/linecover.db +0 -0
- data/linecover_config.rb +14 -0
- data/tests/load_linecover.rb +6 -0
- data/tests/test_json.rb +9 -0
- metadata +45 -37
data/CHANGES
ADDED
data/Rakefile
CHANGED
@@ -1,13 +1,11 @@
|
|
1
1
|
require 'rake/gempackagetask'
|
2
|
-
require 'rbconfig'
|
3
2
|
|
3
|
+
require 'rbconfig'
|
4
4
|
include Config
|
5
5
|
|
6
6
|
PKG_NAME = 'json'
|
7
7
|
PKG_VERSION = File.read('VERSION').chomp
|
8
|
-
PKG_FILES =
|
9
|
-
item.include?("CVS") or item.include?("pkg")
|
10
|
-
}
|
8
|
+
PKG_FILES = FileList["**/*"].exclude("CVS").exclude("pkg")
|
11
9
|
|
12
10
|
desc "Installing library"
|
13
11
|
task :install do
|
@@ -27,12 +25,17 @@ task :test do
|
|
27
25
|
ruby 'tests/runner.rb'
|
28
26
|
end
|
29
27
|
|
28
|
+
desc "Removing generated files"
|
29
|
+
task :clean do
|
30
|
+
rm_rf 'doc'
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create RDOC documentation.
|
30
34
|
task :doc do
|
31
35
|
sh 'rdoc -d -S -o doc lib/json.rb lib/json/editor.rb'
|
32
36
|
end
|
33
37
|
|
34
38
|
spec = Gem::Specification.new do |s|
|
35
|
-
|
36
39
|
#### Basic information.
|
37
40
|
|
38
41
|
s.name = 'json'
|
@@ -54,7 +57,7 @@ spec = Gem::Specification.new do |s|
|
|
54
57
|
#### Load-time details: library and application (you will need one or both).
|
55
58
|
|
56
59
|
s.require_path = 'lib' # Use these for libraries.
|
57
|
-
s.autorequire = 'json'
|
60
|
+
#s.autorequire = 'json'
|
58
61
|
|
59
62
|
s.bindir = "bin" # Use these for applications.
|
60
63
|
s.executables = ["edit_json.rb"]
|
@@ -82,4 +85,6 @@ Rake::GemPackageTask.new(spec) do |pkg|
|
|
82
85
|
pkg.need_tar = true
|
83
86
|
pkg.package_files += PKG_FILES
|
84
87
|
end
|
88
|
+
|
89
|
+
task :release => [ :clean, :package ]
|
85
90
|
# vim: set et sw=4 ts=4:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
data/lib/json.rb
CHANGED
@@ -223,7 +223,7 @@ module JSON
|
|
223
223
|
when '\\n' then "\n"
|
224
224
|
when '\\r' then "\r"
|
225
225
|
when '\\t' then "\t"
|
226
|
-
when '
|
226
|
+
when '\\"' then '"'
|
227
227
|
else
|
228
228
|
if JSON.support_unicode? and $KCODE == 'UTF8'
|
229
229
|
JSON.utf16_to_utf8($~[1])
|
@@ -407,7 +407,7 @@ module JSON
|
|
407
407
|
when char == ?\f then result << '\f'
|
408
408
|
when char == ?\r then result << '\r'
|
409
409
|
when char == ?" then result << '\"'
|
410
|
-
when char == ?\\ then result << '
|
410
|
+
when char == ?\\ then result << '\\\\'
|
411
411
|
when char.between?(0x0, 0x1f) then result << "\\u%04x" % char
|
412
412
|
when char.between?(0x20, 0x7f) then result << char
|
413
413
|
when !(JSON.support_unicode? && $KCODE == 'UTF8')
|
data/linecover.db
ADDED
Binary file
|
data/linecover_config.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
module LineCover::Config
|
2
|
+
VERSION = 1
|
3
|
+
COVERAGE_DATABASE = 'linecover.db'
|
4
|
+
HTML_OUTPUT_DIRECTORY = 'linecover'
|
5
|
+
CONSOLE_LAST_COLUMN = 80
|
6
|
+
FILE_FILTER_ORDER = :EXCLUDE_INCLUDE
|
7
|
+
FILE_FILTER_INCLUDE = [
|
8
|
+
#%r(^(\./)?lib/.*\.rb$/),
|
9
|
+
]
|
10
|
+
FILE_FILTER_EXCLUDE = [
|
11
|
+
%r(^/.*),
|
12
|
+
%r(^(\./)?test(s)?/.*\.rb$),
|
13
|
+
]
|
14
|
+
end
|
data/tests/test_json.rb
CHANGED
@@ -205,5 +205,14 @@ EOT
|
|
205
205
|
assert_equal json, utf8.to_json
|
206
206
|
assert_equal utf8, parse(json)
|
207
207
|
end
|
208
|
+
|
209
|
+
def test_backslash
|
210
|
+
json = '"\\\\.(?i:gif|jpe?g|png)$"'
|
211
|
+
data = JSON.parse(json)
|
212
|
+
assert_equal json, JSON.unparse(data)
|
213
|
+
json = '"\\""'
|
214
|
+
data = JSON.parse(json)
|
215
|
+
assert_equal json, JSON.unparse(data)
|
216
|
+
end
|
208
217
|
end
|
209
218
|
# vim: set et sw=2 ts=2:
|
metadata
CHANGED
@@ -3,62 +3,70 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: json
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.4.
|
7
|
-
date:
|
6
|
+
version: 0.4.1
|
7
|
+
date: 2006-02-06 00:00:00 +01:00
|
8
8
|
summary: A JSON implementation in Ruby
|
9
9
|
require_paths:
|
10
|
-
|
10
|
+
- lib
|
11
11
|
email: flori@ping.de
|
12
12
|
homepage: http://json.rubyforge.org
|
13
13
|
rubyforge_project: json
|
14
|
-
description:
|
15
|
-
autorequire:
|
14
|
+
description: ""
|
15
|
+
autorequire:
|
16
16
|
default_executable: edit_json.rb
|
17
17
|
bindir: bin
|
18
18
|
has_rdoc: true
|
19
19
|
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
20
|
requirements:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
version: 0.0.0
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
25
24
|
version:
|
26
25
|
platform: ruby
|
27
26
|
signing_key:
|
28
27
|
cert_chain:
|
29
28
|
authors:
|
30
|
-
|
29
|
+
- Florian Frank
|
31
30
|
files:
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
31
|
+
- bin
|
32
|
+
- install.rb
|
33
|
+
- GPL
|
34
|
+
- linecover_config.rb
|
35
|
+
- TODO
|
36
|
+
- Rakefile
|
37
|
+
- linecover.db
|
38
|
+
- VERSION
|
39
|
+
- tests
|
40
|
+
- README
|
41
|
+
- CHANGES
|
42
|
+
- lib
|
43
|
+
- bin/edit_json.rb
|
44
|
+
- tests/load_linecover.rb
|
45
|
+
- tests/test_json.rb
|
46
|
+
- tests/runner.rb
|
47
|
+
- lib/json.rb
|
48
|
+
- lib/json
|
49
|
+
- lib/json/json.xpm
|
50
|
+
- lib/json/NilClass.xpm
|
51
|
+
- lib/json/Key.xpm
|
52
|
+
- lib/json/FalseClass.xpm
|
53
|
+
- lib/json/editor.rb
|
54
|
+
- lib/json/Array.xpm
|
55
|
+
- lib/json/TrueClass.xpm
|
56
|
+
- lib/json/Numeric.xpm
|
57
|
+
- lib/json/String.xpm
|
58
|
+
- lib/json/Hash.xpm
|
56
59
|
test_files:
|
57
|
-
|
60
|
+
- tests/runner.rb
|
58
61
|
rdoc_options: []
|
62
|
+
|
59
63
|
extra_rdoc_files: []
|
64
|
+
|
60
65
|
executables:
|
61
|
-
|
66
|
+
- edit_json.rb
|
62
67
|
extensions: []
|
68
|
+
|
63
69
|
requirements: []
|
64
|
-
|
70
|
+
|
71
|
+
dependencies: []
|
72
|
+
|