gir_ffi-tracker 0.3.0 → 0.4.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 +7 -0
- data/Changelog.md +4 -0
- data/Rakefile +3 -1
- data/tasks/yardoc.rake +1 -1
- metadata +14 -23
- data/tasks/notes.rake +0 -121
- data/tasks/setup.rb +0 -6
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8bbdda25a5fa282410524de8f753f4f6b7b5576c
|
4
|
+
data.tar.gz: c9e8a78813492517bbf566c978f197ad3c7a5542
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fbc12500f2ec8031ea35fab495a7e4fe88d9534fe60de8a6df063b8d666085b7ec1536d4d96aebc87d747b991da416c4cd9d1d0b67176398d3096a76f1171471
|
7
|
+
data.tar.gz: fcd2565604e93835d2143fd6dbc6c8ecb7154a45083b65c5f3078d945c8257559cad181fa6847a83e818848d9a193a0efc9f748249b327382a2d6a518bf03587
|
data/Changelog.md
CHANGED
data/Rakefile
CHANGED
data/tasks/yardoc.rake
CHANGED
metadata
CHANGED
@@ -1,36 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gir_ffi-tracker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.4.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Matijs van Zuijlen
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-01-11 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: gir_ffi
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
19
|
+
version: 0.7.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
26
|
+
version: 0.7.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: minitest
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,20 +41,18 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: 10.0
|
47
|
+
version: 10.1.0
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version: 10.0
|
62
|
-
description:
|
54
|
+
version: 10.1.0
|
55
|
+
description: Bindings for Tracker generated by GirFFI, with overrides.
|
63
56
|
email:
|
64
57
|
- matijs@matijs.net
|
65
58
|
executables: []
|
@@ -74,14 +67,14 @@ files:
|
|
74
67
|
- test/unit/tracker_sparql_cursor_test.rb
|
75
68
|
- test/integration/load_test.rb
|
76
69
|
- tasks/yardoc.rake
|
77
|
-
- tasks/notes.rake
|
78
|
-
- tasks/setup.rb
|
79
70
|
- tasks/test.rake
|
80
71
|
- Changelog.md
|
81
72
|
- README.md
|
82
73
|
- Rakefile
|
83
74
|
homepage: http://www.github.com/mvz/gir_ffi-tracker
|
84
|
-
licenses:
|
75
|
+
licenses:
|
76
|
+
- LGPL-2.1
|
77
|
+
metadata: {}
|
85
78
|
post_install_message:
|
86
79
|
rdoc_options:
|
87
80
|
- --main
|
@@ -89,22 +82,20 @@ rdoc_options:
|
|
89
82
|
require_paths:
|
90
83
|
- lib
|
91
84
|
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
-
none: false
|
93
85
|
requirements:
|
94
|
-
- -
|
86
|
+
- - '>='
|
95
87
|
- !ruby/object:Gem::Version
|
96
88
|
version: '0'
|
97
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
90
|
requirements:
|
100
|
-
- -
|
91
|
+
- - '>='
|
101
92
|
- !ruby/object:Gem::Version
|
102
93
|
version: '0'
|
103
94
|
requirements: []
|
104
95
|
rubyforge_project:
|
105
|
-
rubygems_version:
|
96
|
+
rubygems_version: 2.0.14
|
106
97
|
signing_key:
|
107
|
-
specification_version:
|
98
|
+
specification_version: 4
|
108
99
|
summary: GirFFI-based binding to Tracker
|
109
100
|
test_files:
|
110
101
|
- test/integration/load_test.rb
|
data/tasks/notes.rake
DELETED
@@ -1,121 +0,0 @@
|
|
1
|
-
# The following code is copied straight from Bones 2.5.1
|
2
|
-
#
|
3
|
-
|
4
|
-
module Bones
|
5
|
-
|
6
|
-
# A helper class used to find and display any annotations in a collection of
|
7
|
-
# project files.
|
8
|
-
#
|
9
|
-
class AnnotationExtractor
|
10
|
-
|
11
|
-
class Annotation < Struct.new(:line, :tag, :text)
|
12
|
-
# Returns a string representation of the annotation. If the
|
13
|
-
# <tt>:tag</tt> parameter is given as +true+, then the annotation tag
|
14
|
-
# will be included in the string.
|
15
|
-
#
|
16
|
-
def to_s( opts = {} )
|
17
|
-
s = "[%3d] " % line
|
18
|
-
s << "[#{tag}] " if opts[:tag]
|
19
|
-
s << text
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
# Enumerate all the annoations for the given _project_ and _tag_. This
|
24
|
-
# will search for all athe annotations and display them on standard
|
25
|
-
# output.
|
26
|
-
#
|
27
|
-
def self.enumerate tag, id = nil, opts = {}
|
28
|
-
extractor = new(tag, id)
|
29
|
-
extractor.display(extractor.find, opts)
|
30
|
-
end
|
31
|
-
|
32
|
-
attr_reader :tag, :id
|
33
|
-
|
34
|
-
# Creates a new annotation extractor configured to use the _project_ open
|
35
|
-
# strcut and to search for the given _tag_ (which can be more than one tag
|
36
|
-
# via a regular expression 'or' operation -- i.e. THIS|THAT|OTHER)
|
37
|
-
#
|
38
|
-
def initialize tag, id
|
39
|
-
@tag = tag
|
40
|
-
@id = @id_rgxp = nil
|
41
|
-
|
42
|
-
unless id.nil? or id.empty?
|
43
|
-
@id = id
|
44
|
-
@id_rgxp = Regexp.new(Regexp.escape(id), Regexp::IGNORECASE)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
# Iterate over all the files in the project and extract annotations from
|
49
|
-
# the those files. Returns the results as a hash for display.
|
50
|
-
#
|
51
|
-
def find
|
52
|
-
results = {}
|
53
|
-
rgxp = %r/(#{tag}):?\s*(.*?)(?:\s*(?:-?%>|\*+\/))?$/o
|
54
|
-
|
55
|
-
files = Dir.glob("lib/**/*.rb")
|
56
|
-
files += Dir.glob("test/**/*.rb")
|
57
|
-
files.each do |fn|
|
58
|
-
results.update(extract_annotations_from(fn, rgxp))
|
59
|
-
end
|
60
|
-
|
61
|
-
results
|
62
|
-
end
|
63
|
-
|
64
|
-
# Extract any annotations from the given _file_ using the regular
|
65
|
-
# expression _pattern_ provided.
|
66
|
-
#
|
67
|
-
def extract_annotations_from( file, pattern )
|
68
|
-
lineno = 0
|
69
|
-
result = File.readlines(file).inject([]) do |list, line|
|
70
|
-
lineno += 1
|
71
|
-
next list unless m = pattern.match(line)
|
72
|
-
next list << Annotation.new(lineno, m[1], m[2]) unless id
|
73
|
-
|
74
|
-
text = m[2]
|
75
|
-
if text =~ @id_rgxp
|
76
|
-
list << Annotation.new(lineno, m[1], text)
|
77
|
-
end
|
78
|
-
list
|
79
|
-
end
|
80
|
-
result.empty? ? {} : { file => result }
|
81
|
-
end
|
82
|
-
|
83
|
-
# Print the results of the annotation extraction to the screen. If the
|
84
|
-
# <tt>:tags</tt> option is set to +true+, then the annotation tag will be
|
85
|
-
# displayed.
|
86
|
-
#
|
87
|
-
def display( results, opts = {} )
|
88
|
-
results.keys.sort.each do |file|
|
89
|
-
puts "#{file}:"
|
90
|
-
results[file].each do |note|
|
91
|
-
puts " * #{note.to_s(opts)}"
|
92
|
-
end
|
93
|
-
puts
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
end # class AnnotationExtractor
|
98
|
-
end # module Bones
|
99
|
-
|
100
|
-
note_tags = ["TODO", "FIXME", "OPTIMIZE"]
|
101
|
-
|
102
|
-
desc "Enumerate all annotations"
|
103
|
-
task :notes do |t|
|
104
|
-
id = if t.application.top_level_tasks.length > 1
|
105
|
-
t.application.top_level_tasks.slice!(1..-1).join(' ')
|
106
|
-
end
|
107
|
-
Bones::AnnotationExtractor.enumerate(
|
108
|
-
note_tags.join('|'), id, :tag => true)
|
109
|
-
end
|
110
|
-
|
111
|
-
namespace :notes do
|
112
|
-
note_tags.each do |tag|
|
113
|
-
desc "Enumerate all #{tag} annotations"
|
114
|
-
task tag.downcase.to_sym do |t|
|
115
|
-
id = if t.application.top_level_tasks.length > 1
|
116
|
-
t.application.top_level_tasks.slice!(1..-1).join(' ')
|
117
|
-
end
|
118
|
-
Bones::AnnotationExtractor.enumerate(tag, id)
|
119
|
-
end
|
120
|
-
end
|
121
|
-
end
|