summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2009-11-06 23:38:13 +0100
committerFlorian Frank <flori@ping.de>2009-11-07 10:53:42 +0100
commit66f233eaad0f745463d50e3efdc0ea0d9c56fc1e (patch)
tree9db5a9a4f2b4acc7ef16456659fac241beff9508
parent6698ba5b94548c81455fe5a48d9e01aa313e133c (diff)
downloadjson-66f233eaad0f745463d50e3efdc0ea0d9c56fc1e.tar.gz
changed docu title and headlines
-rw-r--r--README20
-rw-r--r--Rakefile11
2 files changed, 15 insertions, 16 deletions
diff --git a/README b/README
index 2dd55e2..a12009f 100644
--- a/README
+++ b/README
@@ -1,6 +1,4 @@
-== json - JSON Implementation for Ruby
-
-=== Description
+== Description
This is a implementation of the JSON specification according to RFC 4627
(http://www.ietf.org/rfc/rfc4627.txt). Starting from version 1.0.0 on there
@@ -34,7 +32,7 @@ String#encoding set. If a document string has ASCII-8BIT as an encoding the
parser attempts to figure out which of the UTF encodings from above it is and
trys to parse it.
-=== Installation
+== Installation
It's recommended to use the extension variant of JSON, because it's faster than
the pure ruby variant. If you cannot build it on your system, you can settle
@@ -65,7 +63,7 @@ with:
# gem install json_pure
-=== Compiling the extensions yourself
+== Compiling the extensions yourself
If you want to build the extensions yourself you need rake:
@@ -82,7 +80,7 @@ If you want to create the parser.c file from its parser.rl file or draw nice
graphviz images of the state machines, you need ragel from: http://www.cs.queensu.ca/~thurston/ragel
-=== Usage
+== Usage
To use JSON you can
require 'json'
@@ -136,7 +134,7 @@ To get the best compatibility to rails' JSON implementation, you can
Both of the additions attempt to require 'json' (like above) first, if it has
not been required yet.
-=== More Examples
+== More Examples
To create a JSON document from a ruby data structure, you can call
JSON.generate like that:
@@ -226,7 +224,7 @@ The script tools/server.rb contains a small example if you want to test, how
receiving a JSON object from a webrick server in your browser with the
javasript prototype library (http://www.prototypejs.org) works.
-=== Speed Comparisons
+== Speed Comparisons
I have created some benchmark results (see the benchmarks/data-p4-3Ghz
subdir of the package) for the JSON-parser to estimate the speed up in the C
@@ -339,17 +337,17 @@ Here are the median comparisons for completeness' sake:
calls/sec ( time) -> speed covers
secs/call
-=== Author
+== Author
Florian Frank <mailto:flori@ping.de>
-=== License
+== License
Ruby License, see the COPYING file included in the source distribution. The
Ruby License includes the GNU General Public License (GPL), Version 2, so see
the file GPL as well.
-=== Download
+== Download
The latest version of this library can be downloaded at
diff --git a/Rakefile b/Rakefile
index edb3731..eead037 100644
--- a/Rakefile
+++ b/Rakefile
@@ -17,6 +17,7 @@ include Config
MAKE = ENV['MAKE'] || %w[gmake make].find { |c| system(c, '-v') }
PKG_NAME = 'json'
+PKG_TITLE = 'JSON Implementation for Ruby'
PKG_VERSION = File.read('VERSION').chomp
PKG_FILES = FileList["**/*"].exclude(/CVS|pkg|tmp|coverage|Makefile|\.nfs\./).exclude(/\.(so|bundle|o|#{CONFIG['DLEXT']})$/)
EXT_ROOT_DIR = 'ext/json/ext'
@@ -173,14 +174,14 @@ task :benchmark => [ :benchmark_parser, :benchmark_generator ]
desc "Create RDOC documentation"
task :doc => [ :version, EXT_PARSER_SRC ] do
- sh "rdoc -o doc -m README README lib/json.rb #{FileList['lib/json/**/*.rb']} #{EXT_PARSER_SRC} #{EXT_GENERATOR_SRC}"
+ sh "rdoc -o doc -t '#{PKG_TITLE}' -m README README lib/json.rb #{FileList['lib/json/**/*.rb']} #{EXT_PARSER_SRC} #{EXT_GENERATOR_SRC}"
end
if defined?(Gem) and defined?(Rake::GemPackageTask) and defined?(Rake::ExtensionTask)
spec_pure = Gem::Specification.new do |s|
s.name = 'json_pure'
s.version = PKG_VERSION
- s.summary = "A JSON implementation in Ruby"
+ s.summary = PKG_TITLE
s.description = "This is a JSON implementation in pure Ruby."
s.files = PKG_FILES
@@ -194,7 +195,7 @@ if defined?(Gem) and defined?(Rake::GemPackageTask) and defined?(Rake::Extension
s.has_rdoc = true
s.extra_rdoc_files << 'README'
s.rdoc_options <<
- '--title' << 'JSON -- A JSON implemention' << '--main' << 'README'
+ '--title' << 'JSON implemention for ruby' << '--main' << 'README'
s.test_files.concat Dir['tests/*.rb']
s.author = "Florian Frank"
@@ -211,7 +212,7 @@ if defined?(Gem) and defined?(Rake::GemPackageTask) and defined?(Rake::Extension
spec_ext = Gem::Specification.new do |s|
s.name = 'json'
s.version = PKG_VERSION
- s.summary = "A JSON implementation as a Ruby extension"
+ s.summary = PKG_TITLE
s.description = "This is a JSON implementation as a Ruby extension in C."
s.files = PKG_FILES
@@ -229,7 +230,7 @@ if defined?(Gem) and defined?(Rake::GemPackageTask) and defined?(Rake::Extension
s.has_rdoc = true
s.extra_rdoc_files << 'README'
s.rdoc_options <<
- '--title' << 'JSON -- A JSON implemention' << '--main' << 'README'
+ '--title' << 'JSON implemention for Ruby' << '--main' << 'README'
s.test_files.concat Dir['tests/*.rb']
s.author = "Florian Frank"