arr-pm 0.0.6 → 0.0.11
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.
Potentially problematic release.
This version of arr-pm might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/.rubocop.yml +73 -0
- data/Gemfile +3 -1
- data/Guardfile +77 -0
- data/Makefile +0 -19
- data/arr-pm.gemspec +3 -1
- data/cpio.rb +202 -0
- data/lib/arr-pm/file.rb +34 -10
- data/lib/arr-pm/file/header.rb +3 -2
- data/lib/arr-pm/file/lead.rb +1 -1
- data/lib/arr-pm/file/tag.rb +1 -1
- data/lib/arr-pm/namespace.rb +6 -0
- data/lib/arr-pm/v2/architecture.rb +32 -0
- data/lib/arr-pm/v2/error.rb +32 -0
- data/lib/arr-pm/v2/format.rb +16 -0
- data/lib/arr-pm/v2/header.rb +35 -0
- data/lib/arr-pm/v2/header_header.rb +36 -0
- data/lib/arr-pm/v2/lead.rb +121 -0
- data/lib/arr-pm/v2/package.rb +18 -0
- data/lib/arr-pm/v2/tag.rb +295 -0
- data/lib/arr-pm/v2/type.rb +15 -0
- data/spec/arr-pm/v2/header_spec.rb +34 -0
- data/spec/arr-pm/v2/lead_spec.rb +125 -0
- data/spec/fixtures/example-1.0-1.x86_64.rpm +0 -0
- data/spec/fixtures/example.json +55 -0
- metadata +45 -27
- data/header-verify.rb +0 -71
- data/notify-failure.sh +0 -15
- data/printrpm.rb +0 -22
- data/test/all.rb +0 -24
- data/test/docs.rb +0 -42
- data/test/testing.rb +0 -14
data/printrpm.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
$: << "lib"
|
2
|
-
|
3
|
-
require "rpm/file"
|
4
|
-
|
5
|
-
rpm = RPM::File.new(ARGV[0])
|
6
|
-
|
7
|
-
#p rpm.lead
|
8
|
-
rpm.signature.tags.each do |tag|
|
9
|
-
#p :tag => [tag.tag, tag.type, tag.count, tag.value]
|
10
|
-
end
|
11
|
-
|
12
|
-
rpm.header.tags.each do |tag|
|
13
|
-
#next unless tag.tag.to_s =~ /(payload|sig)/
|
14
|
-
# p :tag => [tag.tag, tag.type, tag.count, tag.value]
|
15
|
-
end
|
16
|
-
|
17
|
-
require "awesome_print"
|
18
|
-
ap rpm.requires
|
19
|
-
|
20
|
-
#payload = rpm.payload
|
21
|
-
#fd = File.new("/tmp/rpm.payload", "w")
|
22
|
-
#fd.write(rpm.payload.read)
|
data/test/all.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "minitest/spec"
|
3
|
-
require "minitest/autorun"
|
4
|
-
|
5
|
-
# Get coverage report
|
6
|
-
require "simplecov"
|
7
|
-
SimpleCov.start
|
8
|
-
|
9
|
-
# Add '../lib' to the require path.
|
10
|
-
$: << File.join(File.dirname(__FILE__), "..", "lib")
|
11
|
-
|
12
|
-
def use(path)
|
13
|
-
puts "Loading tests from #{path}"
|
14
|
-
require File.expand_path(path)
|
15
|
-
end
|
16
|
-
|
17
|
-
dirname = File.dirname(__FILE__)
|
18
|
-
use File.join(dirname, "docs.rb")
|
19
|
-
|
20
|
-
# Load tests from ./*/**/*.rb (usually ./libraryname/....)
|
21
|
-
glob = File.join(dirname, "*", "**", "*.rb")
|
22
|
-
Dir.glob(glob).each do |path|
|
23
|
-
use path
|
24
|
-
end
|
data/test/docs.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "yard"
|
3
|
-
require File.join(File.expand_path(File.dirname(__FILE__)), "testing")
|
4
|
-
|
5
|
-
describe "documentation tests" do
|
6
|
-
before do
|
7
|
-
# Use YARD to parse all ruby files found in '../lib'
|
8
|
-
libdir = File.join(File.dirname(__FILE__), "..", "lib")
|
9
|
-
YARD::Registry.load(Dir.glob(File.join(libdir, "**", "*.rb")))
|
10
|
-
@registry = YARD::Registry.all
|
11
|
-
end
|
12
|
-
|
13
|
-
test "All classes, methods, modules, and constants must be documented" do
|
14
|
-
# YARD's parser works best in ruby 1.9.x, so skip 1.8.x
|
15
|
-
skip if RUBY_VERSION < "1.9.2"
|
16
|
-
# Note, the 'find the undocumented things' code here is
|
17
|
-
# copied mostly from: YARD 0.7.5's lib/yard/cli/stats.rb
|
18
|
-
#
|
19
|
-
# Find all undocumented classes, modules, and constants
|
20
|
-
undocumented = @registry.select do |o|
|
21
|
-
[:class, :module, :constant].include?(o.type) && o.docstring.blank?
|
22
|
-
end
|
23
|
-
|
24
|
-
# Find all undocumented methods
|
25
|
-
methods = @registry.select { |m| m.type == :method }
|
26
|
-
methods.reject! { |m| m.is_alias? || !m.is_explicit? }
|
27
|
-
undocumented += methods.select do |m|
|
28
|
-
m.docstring.blank? && !m.overridden_method
|
29
|
-
end
|
30
|
-
|
31
|
-
if (undocumented.length > 0)
|
32
|
-
message = ["The following are not documented"]
|
33
|
-
undocumented.each do |o|
|
34
|
-
message << "* #{o.type.to_s} #{o.to_s} <#{o.file}:#{o.line}>"
|
35
|
-
end
|
36
|
-
|
37
|
-
flunk(message.join("\n"))
|
38
|
-
else
|
39
|
-
pass
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
data/test/testing.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "minitest/spec"
|
3
|
-
|
4
|
-
# Add '../lib' to the require path.
|
5
|
-
$: << File.join(File.dirname(__FILE__), "..", "lib")
|
6
|
-
|
7
|
-
# I don't really like monkeypatching, but whatever, this is probably better
|
8
|
-
# than overriding the 'describe' method.
|
9
|
-
class MiniTest::Spec
|
10
|
-
class << self
|
11
|
-
# 'it' sounds wrong, call it 'test'
|
12
|
-
alias :test :it
|
13
|
-
end
|
14
|
-
end
|