nkpart-dget 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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
data/dget.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dget}
8
- s.version = "0.2.0"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nick Partridge"]
12
- s.date = %q{2009-09-09}
12
+ s.date = %q{2009-09-21}
13
13
  s.default_executable = %q{dget}
14
14
  s.description = %q{get local copies of github project wikis}
15
15
  s.email = %q{nkpart@gmail.com}
@@ -19,8 +19,6 @@ Gem::Specification.new do |s|
19
19
  "README.rdoc"
20
20
  ]
21
21
  s.files = [
22
- ".document",
23
- ".gitignore",
24
22
  "LICENSE",
25
23
  "README.rdoc",
26
24
  "Rakefile",
data/lib/dget/github.rb CHANGED
@@ -40,8 +40,9 @@ module DGet
40
40
  def clean_links doc
41
41
  # rewrites internal links to use the local navigation
42
42
  doc.css('a').each do |some_a|
43
- some_a['href'][/#{@project_name}\/(.*)/, 1].fmap { |id|
44
- some_a['href'] = "javascript:go(\'#{id}\')"
43
+ some_a['href'].fmap { |href| href[/#{@project_name}\/(.*)/, 1].fmap { |id|
44
+ some_a['href'] = "javascript:go(\'#{id}\')"
45
+ }
45
46
  }
46
47
  end
47
48
  end
@@ -83,7 +84,7 @@ module DGet
83
84
  i = 0 #todo better way to trace this?
84
85
  page_content = pages.map { |title, id, content_f|
85
86
  i += 1
86
- puts " * [#{i}/#{pages.count}] #{title}"
87
+ puts " * [#{i}/#{pages.size}] #{title}"
87
88
  "<div id=\"#{id}\">#{content_f[]}</div>"
88
89
  }.join
89
90
 
data/lib/dget.rb CHANGED
@@ -20,10 +20,10 @@ module DGet
20
20
 
21
21
  engine, project_spec, file = *args
22
22
  if (engine && project_spec)
23
- return [engine, project_spec, file]
23
+ [engine, project_spec, file]
24
+ else
25
+ []
24
26
  end
25
-
26
- return []
27
27
  end
28
28
 
29
29
  def self.cli(stdin, stdout, args)
@@ -36,10 +36,12 @@ module DGet
36
36
  when "googlecode"
37
37
  GC.do(project_spec, file)
38
38
  end
39
- else
40
- stdout.puts "Usage: "
41
- stdout.puts " dget [github|googlecode] [user/project|project] [file]"
42
- stdout.puts " dget http://github.com/user/project [file]"
39
+ else
40
+ stdout.puts <<USAGE
41
+ Usage:
42
+ dget [github|googlecode] [user/project|project] [file]
43
+ dget http://github.com/user/project [file]
44
+ USAGE
43
45
  end
44
46
  end
45
47
  end
data/spec/dget_spec.rb CHANGED
@@ -9,7 +9,6 @@ describe "Dget" do
9
9
  [["http://wiki.github.com/jgarber/redcloth", "test.html"], ["github", "jgarber/redcloth", "test.html"]]
10
10
  ].each do |args, out|
11
11
  DGet.parse_args(args).should == out
12
- end
13
-
12
+ end
14
13
  end
15
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nkpart-dget
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Partridge
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-09 00:00:00 -07:00
12
+ date: 2009-09-21 00:00:00 -07:00
13
13
  default_executable: dget
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -32,8 +32,6 @@ extra_rdoc_files:
32
32
  - LICENSE
33
33
  - README.rdoc
34
34
  files:
35
- - .document
36
- - .gitignore
37
35
  - LICENSE
38
36
  - README.rdoc
39
37
  - Rakefile
data/.document DELETED
@@ -1,5 +0,0 @@
1
- README.rdoc
2
- lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- LICENSE
data/.gitignore DELETED
@@ -1,5 +0,0 @@
1
- *.sw?
2
- .DS_Store
3
- coverage
4
- rdoc
5
- pkg