dcs-debian 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 196051d55c2132d2324c9a032f1944183f766a07
4
- data.tar.gz: de29432ca948d6453e6f4be9ea35e0d4bee6e410
3
+ metadata.gz: 35838b5b1d1f89ea370ecdfb34e8717d40bc0902
4
+ data.tar.gz: dd2e085923ca44310306f56024424d02f5bb0515
5
5
  SHA512:
6
- metadata.gz: 3115eaf85d8cb58b3378071d5145820ed23cac43ec8836c0f783ecced144ce5aa14abbd4c45d60eced247235cb63d2b1a1b74186610087732087c890129edca3
7
- data.tar.gz: 2701943a0d02cf5cbd2531187d0cc1544cc87c8ff1222244dd63da8dab03a7d4ce94dbe69829c21aa78398b5a2454ed3979d5f28dddf435e070fdc36795fc6b7
6
+ metadata.gz: 7df7c9b8a7adba364b23f8ef16392121cf2187a56676399e497ae5f9f4421e4698e6cf9c680885b51a6528f0546e785a39cda6e0f2d79abbbf4fde108afafaa2
7
+ data.tar.gz: c41a13583679d3d60de7dfd1808f9ab0972da3b2ec4e359f1ecf96d928e94e2161abd94dba9fb820f7230c650b207ead55833e285efb1dfdb9004fd187063273
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Dcs::Debian
1
+ # dcs-debian
2
2
 
3
- TODO: Write a gem description
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
- TODO: Write usage instructions here
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/[my-github-username]/dcs-debian/fork )
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`)
@@ -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 by command line.}
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")
@@ -11,7 +11,7 @@ module Dcs
11
11
 
12
12
  class Command < Thor
13
13
 
14
- desc "control [KEYWORDS]", ""
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 [KEYWORDS]", ""
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 [KEYWORDS]", ""
36
+ desc "rules KEYWORD", ""
37
37
  def rules(arg)
38
- client = SearchClient.new
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,
@@ -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
- case cnode.attribute("name")
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
- #p file
90
- #p line
87
+ raise Error
91
88
  end
92
89
  entry
93
90
  end
@@ -1,5 +1,5 @@
1
1
  module Dcs
2
2
  module Debian
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
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.1.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 http://codesearch.debian.net by command line.
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: []