bit-struct 0.14 → 0.15.0
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.
- checksums.yaml +4 -4
- data/History.txt +5 -0
- data/Rakefile +64 -0
- data/lib/bit-struct/bit-struct.rb +1 -1
- data/test/test-endian.rb +2 -2
- data/test/test-vector.rb +2 -2
- data/test/test.rb +2 -4
- metadata +36 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fe95e9207bbe0468e22df2f4d2962fc13a97567
|
4
|
+
data.tar.gz: ff639098210a16fea1ec24b09dbd8185cf39aec6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ad8d43e7500738629df54d3246c8e3506fde4e9162c7157b85a7a8664f3fb0cb6aad8d20445eba59be3de626717615d12ee62bac65f04c23d383e2827a5b8e1
|
7
|
+
data.tar.gz: e1874e18418b5f048c2dda2355e7023398fed5c6b0b76aaeb8f0bfc68b21b3fef88bcaf290b881f234bf4e3bbfd5180bbccfb8c7a62b8d53b325b1a09aa7e8cf
|
data/History.txt
CHANGED
data/Rakefile
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/testtask'
|
3
|
+
|
4
|
+
PRJ = "bit-struct"
|
5
|
+
|
6
|
+
def version
|
7
|
+
@version ||= begin
|
8
|
+
require 'bit-struct'
|
9
|
+
warn "BitStruct::VERSION not a string" unless
|
10
|
+
BitStruct::VERSION.kind_of? String
|
11
|
+
BitStruct::VERSION
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def tag
|
16
|
+
@tag ||= "#{PRJ}-#{version}"
|
17
|
+
end
|
18
|
+
|
19
|
+
desc "Run unit tests"
|
20
|
+
Rake::TestTask.new :test do |t|
|
21
|
+
t.libs << "lib"
|
22
|
+
t.test_files = FileList["test/*.rb"]
|
23
|
+
end
|
24
|
+
|
25
|
+
desc "Commit, tag, and push repo; build and push gem"
|
26
|
+
task :release => "release:is_new_version" do
|
27
|
+
require 'tempfile'
|
28
|
+
|
29
|
+
sh "gem build #{PRJ}.gemspec"
|
30
|
+
|
31
|
+
file = Tempfile.new "template"
|
32
|
+
begin
|
33
|
+
file.puts "release #{version}"
|
34
|
+
file.close
|
35
|
+
sh "git commit --allow-empty -a -v -t #{file.path}"
|
36
|
+
ensure
|
37
|
+
file.close unless file.closed?
|
38
|
+
file.unlink
|
39
|
+
end
|
40
|
+
|
41
|
+
sh "git tag #{tag}"
|
42
|
+
sh "git push"
|
43
|
+
sh "git push --tags"
|
44
|
+
|
45
|
+
sh "gem push #{tag}.gem"
|
46
|
+
end
|
47
|
+
|
48
|
+
namespace :release do
|
49
|
+
desc "Diff to latest release"
|
50
|
+
task :diff do
|
51
|
+
latest = `git describe --abbrev=0 --tags --match '#{PRJ}-*'`.chomp
|
52
|
+
sh "git diff #{latest}"
|
53
|
+
end
|
54
|
+
|
55
|
+
desc "Log to latest release"
|
56
|
+
task :log do
|
57
|
+
latest = `git describe --abbrev=0 --tags --match '#{PRJ}-*'`.chomp
|
58
|
+
sh "git log #{latest}.."
|
59
|
+
end
|
60
|
+
|
61
|
+
task :is_new_version do
|
62
|
+
abort "#{tag} exists; update version!" unless `git tag -l #{tag}`.empty?
|
63
|
+
end
|
64
|
+
end
|
data/test/test-endian.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
require '
|
1
|
+
require 'minitest/autorun'
|
2
2
|
require 'bit-struct'
|
3
3
|
|
4
|
-
class Test_Endian < Test
|
4
|
+
class Test_Endian < Minitest::Test
|
5
5
|
class Endian < BitStruct
|
6
6
|
unsigned :f_big, 32, :endian => :big
|
7
7
|
unsigned :f_little, 32, :endian => :little
|
data/test/test-vector.rb
CHANGED
data/test/test.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bit-struct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel VanderWerf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Library for packed binary data stored in ruby Strings. Useful for accessing
|
14
14
|
fields in network packets and binary files.
|
@@ -21,47 +21,49 @@ extra_rdoc_files:
|
|
21
21
|
files:
|
22
22
|
- History.txt
|
23
23
|
- README.md
|
24
|
-
-
|
25
|
-
- lib/bit-struct/
|
26
|
-
- lib/bit-struct/
|
24
|
+
- Rakefile
|
25
|
+
- lib/bit-struct/vector-field.rb
|
26
|
+
- lib/bit-struct/char-field.rb
|
27
|
+
- lib/bit-struct/vector.rb
|
27
28
|
- lib/bit-struct/hex-octet-field.rb
|
28
29
|
- lib/bit-struct/yaml.rb
|
30
|
+
- lib/bit-struct/octet-field.rb
|
31
|
+
- lib/bit-struct/text-field.rb
|
29
32
|
- lib/bit-struct/nested-field.rb
|
30
|
-
- lib/bit-struct/
|
33
|
+
- lib/bit-struct/fields.rb
|
34
|
+
- lib/bit-struct/signed-field.rb
|
31
35
|
- lib/bit-struct/unsigned-field.rb
|
32
|
-
- lib/bit-struct/vector.rb
|
33
|
-
- lib/bit-struct/bit-struct.rb
|
34
36
|
- lib/bit-struct/float-field.rb
|
35
|
-
- lib/bit-struct/
|
36
|
-
- lib/bit-struct/
|
37
|
-
- lib/bit-struct/signed-field.rb
|
37
|
+
- lib/bit-struct/bit-struct.rb
|
38
|
+
- lib/bit-struct/pad-field.rb
|
38
39
|
- lib/bit-struct.rb
|
39
|
-
- examples/bits.rb
|
40
|
-
- examples/nested-block.rb
|
41
|
-
- examples/raw.rb
|
42
|
-
- examples/md.rb
|
43
|
-
- examples/field-ripper.rb
|
44
|
-
- examples/ping-recv.rb
|
45
40
|
- examples/switch-endian.rb
|
46
|
-
- examples/
|
47
|
-
- examples/
|
41
|
+
- examples/ping-recv.rb
|
42
|
+
- examples/vector.rb
|
48
43
|
- examples/rest.rb
|
49
44
|
- examples/fixed-point.rb
|
50
|
-
- examples/longlong.rb
|
51
|
-
- examples/vector.rb
|
52
|
-
- examples/byte-bdy.rb
|
53
|
-
- examples/nested.rb
|
54
|
-
- examples/ping.rb
|
55
|
-
- examples/ip.rb
|
56
45
|
- examples/modular-def.rb
|
46
|
+
- examples/nested.rb
|
47
|
+
- examples/md.rb
|
57
48
|
- examples/native.rb
|
58
|
-
- examples/
|
49
|
+
- examples/raw.rb
|
50
|
+
- examples/ip.rb
|
51
|
+
- examples/pad.rb
|
52
|
+
- examples/field-ripper.rb
|
53
|
+
- examples/bits.rb
|
59
54
|
- examples/bignum.rb
|
55
|
+
- examples/nested-block.rb
|
56
|
+
- examples/player-data.rb
|
57
|
+
- examples/byte-bdy.rb
|
58
|
+
- examples/longlong.rb
|
59
|
+
- examples/ara-player-data.rb
|
60
|
+
- examples/ping.rb
|
60
61
|
- test/test.rb
|
61
|
-
- test/test-endian.rb
|
62
62
|
- test/test-vector.rb
|
63
|
+
- test/test-endian.rb
|
63
64
|
homepage: https://github.com/vjoel/bit-struct
|
64
|
-
licenses:
|
65
|
+
licenses:
|
66
|
+
- Ruby
|
65
67
|
metadata: {}
|
66
68
|
post_install_message:
|
67
69
|
rdoc_options:
|
@@ -86,8 +88,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
88
|
version: '0'
|
87
89
|
requirements: []
|
88
90
|
rubyforge_project: bit-struct
|
89
|
-
rubygems_version: 2.0.
|
91
|
+
rubygems_version: 2.0.4
|
90
92
|
signing_key:
|
91
93
|
specification_version: 4
|
92
94
|
summary: Library for packed binary data stored in ruby Strings
|
93
|
-
test_files:
|
95
|
+
test_files:
|
96
|
+
- test/test.rb
|
97
|
+
- test/test-vector.rb
|
98
|
+
- test/test-endian.rb
|
99
|
+
has_rdoc:
|