ruby-yasm 0.1.1 → 0.2.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.
- data/.gemtest +0 -0
- data/.rspec +1 -0
- data/ChangeLog.md +7 -0
- data/LICENSE.txt +1 -3
- data/README.md +7 -6
- data/Rakefile +21 -28
- data/gemspec.yml +20 -0
- data/lib/yasm/program.rb +15 -5
- data/lib/yasm/task.rb +1 -1
- data/lib/yasm/version.rb +1 -1
- data/ruby-yasm.gemspec +11 -69
- data/spec/program_spec.rb +3 -2
- data/spec/spec_helper.rb +2 -2
- metadata +39 -46
- data/.gitignore +0 -10
data/.gemtest
ADDED
File without changes
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour --format documentation
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
### 0.2.0 / 2011-04-11
|
2
|
+
|
3
|
+
* Require rprogram ~> 0.3.
|
4
|
+
* Allow passing in additional exec-options in {YASM::Program.assemble}
|
5
|
+
and {YASM::Program#assemble}.
|
6
|
+
* Opt into [test.rubygems.org](http://test.rubygems.org/)
|
7
|
+
|
1
8
|
### 0.1.1 / 2010-04-15
|
2
9
|
|
3
10
|
* Migrated to [Jeweler](http://github.com/technicalpickles/jeweler)
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# ruby-yasm
|
2
2
|
|
3
|
-
* [
|
4
|
-
* [
|
3
|
+
* [Source](http://github.com/sophsec/ruby-yasm/)
|
4
|
+
* [Issues](http://github.com/sophsec/ruby-yasm/issues)
|
5
|
+
* [Email](mailto:postmodern.mod3 at gmail.com)
|
5
6
|
* [www.tortall.net/projects/yasm](http://www.tortall.net/projects/yasm/)
|
6
7
|
* [www.sophsec.com](http://www.sophsec.com/)
|
7
|
-
* Postmodern (postmodern.mod3 at gmail.com)
|
8
8
|
|
9
9
|
## Description
|
10
10
|
|
@@ -46,8 +46,8 @@ debugging information:
|
|
46
46
|
|
47
47
|
## Requirements
|
48
48
|
|
49
|
-
* [yasm](http://www.tortall.net/projects/yasm/) >= 0.8.0
|
50
|
-
* [rprogram](http://rprogram.rubyforge.org/)
|
49
|
+
* [yasm](http://www.tortall.net/projects/yasm/) >= 0.8.0
|
50
|
+
* [rprogram](http://rprogram.rubyforge.org/) ~> 0.3
|
51
51
|
|
52
52
|
## Install
|
53
53
|
|
@@ -55,5 +55,6 @@ debugging information:
|
|
55
55
|
|
56
56
|
## License
|
57
57
|
|
58
|
-
|
58
|
+
Copyright (c) 2009-2011 Hal Brodigan
|
59
59
|
|
60
|
+
See {file:LICENSE.txt} for license information.
|
data/Rakefile
CHANGED
@@ -1,43 +1,36 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
|
-
require './lib/yasm/version.rb'
|
4
3
|
|
5
4
|
begin
|
6
|
-
|
7
|
-
|
8
|
-
gem.name = 'ruby-yasm'
|
9
|
-
gem.version = YASM::VERSION
|
10
|
-
gem.summary = %Q{A Ruby interface to YASM.}
|
11
|
-
gem.description = %Q{A Ruby interface to YASM.}
|
12
|
-
gem.email = 'postmodern.mod3@gmail.com'
|
13
|
-
gem.homepage = 'http://github.com/sophsec/ruby-yasm'
|
14
|
-
gem.authors = ['Postmodern']
|
15
|
-
gem.add_dependency 'rprogram', '~> 0.1.8'
|
16
|
-
gem.add_development_dependency 'rspec', '~> 1.3.0'
|
17
|
-
gem.add_development_dependency 'yard', '~> 0.5.3'
|
18
|
-
gem.has_rdoc = 'yard'
|
19
|
-
end
|
20
|
-
Jeweler::GemcutterTasks.new
|
21
|
-
rescue LoadError
|
22
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
23
|
-
end
|
5
|
+
gem 'ore-tasks', '~> 0.4'
|
6
|
+
require 'ore/tasks'
|
24
7
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
spec.spec_opts = ['--options', '.specopts']
|
8
|
+
Ore::Tasks.new
|
9
|
+
rescue LoadError => e
|
10
|
+
STDERR.puts e.message
|
11
|
+
STDERR.puts "Run `gem install ore-tasks` to install 'ore/tasks'."
|
30
12
|
end
|
31
13
|
|
32
|
-
|
14
|
+
begin
|
15
|
+
gem 'rspec', '~> 2.4'
|
16
|
+
require 'rspec/core/rake_task'
|
17
|
+
|
18
|
+
RSpec::Core::RakeTask.new
|
19
|
+
rescue LoadError => e
|
20
|
+
task :spec do
|
21
|
+
abort "Please run `gem install rspec` to install RSpec."
|
22
|
+
end
|
23
|
+
end
|
24
|
+
task :test => :spec
|
33
25
|
task :default => :spec
|
34
26
|
|
35
27
|
begin
|
28
|
+
gem 'yard', '~> 0.6.0'
|
36
29
|
require 'yard'
|
37
30
|
|
38
|
-
YARD::Rake::YardocTask.new
|
39
|
-
rescue LoadError
|
31
|
+
YARD::Rake::YardocTask.new
|
32
|
+
rescue LoadError => e
|
40
33
|
task :yard do
|
41
|
-
abort "
|
34
|
+
abort "Please run `gem install yard` to install YARD."
|
42
35
|
end
|
43
36
|
end
|
data/gemspec.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
name: ruby-yasm
|
2
|
+
summary: A Ruby interface to YASM.
|
3
|
+
description:
|
4
|
+
ruby-yasm provides a Ruby interface to YASM assembler.
|
5
|
+
|
6
|
+
license: MIT
|
7
|
+
authors: Postmodern
|
8
|
+
email: postmodern.mod3@gmail.com
|
9
|
+
homepage: http://github.com/sophsec/ruby-yasm
|
10
|
+
has_yard: true
|
11
|
+
|
12
|
+
requirements: yasm >= 0.6.0
|
13
|
+
|
14
|
+
dependencies:
|
15
|
+
rprogram: ~> 0.3
|
16
|
+
|
17
|
+
development_dependencies:
|
18
|
+
ore-tasks: ~> 0.4
|
19
|
+
rspec: ~> 2.4
|
20
|
+
yard: ~> 0.6.0
|
data/lib/yasm/program.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'yasm/task'
|
2
2
|
|
3
3
|
require 'rprogram'
|
4
|
-
require 'tempfile'
|
5
4
|
|
6
5
|
module YASM
|
7
6
|
class Program < RProgram::Program
|
@@ -14,6 +13,9 @@ module YASM
|
|
14
13
|
# @param [Hash{Symbol => Object}] options
|
15
14
|
# Additional options for yasm.
|
16
15
|
#
|
16
|
+
# @param [Hash{Symbol => Object}] exec_options
|
17
|
+
# Additional exec-options.
|
18
|
+
#
|
17
19
|
# @yield [task]
|
18
20
|
# If a block is given, it will be passed a task object used to
|
19
21
|
# specify options for yasm.
|
@@ -36,8 +38,10 @@ module YASM
|
|
36
38
|
# yasm.output = 'code.o'
|
37
39
|
# end
|
38
40
|
#
|
39
|
-
|
40
|
-
|
41
|
+
# @see #assemble
|
42
|
+
#
|
43
|
+
def self.assemble(options={},exec_options={},&block)
|
44
|
+
find.assemble(options,exec_options,&block)
|
41
45
|
end
|
42
46
|
|
43
47
|
#
|
@@ -46,6 +50,9 @@ module YASM
|
|
46
50
|
# @param [Hash{Symbol => Object}] options
|
47
51
|
# Additional options for yasm.
|
48
52
|
#
|
53
|
+
# @param [Hash{Symbol => Object}] exec_options
|
54
|
+
# Additional exec-options.
|
55
|
+
#
|
49
56
|
# @yield [task]
|
50
57
|
# If a block is given, it will be passed a task object used to
|
51
58
|
# specify options for yasm.
|
@@ -68,8 +75,11 @@ module YASM
|
|
68
75
|
# yasm.output = 'code.o'
|
69
76
|
# end
|
70
77
|
#
|
71
|
-
|
72
|
-
|
78
|
+
# @see http://rubydoc.info/gems/rprogram/0.3.0/RProgram/Program#run-instance_method
|
79
|
+
# For additional exec-options.
|
80
|
+
#
|
81
|
+
def assemble(options={},exec_options={},&block)
|
82
|
+
run_task(Task.new(options,&block),exec_options)
|
73
83
|
end
|
74
84
|
|
75
85
|
end
|
data/lib/yasm/task.rb
CHANGED
data/lib/yasm/version.rb
CHANGED
data/ruby-yasm.gemspec
CHANGED
@@ -1,73 +1,15 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
1
|
# -*- encoding: utf-8 -*-
|
5
2
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
"
|
17
|
-
"LICENSE.txt",
|
18
|
-
"README.md"
|
19
|
-
]
|
20
|
-
s.files = [
|
21
|
-
".gitignore",
|
22
|
-
".specopts",
|
23
|
-
".yardopts",
|
24
|
-
"ChangeLog.md",
|
25
|
-
"LICENSE.txt",
|
26
|
-
"README.md",
|
27
|
-
"Rakefile",
|
28
|
-
"lib/yasm.rb",
|
29
|
-
"lib/yasm/program.rb",
|
30
|
-
"lib/yasm/task.rb",
|
31
|
-
"lib/yasm/version.rb",
|
32
|
-
"ruby-yasm.gemspec",
|
33
|
-
"spec/helpers/files.rb",
|
34
|
-
"spec/helpers/files/gas.S",
|
35
|
-
"spec/program_spec.rb",
|
36
|
-
"spec/spec_helper.rb",
|
37
|
-
"spec/task_spec.rb",
|
38
|
-
"spec/yasm_spec.rb"
|
39
|
-
]
|
40
|
-
s.has_rdoc = %q{yard}
|
41
|
-
s.homepage = %q{http://github.com/sophsec/ruby-yasm}
|
42
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
43
|
-
s.require_paths = ["lib"]
|
44
|
-
s.rubygems_version = %q{1.3.6}
|
45
|
-
s.summary = %q{A Ruby interface to YASM.}
|
46
|
-
s.test_files = [
|
47
|
-
"spec/spec_helper.rb",
|
48
|
-
"spec/yasm_spec.rb",
|
49
|
-
"spec/helpers/files.rb",
|
50
|
-
"spec/program_spec.rb",
|
51
|
-
"spec/task_spec.rb"
|
52
|
-
]
|
53
|
-
|
54
|
-
if s.respond_to? :specification_version then
|
55
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
56
|
-
s.specification_version = 3
|
57
|
-
|
58
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
59
|
-
s.add_runtime_dependency(%q<rprogram>, ["~> 0.1.8"])
|
60
|
-
s.add_development_dependency(%q<rspec>, ["~> 1.3.0"])
|
61
|
-
s.add_development_dependency(%q<yard>, ["~> 0.5.3"])
|
62
|
-
else
|
63
|
-
s.add_dependency(%q<rprogram>, ["~> 0.1.8"])
|
64
|
-
s.add_dependency(%q<rspec>, ["~> 1.3.0"])
|
65
|
-
s.add_dependency(%q<yard>, ["~> 0.5.3"])
|
66
|
-
end
|
67
|
-
else
|
68
|
-
s.add_dependency(%q<rprogram>, ["~> 0.1.8"])
|
69
|
-
s.add_dependency(%q<rspec>, ["~> 1.3.0"])
|
70
|
-
s.add_dependency(%q<yard>, ["~> 0.5.3"])
|
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 'ruby-yasm.gemspec' file requires Ore."
|
13
|
+
STDERR.puts "Run `gem install ore-core` to install Ore."
|
71
14
|
end
|
72
15
|
end
|
73
|
-
|
data/spec/program_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-yasm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 1
|
8
|
-
- 1
|
9
|
-
version: 0.1.1
|
4
|
+
prerelease:
|
5
|
+
version: 0.2.0
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Postmodern
|
@@ -14,69 +10,71 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date:
|
18
|
-
default_executable:
|
13
|
+
date: 2011-04-11 00:00:00 Z
|
19
14
|
dependencies:
|
20
15
|
- !ruby/object:Gem::Dependency
|
21
16
|
name: rprogram
|
22
17
|
prerelease: false
|
23
18
|
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
24
20
|
requirements:
|
25
21
|
- - ~>
|
26
22
|
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 0
|
29
|
-
- 1
|
30
|
-
- 8
|
31
|
-
version: 0.1.8
|
23
|
+
version: "0.3"
|
32
24
|
type: :runtime
|
33
25
|
version_requirements: *id001
|
34
26
|
- !ruby/object:Gem::Dependency
|
35
|
-
name:
|
27
|
+
name: ore-tasks
|
36
28
|
prerelease: false
|
37
29
|
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
38
31
|
requirements:
|
39
32
|
- - ~>
|
40
33
|
- !ruby/object:Gem::Version
|
41
|
-
|
42
|
-
- 1
|
43
|
-
- 3
|
44
|
-
- 0
|
45
|
-
version: 1.3.0
|
34
|
+
version: "0.4"
|
46
35
|
type: :development
|
47
36
|
version_requirements: *id002
|
48
37
|
- !ruby/object:Gem::Dependency
|
49
|
-
name:
|
38
|
+
name: rspec
|
50
39
|
prerelease: false
|
51
40
|
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
52
42
|
requirements:
|
53
43
|
- - ~>
|
54
44
|
- !ruby/object:Gem::Version
|
55
|
-
|
56
|
-
- 0
|
57
|
-
- 5
|
58
|
-
- 3
|
59
|
-
version: 0.5.3
|
45
|
+
version: "2.4"
|
60
46
|
type: :development
|
61
47
|
version_requirements: *id003
|
62
|
-
|
63
|
-
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: yard
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ~>
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 0.6.0
|
57
|
+
type: :development
|
58
|
+
version_requirements: *id004
|
59
|
+
description: ruby-yasm provides a Ruby interface to YASM assembler.
|
60
|
+
email:
|
61
|
+
- postmodern.mod3@gmail.com
|
64
62
|
executables: []
|
65
63
|
|
66
64
|
extensions: []
|
67
65
|
|
68
66
|
extra_rdoc_files:
|
69
|
-
- ChangeLog.md
|
70
|
-
- LICENSE.txt
|
71
67
|
- README.md
|
72
68
|
files:
|
73
|
-
- .
|
69
|
+
- .gemtest
|
70
|
+
- .rspec
|
74
71
|
- .specopts
|
75
72
|
- .yardopts
|
76
73
|
- ChangeLog.md
|
77
74
|
- LICENSE.txt
|
78
75
|
- README.md
|
79
76
|
- Rakefile
|
77
|
+
- gemspec.yml
|
80
78
|
- lib/yasm.rb
|
81
79
|
- lib/yasm/program.rb
|
82
80
|
- lib/yasm/task.rb
|
@@ -88,39 +86,34 @@ files:
|
|
88
86
|
- spec/spec_helper.rb
|
89
87
|
- spec/task_spec.rb
|
90
88
|
- spec/yasm_spec.rb
|
91
|
-
has_rdoc: yard
|
92
89
|
homepage: http://github.com/sophsec/ruby-yasm
|
93
|
-
licenses:
|
94
|
-
|
90
|
+
licenses:
|
91
|
+
- MIT
|
95
92
|
post_install_message:
|
96
|
-
rdoc_options:
|
97
|
-
|
93
|
+
rdoc_options: []
|
94
|
+
|
98
95
|
require_paths:
|
99
96
|
- lib
|
100
97
|
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
101
99
|
requirements:
|
102
100
|
- - ">="
|
103
101
|
- !ruby/object:Gem::Version
|
104
|
-
segments:
|
105
|
-
- 0
|
106
102
|
version: "0"
|
107
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
|
+
none: false
|
108
105
|
requirements:
|
109
106
|
- - ">="
|
110
107
|
- !ruby/object:Gem::Version
|
111
|
-
segments:
|
112
|
-
- 0
|
113
108
|
version: "0"
|
114
|
-
requirements:
|
115
|
-
|
116
|
-
rubyforge_project:
|
117
|
-
rubygems_version: 1.
|
109
|
+
requirements:
|
110
|
+
- yasm >= 0.6.0
|
111
|
+
rubyforge_project: ruby-yasm
|
112
|
+
rubygems_version: 1.7.2
|
118
113
|
signing_key:
|
119
114
|
specification_version: 3
|
120
115
|
summary: A Ruby interface to YASM.
|
121
116
|
test_files:
|
122
|
-
- spec/spec_helper.rb
|
123
|
-
- spec/yasm_spec.rb
|
124
|
-
- spec/helpers/files.rb
|
125
117
|
- spec/program_spec.rb
|
118
|
+
- spec/yasm_spec.rb
|
126
119
|
- spec/task_spec.rb
|