doc_to_dash 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # DocToDash
2
2
 
3
- TODO: Write a gem description
3
+ DocToDash converts documentation files (at the moment only YARD) into a classes and methods docset that can then be loaded into the docset viewing program: Dash.
4
4
 
5
5
  ## Installation
6
6
 
@@ -16,9 +16,81 @@ Or install it yourself as:
16
16
 
17
17
  $ gem install doc_to_dash
18
18
 
19
+ ## Options
20
+
21
+ <table>
22
+ <tr>
23
+ <th>Key</th>
24
+ <th>Default</th>
25
+ <th>Description</th>
26
+ <th>Required</th>
27
+ </tr>
28
+
29
+ <tr>
30
+ <td>:docset_name</td>
31
+ <td>DefaultDocset</td>
32
+ <td>What the file will be called. EX: DefaultDocset.docset</td>
33
+ <td>Yes</td>
34
+ </tr>
35
+
36
+ <tr>
37
+ <td>:docset_output_path</td>
38
+ <td>doc/</td>
39
+ <td>Where the file above will be stored EX: doc/DefaultDocset.docset</td>
40
+ <td>Yes</td>
41
+ </tr>
42
+
43
+ <tr>
44
+ <td>:icon_path</td>
45
+ <td>nil/</td>
46
+ <td>The icon file that will be put in the docset. Shown in Dash.</td>
47
+ <td>No</td>
48
+ </tr>
49
+
50
+ <tr>
51
+ <td>:doc_input_path</td>
52
+ <td>nil/</td>
53
+ <td>The directory that the doc files will be coming from. EX: /Users/Caleb/web/my_site/doc/yard</td>
54
+ <td>Yes</td>
55
+ </tr>
56
+
57
+ <tr>
58
+ <td>:doc_save_folder</td>
59
+ <td>docs/</td>
60
+ <td>Where inside the docset the docs will be copied to (not really important, just here if you need to change it)</td>
61
+ <td>Yes</td>
62
+ </tr>
63
+
64
+ <tr>
65
+ <td>:verbose</td>
66
+ <td>true</td>
67
+ <td>Spits out messages with "puts" showing what is going on.</td>
68
+ <td>Yes</td>
69
+ </tr>
70
+
71
+ <tr>
72
+ <td>:parser</td>
73
+ <td>DocToDash::YardParser</td>
74
+ <td>Parser to use to pull out classes and modules. YARD is only supported at the moment.</td>
75
+ <td>Yes</td>
76
+ </tr>
77
+ </table>
78
+
19
79
  ## Usage
20
80
 
21
- TODO: Write usage instructions here
81
+ Generate YARD documentation (or as time progresses and we support rdoc, generate that). This will output your Rails application's YARD documentation to doc/yard:
82
+
83
+ $ yardoc app/**/*.rb lib/**/*.rb --protected --private --embed-mixins --output-dir doc/yard/
84
+
85
+ Require doc_to_dash
86
+
87
+ require 'doc_to_dash'
88
+
89
+ Tell doc_to_dash to generate a docset:
90
+
91
+ DocToDash::DocsetGenerator.new(:docset_name => 'MyApplication', :doc_input_path => '/web/myapp/doc/yard', :icon_path => '~/icon.png', :docset_output_path => '/users/test/docsets').run
92
+
93
+ This will create a docset in the docset_output_path then you just need to load the docset into Dash.
22
94
 
23
95
  ## Contributing
24
96
 
@@ -26,4 +98,4 @@ TODO: Write usage instructions here
26
98
  2. Create your feature branch (`git checkout -b my-new-feature`)
27
99
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
100
  4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
101
+ 5. Create new Pull Request
data/bin/doc_to_dash ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+ require 'doc_to_dash'
3
+
4
+ # Need to do some cool command line switches here instead of this usage
5
+ # Need to incorporate icon, etc in.
6
+
7
+ if ARGV.count < 3
8
+ puts "Usage: doc_to_dash [docset_name] [input_docs_path] [output_docset]"
9
+ exit
10
+ end
11
+
12
+ DocToDash::DocsetGenerator.new(:docset_name => ARGV[0], :docset_output_path => ARGV[2], :doc_input_path => ARGV[1]).run
data/doc_to_dash.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
  gem.email = ["me@caleb.io"]
11
11
  gem.description = "Converts documentation to a Dash Docset"
12
12
  gem.summary = "Documentation to Dash Docset Converter"
13
- gem.homepage = ""
13
+ gem.homepage = "https://rubygems.org/gems/doc_to_dash"
14
14
 
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -19,4 +19,6 @@ Gem::Specification.new do |gem|
19
19
 
20
20
  gem.add_dependency "nokogiri"
21
21
  gem.add_dependency "sqlite3"
22
+
23
+ gem.executables << 'doc_to_dash'
22
24
  end
@@ -1,3 +1,3 @@
1
1
  module DocToDash
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doc_to_dash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -46,7 +46,8 @@ dependencies:
46
46
  description: Converts documentation to a Dash Docset
47
47
  email:
48
48
  - me@caleb.io
49
- executables: []
49
+ executables:
50
+ - doc_to_dash
50
51
  extensions: []
51
52
  extra_rdoc_files: []
52
53
  files:
@@ -55,11 +56,12 @@ files:
55
56
  - LICENSE.txt
56
57
  - README.md
57
58
  - Rakefile
59
+ - bin/doc_to_dash
58
60
  - doc_to_dash.gemspec
59
61
  - lib/doc_to_dash.rb
60
62
  - lib/doc_to_dash/version.rb
61
63
  - lib/doc_to_dash/yard_parser.rb
62
- homepage: ''
64
+ homepage: https://rubygems.org/gems/doc_to_dash
63
65
  licenses: []
64
66
  post_install_message:
65
67
  rdoc_options: []
@@ -84,3 +86,4 @@ signing_key:
84
86
  specification_version: 3
85
87
  summary: Documentation to Dash Docset Converter
86
88
  test_files: []
89
+ has_rdoc: