Permalink
Browse files

marshal-structure dumps a tree based on the Marshal format

  • Loading branch information...
0 parents commit 7c82f07a32fd5dd40dee09cb830a1d5750870e43 @drbrain committed Aug 6, 2011
Showing with 917 additions and 0 deletions.
  1. +9 −0 .autotest
  2. +6 −0 .gitignore
  3. +5 −0 History.txt
  4. +7 −0 Manifest.txt
  5. +73 −0 README.rdoc
  6. +27 −0 Rakefile
  7. +619 −0 lib/marshal/structure.rb
  8. +171 −0 test/test_marshal_structure.rb
@@ -0,0 +1,9 @@
+# -*- ruby -*-
+
+require 'autotest/restart'
+require 'autotest/isolate'
+
+Autotest.add_hook :initialize do |at|
+ at.testlib = 'minitest/autorun'
+end
+
@@ -0,0 +1,6 @@
+*.rbc
+*.swp
+/TAGS
+/doc
+/pkg
+/tmp
@@ -0,0 +1,5 @@
+=== 1.0 / 2011-08-05
+
+* Major enhancements
+ * Birthday!
+
@@ -0,0 +1,7 @@
+.autotest
+History.txt
+Manifest.txt
+README.rdoc
+Rakefile
+lib/marshal/structure.rb
+test/test_marshal_structure.rb
@@ -0,0 +1,73 @@
+= marshal-structure
+
+* https://github.com/drbrain/marshal-structure
+
+== DESCRIPTION:
+
+Dumps a tree based on the Marshal format. Supports the Marshal 4.8 format.
+
+== FEATURES/PROBLEMS:
+
+* Works like Marshal.load
+
+== SYNOPSIS:
+
+From the command line:
+
+ ruby -rpp -rmarshal-structure \
+ -e 'pp Marshal::Structure.load Marshal.dump "hello"'
+
+Fancier usage:
+
+ require 'pp'
+ require 'marshal-structure'
+
+ ms = Marshal::Structure.new Marshal.dump %w[hello world]
+
+ # print the Marshal stream structure
+ pp ms.construct
+
+ # print ruby objects in Marshal stream
+ pp ms.objects
+
+== REQUIREMENTS:
+
+* Ruby 1.8.7+
+
+== INSTALL:
+
+ gem install marshal-structure
+
+== DEVELOPERS:
+
+After checking out the source, run:
+
+ $ rake newb
+
+This task will install any missing dependencies, run the tests/specs,
+and generate the RDoc.
+
+== LICENSE:
+
+(The MIT License)
+
+Copyright (c) 2011 Eric Hodel
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,27 @@
+# -*- ruby -*-
+
+require 'rubygems'
+require 'hoe'
+
+Hoe.plugin :git
+Hoe.plugin :isolate
+Hoe.plugin :minitest
+
+Hoe.spec 'marshal-structure' do
+ developer 'Eric Hodel', 'drbrain@segment7.net'
+
+ rdoc_locations << 'docs.seattlerb.org:/data/www/docs.seattlerb.org/marshal-structure/'
+
+ self.readme_file = 'README.rdoc'
+ self.extra_rdoc_files << 'README.rdoc' # HACK fix in Hoe
+
+ if respond_to? :isolate_dir= then # HACK Hoe issue #7
+ self.isolate_dir = 'tmp/isolate'
+ else
+ warn 'please: gem install isolate'
+ end
+
+ extra_dev_deps << ['ben_string', '~> 1']
+end
+
+# vim: syntax=ruby
Oops, something went wrong.

0 comments on commit 7c82f07

Please sign in to comment.