rstruct 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ff535cc27d70fad164a0837a7811909fcb58989a
4
+ data.tar.gz: 581bb8965648565ea08a3198487f6517583e9094
5
+ SHA512:
6
+ metadata.gz: 144d7009afa88dfebaa49e1d6d2e911f4940335b8bdb0da9c58b6b101153b9e7766ca707928fc7398207c6f71f8e2beae1853c005575406881ad5e420bfff1c2
7
+ data.tar.gz: 0d84216c337cb08ec3768a008e5cb0258211ea0ae0bc371d564c05087a9e330d22e755a8802ffd079f60d1f1aff953fdaf7875d3b81b35de6361c4ec083700cb
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
1
  --color
2
- --format nested
2
+ --format doc
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -204,7 +204,7 @@ describe Rstruct::Structure do
204
204
  @populate = lambda { @values.each { |k,v| @instance[k] = v } }
205
205
 
206
206
  @pack_format = "NN"
207
- @rawdata = "\xde\xad\xbe\xef\xfa\xce\xfe\xeb"
207
+ @rawdata = "\xde\xad\xbe\xef\xfa\xce\xfe\xeb".force_encoding('binary')
208
208
  end
209
209
 
210
210
  it_should_behave_like "a structure"
@@ -243,9 +243,9 @@ describe Rstruct::Structure do
243
243
  @pack_format = "VVVVVVV"
244
244
  @rawdata = @values.values_at(
245
245
  :magic, :cputype, :cpusubtype, :filetype, :ncmds, :sizeofcmds, :flags
246
- ).pack(@pack_format)
246
+ ).pack(@pack_format).force_encoding('binary')
247
247
 
248
- @rawdata.should == "\316\372\355\376\a\000\000\000\003\000\000\000\002\000\000\000\r\000\000\000\354\005\000\000\205\000\000\000"
248
+ @rawdata.should == "\316\372\355\376\a\000\000\000\003\000\000\000\002\000\000\000\r\000\000\000\354\005\000\000\205\000\000\000".force_encoding('binary')
249
249
 
250
250
  end
251
251
 
@@ -288,7 +288,7 @@ describe Rstruct::Structure do
288
288
  end
289
289
 
290
290
  @pack_format = "NNcc"
291
- @rawdata = "\xde\xad\xbe\xef\xfa\xce\xfe\xeb\x01\x02"
291
+ @rawdata = "\xde\xad\xbe\xef\xfa\xce\xfe\xeb\x01\x02".force_encoding('binary')
292
292
 
293
293
  @verify_unpack = lambda do |ret|
294
294
  @values.each {|k,v| ret.__send__(k).should == v }
@@ -333,7 +333,7 @@ describe Rstruct::Structure do
333
333
  end
334
334
 
335
335
  @pack_format = "NNccaa"
336
- @rawdata = "\xde\xad\xbe\xef\xfa\xce\xfe\xeb\x01\x02\x41\x42"
336
+ @rawdata = "\xde\xad\xbe\xef\xfa\xce\xfe\xeb\x01\x02\x41\x42".force_encoding('binary')
337
337
 
338
338
  @verify_unpack = lambda do |ret|
339
339
  @values.each {|k,v| ret.__send__(k).should == v }
@@ -1,5 +1,6 @@
1
1
  require 'tempfile'
2
2
  require 'stringio'
3
+ require 'pry'
3
4
 
4
5
  # Applies to types that can be packed.
5
6
  shared_examples_for "a packable type" do
@@ -32,7 +33,7 @@ shared_examples_for "a packable type" do
32
33
  tempf.write("test")
33
34
  @populate.call()
34
35
  ret = @instance.write(tempf)
35
- ret.should == @rawdata.size
36
+ ret.should == @rawdata.bytesize
36
37
  tempf.rewind
37
38
  tempf.read.bytes.to_a.should == "test#{@rawdata}".bytes.to_a
38
39
  ensure
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rstruct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
5
- prerelease:
4
+ version: 0.1.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Eric Monti
@@ -14,65 +13,57 @@ dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: pry
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rbkb
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  description: A library for working with Ruby binary structures in a way similar to
@@ -115,25 +106,24 @@ files:
115
106
  homepage: http://github.com/emonti/rstruct
116
107
  licenses:
117
108
  - MIT
109
+ metadata: {}
118
110
  post_install_message:
119
111
  rdoc_options: []
120
112
  require_paths:
121
113
  - lib
122
114
  required_ruby_version: !ruby/object:Gem::Requirement
123
- none: false
124
115
  requirements:
125
- - - ! '>='
116
+ - - '>='
126
117
  - !ruby/object:Gem::Version
127
118
  version: '0'
128
119
  required_rubygems_version: !ruby/object:Gem::Requirement
129
- none: false
130
120
  requirements:
131
- - - ! '>='
121
+ - - '>='
132
122
  - !ruby/object:Gem::Version
133
123
  version: '0'
134
124
  requirements: []
135
125
  rubyforge_project:
136
- rubygems_version: 1.8.25
126
+ rubygems_version: 2.4.1
137
127
  signing_key:
138
128
  specification_version: 3
139
129
  summary: A library for working with Ruby binary structures in a way similar to c-structs