inqlude 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/.travis.yml +7 -3
- data/CHANGELOG.md +9 -0
- data/Gemfile +4 -0
- data/README.md +4 -0
- data/lib/cli.rb +24 -26
- data/lib/cli_controller.rb +24 -0
- data/lib/inqlude.rb +1 -0
- data/lib/kde_frameworks_release.rb +6 -1
- data/lib/manifest_handler.rb +44 -1
- data/lib/verifier.rb +4 -0
- data/lib/version.rb +1 -1
- data/lib/view.rb +62 -15
- data/manifest-format.md +30 -5
- data/spec/data/inqlude-all.json +11 -2
- data/spec/data/manifests/awesomelib/awesomelib.2013-09-08.manifest +4 -2
- data/spec/data/manifests/bleedingedge/bleedingedge.2012-01-01.manifest +3 -0
- data/spec/data/manifests/commercial/commercial.manifest +3 -0
- data/spec/data/manifests/newlib/newlib.manifest +1 -0
- data/spec/data/missing-topics/miss-topics/miss-topics.manifest +2 -1
- data/spec/integration/cli_verify_spec.rb +2 -0
- data/spec/integration/cli_view_spec.rb +102 -0
- data/spec/integration/spec_helper.rb +3 -0
- data/spec/online/cli_view_spec.rb +64 -0
- data/spec/online/spec_helper.rb +5 -0
- data/spec/stubs/qmake/qmake +2 -0
- data/spec/unit/cli_controller_spec.rb +51 -0
- data/spec/unit/kde_frameworks_release_spec.rb +36 -23
- data/spec/unit/manifest_handler_spec.rb +15 -1
- data/spec/unit/manifest_spec.rb +1 -1
- data/spec/unit/spec_helper.rb +10 -0
- data/spec/unit/view_spec.rb +68 -0
- data/topics/Manifest_updater/README.md +19 -0
- data/topics/Manifest_updater/app.js +43 -0
- data/topics/Manifest_updater/manifests/example/example.manifest +20 -0
- data/topics/Manifest_updater/package.json +9 -0
- data/topics/Manifest_updater/topics.csv +1 -0
- data/topics/Manifest_updater/update_manifests/example/example.manifest +24 -0
- data/topics/topics.csv +3 -0
- data/view/{about.html.haml → one-column/about.html.haml} +0 -0
- data/view/{all.html.haml → one-column/all.html.haml} +0 -0
- data/view/{commercial.html.haml → one-column/commercial.html.haml} +0 -0
- data/view/{contribute.html.haml → one-column/contribute.html.haml} +0 -0
- data/view/{development.html.haml → one-column/development.html.haml} +0 -0
- data/view/{favicon.ico → one-column/favicon.ico} +0 -0
- data/view/{get.html.haml → one-column/get.html.haml} +0 -0
- data/view/{group.html.haml → one-column/group.html.haml} +0 -0
- data/view/{index.html.haml → one-column/index.html.haml} +0 -0
- data/view/{layout.html.haml → one-column/layout.html.haml} +0 -0
- data/view/{library.html.haml → one-column/library.html.haml} +1 -1
- data/view/{public → one-column/public}/inqlude.css +0 -0
- data/view/{search.html.haml → one-column/search.html.haml} +0 -0
- data/view/{unreleased.html.haml → one-column/unreleased.html.haml} +0 -0
- data/view/two-column/about.html.haml +34 -0
- data/view/two-column/all.html.haml +47 -0
- data/view/two-column/contribute.html.haml +49 -0
- data/view/two-column/favicon.ico +0 -0
- data/view/two-column/get.html.haml +57 -0
- data/view/two-column/group.html.haml +52 -0
- data/view/two-column/index.html.haml +194 -0
- data/view/two-column/ios.ico +0 -0
- data/view/two-column/layout.html.haml +102 -0
- data/view/two-column/library.html.haml +64 -0
- data/view/two-column/public/inqlude.css +265 -0
- data/view/two-column/search.html.haml +20 -0
- data/view/two-column/topic.html.haml +47 -0
- metadata +41 -16
@@ -1,9 +1,7 @@
|
|
1
1
|
require File.expand_path('../spec_helper', __FILE__)
|
2
2
|
|
3
3
|
describe KdeFrameworksRelease do
|
4
|
-
|
5
4
|
include GivenFilesystemSpecHelpers
|
6
|
-
|
7
5
|
use_given_filesystem
|
8
6
|
|
9
7
|
context "given KDE generic manifests" do
|
@@ -28,49 +26,64 @@ describe KdeFrameworksRelease do
|
|
28
26
|
|
29
27
|
it "reads generic manifests" do
|
30
28
|
k = KdeFrameworksRelease.new @manifest_handler
|
31
|
-
k.read_generic_manifests
|
32
29
|
|
33
|
-
|
34
|
-
|
35
|
-
|
30
|
+
expected_output = <<EOT
|
31
|
+
Reading generic manifests from '#{@manifest_dir}'...
|
32
|
+
Read 2 manifests.
|
33
|
+
EOT
|
34
|
+
|
35
|
+
expect {
|
36
|
+
k.read_generic_manifests
|
37
|
+
}.to output(expected_output).to_stdout
|
38
|
+
|
39
|
+
expect(k.generic_manifests.count).to eq 2
|
40
|
+
expect(k.generic_manifests[0].name).to eq "karchive"
|
41
|
+
expect(k.generic_manifests[1].name).to eq "kservice"
|
36
42
|
end
|
37
43
|
|
38
44
|
it "writes release manifests" do
|
39
45
|
k = KdeFrameworksRelease.new @manifest_handler
|
40
|
-
|
46
|
+
expect {
|
47
|
+
k.read_generic_manifests
|
48
|
+
}.to output.to_stdout
|
49
|
+
|
50
|
+
expected_output = <<EOT
|
51
|
+
Writing release manifests for version '4.9.90'...
|
52
|
+
#{@manifest_dir}/karchive/karchive.2014-02-01.manifest
|
53
|
+
#{@manifest_dir}/kservice/kservice.2014-02-01.manifest
|
54
|
+
Written 2 manifests.
|
55
|
+
EOT
|
41
56
|
|
42
|
-
|
57
|
+
expect {
|
58
|
+
k.write_release_manifests("2014-02-01", "4.9.90")
|
59
|
+
}.to output(expected_output).to_stdout
|
43
60
|
|
44
|
-
manifest_path = File.join(
|
45
|
-
|
46
|
-
expect( File.exists? manifest_path ).to be true
|
61
|
+
manifest_path = File.join(@manifest_dir,"karchive/karchive.2014-02-01.manifest")
|
62
|
+
expect(File.exists? manifest_path).to be true
|
47
63
|
|
48
|
-
manifest_path = File.join(
|
49
|
-
|
50
|
-
expect( File.exists? manifest_path ).to be true
|
64
|
+
manifest_path = File.join(@manifest_dir,"kservice/kservice.2014-02-01.manifest")
|
65
|
+
expect(File.exists? manifest_path).to be true
|
51
66
|
|
52
|
-
manifest = Manifest.parse_file(
|
67
|
+
manifest = Manifest.parse_file(manifest_path)
|
53
68
|
expect(manifest.class).to be ManifestRelease
|
54
|
-
expect(
|
55
|
-
expect(
|
56
|
-
expect(
|
69
|
+
expect(manifest.name).to eq "kservice"
|
70
|
+
expect(manifest.version).to eq "4.9.90"
|
71
|
+
expect(manifest.release_date).to eq "2014-02-01"
|
57
72
|
end
|
58
73
|
end
|
59
74
|
|
60
75
|
it "creates release manifest from generic manifest" do
|
61
|
-
generic_manifest = Manifest.parse_file(
|
62
|
-
given_file("karchive-generic.manifest") )
|
76
|
+
generic_manifest = Manifest.parse_file(given_file("karchive-generic.manifest"))
|
63
77
|
date = "2014-11-06"
|
64
78
|
version = "5.4.0"
|
65
79
|
release_manifest = KdeFrameworksRelease.create_release_manifest(
|
66
80
|
generic_manifest, date, version)
|
67
|
-
expected_json = File.read(
|
81
|
+
expected_json = File.read(given_file("karchive-release-5.4.manifest"))
|
68
82
|
expected_json.chomp! # Remove newline added by File.read
|
69
|
-
expect(
|
83
|
+
expect(release_manifest.to_json).to eq expected_json
|
70
84
|
end
|
71
85
|
|
72
86
|
it "strips patch release" do
|
73
87
|
expect(KdeFrameworksRelease.strip_patch_release("5.4.0")).to eq "5.4"
|
74
88
|
end
|
75
|
-
|
76
89
|
end
|
@@ -87,6 +87,12 @@ describe ManifestHandler do
|
|
87
87
|
expect( libraries[1].manifests.last.name ).to eq "commercial"
|
88
88
|
end
|
89
89
|
|
90
|
+
it "returns latest libraries" do
|
91
|
+
libraries = mh.latest_libraries
|
92
|
+
expect(libraries.first.manifests.last.name).to eq "proprietarylib"
|
93
|
+
expect(libraries).not_to include "newlib"
|
94
|
+
end
|
95
|
+
|
90
96
|
end
|
91
97
|
|
92
98
|
describe "#group" do
|
@@ -97,6 +103,14 @@ describe ManifestHandler do
|
|
97
103
|
end
|
98
104
|
end
|
99
105
|
|
106
|
+
describe "#topic" do
|
107
|
+
it "returns all libraries of a topic" do
|
108
|
+
libraries = mh.topic("API")
|
109
|
+
expect( libraries.count ).to eq 2
|
110
|
+
expect( libraries.first.manifests.last.name ).to eq "awesomelib"
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
100
114
|
describe "#library" do
|
101
115
|
|
102
116
|
it "returns one library" do
|
@@ -145,7 +159,7 @@ describe ManifestHandler do
|
|
145
159
|
end
|
146
160
|
|
147
161
|
it "generates inqlude-all.json" do
|
148
|
-
expected_json = File.read(test_data_path("inqlude-all.json"))
|
162
|
+
expected_json = File.read(test_data_path("inqlude-all.json")).chomp
|
149
163
|
expect(mh.generate_inqlude_all).to eq expected_json
|
150
164
|
end
|
151
165
|
end
|
data/spec/unit/manifest_spec.rb
CHANGED
@@ -68,7 +68,7 @@ describe Manifest do
|
|
68
68
|
it "writes JSON for release manifest" do
|
69
69
|
filename = File.join settings.manifest_path, awesomelib_manifest_file
|
70
70
|
manifest = Manifest.parse_file filename
|
71
|
-
expect( manifest.to_json ).to eq File.read( filename )
|
71
|
+
expect( manifest.to_json ).to eq File.read( filename ).chomp
|
72
72
|
end
|
73
73
|
|
74
74
|
it "writes JSON for generic manifest" do
|
data/spec/unit/spec_helper.rb
CHANGED
@@ -1,11 +1,21 @@
|
|
1
|
+
require "codeclimate-test-reporter"
|
2
|
+
CodeClimate::TestReporter.start
|
3
|
+
|
1
4
|
require 'given_filesystem/spec_helpers'
|
2
5
|
|
3
6
|
require_relative "../../lib/inqlude"
|
4
7
|
|
8
|
+
require "nokogiri"
|
9
|
+
require "open-uri"
|
10
|
+
|
5
11
|
def test_data_path file_name
|
6
12
|
File.expand_path(File.join('../../data/', file_name), __FILE__)
|
7
13
|
end
|
8
14
|
|
15
|
+
def stubs_path(context)
|
16
|
+
File.expand_path(File.join('../../stubs/', context), __FILE__)
|
17
|
+
end
|
18
|
+
|
9
19
|
def create_manifest name, release_date, version
|
10
20
|
m = ManifestRelease.new
|
11
21
|
m.name = name
|
data/spec/unit/view_spec.rb
CHANGED
@@ -44,6 +44,15 @@ describe View do
|
|
44
44
|
expect(v.commercial_libraries.count).to eq mh.commercial_libraries.count
|
45
45
|
expect(v.commercial_libraries.first.name).to eq mh.commercial_libraries.first.name
|
46
46
|
end
|
47
|
+
|
48
|
+
it "returns list of latest libraries" do
|
49
|
+
mh = ManifestHandler.new settings
|
50
|
+
mh.read_remote
|
51
|
+
v = View.new mh
|
52
|
+
|
53
|
+
expect(v.latest_libraries.count).to eq mh.latest_libraries.count
|
54
|
+
expect(v.latest_libraries.first.name).to eq mh.latest_libraries.first.name
|
55
|
+
end
|
47
56
|
|
48
57
|
it "returns group" do
|
49
58
|
mh = ManifestHandler.new settings
|
@@ -54,6 +63,15 @@ describe View do
|
|
54
63
|
expect(v.group.count).to eq mh.group("kde-frameworks").count
|
55
64
|
expect(v.group.first.name).to eq mh.group("kde-frameworks").first.name
|
56
65
|
end
|
66
|
+
|
67
|
+
it "returns topic" do
|
68
|
+
mh = ManifestHandler.new settings
|
69
|
+
mh.read_remote
|
70
|
+
v = View.new mh
|
71
|
+
|
72
|
+
expect(v.topic("API").count).to eq 2
|
73
|
+
expect(v.topic("API").first.name).to eq 'awesomelib'
|
74
|
+
end
|
57
75
|
end
|
58
76
|
|
59
77
|
context "generic manifest and one release" do
|
@@ -173,4 +191,54 @@ EOT
|
|
173
191
|
end
|
174
192
|
end
|
175
193
|
|
194
|
+
context "templates" do
|
195
|
+
include_context "manifest_files"
|
196
|
+
|
197
|
+
include GivenFilesystemSpecHelpers
|
198
|
+
|
199
|
+
use_given_filesystem
|
200
|
+
|
201
|
+
before(:each) do
|
202
|
+
mh = ManifestHandler.new(settings)
|
203
|
+
mh.read_remote
|
204
|
+
|
205
|
+
v = View.new mh
|
206
|
+
v.templates = "one-column"
|
207
|
+
|
208
|
+
dir = given_directory
|
209
|
+
|
210
|
+
v.create(dir)
|
211
|
+
@path = File.join(dir, "index.html")
|
212
|
+
end
|
213
|
+
|
214
|
+
it "generates templates" do
|
215
|
+
expect(File.exists?(@path)).to be true
|
216
|
+
end
|
217
|
+
|
218
|
+
it "checks content" do
|
219
|
+
html_data = File.read(@path)
|
220
|
+
|
221
|
+
nokogiri_object = Nokogiri::HTML(html_data)
|
222
|
+
paragraphs_content = nokogiri_object.xpath("//p").to_s
|
223
|
+
|
224
|
+
expected_content =
|
225
|
+
'<p>
|
226
|
+
The goal of Inqlude is to provide a comprehensive listing of all
|
227
|
+
existing libraries for developers of Qt applications. If you are creating
|
228
|
+
applications using the <a href="http://qt-project.org">Qt toolkit</a>, and
|
229
|
+
are looking for libraries, components
|
230
|
+
or modules to use, Inqlude is the place where you find all information and
|
231
|
+
pointers to get started.
|
232
|
+
</p><p>
|
233
|
+
This is a young project, we are still collecting information, and are
|
234
|
+
building up the web site and the tools around it. If you would like to get
|
235
|
+
involved, read more about <a href="contribute.html">how to contribute</a>, or go
|
236
|
+
to the mailing list
|
237
|
+
<a href="https://mail.kde.org/mailman/listinfo/inqlude">inqlude.kde.org</a>
|
238
|
+
to directly talk to us. See you there.
|
239
|
+
</p>'
|
240
|
+
|
241
|
+
expect(paragraphs_content).to eq(expected_content)
|
242
|
+
end
|
243
|
+
end
|
176
244
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
**This directory contains a node.js program to update the manifests with topics from
|
2
|
+
the file `topics.csv`.**
|
3
|
+
|
4
|
+
Follow the instructions given below to run the program.
|
5
|
+
|
6
|
+
* Install node.js and npm.
|
7
|
+
* Copy the library folders that contain the manifest files required to be updated
|
8
|
+
and paste them at `manifests` directory and `update_manifests` directory.
|
9
|
+
* Run `npm install` from this directory.
|
10
|
+
* Then run `node app.js` from this directory.
|
11
|
+
* You will find the updated manifests at `update_manifests` directory.
|
12
|
+
|
13
|
+
|
14
|
+
**Note:**
|
15
|
+
* You should have the `topics.csv` file in the same directory that contains `app.js`.
|
16
|
+
* Having the manifest files at `manifests` directory is adequate, but make sure that
|
17
|
+
you have the same library folder structure at both `manifests` directory and
|
18
|
+
`update_manifests` directory.
|
19
|
+
* Also make sure that you have the details for the required update activity at `topics.csv`.
|
@@ -0,0 +1,43 @@
|
|
1
|
+
var fs = require('fs');
|
2
|
+
var recursive = require('recursive-readdir');
|
3
|
+
|
4
|
+
var parse = require('csv-parse');
|
5
|
+
var csvAr;
|
6
|
+
|
7
|
+
var parser = parse({delimiter: ','}, function(err, data){
|
8
|
+
csvAr = data;
|
9
|
+
});
|
10
|
+
|
11
|
+
fs.createReadStream(__dirname+'/topics.csv').pipe(parser);
|
12
|
+
|
13
|
+
recursive('manifests', function (err, files) {
|
14
|
+
for (var i = files.length - 1; i >= 0; i--) {
|
15
|
+
var fi = files[i];
|
16
|
+
var data = fs.readFileSync(fi, 'utf8');
|
17
|
+
var manifest = JSON.parse(data);
|
18
|
+
var name = manifest.name;
|
19
|
+
var sel = csvAr.filter(function(d) {
|
20
|
+
return d[0] == name;
|
21
|
+
})[0];
|
22
|
+
|
23
|
+
if(!sel){
|
24
|
+
console.log(fi);
|
25
|
+
}
|
26
|
+
var sel1 = sel;
|
27
|
+
|
28
|
+
sel1 = sel.slice(1);
|
29
|
+
for (var j = 0; j < sel1.length ; j++) {
|
30
|
+
if(sel1[j] === ''){
|
31
|
+
sel1 = sel1.slice(0,j);
|
32
|
+
break;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
manifest.topics = sel1;
|
37
|
+
var data1 = JSON.stringify(manifest, null, 2) + '\n';
|
38
|
+
|
39
|
+
var fi2 = 'update_'+ fi;
|
40
|
+
fs.writeFileSync(fi2, data1);
|
41
|
+
}
|
42
|
+
});
|
43
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://inqlude.org/schema/generic-manifest-v1#",
|
3
|
+
"name": "example",
|
4
|
+
"summary": "An example library",
|
5
|
+
"urls": {
|
6
|
+
"homepage": "http://example.org",
|
7
|
+
"download": "http://example.org/download"
|
8
|
+
},
|
9
|
+
"licenses": [
|
10
|
+
"GPLv3"
|
11
|
+
],
|
12
|
+
"description": "This is an example library",
|
13
|
+
"authors": [
|
14
|
+
"Nanduni Nimalsiri <nandunibw@gmail.com>"
|
15
|
+
],
|
16
|
+
"platforms": [
|
17
|
+
"Linux",
|
18
|
+
"Windows"
|
19
|
+
]
|
20
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
example,API,QML,
|
@@ -0,0 +1,24 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://inqlude.org/schema/generic-manifest-v1#",
|
3
|
+
"name": "example",
|
4
|
+
"summary": "An example library",
|
5
|
+
"urls": {
|
6
|
+
"homepage": "http://example.org",
|
7
|
+
"download": "http://example.org/download"
|
8
|
+
},
|
9
|
+
"licenses": [
|
10
|
+
"GPLv3"
|
11
|
+
],
|
12
|
+
"description": "This is an example library",
|
13
|
+
"authors": [
|
14
|
+
"Nanduni Nimalsiri <nandunibw@gmail.com>"
|
15
|
+
],
|
16
|
+
"platforms": [
|
17
|
+
"Linux",
|
18
|
+
"Windows"
|
19
|
+
],
|
20
|
+
"topics": [
|
21
|
+
"API",
|
22
|
+
"QML"
|
23
|
+
]
|
24
|
+
}
|
data/topics/topics.csv
CHANGED
@@ -100,6 +100,7 @@ libqtlua,Scripting,,
|
|
100
100
|
libqxt,Development,Widgets,
|
101
101
|
libsystemd-qt,Bindings,,
|
102
102
|
libtmdbqt,API,Data,
|
103
|
+
limereport,Printing,,
|
103
104
|
log4qt,Development,Logging,
|
104
105
|
log4qt-fork,Development,Logging,
|
105
106
|
lxqt_wallet,Security,,
|
@@ -168,9 +169,11 @@ qtoptimization,Development,,
|
|
168
169
|
qtorm,Web,Data,
|
169
170
|
qtrest,Communication,API,
|
170
171
|
qtrpt,Printing,,
|
172
|
+
qtsharp,Development,,
|
171
173
|
qtspeech,Bindings,Multimedia,
|
172
174
|
qtuio,Mobile,,
|
173
175
|
qtuiotouch,Mobile,,
|
176
|
+
qtunits,Data,,
|
174
177
|
qtvkontakte,Mobile,,
|
175
178
|
qtwebapp,Web,,
|
176
179
|
qtwebkit,Web,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,34 @@
|
|
1
|
+
%home
|
2
|
+
= link_to "Home", "index"
|
3
|
+
|
4
|
+
%h3 About Inqlude
|
5
|
+
|
6
|
+
%p
|
7
|
+
The goal of Inqlude is to provide a comprehensive listing of all
|
8
|
+
existing libraries for developers of Qt applications. If you are creating
|
9
|
+
applications using the Qt toolkit, and are looking for libraries, components
|
10
|
+
or modules to use, Inqlude is the place where you find all information and
|
11
|
+
pointers to get started.
|
12
|
+
%p
|
13
|
+
Inqlude comes with a command line client for handling libraries. See the
|
14
|
+
= link_to "instructions how to get libraries", "get"
|
15
|
+
for more details.
|
16
|
+
%p
|
17
|
+
Inqlude aims to be a complete archive of all available Qt based
|
18
|
+
libraries. If you notice that there is some information missing, outdated
|
19
|
+
or inaccurate, please consider contributing the missing data. See the
|
20
|
+
= link_to "instructions how to contribute", "contribute"
|
21
|
+
for more details.
|
22
|
+
%p
|
23
|
+
%em
|
24
|
+
Note that Inqlude is currently in alpha state. It's not ready for full
|
25
|
+
production use yet. Data is still incomplete, and the tools are
|
26
|
+
limited. Feedback and input is appreciated.
|
27
|
+
%p
|
28
|
+
If you have questions of comments please feel free to write to the Inqlude
|
29
|
+
mailing list #{link_to "inqlude@kde.org", "mailto:inqlude@kde.org"}.
|
30
|
+
%p
|
31
|
+
Inqlude was created by
|
32
|
+
= link_to "Cornelius Schumacher", "mailto:schumacher@kde.org"
|
33
|
+
with the help of many others, and is a proud member of the KDE family.
|
34
|
+
%br
|