inqlude 0.0.8 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.rspec +1 -0
- data/Gemfile +3 -0
- data/README +35 -1
- data/TODO +50 -15
- data/inqlude.gemspec +7 -2
- data/lib/cli.rb +70 -6
- data/lib/creator.rb +32 -8
- data/lib/git_hub_tool.rb +92 -0
- data/lib/inqlude.rb +7 -0
- data/lib/kde_frameworks_creator.rb +173 -0
- data/lib/kde_frameworks_release.rb +61 -0
- data/lib/library.rb +26 -1
- data/lib/manifest.rb +43 -0
- data/lib/manifest_handler.rb +59 -17
- data/lib/rpm_manifestizer.rb +2 -2
- data/lib/settings.rb +21 -10
- data/lib/verifier.rb +29 -18
- data/lib/version.rb +1 -1
- data/lib/view.rb +55 -10
- data/manifest-format.md +27 -12
- data/schema/generic-manifest-v1 +54 -0
- data/schema/proprietary-release-manifest-v1 +63 -0
- data/schema/release-manifest-v1 +73 -0
- data/spec/creator_spec.rb +94 -34
- data/spec/data/awesomelib/awesomelib.2013-09-08.manifest +14 -6
- data/spec/data/bleedingedge/bleedingedge.2012-01-01.manifest +3 -2
- data/spec/data/commercial/commercial.manifest +13 -0
- data/spec/data/karchive-generic.manifest +22 -0
- data/spec/data/karchive-release-beta.manifest +29 -0
- data/spec/data/karchive-release.manifest +29 -0
- data/spec/data/karchive-release2.manifest +29 -0
- data/spec/data/karchive.authors +10 -0
- data/spec/data/karchive.readme +35 -0
- data/spec/data/kservice-generic.manifest +22 -0
- data/spec/data/kservice.readme +9 -0
- data/spec/data/newlib/newlib.manifest +13 -0
- data/spec/data/proprietarylib/proprietarylib.2013-12-22.manifest +16 -0
- data/spec/data/rendertest-generic.manifest +20 -0
- data/spec/data/testcontent +1 -0
- data/spec/kde_frameworks_creator_spec.rb +263 -0
- data/spec/kde_frameworks_release_spec.rb +72 -0
- data/spec/library_spec.rb +54 -2
- data/spec/manifest_handler_spec.rb +102 -8
- data/spec/manifest_spec.rb +63 -0
- data/spec/rpm_manifestizer_spec.rb +2 -2
- data/spec/settings_spec.rb +53 -4
- data/spec/spec_helper.rb +40 -1
- data/spec/verifier_spec.rb +53 -22
- data/spec/view_spec.rb +145 -0
- data/view/all.html.haml +24 -0
- data/view/commercial.html.haml +17 -0
- data/view/contribute.html.haml +7 -3
- data/view/development.html.haml +36 -0
- data/view/favicon.ico +0 -0
- data/view/group.html.haml +20 -0
- data/view/index.html.haml +11 -1
- data/view/layout.html.haml +0 -5
- data/view/library.html.haml +4 -4
- data/view/public/inqlude.css +2 -2
- data/view/unreleased.html.haml +18 -0
- metadata +172 -97
- data/view/edge.html.haml +0 -9
data/.gitignore
CHANGED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/Gemfile
ADDED
data/README
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Inqlude - the Qt library archive
|
2
2
|
|
3
|
+
## Overview
|
4
|
+
|
3
5
|
Inqlude is a tool to handle Qt based libraries. It provides developers using Qt
|
4
6
|
with an easy way to find, install, and use libraries, in particular 3rd party
|
5
7
|
libraries. A public version of the library runs at http://inqlude.org.
|
@@ -22,7 +24,39 @@ the native tools.
|
|
22
24
|
There also is an option to generate an HTML overview of all available libraries.
|
23
25
|
This can be hosted or used locally.
|
24
26
|
|
27
|
+
## KDE Frameworks
|
28
|
+
|
29
|
+
The KDE Frameworks provide more than fifty libraries, which can be used to
|
30
|
+
write Qt application. Inqlude has some special tooling to deal with the data
|
31
|
+
from KDE Frameworks
|
32
|
+
|
33
|
+
To checkout all frameworks from source, you can use
|
34
|
+
|
35
|
+
```bash
|
36
|
+
kde-checkout-list.pl --component=frameworks --clone
|
37
|
+
```
|
38
|
+
|
39
|
+
This creates a `frameworks` directory with a checkout of all git repositories
|
40
|
+
part of [KDE Frameworks](https://projects.kde.org/projects/frameworks).
|
41
|
+
|
42
|
+
You can update the generic meta data of the frameworks in Inqlude with
|
43
|
+
|
44
|
+
```bash
|
45
|
+
inqlude create_kde_frameworks <frameworks-checkout-dir> <inqlude-data-dir>
|
46
|
+
```
|
47
|
+
|
48
|
+
To create release manifests for a KDE Frameworks release runs
|
49
|
+
|
50
|
+
```bash
|
51
|
+
inqlude release_kde_frameworks <release_date> <version>
|
52
|
+
```
|
53
|
+
|
54
|
+
## License
|
55
|
+
|
25
56
|
Inqlude is licensed under the GPL.
|
26
57
|
|
58
|
+
## Contact
|
59
|
+
|
27
60
|
If you have questions or comments, please contact Cornelius Schumacher
|
28
|
-
<schumacher@kde.org
|
61
|
+
<schumacher@kde.org> or write to the
|
62
|
+
[Inqlude mailing list](mailto:inqlude@kde.org).
|
data/TODO
CHANGED
@@ -1,37 +1,64 @@
|
|
1
|
-
# Alpha (first announcement, ready for early adopters)
|
1
|
+
# 0.7 (Alpha) (first announcement, ready for early adopters)
|
2
2
|
|
3
|
-
*
|
3
|
+
* Release it
|
4
4
|
|
5
|
-
# Beta (ready for contributors of meta data)
|
6
5
|
|
7
|
-
|
6
|
+
# 0.8 (Alpha) (second announcement, ready for contributors)
|
7
|
+
|
8
|
+
* Create ROADMAP.md
|
9
|
+
* Define milestones on GitHub and reference issues
|
10
|
+
* Move all issues from this file to GitHub
|
11
|
+
* Add Upstream.get_involved for all issues where possible
|
12
|
+
|
13
|
+
* Release it
|
14
|
+
|
15
|
+
|
16
|
+
# 0.9 (Beta) (ready for contributors of meta data, schema stable)
|
17
|
+
|
18
|
+
* Replace manifest hash by Manifest object
|
19
|
+
|
20
|
+
* Add display name High Priority #12
|
21
|
+
* Check platform attribute for valid entries High Priority #18
|
22
|
+
* Check maturity for valid values High Priority #16
|
23
|
+
* Link to license text Medium Priority #14
|
24
|
+
* Add a comment field for authors Medium Priority #15
|
25
|
+
* Add attribute for screenshots Medium Priority #10
|
26
|
+
* Add bugtracker URL Low Priority #7
|
27
|
+
|
8
28
|
* Define maturity scale
|
9
29
|
* State policy for inclusion of libraries (at least one stable release, no qt3,
|
10
30
|
open source, provides a Qt API, published API docs)
|
11
31
|
* Handle binding consistently (suffix -qt, common description, maybe special
|
12
32
|
tags in meta data for bound library)
|
13
33
|
|
14
|
-
*
|
15
|
-
*
|
16
|
-
* Add
|
34
|
+
* Show Qt5 compability High Priority #20
|
35
|
+
* Check links Medium Priority #11
|
36
|
+
* Add command for showing library details High Priority #1
|
17
37
|
|
18
|
-
*
|
19
|
-
|
20
|
-
*
|
38
|
+
* Turn alpha ribbon into beta ribbon on web site
|
39
|
+
|
40
|
+
* Release it
|
21
41
|
|
22
|
-
* Add download section on library page with source code download and links to
|
23
|
-
packages e.g. openSUSE 1-click install
|
24
|
-
* Show release date on library page
|
25
|
-
* Add page with older versions of each library
|
26
42
|
|
27
43
|
# 1.0 (ready for end users of the web site)
|
28
44
|
|
45
|
+
* Show latest releases on web page Medium Priority #22
|
46
|
+
* Make layout responsive Medium Priority Web site #6
|
47
|
+
* Align summaries on development page vertically Low Priority Web site #19
|
48
|
+
|
29
49
|
* Add "How to use" data
|
30
50
|
* Add tags for searching
|
51
|
+
|
31
52
|
* Update manifest data to have complete package data
|
32
53
|
* Check existence of packages
|
54
|
+
* Link to Open Build Service Low Priority #9
|
55
|
+
|
56
|
+
* Remove beta ribbon on web site
|
57
|
+
|
58
|
+
* Release it
|
59
|
+
|
33
60
|
|
34
|
-
#
|
61
|
+
# 2.0 (ready for end users of the command line tool)
|
35
62
|
|
36
63
|
* Smarter match for source RPMs, which contain more than one library
|
37
64
|
* Retrieve data from qt-apps and kde-apps
|
@@ -40,3 +67,11 @@
|
|
40
67
|
* Get manifests from build service
|
41
68
|
* List libraries with available packages
|
42
69
|
* Properly identify repository (use vendor?)
|
70
|
+
|
71
|
+
* Release it
|
72
|
+
|
73
|
+
|
74
|
+
# Later
|
75
|
+
|
76
|
+
* Create more friendly progress display for cache creation Low Priority #3
|
77
|
+
* Add some quality indication Low Priority #17
|
data/inqlude.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ['Cornelius Schumacher']
|
10
10
|
s.email = ['schumacher@kde.org']
|
11
|
-
s.homepage = "
|
11
|
+
s.homepage = "http://inqlude.org"
|
12
12
|
s.summary = "Command line tool for handling Qt based libraries"
|
13
13
|
s.description = "Inqlude is the command line interface for accessing the independent Qt library archive."
|
14
14
|
|
@@ -18,8 +18,13 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.add_dependency "thor", ">=0.14.0"
|
19
19
|
s.add_dependency "json", ">=1.5.1"
|
20
20
|
s.add_dependency "haml", ">=3.1.1"
|
21
|
+
s.add_dependency "json-schema", ">= 2.1.3"
|
22
|
+
s.add_dependency "kramdown"
|
23
|
+
s.add_dependency "xdg"
|
24
|
+
|
25
|
+
s.add_development_dependency "rspec", "~>3"
|
26
|
+
s.add_development_dependency "given_filesystem"
|
21
27
|
|
22
|
-
s.add_development_dependency "test-unit", "1.2.3"
|
23
28
|
s.files = `git ls-files`.split("\n")
|
24
29
|
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
|
25
30
|
s.require_path = 'lib'
|
data/lib/cli.rb
CHANGED
@@ -98,11 +98,18 @@ actual domain."
|
|
98
98
|
end
|
99
99
|
|
100
100
|
desc "verify [filename]", "Verify all manifests or specific file if filename is given"
|
101
|
+
method_option :check_links, :type => :boolean,
|
102
|
+
:desc => "Check links for reachability."
|
101
103
|
def verify filename=nil
|
102
104
|
process_global_options options
|
103
105
|
|
104
106
|
v = Verifier.new @@settings
|
105
107
|
|
108
|
+
if options[:check_links]
|
109
|
+
Upstream.get_involved "Implement --check-links option", 11
|
110
|
+
exit 1
|
111
|
+
end
|
112
|
+
|
106
113
|
if filename
|
107
114
|
result = v.verify_file filename
|
108
115
|
result.print_result
|
@@ -127,6 +134,18 @@ actual domain."
|
|
127
134
|
end
|
128
135
|
end
|
129
136
|
|
137
|
+
desc "review <repo>", "Review pull requests on GitHub. Use 'username:branch' as repo parameter."
|
138
|
+
def review repo, action = nil
|
139
|
+
if !action
|
140
|
+
GitHubTool.review repo
|
141
|
+
elsif action == "accept"
|
142
|
+
GitHubTool.accept repo
|
143
|
+
else
|
144
|
+
STDERR.puts "Unknown review action: '#{action}'"
|
145
|
+
exit 1
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
130
149
|
desc "system_scan", "Scan system for installed Qt libraries and create manifests"
|
131
150
|
method_option :dry_run, :type => :boolean,
|
132
151
|
:desc => "Dry run. Don't write files."
|
@@ -149,24 +168,69 @@ actual domain."
|
|
149
168
|
m.process_all_rpms
|
150
169
|
end
|
151
170
|
|
152
|
-
desc "create <manifest_name>
|
171
|
+
desc "create <manifest_name> [version] [release_date]", "Create new or updated manifest"
|
153
172
|
method_option :kf5, :type => :boolean,
|
154
173
|
:desc => "Create KDE Framworks 5 template", :required => false
|
155
|
-
def create name, version, release_date
|
174
|
+
def create name, version=nil, release_date=nil
|
156
175
|
@@settings.manifest_path = "."
|
157
176
|
creator = Creator.new @@settings, name
|
158
177
|
if creator.is_new?
|
178
|
+
if !version && release_date || version && !release_date
|
179
|
+
STDERR.puts "You need to specify both, version and release date"
|
180
|
+
exit 1
|
181
|
+
end
|
182
|
+
if version && release_date
|
183
|
+
if options[:kf5]
|
184
|
+
creator.create_kf5 version, release_date
|
185
|
+
else
|
186
|
+
creator.create version, release_date
|
187
|
+
end
|
188
|
+
else
|
189
|
+
creator.create_generic
|
190
|
+
end
|
191
|
+
else
|
192
|
+
if !version || !release_date
|
193
|
+
STDERR.puts "Updating manifest requires version and release_date"
|
194
|
+
exit 1
|
195
|
+
end
|
159
196
|
creator.validate_directory
|
160
197
|
creator.update version, release_date
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
desc "create_kde_frameworks <frameworks-git-checkout> <output_dir>",
|
202
|
+
"Create manifests from git checkout of KDE frameworks module in given directory"
|
203
|
+
method_option "show-warnings", :type => :boolean,
|
204
|
+
:desc => "Show warnings about missing data", :required => false
|
205
|
+
method_option "ignore-errors-homepage", :type => :boolean,
|
206
|
+
:desc => "Ignore errors about missing home page", :required => false
|
207
|
+
def create_kde_frameworks checkout_dir, output_dir
|
208
|
+
k = KdeFrameworksCreator.new
|
209
|
+
if options["ignore-errors-homepage"]
|
210
|
+
k.parse_checkout checkout_dir, :ignore_errors => [ "link_home_page" ]
|
161
211
|
else
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
212
|
+
k.parse_checkout checkout_dir
|
213
|
+
end
|
214
|
+
k.create_manifests output_dir
|
215
|
+
k.errors.each do |error|
|
216
|
+
puts "#{error[:name]}: #{error[:issue]}"
|
217
|
+
end
|
218
|
+
if options["show-warnings"]
|
219
|
+
k.warnings.each do |warning|
|
220
|
+
puts "#{warning[:name]}: #{warning[:issue]} (#{warning[:details]})"
|
166
221
|
end
|
167
222
|
end
|
168
223
|
end
|
169
224
|
|
225
|
+
desc "release_kde_frameworks <release_date> <version>",
|
226
|
+
"Create release manifests for KDE frameworks release"
|
227
|
+
def release_kde_frameworks release_date, version
|
228
|
+
handler = ManifestHandler.new @@settings
|
229
|
+
k = KdeFrameworksRelease.new handler
|
230
|
+
k.read_generic_manifests
|
231
|
+
k.write_release_manifests release_date, version
|
232
|
+
end
|
233
|
+
|
170
234
|
desc "get_involved", "Information about how to get involved"
|
171
235
|
def get_involved
|
172
236
|
Upstream.print_info
|
data/lib/creator.rb
CHANGED
@@ -24,7 +24,7 @@ class Creator
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def is_new?
|
27
|
-
return File.exists? @dir
|
27
|
+
return !File.exists?( @dir )
|
28
28
|
end
|
29
29
|
|
30
30
|
def validate_directory
|
@@ -47,22 +47,22 @@ class Creator
|
|
47
47
|
m["release_date"] = release_date
|
48
48
|
|
49
49
|
File.open( filename, "w" ) do |file|
|
50
|
-
file.puts
|
50
|
+
file.puts Manifest.to_json(m)
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
54
|
def create_dir
|
55
|
-
|
55
|
+
FileUtils.mkdir_p File.join(@settings.manifest_path,@name)
|
56
56
|
end
|
57
57
|
|
58
58
|
def create_manifest version, release_date
|
59
59
|
m = Hash.new
|
60
|
-
m["
|
60
|
+
m["$schema"] = Manifest.release_schema_id
|
61
61
|
m["name"] = @name
|
62
62
|
m["version"] = version
|
63
63
|
m["release_date"] = release_date
|
64
64
|
m["summary"] = ""
|
65
|
-
m["urls"] = { "homepage" => "", "vcs" => "" }
|
65
|
+
m["urls"] = { "homepage" => "", "vcs" => "", "download" => "" }
|
66
66
|
m["licenses"] = [ "" ]
|
67
67
|
m["description"] = ""
|
68
68
|
if version == "edge"
|
@@ -70,20 +70,44 @@ class Creator
|
|
70
70
|
else
|
71
71
|
m["maturity"] = "stable"
|
72
72
|
end
|
73
|
+
m["authors"] = [ "" ]
|
73
74
|
m["platforms"] = [ "Linux" ]
|
74
75
|
m["packages"] = { "source" => "" }
|
75
76
|
m
|
76
77
|
end
|
77
78
|
|
78
79
|
def write_manifest manifest
|
79
|
-
filename = File.join @settings.manifest_path, @name,
|
80
|
-
|
80
|
+
filename = File.join @settings.manifest_path, @name, @name
|
81
|
+
if manifest["release_date"]
|
82
|
+
filename += ".#{manifest["release_date"]}"
|
83
|
+
end
|
84
|
+
filename += ".manifest"
|
81
85
|
|
82
86
|
File.open( filename, "w" ) do |file|
|
83
|
-
file.puts
|
87
|
+
file.puts Manifest.to_json(manifest)
|
84
88
|
end
|
85
89
|
end
|
86
90
|
|
91
|
+
def create_generic_manifest
|
92
|
+
m = Hash.new
|
93
|
+
m["$schema"] = Manifest.generic_schema_id
|
94
|
+
m["name"] = @name
|
95
|
+
m["display_name"] = @name.capitalize
|
96
|
+
m["summary"] = ""
|
97
|
+
m["urls"] = { "homepage" => "", "vcs" => "" }
|
98
|
+
m["licenses"] = [ "" ]
|
99
|
+
m["description"] = ""
|
100
|
+
m["authors"] = [ "" ]
|
101
|
+
m["platforms"] = [ "Linux" ]
|
102
|
+
m
|
103
|
+
end
|
104
|
+
|
105
|
+
def create_generic
|
106
|
+
create_dir
|
107
|
+
m = create_generic_manifest
|
108
|
+
write_manifest m
|
109
|
+
end
|
110
|
+
|
87
111
|
def create version, release_date
|
88
112
|
create_dir
|
89
113
|
m = create_manifest version, release_date
|
data/lib/git_hub_tool.rb
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
# Copyright (C) 2013 Cornelius Schumacher <schumacher@kde.org>
|
2
|
+
#
|
3
|
+
# This program is free software; you can redistribute it and/or modify
|
4
|
+
# it under the terms of the GNU General Public License as published by
|
5
|
+
# the Free Software Foundation; either version 2 of the License, or
|
6
|
+
# (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
# GNU General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU General Public License along
|
14
|
+
# with this program; if not, write to the Free Software Foundation, Inc.,
|
15
|
+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
16
|
+
|
17
|
+
class GitHubTool
|
18
|
+
|
19
|
+
def self.review repo
|
20
|
+
puts "Reviewing repo '#{repo}'"
|
21
|
+
|
22
|
+
check_directory
|
23
|
+
if `git status` !~ /^# On branch master/
|
24
|
+
STDERR.puts "You need to be on the master branch"
|
25
|
+
exit 1
|
26
|
+
end
|
27
|
+
|
28
|
+
user,branch = parse_repo repo
|
29
|
+
|
30
|
+
run "git checkout -b #{user}-#{branch} master"
|
31
|
+
begin
|
32
|
+
run "git pull git@github.com:#{user}/inqlude-data.git #{branch}"
|
33
|
+
rescue
|
34
|
+
run "git checkout master"
|
35
|
+
run "git branch -d #{user}-#{branch}"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.accept repo
|
40
|
+
check_directory
|
41
|
+
|
42
|
+
user,branch = parse_repo repo
|
43
|
+
|
44
|
+
branchname = "#{user}-#{branch}"
|
45
|
+
|
46
|
+
if `git status` !~ /^# On branch #{branchname}/
|
47
|
+
STDERR.puts "You need to be on the #{branchname} branch"
|
48
|
+
exit 1
|
49
|
+
end
|
50
|
+
|
51
|
+
run "git checkout master"
|
52
|
+
run "git merge #{branchname}"
|
53
|
+
run "git push origin master"
|
54
|
+
run "git branch -d #{branchname}"
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.check_directory
|
58
|
+
current_dir = File.basename Dir.pwd
|
59
|
+
if current_dir != "inqlude-data"
|
60
|
+
STDERR.puts "inqlude review needs to be run in the inqlude-data directory"
|
61
|
+
exit 1
|
62
|
+
end
|
63
|
+
if !File.exists? ".git"
|
64
|
+
STDERR.puts "inqlude-data directory needs to be a git checkout"
|
65
|
+
exit 1
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.parse_repo repo
|
70
|
+
user = repo.split(":")[0]
|
71
|
+
branch = repo.split(":")[1]
|
72
|
+
|
73
|
+
if !user
|
74
|
+
STDERR.puts "Unable to extract user from repo parameter"
|
75
|
+
exit 1
|
76
|
+
end
|
77
|
+
if !branch
|
78
|
+
STDERR.puts "Unable to extract branch from repo parameter"
|
79
|
+
exit 1
|
80
|
+
end
|
81
|
+
|
82
|
+
return user,branch
|
83
|
+
end
|
84
|
+
|
85
|
+
def self.run cmd
|
86
|
+
puts "Running: #{cmd}"
|
87
|
+
if !system cmd
|
88
|
+
raise "Command failed"
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
end
|