dcs-debian 0.2.0 → 0.3.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 +19 -0
- data/lib/dcs/debian/version.rb +1 -1
- data/lib/dcs/debian.rb +15 -22
- data/screenshot.png +0 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3c16556677dcb68fc4453516de43b0a9622c2b6
|
4
|
+
data.tar.gz: 6d7597d3dc84b997f4b45ec21f46c8ad0a09fb0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88218d4b65bb18e8e253eacf5602eee966b30357b163d9edb02e6d21623c917c0817710435d89d4d96a38847ae4babab3997e0b05af49587d0e63fb6be110afd
|
7
|
+
data.tar.gz: d8334289f9833a7b0518077bc0dcf1e645c44fb6f96290a38b4715dfdf1836a10426f5f239c95fe23f7784e7ed1b1e3e5d772be5789b83cb920155b435c49e6c
|
data/README.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
Dcs-debian is the command line tool which uses Debian Code Search to search debian/ files.
|
4
4
|
|
5
|
+
When working on Debian ITP, lintian sometimes reports pile of warnings or errors.
|
6
|
+
In such a case, I wonder how to fix this issue. How does other packages fix it?
|
7
|
+
|
8
|
+
This is the reason why I've created dcs-debian as thin wrapper of
|
9
|
+
Debian Code Search (http://codesearch.debian.net).
|
10
|
+
|
11
|
+

|
12
|
+
|
5
13
|
## Installation
|
6
14
|
|
7
15
|
Add this line to your application's Gemfile:
|
@@ -20,6 +28,17 @@ Or install it yourself as:
|
|
20
28
|
|
21
29
|
## Usage
|
22
30
|
|
31
|
+
Here is the usage of dcs-debian:
|
32
|
+
|
33
|
+
$ dcs-debian
|
34
|
+
Commands:
|
35
|
+
dcs-debian changelog KEYWORD #
|
36
|
+
dcs-debian control KEYWORD #
|
37
|
+
dcs-debian help [COMMAND] # Describe available commands or one specific command
|
38
|
+
dcs-debian rules KEYWORD #
|
39
|
+
|
40
|
+
Just type specific keyword like this:
|
41
|
+
|
23
42
|
$ dcs-debian rules groonga
|
24
43
|
$ dcs-debian changelog closed
|
25
44
|
$ dcs-debian control Standards
|
data/lib/dcs/debian/version.rb
CHANGED
data/lib/dcs/debian.rb
CHANGED
@@ -7,41 +7,34 @@ require "dcs/debian/helper"
|
|
7
7
|
|
8
8
|
module Dcs
|
9
9
|
module Debian
|
10
|
-
# Your code goes here...
|
11
10
|
|
12
11
|
class Command < Thor
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
puts sprintf("%s (%s)",
|
19
|
-
context[:path].bold.white_on_green,
|
20
|
-
context[:url].white_on_blue)
|
21
|
-
puts context[:pre].gsub(/#{arg}/, '\&'.red_on_yellow)
|
13
|
+
def self.define_commands(name)
|
14
|
+
desc "#{name} KEYWORD", "Search debian/#{name} file"
|
15
|
+
define_method(name) do |*args, &block|
|
16
|
+
dcs_search(name, args[0])
|
22
17
|
end
|
23
18
|
end
|
24
19
|
|
25
|
-
|
26
|
-
|
20
|
+
define_commands :control
|
21
|
+
define_commands :rules
|
22
|
+
define_commands :changelog
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def dcs_search(file, keyword)
|
27
27
|
client = Searcher.new
|
28
|
-
client.pagination(
|
28
|
+
client.pagination(file, keyword) do |context|
|
29
29
|
puts sprintf("%s (%s)",
|
30
30
|
context[:path].bold.white_on_green,
|
31
31
|
context[:url].white_on_blue)
|
32
|
-
puts context[:pre].gsub(/#{
|
32
|
+
puts context[:pre].gsub(/#{keyword}/, '\&'.red_on_yellow)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
client = Searcher.new
|
39
|
-
client.pagination("rules", arg) do |context|
|
40
|
-
puts sprintf("%s (%s)",
|
41
|
-
context[:path].bold.white_on_green,
|
42
|
-
context[:url].white_on_blue)
|
43
|
-
puts context[:pre].gsub(/#{arg}/, '\&'.red_on_yellow)
|
44
|
-
end
|
36
|
+
def method_missing(id, *arguments)
|
37
|
+
dcs_search(id.to_s, arguments[0])
|
45
38
|
end
|
46
39
|
|
47
40
|
end
|
data/screenshot.png
ADDED
Binary file
|
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.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HAYASHI Kentaro
|
@@ -85,6 +85,7 @@ files:
|
|
85
85
|
- lib/dcs/debian.rb
|
86
86
|
- lib/dcs/debian/helper.rb
|
87
87
|
- lib/dcs/debian/version.rb
|
88
|
+
- screenshot.png
|
88
89
|
homepage: https://github.com/kenhys/dcs-debian
|
89
90
|
licenses:
|
90
91
|
- MIT
|