ffi-udis86 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,8 @@
1
+ doc
2
+ pkg
3
+ tmp/*
4
+ .DS_Store
5
+ .yardoc
6
+ *.o
7
+ *.swp
8
+ *~
@@ -1,3 +1,10 @@
1
+ ### 0.1.3 / 2012-05-11
2
+
3
+ * Require ffi ~> 1.0.
4
+ * Load `libudis86.so.0` if `libudis86.so` does not exist.
5
+ * Temporarily drop support for [Rubinius](http://rubini.us/) due to [missing
6
+ FFI::Union](https://github.com/rubinius/rubinius/issues/1717).
7
+
1
8
  ### 0.1.2 / 2011-02-02
2
9
 
3
10
  * Opted into [gem-tester.org](http://gem-testers.org/).
data/README.md CHANGED
@@ -88,8 +88,12 @@ Disassemble and print information about the instruction and operands:
88
88
 
89
89
  ## Requirements
90
90
 
91
+ * [Ruby](http://ruby-lang.org/) >= 1.8.7 or
92
+ [JRruby](http://jruby.org) >= 1.6
93
+ * [Rubinius](http://rubini.us/) is not currently supported due to
94
+ [Issue 1717](https://github.com/rubinius/rubinius/issues/1717)
91
95
  * [udis86](http://udis86.sourceforge.net/) >= 1.7
92
- * [ffi](http://github.com/ffi/ffi) >= 0.6.0, <= 1.1.0
96
+ * [ffi](http://github.com/ffi/ffi) ~> 1.0
93
97
 
94
98
  ## Install
95
99
 
data/Rakefile CHANGED
@@ -2,17 +2,17 @@ require 'rubygems'
2
2
  require 'rake'
3
3
 
4
4
  begin
5
- gem 'ore-tasks', '~> 0.3.0'
6
- require 'ore/tasks'
5
+ gem 'rubygems-tasks', '~> 0.1'
6
+ require 'rubygems/tasks'
7
7
 
8
- Ore::Tasks.new
8
+ Gem::Tasks.new
9
9
  rescue LoadError => e
10
- STDERR.puts e.message
11
- STDERR.puts "Run `gem install ore-tasks` to install 'ore/tasks'."
10
+ warn e.message
11
+ warn "Run `gem install rubygems-tasks` to install 'rubygems/tasks'."
12
12
  end
13
13
 
14
14
  begin
15
- gem 'rspec', '~> 2.4.0'
15
+ gem 'rspec', '~> 2.4'
16
16
  require 'rspec/core/rake_task'
17
17
 
18
18
  RSpec::Core::RakeTask.new
@@ -25,7 +25,7 @@ task :test => :spec
25
25
  task :default => :spec
26
26
 
27
27
  begin
28
- gem 'yard', '~> 0.6.0'
28
+ gem 'yard', '~> 0.7'
29
29
  require 'yard'
30
30
 
31
31
  YARD::Rake::YardocTask.new
@@ -1,15 +1,127 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- begin
4
- Ore::Specification.new do |gemspec|
5
- # custom logic here
6
- end
7
- rescue NameError
8
- begin
9
- require 'ore/specification'
10
- retry
11
- rescue LoadError
12
- STDERR.puts "The 'ffi-udis86.gemspec' file requires Ore."
13
- STDERR.puts "Run `gem install ore-core` to install Ore."
1
+ # encoding: utf-8
2
+
3
+ require 'yaml'
4
+
5
+ Gem::Specification.new do |gemspec|
6
+ files = if File.directory?('.git')
7
+ `git ls-files`.split($/)
8
+ elsif File.directory?('.hg')
9
+ `hg manifest`.split($/)
10
+ elsif File.directory?('.svn')
11
+ `svn ls -R`.split($/).select { |path| File.file?(path) }
12
+ else
13
+ Dir['{**/}{.*,*}'].select { |path| File.file?(path) }
14
+ end
15
+
16
+ filter_files = lambda { |paths|
17
+ case paths
18
+ when Array
19
+ (files & paths)
20
+ when String
21
+ (files & Dir[paths])
22
+ end
23
+ }
24
+
25
+ version = {
26
+ :file => 'lib/ffi/udis86/version.rb',
27
+ :constant => 'FFI::UDis86::VERSION'
28
+ }
29
+
30
+ defaults = {
31
+ 'name' => File.basename(File.dirname(__FILE__)),
32
+ 'files' => files,
33
+ 'executables' => filter_files['bin/*'].map { |path| File.basename(path) },
34
+ 'test_files' => filter_files['{test/{**/}*_test.rb,spec/{**/}*_spec.rb}'],
35
+ 'extra_doc_files' => filter_files['*.{txt,rdoc,md,markdown,tt,textile}'],
36
+ }
37
+
38
+ metadata = defaults.merge(YAML.load_file('gemspec.yml'))
39
+
40
+ gemspec.name = metadata.fetch('name',defaults[:name])
41
+ gemspec.version = if metadata['version']
42
+ metadata['version']
43
+ elsif File.file?(version[:file])
44
+ require File.join('.',version[:file])
45
+ eval(version[:constant])
46
+ end
47
+
48
+ gemspec.summary = metadata.fetch('summary',metadata['description'])
49
+ gemspec.description = metadata.fetch('description',metadata['summary'])
50
+
51
+ case metadata['license']
52
+ when Array
53
+ gemspec.licenses = metadata['license']
54
+ when String
55
+ gemspec.license = metadata['license']
56
+ end
57
+
58
+ case metadata['authors']
59
+ when Array
60
+ gemspec.authors = metadata['authors']
61
+ when String
62
+ gemspec.author = metadata['authors']
63
+ end
64
+
65
+ gemspec.email = metadata['email']
66
+ gemspec.homepage = metadata['homepage']
67
+
68
+ case metadata['require_paths']
69
+ when Array
70
+ gemspec.require_paths = metadata['require_paths']
71
+ when String
72
+ gemspec.require_path = metadata['require_paths']
73
+ end
74
+
75
+ gemspec.files = filter_files[metadata['files']]
76
+
77
+ gemspec.executables = metadata['executables']
78
+ gemspec.extensions = metadata['extensions']
79
+
80
+ if Gem::VERSION < '1.7.'
81
+ gemspec.default_executable = gemspec.executables.first
82
+ end
83
+
84
+ gemspec.test_files = filter_files[metadata['test_files']]
85
+
86
+ unless gemspec.files.include?('.document')
87
+ gemspec.extra_rdoc_files = metadata['extra_doc_files']
88
+ end
89
+
90
+ gemspec.post_install_message = metadata['post_install_message']
91
+ gemspec.requirements = metadata['requirements']
92
+
93
+ if gemspec.respond_to?(:required_ruby_version=)
94
+ gemspec.required_ruby_version = metadata['required_ruby_version']
95
+ end
96
+
97
+ if gemspec.respond_to?(:required_rubygems_version=)
98
+ gemspec.required_rubygems_version = metadata['required_ruby_version']
99
+ end
100
+
101
+ parse_versions = lambda { |versions|
102
+ case versions
103
+ when Array
104
+ versions.map { |v| v.to_s }
105
+ when String
106
+ versions.split(/,\s*/)
107
+ end
108
+ }
109
+
110
+ if metadata['dependencies']
111
+ metadata['dependencies'].each do |name,versions|
112
+ gemspec.add_dependency(name,parse_versions[versions])
113
+ end
114
+ end
115
+
116
+ if metadata['runtime_dependencies']
117
+ metadata['runtime_dependencies'].each do |name,versions|
118
+ gemspec.add_runtime_dependency(name,parse_versions[versions])
119
+ end
120
+ end
121
+
122
+ if metadata['development_dependencies']
123
+ metadata['development_dependencies'].each do |name,versions|
124
+ gemspec.add_development_dependency(name,parse_versions[versions])
125
+ end
14
126
  end
