benschwarz-smoke 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +6 -0
- data/VERSION.yml +1 -1
- metadata +65 -196
- data/Gemfile +0 -10
- data/bin/edit_json.rb +0 -3
- data/bin/restclient +0 -3
- data/vendor/gems/cache/crack-0.1.1.gem +0 -0
- data/vendor/gems/cache/fakeweb-1.2.5.gem +0 -0
- data/vendor/gems/cache/json-1.1.3.gem +0 -0
- data/vendor/gems/cache/rest-client-1.0.1.gem +0 -0
- data/vendor/gems/cache/simple-rss-1.2.gem +0 -0
- data/vendor/gems/cache/wycats-moneta-0.6.0.gem +0 -0
- data/vendor/gems/environment.rb +0 -83
- data/vendor/gems/gems/crack-0.1.1/LICENSE +0 -20
- data/vendor/gems/gems/crack-0.1.1/README.rdoc +0 -22
- data/vendor/gems/gems/crack-0.1.1/VERSION.yml +0 -4
- data/vendor/gems/gems/crack-0.1.1/lib/crack.rb +0 -7
- data/vendor/gems/gems/crack-0.1.1/lib/crack/core_extensions.rb +0 -126
- data/vendor/gems/gems/crack-0.1.1/lib/crack/json.rb +0 -66
- data/vendor/gems/gems/crack-0.1.1/lib/crack/xml.rb +0 -211
- data/vendor/gems/gems/crack-0.1.1/test/crack_test.rb +0 -4
- data/vendor/gems/gems/crack-0.1.1/test/json_test.rb +0 -42
- data/vendor/gems/gems/crack-0.1.1/test/test_helper.rb +0 -12
- data/vendor/gems/gems/crack-0.1.1/test/xml_test.rb +0 -451
- data/vendor/gems/gems/fakeweb-1.2.5/CHANGELOG +0 -163
- data/vendor/gems/gems/fakeweb-1.2.5/LICENSE.txt +0 -281
- data/vendor/gems/gems/fakeweb-1.2.5/README.rdoc +0 -193
- data/vendor/gems/gems/fakeweb-1.2.5/Rakefile +0 -76
- data/vendor/gems/gems/fakeweb-1.2.5/lib/fake_web.rb +0 -172
- data/vendor/gems/gems/fakeweb-1.2.5/lib/fake_web/ext/net_http.rb +0 -71
- data/vendor/gems/gems/fakeweb-1.2.5/lib/fake_web/registry.rb +0 -103
- data/vendor/gems/gems/fakeweb-1.2.5/lib/fake_web/responder.rb +0 -113
- data/vendor/gems/gems/fakeweb-1.2.5/lib/fake_web/response.rb +0 -10
- data/vendor/gems/gems/fakeweb-1.2.5/lib/fake_web/stub_socket.rb +0 -15
- data/vendor/gems/gems/fakeweb-1.2.5/lib/fake_web/utility.rb +0 -22
- data/vendor/gems/gems/fakeweb-1.2.5/lib/fakeweb.rb +0 -2
- data/vendor/gems/gems/fakeweb-1.2.5/test/fixtures/google_response_from_curl +0 -12
- data/vendor/gems/gems/fakeweb-1.2.5/test/fixtures/google_response_with_transfer_encoding +0 -17
- data/vendor/gems/gems/fakeweb-1.2.5/test/fixtures/google_response_without_transfer_encoding +0 -11
- data/vendor/gems/gems/fakeweb-1.2.5/test/fixtures/test_example.txt +0 -1
- data/vendor/gems/gems/fakeweb-1.2.5/test/fixtures/test_txt_file +0 -3
- data/vendor/gems/gems/fakeweb-1.2.5/test/test_allow_net_connect.rb +0 -85
- data/vendor/gems/gems/fakeweb-1.2.5/test/test_deprecations.rb +0 -54
- data/vendor/gems/gems/fakeweb-1.2.5/test/test_fake_authentication.rb +0 -92
- data/vendor/gems/gems/fakeweb-1.2.5/test/test_fake_web.rb +0 -518
- data/vendor/gems/gems/fakeweb-1.2.5/test/test_fake_web_open_uri.rb +0 -58
- data/vendor/gems/gems/fakeweb-1.2.5/test/test_helper.rb +0 -74
- data/vendor/gems/gems/fakeweb-1.2.5/test/test_missing_open_uri.rb +0 -25
- data/vendor/gems/gems/fakeweb-1.2.5/test/test_precedence.rb +0 -51
- data/vendor/gems/gems/fakeweb-1.2.5/test/test_query_string.rb +0 -45
- data/vendor/gems/gems/fakeweb-1.2.5/test/test_regexes.rb +0 -103
- data/vendor/gems/gems/fakeweb-1.2.5/test/test_response_headers.rb +0 -67
- data/vendor/gems/gems/fakeweb-1.2.5/test/test_trailing_slashes.rb +0 -53
- data/vendor/gems/gems/fakeweb-1.2.5/test/test_utility.rb +0 -70
- data/vendor/gems/gems/json-1.1.3/CHANGES +0 -93
- data/vendor/gems/gems/json-1.1.3/GPL +0 -340
- data/vendor/gems/gems/json-1.1.3/README +0 -78
- data/vendor/gems/gems/json-1.1.3/RUBY +0 -58
- data/vendor/gems/gems/json-1.1.3/Rakefile +0 -309
- data/vendor/gems/gems/json-1.1.3/TODO +0 -1
- data/vendor/gems/gems/json-1.1.3/VERSION +0 -1
- data/vendor/gems/gems/json-1.1.3/benchmarks/benchmark.txt +0 -133
- data/vendor/gems/gems/json-1.1.3/benchmarks/benchmark_generator.rb +0 -48
- data/vendor/gems/gems/json-1.1.3/benchmarks/benchmark_parser.rb +0 -26
- data/vendor/gems/gems/json-1.1.3/benchmarks/benchmark_rails.rb +0 -26
- data/vendor/gems/gems/json-1.1.3/bin/edit_json.rb +0 -10
- data/vendor/gems/gems/json-1.1.3/bin/prettify_json.rb +0 -76
- data/vendor/gems/gems/json-1.1.3/data/example.json +0 -1
- data/vendor/gems/gems/json-1.1.3/data/index.html +0 -38
- data/vendor/gems/gems/json-1.1.3/data/prototype.js +0 -4184
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/generator.bundle +0 -0
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/generator/Makefile +0 -150
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/generator/extconf.rb +0 -9
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/generator/generator.bundle +0 -0
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/generator/generator.c +0 -875
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/generator/generator.o +0 -0
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/generator/unicode.c +0 -182
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/generator/unicode.h +0 -53
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/generator/unicode.o +0 -0
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser.bundle +0 -0
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser/Makefile +0 -150
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser/extconf.rb +0 -9
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser/parser.bundle +0 -0
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser/parser.c +0 -1758
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser/parser.o +0 -0
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser/parser.rl +0 -638
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser/unicode.c +0 -154
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser/unicode.h +0 -58
- data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser/unicode.o +0 -0
- data/vendor/gems/gems/json-1.1.3/install.rb +0 -26
- data/vendor/gems/gems/json-1.1.3/lib/json.rb +0 -235
- data/vendor/gems/gems/json-1.1.3/lib/json/Array.xpm +0 -21
- data/vendor/gems/gems/json-1.1.3/lib/json/FalseClass.xpm +0 -21
- data/vendor/gems/gems/json-1.1.3/lib/json/Hash.xpm +0 -21
- data/vendor/gems/gems/json-1.1.3/lib/json/Key.xpm +0 -73
- data/vendor/gems/gems/json-1.1.3/lib/json/NilClass.xpm +0 -21
- data/vendor/gems/gems/json-1.1.3/lib/json/Numeric.xpm +0 -28
- data/vendor/gems/gems/json-1.1.3/lib/json/String.xpm +0 -96
- data/vendor/gems/gems/json-1.1.3/lib/json/TrueClass.xpm +0 -21
- data/vendor/gems/gems/json-1.1.3/lib/json/add/core.rb +0 -135
- data/vendor/gems/gems/json-1.1.3/lib/json/add/rails.rb +0 -58
- data/vendor/gems/gems/json-1.1.3/lib/json/common.rb +0 -354
- data/vendor/gems/gems/json-1.1.3/lib/json/editor.rb +0 -1362
- data/vendor/gems/gems/json-1.1.3/lib/json/ext.rb +0 -13
- data/vendor/gems/gems/json-1.1.3/lib/json/json.xpm +0 -1499
- data/vendor/gems/gems/json-1.1.3/lib/json/pure.rb +0 -75
- data/vendor/gems/gems/json-1.1.3/lib/json/pure/generator.rb +0 -394
- data/vendor/gems/gems/json-1.1.3/lib/json/pure/parser.rb +0 -259
- data/vendor/gems/gems/json-1.1.3/lib/json/version.rb +0 -9
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail1.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail10.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail11.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail12.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail13.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail14.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail18.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail19.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail2.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail20.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail21.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail22.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail23.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail24.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail25.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail27.json +0 -2
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail28.json +0 -2
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail3.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail4.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail5.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail6.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail7.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail8.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/fail9.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/pass1.json +0 -56
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/pass15.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/pass16.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/pass17.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/pass2.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/pass26.json +0 -1
- data/vendor/gems/gems/json-1.1.3/tests/fixtures/pass3.json +0 -6
- data/vendor/gems/gems/json-1.1.3/tests/runner.rb +0 -25
- data/vendor/gems/gems/json-1.1.3/tests/test_json.rb +0 -293
- data/vendor/gems/gems/json-1.1.3/tests/test_json_addition.rb +0 -161
- data/vendor/gems/gems/json-1.1.3/tests/test_json_fixtures.rb +0 -30
- data/vendor/gems/gems/json-1.1.3/tests/test_json_generate.rb +0 -100
- data/vendor/gems/gems/json-1.1.3/tests/test_json_rails.rb +0 -118
- data/vendor/gems/gems/json-1.1.3/tests/test_json_unicode.rb +0 -61
- data/vendor/gems/gems/json-1.1.3/tools/fuzz.rb +0 -140
- data/vendor/gems/gems/json-1.1.3/tools/server.rb +0 -62
- data/vendor/gems/gems/rest-client-1.0.1/README.rdoc +0 -151
- data/vendor/gems/gems/rest-client-1.0.1/Rakefile +0 -85
- data/vendor/gems/gems/rest-client-1.0.1/bin/restclient +0 -87
- data/vendor/gems/gems/rest-client-1.0.1/lib/rest_client.rb +0 -2
- data/vendor/gems/gems/rest-client-1.0.1/lib/restclient.rb +0 -93
- data/vendor/gems/gems/rest-client-1.0.1/lib/restclient/exceptions.rb +0 -84
- data/vendor/gems/gems/rest-client-1.0.1/lib/restclient/mixin/response.rb +0 -43
- data/vendor/gems/gems/rest-client-1.0.1/lib/restclient/raw_response.rb +0 -30
- data/vendor/gems/gems/rest-client-1.0.1/lib/restclient/request.rb +0 -236
- data/vendor/gems/gems/rest-client-1.0.1/lib/restclient/resource.rb +0 -146
- data/vendor/gems/gems/rest-client-1.0.1/lib/restclient/response.rb +0 -20
- data/vendor/gems/gems/rest-client-1.0.1/spec/base.rb +0 -4
- data/vendor/gems/gems/rest-client-1.0.1/spec/exceptions_spec.rb +0 -54
- data/vendor/gems/gems/rest-client-1.0.1/spec/mixin/response_spec.rb +0 -46
- data/vendor/gems/gems/rest-client-1.0.1/spec/raw_response_spec.rb +0 -17
- data/vendor/gems/gems/rest-client-1.0.1/spec/request_spec.rb +0 -462
- data/vendor/gems/gems/rest-client-1.0.1/spec/resource_spec.rb +0 -75
- data/vendor/gems/gems/rest-client-1.0.1/spec/response_spec.rb +0 -16
- data/vendor/gems/gems/rest-client-1.0.1/spec/restclient_spec.rb +0 -53
- data/vendor/gems/gems/simple-rss-1.2/LICENSE +0 -429
- data/vendor/gems/gems/simple-rss-1.2/README +0 -43
- data/vendor/gems/gems/simple-rss-1.2/Rakefile +0 -212
- data/vendor/gems/gems/simple-rss-1.2/lib/simple-rss.rb +0 -149
- data/vendor/gems/gems/simple-rss-1.2/test/base/base_test.rb +0 -51
- data/vendor/gems/gems/simple-rss-1.2/test/data/atom.xml +0 -45
- data/vendor/gems/gems/simple-rss-1.2/test/data/not-rss.xml +0 -8
- data/vendor/gems/gems/simple-rss-1.2/test/data/rss09.rdf +0 -79
- data/vendor/gems/gems/simple-rss-1.2/test/data/rss20.xml +0 -818
- data/vendor/gems/gems/simple-rss-1.2/test/test_helper.rb +0 -4
- data/vendor/gems/gems/wycats-moneta-0.6.0/LICENSE +0 -20
- data/vendor/gems/gems/wycats-moneta-0.6.0/README +0 -50
- data/vendor/gems/gems/wycats-moneta-0.6.0/Rakefile +0 -60
- data/vendor/gems/gems/wycats-moneta-0.6.0/TODO +0 -4
- data/vendor/gems/gems/wycats-moneta-0.6.0/lib/moneta.rb +0 -76
- data/vendor/gems/gems/wycats-moneta-0.6.0/lib/moneta/datamapper.rb +0 -117
- data/vendor/gems/gems/wycats-moneta-0.6.0/lib/moneta/file.rb +0 -91
- data/vendor/gems/gems/wycats-moneta-0.6.0/lib/moneta/memcache.rb +0 -52
- data/vendor/gems/gems/wycats-moneta-0.6.0/lib/moneta/memory.rb +0 -11
- data/vendor/gems/gems/wycats-moneta-0.6.0/lib/moneta/xattr.rb +0 -58
- data/vendor/gems/specifications/crack-0.1.1.gemspec +0 -29
- data/vendor/gems/specifications/fakeweb-1.2.5.gemspec +0 -34
- data/vendor/gems/specifications/json-1.1.3.gemspec +0 -33
- data/vendor/gems/specifications/rest-client-1.0.1.gemspec +0 -30
- data/vendor/gems/specifications/simple-rss-1.2.gemspec +0 -27
- data/vendor/gems/specifications/wycats-moneta-0.6.0.gemspec +0 -29
@@ -1,78 +0,0 @@
|
|
1
|
-
Dependencies for Building
|
2
|
-
=========================
|
3
|
-
|
4
|
-
- You need rake to build the extensions and install them.
|
5
|
-
|
6
|
-
You can get it from rubyforge:
|
7
|
-
http://rubyforge.org/projects/rake
|
8
|
-
|
9
|
-
or just type
|
10
|
-
|
11
|
-
# gem install rake
|
12
|
-
|
13
|
-
for the installation via rubygems.
|
14
|
-
|
15
|
-
- If you want to rebuild the parser.c file or draw nice graphviz images of the
|
16
|
-
state machines, you need ragel from:
|
17
|
-
http://www.cs.queensu.ca/~thurston/ragel
|
18
|
-
|
19
|
-
Installation
|
20
|
-
============
|
21
|
-
|
22
|
-
It's recommended to use the extension variant of JSON, because it's quite a bit
|
23
|
-
faster than the pure ruby variant. If you cannot build it on your system, you
|
24
|
-
can settle for the latter.
|
25
|
-
|
26
|
-
Just type into the command line as root:
|
27
|
-
|
28
|
-
# rake install
|
29
|
-
|
30
|
-
The above command will build the extensions and install them on your system.
|
31
|
-
|
32
|
-
# rake install_pure
|
33
|
-
|
34
|
-
or
|
35
|
-
|
36
|
-
# ruby install.rb
|
37
|
-
|
38
|
-
will just install the pure ruby implementation of JSON.
|
39
|
-
|
40
|
-
If you use Rubygems you can type
|
41
|
-
|
42
|
-
# gem install json
|
43
|
-
|
44
|
-
instead, to install the newest JSON version.
|
45
|
-
|
46
|
-
There is also a pure ruby json only variant of the gem, that can be installed
|
47
|
-
with:
|
48
|
-
|
49
|
-
# gem install json_pure
|
50
|
-
|
51
|
-
Testing and Examples
|
52
|
-
====================
|
53
|
-
|
54
|
-
To run the tests type:
|
55
|
-
|
56
|
-
$ rake test_ext
|
57
|
-
|
58
|
-
This will build the extensions first and then test them.
|
59
|
-
|
60
|
-
$ rake test_pure
|
61
|
-
|
62
|
-
This will test the pure ruby extensions.
|
63
|
-
|
64
|
-
There is also a small example in tools/server.rb if you want to see, how
|
65
|
-
receiving a JSON object from a webrick server in your browser with the
|
66
|
-
javasript prototype library (http://www.prototypejs.org) works.
|
67
|
-
|
68
|
-
Author
|
69
|
-
======
|
70
|
-
|
71
|
-
Florian Frank <flori@ping.de>
|
72
|
-
|
73
|
-
License
|
74
|
-
=======
|
75
|
-
|
76
|
-
Ruby License, see the RUBY file included in the source distribution. The Ruby
|
77
|
-
License includes the GNU General Public License (GPL), Version 2, so see the
|
78
|
-
file GPL as well.
|
@@ -1,58 +0,0 @@
|
|
1
|
-
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.co.jp>.
|
2
|
-
You can redistribute it and/or modify it under either the terms of the GPL
|
3
|
-
(see COPYING.txt file), or the conditions below:
|
4
|
-
|
5
|
-
1. You may make and give away verbatim copies of the source form of the
|
6
|
-
software without restriction, provided that you duplicate all of the
|
7
|
-
original copyright notices and associated disclaimers.
|
8
|
-
|
9
|
-
2. You may modify your copy of the software in any way, provided that
|
10
|
-
you do at least ONE of the following:
|
11
|
-
|
12
|
-
a) place your modifications in the Public Domain or otherwise
|
13
|
-
make them Freely Available, such as by posting said
|
14
|
-
modifications to Usenet or an equivalent medium, or by allowing
|
15
|
-
the author to include your modifications in the software.
|
16
|
-
|
17
|
-
b) use the modified software only within your corporation or
|
18
|
-
organization.
|
19
|
-
|
20
|
-
c) rename any non-standard executables so the names do not conflict
|
21
|
-
with standard executables, which must also be provided.
|
22
|
-
|
23
|
-
d) make other distribution arrangements with the author.
|
24
|
-
|
25
|
-
3. You may distribute the software in object code or executable
|
26
|
-
form, provided that you do at least ONE of the following:
|
27
|
-
|
28
|
-
a) distribute the executables and library files of the software,
|
29
|
-
together with instructions (in the manual page or equivalent)
|
30
|
-
on where to get the original distribution.
|
31
|
-
|
32
|
-
b) accompany the distribution with the machine-readable source of
|
33
|
-
the software.
|
34
|
-
|
35
|
-
c) give non-standard executables non-standard names, with
|
36
|
-
instructions on where to get the original software distribution.
|
37
|
-
|
38
|
-
d) make other distribution arrangements with the author.
|
39
|
-
|
40
|
-
4. You may modify and include the part of the software into any other
|
41
|
-
software (possibly commercial). But some files in the distribution
|
42
|
-
are not written by the author, so that they are not under this terms.
|
43
|
-
|
44
|
-
They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some
|
45
|
-
files under the ./missing directory. See each file for the copying
|
46
|
-
condition.
|
47
|
-
|
48
|
-
5. The scripts and library files supplied as input to or produced as
|
49
|
-
output from the software do not automatically fall under the
|
50
|
-
copyright of the software, but belong to whomever generated them,
|
51
|
-
and may be sold commercially, and may be aggregated with this
|
52
|
-
software.
|
53
|
-
|
54
|
-
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
55
|
-
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
56
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
57
|
-
PURPOSE.
|
58
|
-
|
@@ -1,309 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require 'rake/gempackagetask'
|
3
|
-
rescue LoadError
|
4
|
-
end
|
5
|
-
require 'rake/clean'
|
6
|
-
|
7
|
-
require 'rbconfig'
|
8
|
-
include Config
|
9
|
-
|
10
|
-
ON_WINDOWS = RUBY_PLATFORM =~ /mswin32/i
|
11
|
-
PKG_NAME = 'json'
|
12
|
-
PKG_VERSION = File.read('VERSION').chomp
|
13
|
-
PKG_FILES = FileList["**/*"].exclude(/CVS|pkg|coverage|Makefile/).exclude(/\.(so|bundle|o|#{CONFIG['DLEXT']})$/)
|
14
|
-
EXT_ROOT_DIR = 'ext/json/ext'
|
15
|
-
EXT_PARSER_DIR = "#{EXT_ROOT_DIR}/parser"
|
16
|
-
EXT_PARSER_DL = "#{EXT_ROOT_DIR}/parser.#{CONFIG['DLEXT']}"
|
17
|
-
EXT_PARSER_SRC = "#{EXT_PARSER_DIR}/parser.c"
|
18
|
-
PKG_FILES << EXT_PARSER_SRC
|
19
|
-
EXT_GENERATOR_DIR = "#{EXT_ROOT_DIR}/generator"
|
20
|
-
EXT_GENERATOR_DL = "#{EXT_ROOT_DIR}/generator.#{CONFIG['DLEXT']}"
|
21
|
-
EXT_GENERATOR_SRC = "#{EXT_GENERATOR_DIR}/generator.c"
|
22
|
-
RAGEL_CODEGEN = %w[rlcodegen rlgen-cd].find { |c| system(c, '-v') }
|
23
|
-
RAGEL_DOTGEN = %w[rlgen-dot rlgen-cd].find { |c| system(c, '-v') }
|
24
|
-
RAGEL_PATH = "#{EXT_PARSER_DIR}/parser.rl"
|
25
|
-
CLEAN.include 'doc', 'coverage', FileList['diagrams/*.*'],
|
26
|
-
FileList["ext/**/*.{so,bundle,#{CONFIG['DLEXT']},o,obj,pdb,lib,manifest,exp,def}"],
|
27
|
-
FileList["ext/**/Makefile"]
|
28
|
-
|
29
|
-
|
30
|
-
desc "Installing library (pure)"
|
31
|
-
task :install_pure => :version do
|
32
|
-
ruby 'install.rb'
|
33
|
-
end
|
34
|
-
|
35
|
-
task :install_ext_really do
|
36
|
-
sitearchdir = CONFIG["sitearchdir"]
|
37
|
-
cd 'ext' do
|
38
|
-
for file in Dir["json/ext/*.#{CONFIG['DLEXT']}"]
|
39
|
-
d = File.join(sitearchdir, file)
|
40
|
-
mkdir_p File.dirname(d)
|
41
|
-
install(file, d)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
desc "Installing library (extension)"
|
47
|
-
task :install_ext => [ :compile, :install_pure, :install_ext_really ]
|
48
|
-
|
49
|
-
task :install => :install_ext
|
50
|
-
|
51
|
-
desc "Compiling extension"
|
52
|
-
task :compile => [ EXT_PARSER_DL, EXT_GENERATOR_DL ]
|
53
|
-
|
54
|
-
file EXT_PARSER_DL => EXT_PARSER_SRC do
|
55
|
-
cd EXT_PARSER_DIR do
|
56
|
-
ruby 'extconf.rb'
|
57
|
-
if ON_WINDOWS
|
58
|
-
sh 'nmake'
|
59
|
-
sh "mt -manifest parser.#{CONFIG['DLEXT']}.manifest -outputresource:parser.#{CONFIG['DLEXT']};2"
|
60
|
-
else
|
61
|
-
sh 'make'
|
62
|
-
end
|
63
|
-
end
|
64
|
-
cp "#{EXT_PARSER_DIR}/parser.#{CONFIG['DLEXT']}", EXT_ROOT_DIR
|
65
|
-
end
|
66
|
-
|
67
|
-
file EXT_GENERATOR_DL => EXT_GENERATOR_SRC do
|
68
|
-
cd EXT_GENERATOR_DIR do
|
69
|
-
ruby 'extconf.rb'
|
70
|
-
if ON_WINDOWS
|
71
|
-
sh 'nmake'
|
72
|
-
sh "mt -manifest generator.#{CONFIG['DLEXT']}.manifest -outputresource:generator.#{CONFIG['DLEXT']};2"
|
73
|
-
else
|
74
|
-
sh 'make'
|
75
|
-
end
|
76
|
-
end
|
77
|
-
cp "#{EXT_GENERATOR_DIR}/generator.#{CONFIG['DLEXT']}", EXT_ROOT_DIR
|
78
|
-
end
|
79
|
-
|
80
|
-
desc "Generate parser with ragel"
|
81
|
-
task :ragel => EXT_PARSER_SRC
|
82
|
-
|
83
|
-
task :ragel_clean do
|
84
|
-
rm_rf EXT_PARSER_SRC
|
85
|
-
end
|
86
|
-
|
87
|
-
file EXT_PARSER_SRC => RAGEL_PATH do
|
88
|
-
cd EXT_PARSER_DIR do
|
89
|
-
sh "ragel -x parser.rl | #{RAGEL_CODEGEN} -G2"
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
desc "Generate diagrams of ragel parser (ps)"
|
94
|
-
task :ragel_dot_ps do
|
95
|
-
root = 'diagrams'
|
96
|
-
specs = []
|
97
|
-
File.new(RAGEL_PATH).grep(/^\s*machine\s*(\S+);\s*$/) { specs << $1 }
|
98
|
-
for s in specs
|
99
|
-
sh "ragel -x #{RAGEL_PATH} -S#{s} | #{RAGEL_DOTGEN} -p|dot -Tps -o#{root}/#{s}.ps"
|
100
|
-
end
|
101
|
-
end
|
102
|
-
|
103
|
-
desc "Generate diagrams of ragel parser (png)"
|
104
|
-
task :ragel_dot_png do
|
105
|
-
root = 'diagrams'
|
106
|
-
specs = []
|
107
|
-
File.new(RAGEL_PATH).grep(/^\s*machine\s*(\S+);\s*$/) { specs << $1 }
|
108
|
-
for s in specs
|
109
|
-
sh "ragel -x #{RAGEL_PATH} -S#{s} | #{RAGEL_DOTGEN} -p|dot -Tpng -o#{root}/#{s}.png"
|
110
|
-
end
|
111
|
-
end
|
112
|
-
|
113
|
-
desc "Generate diagrams of ragel parser"
|
114
|
-
task :ragel_dot => [ :ragel_dot_png, :ragel_dot_ps ]
|
115
|
-
|
116
|
-
desc "Testing library (pure ruby)"
|
117
|
-
task :test_pure => :clean do
|
118
|
-
ruby '-v -I lib tests/runner.rb'
|
119
|
-
end
|
120
|
-
|
121
|
-
desc "Testing library (extension)"
|
122
|
-
task :test_ext => :compile do
|
123
|
-
ruby '-v -I ext:lib tests/runner.rb'
|
124
|
-
end
|
125
|
-
|
126
|
-
desc "Benchmarking parser (pure)"
|
127
|
-
task :benchmark_parser_pure do
|
128
|
-
ruby '-I lib benchmarks/benchmark_parser.rb pure'
|
129
|
-
end
|
130
|
-
|
131
|
-
desc "Benchmarking generator (pure)"
|
132
|
-
task :benchmark_generator_pure do
|
133
|
-
ruby '-I lib benchmarks/benchmark_generator.rb pure'
|
134
|
-
ruby 'benchmarks/benchmark_rails.rb'
|
135
|
-
end
|
136
|
-
|
137
|
-
desc "Benchmarking library (pure)"
|
138
|
-
task :benchmark_pure => [ :benchmark_parser_pure, :benchmark_generator_pure ]
|
139
|
-
|
140
|
-
desc "Benchmarking parser (extension)"
|
141
|
-
task :benchmark_parser_ext => :compile do
|
142
|
-
ruby '-I ext:lib benchmarks/benchmark_parser.rb ext'
|
143
|
-
end
|
144
|
-
|
145
|
-
desc "Benchmarking generator (extension)"
|
146
|
-
task :benchmark_generator_ext => :compile do
|
147
|
-
ruby '-I ext:lib benchmarks/benchmark_generator.rb ext'
|
148
|
-
ruby 'benchmarks/benchmark_rails.rb'
|
149
|
-
end
|
150
|
-
|
151
|
-
desc "Benchmarking library (extension)"
|
152
|
-
task :benchmark_ext => [ :benchmark_parser_ext, :benchmark_generator_ext ]
|
153
|
-
|
154
|
-
task :benchmark do
|
155
|
-
puts "Benchmarking extension variant"
|
156
|
-
Rake::Task[:benchmark_ext].invoke
|
157
|
-
puts "Benchmarking pure variant"
|
158
|
-
Rake::Task[:benchmark_pure].invoke
|
159
|
-
end
|
160
|
-
|
161
|
-
desc "Testing library with coverage" # XXX broken
|
162
|
-
task :coverage do
|
163
|
-
system 'RUBYOPT="" rcov -x tests -Ilib tests/runner.rb'
|
164
|
-
end
|
165
|
-
|
166
|
-
desc "Create RDOC documentation"
|
167
|
-
task :doc => [ :version, EXT_PARSER_SRC ] do
|
168
|
-
sh "rdoc -m JSON -S -o doc lib/json.rb #{FileList['lib/json/**/*.rb']} #{EXT_PARSER_SRC} #{EXT_GENERATOR_SRC}"
|
169
|
-
end
|
170
|
-
|
171
|
-
if defined? Gem
|
172
|
-
spec_pure = Gem::Specification.new do |s|
|
173
|
-
s.name = 'json_pure'
|
174
|
-
s.version = PKG_VERSION
|
175
|
-
s.summary = "A JSON implementation in Ruby"
|
176
|
-
s.description = ""
|
177
|
-
|
178
|
-
s.files = PKG_FILES
|
179
|
-
|
180
|
-
s.require_path = 'lib'
|
181
|
-
|
182
|
-
s.bindir = "bin"
|
183
|
-
s.executables = ["edit_json.rb"]
|
184
|
-
s.default_executable = "edit_json.rb"
|
185
|
-
|
186
|
-
s.has_rdoc = true
|
187
|
-
s.rdoc_options <<
|
188
|
-
'--title' << 'JSON -- A JSON implemention' <<
|
189
|
-
'--main' << 'JSON' << '--line-numbers'
|
190
|
-
s.test_files << 'tests/runner.rb'
|
191
|
-
|
192
|
-
s.author = "Florian Frank"
|
193
|
-
s.email = "flori@ping.de"
|
194
|
-
s.homepage = "http://json.rubyforge.org"
|
195
|
-
s.rubyforge_project = "json"
|
196
|
-
end
|
197
|
-
|
198
|
-
Rake::GemPackageTask.new(spec_pure) do |pkg|
|
199
|
-
pkg.need_tar = true
|
200
|
-
pkg.package_files += PKG_FILES
|
201
|
-
end
|
202
|
-
|
203
|
-
spec_ext = Gem::Specification.new do |s|
|
204
|
-
s.name = 'json'
|
205
|
-
s.version = PKG_VERSION
|
206
|
-
s.summary = "A JSON implementation as a Ruby extension"
|
207
|
-
s.description = ""
|
208
|
-
|
209
|
-
s.files = PKG_FILES
|
210
|
-
|
211
|
-
s.extensions <<
|
212
|
-
"#{EXT_PARSER_DIR}/extconf.rb" <<
|
213
|
-
"#{EXT_GENERATOR_DIR}/extconf.rb"
|
214
|
-
|
215
|
-
s.require_path = EXT_ROOT_DIR
|
216
|
-
s.require_paths << 'ext'
|
217
|
-
s.require_paths << 'lib'
|
218
|
-
|
219
|
-
s.bindir = "bin"
|
220
|
-
s.executables = ["edit_json.rb"]
|
221
|
-
s.default_executable = "edit_json.rb"
|
222
|
-
|
223
|
-
s.has_rdoc = true
|
224
|
-
s.rdoc_options <<
|
225
|
-
'--title' << 'JSON -- A JSON implemention' <<
|
226
|
-
'--main' << 'JSON' << '--line-numbers'
|
227
|
-
s.test_files << 'tests/runner.rb'
|
228
|
-
|
229
|
-
s.author = "Florian Frank"
|
230
|
-
s.email = "flori@ping.de"
|
231
|
-
s.homepage = "http://json.rubyforge.org"
|
232
|
-
s.rubyforge_project = "json"
|
233
|
-
end
|
234
|
-
|
235
|
-
Rake::GemPackageTask.new(spec_ext) do |pkg|
|
236
|
-
pkg.need_tar = true
|
237
|
-
pkg.package_files += PKG_FILES
|
238
|
-
end
|
239
|
-
|
240
|
-
task :package_win => :compile do
|
241
|
-
mkdir_p 'pkg'
|
242
|
-
spec_win_ext = Gem::Specification.new do |s|
|
243
|
-
s.name = 'json'
|
244
|
-
s.platform = Gem::Platform::WIN32
|
245
|
-
s.version = PKG_VERSION
|
246
|
-
s.summary = "A JSON implementation as a Ruby extension"
|
247
|
-
s.description = ""
|
248
|
-
|
249
|
-
s.files = PKG_FILES.to_a <<
|
250
|
-
"#{EXT_ROOT_DIR}/parser.#{CONFIG['DLEXT']}" <<
|
251
|
-
"#{EXT_ROOT_DIR}/generator.#{CONFIG['DLEXT']}"
|
252
|
-
|
253
|
-
s.require_path = EXT_ROOT_DIR
|
254
|
-
s.require_paths << 'ext'
|
255
|
-
s.require_paths << 'lib'
|
256
|
-
|
257
|
-
s.bindir = "bin"
|
258
|
-
s.executables = ["edit_json.rb", "prettify_json.rb"]
|
259
|
-
s.default_executable = "edit_json.rb"
|
260
|
-
|
261
|
-
s.has_rdoc = true
|
262
|
-
s.rdoc_options <<
|
263
|
-
'--title' << 'JSON -- A JSON implemention' <<
|
264
|
-
'--main' << 'JSON' << '--line-numbers'
|
265
|
-
s.test_files << 'tests/runner.rb'
|
266
|
-
|
267
|
-
s.author = "Florian Frank"
|
268
|
-
s.email = "flori@ping.de"
|
269
|
-
s.homepage = "http://json.rubyforge.org"
|
270
|
-
s.rubyforge_project = "json"
|
271
|
-
end
|
272
|
-
|
273
|
-
gem_file = "json-#{spec_win_ext.version}-#{spec_win_ext.platform}.gem"
|
274
|
-
Gem::Builder.new(spec_win_ext).build
|
275
|
-
mv gem_file, 'pkg'
|
276
|
-
end
|
277
|
-
end
|
278
|
-
|
279
|
-
task :mrproper => [ :ragel_clean, :clean ] do
|
280
|
-
for dir in [ EXT_PARSER_DIR, EXT_GENERATOR_DIR ]
|
281
|
-
cd(dir) { rm_f 'Makefile' }
|
282
|
-
end
|
283
|
-
end
|
284
|
-
|
285
|
-
desc m = "Writing version information for #{PKG_VERSION}"
|
286
|
-
task :version do
|
287
|
-
puts m
|
288
|
-
File.open(File.join('lib', 'json', 'version.rb'), 'w') do |v|
|
289
|
-
v.puts <<EOT
|
290
|
-
module JSON
|
291
|
-
# JSON version
|
292
|
-
VERSION = '#{PKG_VERSION}'
|
293
|
-
VERSION_ARRAY = VERSION.split(/\\./).map { |x| x.to_i } # :nodoc:
|
294
|
-
VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
|
295
|
-
VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
|
296
|
-
VERSION_BUILD = VERSION_ARRAY[2] # :nodoc:
|
297
|
-
VARIANT_BINARY = #{!!ON_WINDOWS}
|
298
|
-
end
|
299
|
-
EOT
|
300
|
-
end
|
301
|
-
end
|
302
|
-
|
303
|
-
if ON_WINDOWS
|
304
|
-
task :release => [ :version, :clean, :package_win ]
|
305
|
-
else
|
306
|
-
task :release => [ :version, :mrproper, :package ]
|
307
|
-
end
|
308
|
-
|
309
|
-
task :default => [ :version, :compile ]
|
@@ -1 +0,0 @@
|
|
1
|
-
|