marshal-structure 1.0 → 1.1
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.
- data.tar.gz.sig +0 -0
- data/History.txt +5 -0
- data/README.rdoc +2 -2
- data/lib/marshal/structure.rb +19 -1
- metadata +13 -16
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -14,13 +14,13 @@ Dumps a tree based on the Marshal format. Supports the Marshal 4.8 format.
|
|
14
14
|
|
15
15
|
From the command line:
|
16
16
|
|
17
|
-
ruby -rpp -rmarshal
|
17
|
+
ruby -rpp -rmarshal/structure \
|
18
18
|
-e 'pp Marshal::Structure.load Marshal.dump "hello"'
|
19
19
|
|
20
20
|
Fancier usage:
|
21
21
|
|
22
22
|
require 'pp'
|
23
|
-
require 'marshal
|
23
|
+
require 'marshal/structure'
|
24
24
|
|
25
25
|
ms = Marshal::Structure.new Marshal.dump %w[hello world]
|
26
26
|
|
data/lib/marshal/structure.rb
CHANGED
@@ -9,7 +9,7 @@ class Marshal::Structure
|
|
9
9
|
##
|
10
10
|
# Version of Marshal::Structure you are using
|
11
11
|
|
12
|
-
VERSION = '1.
|
12
|
+
VERSION = '1.1'
|
13
13
|
|
14
14
|
##
|
15
15
|
# Supported major Marshal version
|
@@ -198,6 +198,24 @@ class Marshal::Structure
|
|
198
198
|
new(data).construct
|
199
199
|
end
|
200
200
|
|
201
|
+
##
|
202
|
+
# Dumps the structure of each item in +argv+. If +argv+ is empty standard
|
203
|
+
# input is dumped.
|
204
|
+
|
205
|
+
def self.run argv = ARGV
|
206
|
+
require 'pp'
|
207
|
+
|
208
|
+
if argv.empty? then
|
209
|
+
pp load $stdin
|
210
|
+
else
|
211
|
+
argv.each do |file|
|
212
|
+
open file, 'rb' do |io|
|
213
|
+
pp load io
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
201
219
|
##
|
202
220
|
# Prepares processing of +stream+
|
203
221
|
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marshal-structure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: "1.
|
8
|
+
- 1
|
9
|
+
version: "1.1"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Eric Hodel
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
x52qPcexcYZR7w==
|
36
36
|
-----END CERTIFICATE-----
|
37
37
|
|
38
|
-
date: 2011-
|
38
|
+
date: 2011-10-07 00:00:00 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: minitest
|
@@ -43,14 +43,13 @@ dependencies:
|
|
43
43
|
requirement: &id001 !ruby/object:Gem::Requirement
|
44
44
|
none: false
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ~>
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
hash:
|
48
|
+
hash: 15
|
49
49
|
segments:
|
50
50
|
- 2
|
51
|
-
-
|
52
|
-
|
53
|
-
version: 2.3.1
|
51
|
+
- 6
|
52
|
+
version: "2.6"
|
54
53
|
type: :development
|
55
54
|
version_requirements: *id001
|
56
55
|
- !ruby/object:Gem::Dependency
|
@@ -75,11 +74,11 @@ dependencies:
|
|
75
74
|
requirements:
|
76
75
|
- - ~>
|
77
76
|
- !ruby/object:Gem::Version
|
78
|
-
hash:
|
77
|
+
hash: 27
|
79
78
|
segments:
|
80
79
|
- 2
|
81
|
-
-
|
82
|
-
version: "2.
|
80
|
+
- 12
|
81
|
+
version: "2.12"
|
83
82
|
type: :development
|
84
83
|
version_requirements: *id003
|
85
84
|
description: Dumps a tree based on the Marshal format. Supports the Marshal 4.8 format.
|
@@ -105,8 +104,6 @@ files:
|
|
105
104
|
homepage: https://github.com/drbrain/marshal-structure
|
106
105
|
licenses: []
|
107
106
|
|
108
|
-
metadata: {}
|
109
|
-
|
110
107
|
post_install_message:
|
111
108
|
rdoc_options:
|
112
109
|
- --main
|
@@ -134,9 +131,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
131
|
requirements: []
|
135
132
|
|
136
133
|
rubyforge_project: marshal-structure
|
137
|
-
rubygems_version: 1.8.
|
134
|
+
rubygems_version: 1.8.10
|
138
135
|
signing_key:
|
139
|
-
specification_version:
|
136
|
+
specification_version: 3
|
140
137
|
summary: Dumps a tree based on the Marshal format
|
141
138
|
test_files:
|
142
139
|
- test/test_marshal_structure.rb
|
metadata.gz.sig
CHANGED
Binary file
|