15
127
  end
@@ -13,9 +13,9 @@ has_yard: true
13
13
  requirements: udis86 >= 1.7
14
14
 
15
15
  dependencies:
16
- ffi: >= 0.6.0, <= 1.1.0
16
+ ffi: ~> 1.0
17
17
 
18
18
  development_dependencies:
19
- ore-tasks: ~> 0.3.0
20
- rspec: ~> 2.4.0
21
- yard: ~> 0.6.0
19
+ rubygems-tasks: ~> 0.1
20
+ rspec: ~> 2.4
21
+ yard: ~> 0.7
@@ -7,7 +7,7 @@ module FFI
7
7
  module UDis86
8
8
  extend FFI::Library
9
9
 
10
- ffi_lib 'udis86'
10
+ ffi_lib ['udis86', 'libudis86.so.0']
11
11
 
12
12
  attach_function :ud_init, [:pointer], :void
13
13
  attach_function :ud_set_input_hook, [:pointer, :ud_input_callback], :void
@@ -1,6 +1,6 @@
1
1
  module FFI
2
2
  module UDis86
3
3
  # udis86-ffi version
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
6
6
  end
@@ -1,4 +1,4 @@
1
- gem 'rspec', '~> 2.4.0'
1
+ gem 'rspec', '~> 2.4'
2
2
  require 'rspec'
