grape_documenter 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # GrapeDoc
2
2
 
3
- This adds a rake tasks to Rails Applications to generate documentation for Grape APIs.
3
+ This adds a task to Rails Applications to generate documentation for Grape APIs.
4
4
 
5
5
  ## Installation
6
6
 
@@ -20,17 +20,15 @@ Or install it yourself as:
20
20
 
21
21
  Within the root of you Rails Application run the following rake task...
22
22
 
23
- $ bundle exec rake generate_grape_docs['MyApplication::API','/path/to/where/you/want/your/docs']
23
+ $ bundle exec grape_doc 'MyApplication::API' '/path/to/where/you/want/your/docs'
24
24
 
25
- NOTE: The lack of space between the arguments. Rake doesn't like the space unless you wrap the whole thing as a string.
26
-
27
- The first argument is the a string of the class of Grape::API. If you have multiple APIs within the same application you can run the rake task as many times as you like with different output paths.
25
+ The first argument is the a string of the class of Grape::API. If you have multiple APIs within the same application you can run the task as many times as you like with different output paths.
28
26
 
29
27
  ### Specifying output format
30
28
 
31
29
  Currently 2 formats are supported: 'html'; 'textile'. The default is html. You can change the format as shown below...
32
30
 
33
- $ bundle exec rake generate_grape_docs['MyApplication::API','/path/to/where/you/want/your/docs','textile']
31
+ $ bundle exec grape_doc 'MyApplication::API' '/path/to/where/you/want/your/docs' 'textile'
34
32
 
35
33
  ## Contributing
36
34
 
data/bin/grape_doc ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'grape_doc'
4
+
5
+ begin
6
+ require File.expand_path(Dir.pwd + "/config/environment")
7
+ rescue LoadError => ex
8
+ puts "#{ex}"
9
+ end
10
+
11
+ generator = GrapeDoc::Generator.new(ARGV[0], ARGV[1], :format => ARGV[2])
12
+ generator.output
data/grape_doc.gemspec CHANGED
@@ -4,8 +4,8 @@ require File.expand_path('../lib/grape_doc/version', __FILE__)
4
4
  Gem::Specification.new do |gem|
5
5
  gem.authors = ["Phil Lee", "Steven Anderson"]
6
6
  gem.email = ["philip.lee@sage.com"]
7
- gem.description = "This adds a rake tasks to Rails Applications to generate documentation for Grape APIs."
8
- gem.summary = "This adds a rake tasks to Rails Applications to generate documentation for Grape APIs."
7
+ gem.description = "This adds a task to Rails Applications to generate documentation for Grape APIs."
8
+ gem.summary = "This adds a task to Rails Applications to generate documentation for Grape APIs."
9
9
  gem.homepage = ""
10
10
 
11
11
  gem.files = `git ls-files`.split($\)
@@ -1,7 +1,7 @@
1
1
  require 'grape_doc'
2
2
 
3
3
  module GrapeDoc
4
- class Railtie < ::Rails::Railtie
4
+ class Railtie < Rails::Railtie
5
5
  rake_tasks do
6
6
  load 'tasks/generate.rake'
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module GrapeDoc
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/grape_doc.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require "grape_doc/version"
2
- require 'grape_doc/railtie' if defined?(Rails)
3
2
 
4
3
  module GrapeDoc
5
4
  require 'grape_doc/generator'
@@ -7,4 +6,5 @@ module GrapeDoc
7
6
  require 'grape_doc/namespace_doc'
8
7
  require 'grape_doc/formatters/textile'
9
8
  require 'grape_doc/formatters/html'
9
+ require 'grape_doc/railtie' if defined?(Rails)
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape_documenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -76,11 +76,12 @@ dependencies:
76
76
  - - ! '>='
77
77
  - !ruby/object:Gem::Version
78
78
  version: '0'
79
- description: This adds a rake tasks to Rails Applications to generate documentation
80
- for Grape APIs.
79
+ description: This adds a task to Rails Applications to generate documentation for
80
+ Grape APIs.
81
81
  email:
82
82
  - philip.lee@sage.com
83
- executables: []
83
+ executables:
84
+ - grape_doc
84
85
  extensions: []
85
86
  extra_rdoc_files: []
86
87
  files:
@@ -89,6 +90,7 @@ files:
89
90
  - LICENSE
90
91
  - README.md
91
92
  - Rakefile
93
+ - bin/grape_doc
92
94
  - grape_doc.gemspec
93
95
  - lib/grape_doc.rb
94
96
  - lib/grape_doc/formatters/html.rb
@@ -126,8 +128,8 @@ rubyforge_project:
126
128
  rubygems_version: 1.8.24
127
129
  signing_key:
128
130
  specification_version: 3
129
- summary: This adds a rake tasks to Rails Applications to generate documentation for
130
- Grape APIs.
131
+ summary: This adds a task to Rails Applications to generate documentation for Grape
132
+ APIs.
131
133
  test_files:
132
134
  - spec/formatters/textile_spec.rb
133
135
  - spec/generator_spec.rb