gir_ffi-pretty_printer 0.0.6 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/COPYING.LIB +504 -0
- data/Changelog.md +54 -0
- data/lib/gir_ffi-pretty_printer/class_pretty_printer.rb +9 -5
- data/lib/gir_ffi-pretty_printer/pretty_printer.rb +9 -8
- data/lib/gir_ffi-pretty_printer/version.rb +7 -0
- data/lib/gir_ffi-pretty_printer.rb +1 -1
- metadata +106 -44
- data/Rakefile +0 -33
- data/test/gir_ffi-pretty_printer/class_pretty_printer_test.rb +0 -80
- data/test/gir_ffi-pretty_printer/pretty_printer_test.rb +0 -12
- data/test/integration/actual_glib.rb +0 -9885
- data/test/integration/actual_gobject.rb +0 -3816
- data/test/integration/expected_glib.rb +0 -9885
- data/test/integration/expected_gobject.rb +0 -3816
- data/test/integration/glib_test.rb +0 -17
- data/test/integration/gobject_test.rb +0 -17
- data/test/test_helper.rb +0 -13
metadata
CHANGED
@@ -1,138 +1,200 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gir_ffi-pretty_printer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matijs van Zuijlen
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bindings
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: gir_ffi
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.16.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.16.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: indentation
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.1.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.1.1
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: mvz-live_ast
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
61
|
+
version: '2.0'
|
48
62
|
type: :runtime
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
68
|
+
version: '2.0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: minitest
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '5.
|
75
|
+
version: '5.12'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '5.
|
82
|
+
version: '5.12'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rake
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
89
|
+
version: '13.0'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
83
|
-
|
84
|
-
|
96
|
+
version: '13.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake-manifest
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.2.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.2.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.25'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.25'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-minitest
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.20.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.20.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop-performance
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '1.13'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '1.13'
|
153
|
+
description: |
|
154
|
+
Library and executable to pretty-print modules generated by GirFFI,
|
155
|
+
taking method overrides and hand-added methods into account.
|
85
156
|
email:
|
86
157
|
- matijs@matijs.net
|
87
158
|
executables: []
|
88
159
|
extensions: []
|
89
|
-
extra_rdoc_files:
|
160
|
+
extra_rdoc_files:
|
161
|
+
- Changelog.md
|
162
|
+
- README.md
|
90
163
|
files:
|
164
|
+
- COPYING.LIB
|
165
|
+
- Changelog.md
|
91
166
|
- README.md
|
92
|
-
- Rakefile
|
93
167
|
- lib/gir_ffi-pretty_printer.rb
|
94
168
|
- lib/gir_ffi-pretty_printer/class_pretty_printer.rb
|
95
169
|
- lib/gir_ffi-pretty_printer/pretty_printer.rb
|
96
|
-
-
|
97
|
-
- test/gir_ffi-pretty_printer/pretty_printer_test.rb
|
98
|
-
- test/integration/actual_glib.rb
|
99
|
-
- test/integration/actual_gobject.rb
|
100
|
-
- test/integration/expected_glib.rb
|
101
|
-
- test/integration/expected_gobject.rb
|
102
|
-
- test/integration/glib_test.rb
|
103
|
-
- test/integration/gobject_test.rb
|
104
|
-
- test/test_helper.rb
|
170
|
+
- lib/gir_ffi-pretty_printer/version.rb
|
105
171
|
homepage: http://www.github.com/mvz/gir_ffi-pretty_printer
|
106
172
|
licenses:
|
107
173
|
- LGPL-2.1+
|
108
|
-
metadata:
|
109
|
-
|
110
|
-
|
174
|
+
metadata:
|
175
|
+
homepage_uri: http://www.github.com/mvz/gir_ffi-pretty_printer
|
176
|
+
source_code_uri: https://github.com/mvz/gir_ffi-pretty_printer
|
177
|
+
changelog_uri: https://github.com/mvz/gir_ffi-pretty_printer/blob/master/Changelog.md
|
178
|
+
rubygems_mfa_required: 'true'
|
179
|
+
post_install_message:
|
180
|
+
rdoc_options:
|
181
|
+
- "--main"
|
182
|
+
- README.md
|
111
183
|
require_paths:
|
112
184
|
- lib
|
113
185
|
required_ruby_version: !ruby/object:Gem::Requirement
|
114
186
|
requirements:
|
115
187
|
- - ">="
|
116
188
|
- !ruby/object:Gem::Version
|
117
|
-
version: 2.
|
189
|
+
version: 2.7.0
|
118
190
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
191
|
requirements:
|
120
192
|
- - ">="
|
121
193
|
- !ruby/object:Gem::Version
|
122
194
|
version: '0'
|
123
195
|
requirements: []
|
124
|
-
|
125
|
-
|
126
|
-
signing_key:
|
196
|
+
rubygems_version: 3.3.7
|
197
|
+
signing_key:
|
127
198
|
specification_version: 4
|
128
199
|
summary: Pretty-printer for modules generated by GirFFI
|
129
|
-
test_files:
|
130
|
-
- test/gir_ffi-pretty_printer/pretty_printer_test.rb
|
131
|
-
- test/gir_ffi-pretty_printer/class_pretty_printer_test.rb
|
132
|
-
- test/test_helper.rb
|
133
|
-
- test/integration/actual_glib.rb
|
134
|
-
- test/integration/expected_gobject.rb
|
135
|
-
- test/integration/glib_test.rb
|
136
|
-
- test/integration/expected_glib.rb
|
137
|
-
- test/integration/actual_gobject.rb
|
138
|
-
- test/integration/gobject_test.rb
|
200
|
+
test_files: []
|
data/Rakefile
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'rake/clean'
|
4
|
-
require 'bundler/gem_tasks'
|
5
|
-
require 'rake/testtask'
|
6
|
-
|
7
|
-
namespace :test do
|
8
|
-
Rake::TestTask.new(:unit) do |t|
|
9
|
-
t.libs = ['lib']
|
10
|
-
t.ruby_opts += ['-w -Itest']
|
11
|
-
t.test_files = FileList['test/gir_ffi-pretty_printer/*_test.rb']
|
12
|
-
t.warning = true
|
13
|
-
end
|
14
|
-
|
15
|
-
Rake::TestTask.new(:integration) do |t|
|
16
|
-
t.libs = ['lib']
|
17
|
-
t.ruby_opts += ['-w -Itest']
|
18
|
-
t.test_files = FileList['test/integration/*_test.rb']
|
19
|
-
t.warning = true
|
20
|
-
end
|
21
|
-
|
22
|
-
task all: [:unit, :integration]
|
23
|
-
end
|
24
|
-
|
25
|
-
begin
|
26
|
-
require 'yard'
|
27
|
-
YARD::Rake::YardocTask.new
|
28
|
-
rescue LoadError
|
29
|
-
puts 'Install yard to enable the documentation tasks'
|
30
|
-
end
|
31
|
-
|
32
|
-
task test: 'test:all'
|
33
|
-
task default: 'test'
|
@@ -1,80 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'test_helper'
|
4
|
-
|
5
|
-
class SimpleClass
|
6
|
-
def bar
|
7
|
-
'hello'
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
class SimpleAlias < SimpleClass
|
12
|
-
alias foo bar
|
13
|
-
end
|
14
|
-
|
15
|
-
class ComplexAlias < SimpleClass
|
16
|
-
alias bar_without_qux bar
|
17
|
-
|
18
|
-
def bar_with_qux
|
19
|
-
bar_without_qux + '-more'
|
20
|
-
end
|
21
|
-
|
22
|
-
alias bar bar_with_qux
|
23
|
-
end
|
24
|
-
|
25
|
-
describe GirFFI::ClassPrettyPrinter do
|
26
|
-
let(:instance) { GirFFI::ClassPrettyPrinter.new printed_class }
|
27
|
-
|
28
|
-
describe '#pretty_print' do
|
29
|
-
describe 'for a class with a simple method definition' do
|
30
|
-
let(:printed_class) { SimpleClass }
|
31
|
-
it 'pretty-prints the class' do
|
32
|
-
expected = <<-RUBY.reset_indentation.chomp
|
33
|
-
class SimpleClass < Object
|
34
|
-
|
35
|
-
def bar
|
36
|
-
"hello"
|
37
|
-
end
|
38
|
-
end
|
39
|
-
RUBY
|
40
|
-
|
41
|
-
result = instance.pretty_print
|
42
|
-
result.must_equal expected
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
describe 'for a class with a simple aliased method' do
|
47
|
-
let(:printed_class) { SimpleAlias }
|
48
|
-
it 'pretty-prints the class' do
|
49
|
-
expected = <<-RUBY.reset_indentation.chomp
|
50
|
-
class SimpleAlias < SimpleClass
|
51
|
-
|
52
|
-
alias_method 'foo', 'bar'
|
53
|
-
end
|
54
|
-
RUBY
|
55
|
-
|
56
|
-
result = instance.pretty_print
|
57
|
-
result.must_equal expected
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
describe 'for a class with an alias chain' do
|
62
|
-
let(:printed_class) { ComplexAlias }
|
63
|
-
it 'pretty-prints the class' do
|
64
|
-
expected = <<-RUBY.reset_indentation.chomp
|
65
|
-
class ComplexAlias < SimpleClass
|
66
|
-
|
67
|
-
def bar_with_qux
|
68
|
-
(bar_without_qux + "-more")
|
69
|
-
end
|
70
|
-
alias_method 'bar', 'bar_with_qux'
|
71
|
-
alias_method 'bar_without_qux', 'bar'
|
72
|
-
end
|
73
|
-
RUBY
|
74
|
-
|
75
|
-
result = instance.pretty_print
|
76
|
-
result.must_equal expected
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'test_helper'
|
4
|
-
describe GirFFI::PrettyPrinter do
|
5
|
-
describe '#pretty_print' do
|
6
|
-
let(:instance) { GirFFI::PrettyPrinter.new }
|
7
|
-
it 'pretty-prints a module without version specification' do
|
8
|
-
instance.pretty_print 'GObject'
|
9
|
-
pass
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|