3
3
  require 'ffi/udis86/version'
4
4
 
metadata CHANGED
@@ -1,75 +1,92 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ffi-udis86
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
4
5
  prerelease:
5
- version: 0.1.2
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Postmodern
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-02-02 00:00:00 -08:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2012-05-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: ffi
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
20
17
  none: false
21
- requirements:
22
- - - ">="
23
- - !ruby/object:Gem::Version
24
- version: 0.6.0
25
- - - <=
26
- - !ruby/object:Gem::Version
27
- version: 1.1.0
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.0'
28
22
  type: :runtime
29
- version_requirements: *id001
30
- - !ruby/object:Gem::Dependency
31
- name: ore-tasks
32
23
  prerelease: false
33
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
34
25
  none: false
35
- requirements:
26
+ requirements:
36
27
  - - ~>
37
- - !ruby/object:Gem::Version
38
- version: 0.3.0
28
+ - !ruby/object:Gem::Version
29
+ version: '1.0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rubygems-tasks
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '0.1'
39
38
  type: :development
40
- version_requirements: *id002
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
39
  prerelease: false
44
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
45
41
  none: false
46
- requirements:
42
+ requirements:
47
43
  - - ~>
48
- - !ruby/object:Gem::Version
49
- version: 2.4.0
44
+ - !ruby/object:Gem::Version
45
+ version: '0.1'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '2.4'
50
54
  type: :development
51
- version_requirements: *id003
52
- - !ruby/object:Gem::Dependency
53
- name: yard
54
55
  prerelease: false
55
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
56
57
  none: false
57
- requirements:
58
+ requirements:
58
59
  - - ~>
59
- - !ruby/object:Gem::Version
60
- version: 0.6.0
60
+ - !ruby/object:Gem::Version
61
+ version: '2.4'
62
+ - !ruby/object:Gem::Dependency
63
+ name: yard
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: '0.7'
61
70
  type: :development
62
- version_requirements: *id004
63
- description: ffi-udis86 provides Ruby FFI bindings for the udis86, a x86 and x86-64 disassembler.
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '0.7'
78
+ description: ffi-udis86 provides Ruby FFI bindings for the udis86, a x86 and x86-64
79
+ disassembler.
64
80
  email: postmodern.mod3@gmail.com
65
81
  executables: []
66
-
67
82
  extensions: []
68
-
69
- extra_rdoc_files:
83
+ extra_rdoc_files:
84
+ - ChangeLog.md
85
+ - LICENSE.txt
70
86
  - README.md
71
- files:
87
+ files:
72
88
  - .gemtest
89
+ - .gitignore
73
90
  - .rspec
74
91
  - .specopts
75
92
  - .yardopts
@@ -104,35 +121,33 @@ files:
104
121
  - spec/spec_helper.rb
105
122
  - spec/ud_spec.rb
106
123
  - spec/udis86_spec.rb
107
- has_rdoc: true
108
124
  homepage: http://github.com/sophsec/ffi-udis86
109
- licenses:
125
+ licenses:
110
126
  - MIT
111
127
  post_install_message:
112
128
  rdoc_options: []
113
-
114
- require_paths:
129
+ require_paths:
115
130
  - lib
116
- required_ruby_version: !ruby/object:Gem::Requirement
131
+ required_ruby_version: !ruby/object:Gem::Requirement
117
132
  none: false
118
- requirements:
119
- - - ">="
120
- - !ruby/object:Gem::Version
121
- version: "0"
122
- required_rubygems_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ! '>='
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
137
+ required_rubygems_version: !ruby/object:Gem::Requirement
123
138
  none: false
124
- requirements:
125
- - - ">="
126
- - !ruby/object:Gem::Version
127
- version: "0"
128
- requirements:
139
+ requirements:
140
+ - - ! '>='
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ requirements:
129
144
  - udis86 >= 1.7
130
- rubyforge_project: ffi-udis86
131
- rubygems_version: 1.5.0
145
+ rubyforge_project:
146
+ rubygems_version: 1.8.24
132
147
  signing_key:
133
148
  specification_version: 3
134
149
  summary: Ruby FFI bindings for udis86, a x86 and x86-64 disassembler.
135
- test_files:
136
- - spec/ud_spec.rb
150
+ test_files:
137
151
  - spec/operand_spec.rb
152
+ - spec/ud_spec.rb
138
153
  - spec/udis86_spec.rb