dcs-debian 0.1.0 → 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.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/dcs-debian.gemspec +3 -3
- data/lib/dcs/debian.rb +4 -4
- data/lib/dcs/debian/helper.rb +3 -6
- data/lib/dcs/debian/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35838b5b1d1f89ea370ecdfb34e8717d40bc0902
|
4
|
+
data.tar.gz: dd2e085923ca44310306f56024424d02f5bb0515
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7df7c9b8a7adba364b23f8ef16392121cf2187a56676399e497ae5f9f4421e4698e6cf9c680885b51a6528f0546e785a39cda6e0f2d79abbbf4fde108afafaa2
|
7
|
+
data.tar.gz: c41a13583679d3d60de7dfd1808f9ab0972da3b2ec4e359f1ecf96d928e94e2161abd94dba9fb820f7230c650b207ead55833e285efb1dfdb9004fd187063273
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# dcs-debian
|
2
2
|
|
3
|
-
|
3
|
+
Dcs-debian is the command line tool which uses Debian Code Search to search debian/ files.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -20,11 +20,13 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
|
23
|
+
$ dcs-debian rules groonga
|
24
|
+
$ dcs-debian changelog closed
|
25
|
+
$ dcs-debian control Standards
|
24
26
|
|
25
27
|
## Contributing
|
26
28
|
|
27
|
-
1. Fork it ( https://github.com/
|
29
|
+
1. Fork it ( https://github.com/kenhys/dcs-debian/fork )
|
28
30
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
31
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
32
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/dcs-debian.gemspec
CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Dcs::Debian::VERSION
|
9
9
|
spec.authors = ["HAYASHI Kentaro"]
|
10
10
|
spec.email = ["kenhys@gmail.com"]
|
11
|
-
spec.summary = %q{Command line tool to search debian/ files.}
|
12
|
-
spec.description = %q{Search keyword from http://codesearch.debian.net
|
13
|
-
spec.homepage = ""
|
11
|
+
spec.summary = %q{Command line tool which uses Debian Code Search to search debian/ files.}
|
12
|
+
spec.description = %q{Search debian/ files which contains specific keyword from Debian Code Search (http://codesearch.debian.net).}
|
13
|
+
spec.homepage = "https://github.com/kenhys/dcs-debian"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
data/lib/dcs/debian.rb
CHANGED
@@ -11,7 +11,7 @@ module Dcs
|
|
11
11
|
|
12
12
|
class Command < Thor
|
13
13
|
|
14
|
-
desc "control
|
14
|
+
desc "control KEYWORD", ""
|
15
15
|
def control(arg)
|
16
16
|
client = Searcher.new
|
17
17
|
client.pagination("control", arg) do |context|
|
@@ -22,7 +22,7 @@ module Dcs
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
desc "changelog
|
25
|
+
desc "changelog KEYWORD", ""
|
26
26
|
def changelog(arg)
|
27
27
|
client = Searcher.new
|
28
28
|
client.pagination("changelog", arg) do |context|
|
@@ -33,9 +33,9 @@ module Dcs
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
desc "rules
|
36
|
+
desc "rules KEYWORD", ""
|
37
37
|
def rules(arg)
|
38
|
-
client =
|
38
|
+
client = Searcher.new
|
39
39
|
client.pagination("rules", arg) do |context|
|
40
40
|
puts sprintf("%s (%s)",
|
41
41
|
context[:path].bold.white_on_green,
|
data/lib/dcs/debian/helper.rb
CHANGED
@@ -18,7 +18,7 @@ module Dcs
|
|
18
18
|
|
19
19
|
data = []
|
20
20
|
unless next_uri
|
21
|
-
next_uri = sprintf("%s/search?q=%s+path%%3Adebian%%2F%s",
|
21
|
+
next_uri = sprintf("%s/search?q=%s+path%%3Adebian%%2F%s%%24",
|
22
22
|
BASE_URL, keyword, target)
|
23
23
|
end
|
24
24
|
|
@@ -74,9 +74,7 @@ module Dcs
|
|
74
74
|
data = []
|
75
75
|
pre.children.each do |cnode|
|
76
76
|
if cnode.kind_of?(Nokogiri::XML::Element)
|
77
|
-
|
78
|
-
when "br"
|
79
|
-
when "strong"
|
77
|
+
if cnode.name != "br"
|
80
78
|
data << indent + cnode.text
|
81
79
|
end
|
82
80
|
else
|
@@ -86,8 +84,7 @@ module Dcs
|
|
86
84
|
entry[:pre] = data.join("\n")
|
87
85
|
end
|
88
86
|
else
|
89
|
-
|
90
|
-
#p line
|
87
|
+
raise Error
|
91
88
|
end
|
92
89
|
entry
|
93
90
|
end
|
data/lib/dcs/debian/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dcs-debian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HAYASHI Kentaro
|
@@ -66,7 +66,8 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '10.0'
|
69
|
-
description: Search keyword from
|
69
|
+
description: Search debian/ files which contains specific keyword from Debian Code
|
70
|
+
Search (http://codesearch.debian.net).
|
70
71
|
email:
|
71
72
|
- kenhys@gmail.com
|
72
73
|
executables:
|
@@ -84,7 +85,7 @@ files:
|
|
84
85
|
- lib/dcs/debian.rb
|
85
86
|
- lib/dcs/debian/helper.rb
|
86
87
|
- lib/dcs/debian/version.rb
|
87
|
-
homepage:
|
88
|
+
homepage: https://github.com/kenhys/dcs-debian
|
88
89
|
licenses:
|
89
90
|
- MIT
|
90
91
|
metadata: {}
|
@@ -107,5 +108,5 @@ rubyforge_project:
|
|
107
108
|
rubygems_version: 2.2.2
|
108
109
|
signing_key:
|
109
110
|
specification_version: 4
|
110
|
-
summary: Command line tool to search debian/ files.
|
111
|
+
summary: Command line tool which uses Debian Code Search to search debian/ files.
|
111
112
|
test_files: []
|