api_docs 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -0
- data/VERSION +1 -1
- data/api_docs.gemspec +4 -2
- data/doc/screenshot.png +0 -0
- data/lib/api_docs/configuration.rb +4 -0
- data/lib/tasks/api_docs.rake +9 -0
- data/test/api_docs_test.rb +1 -0
- metadata +5 -3
data/README.md
CHANGED
@@ -90,9 +90,15 @@ ApiDocs.configure do |config|
|
|
90
90
|
# controller that ApiDocs controller inherits from.
|
91
91
|
# Useful for hiding it behind admin controller.
|
92
92
|
config.base_controller = 'ApplicationController'
|
93
|
+
|
94
|
+
# Remove doc files before running tests. False by default.
|
95
|
+
config.reload_docs_folder = false
|
93
96
|
end
|
94
97
|
```
|
95
98
|
|
99
|
+
|
100
|
+
![Api Docs Example](https://github.com/twg/api_docs/raw/master/doc/screenshot.png)
|
101
|
+
|
96
102
|
---
|
97
103
|
|
98
104
|
Copyright 2012 Oleg Khabarov, Jack Neto, [The Working Group, Inc](http://twg.ca)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
data/api_docs.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "api_docs"
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Oleg Khabarov", "Jack Neto", "The Working Group Inc."]
|
12
|
-
s.date = "2012-09-
|
12
|
+
s.date = "2012-09-24"
|
13
13
|
s.description = "Generate API documentation using integration tests in Ruby on Rails 3"
|
14
14
|
s.email = "jack@twg.ca"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -30,10 +30,12 @@ Gem::Specification.new do |s|
|
|
30
30
|
"app/views/api_docs/docs/_request_params.html.erb",
|
31
31
|
"app/views/api_docs/docs/index.html.erb",
|
32
32
|
"config/routes.rb",
|
33
|
+
"doc/screenshot.png",
|
33
34
|
"lib/api_docs.rb",
|
34
35
|
"lib/api_docs/configuration.rb",
|
35
36
|
"lib/api_docs/engine.rb",
|
36
37
|
"lib/api_docs/test_helper.rb",
|
38
|
+
"lib/tasks/api_docs.rake",
|
37
39
|
"script/rails",
|
38
40
|
"test/api_docs_test.rb",
|
39
41
|
"test/docs_controller_test.rb",
|
data/doc/screenshot.png
ADDED
Binary file
|
@@ -9,11 +9,15 @@ class ApiDocs::Configuration
|
|
9
9
|
# Array of ignored attributes. Attributes that don't really change
|
10
10
|
# the content like timestamps.
|
11
11
|
attr_accessor :ignored_attributes
|
12
|
+
|
13
|
+
# Remove doc files before running tests. False by default.
|
14
|
+
attr_accessor :reload_docs_folder
|
12
15
|
|
13
16
|
# Configuration defaults
|
14
17
|
def initialize
|
15
18
|
@docs_path = Rails.root.join('doc/api')
|
16
19
|
@base_controller = 'ApplicationController'
|
17
20
|
@ignored_attributes = %w(created_at updated_at)
|
21
|
+
@reload_docs_folder = false
|
18
22
|
end
|
19
23
|
end
|
data/test/api_docs_test.rb
CHANGED
@@ -11,5 +11,6 @@ class ApiDocsTest < ActiveSupport::TestCase
|
|
11
11
|
assert config.docs_path
|
12
12
|
assert_equal 'ApplicationController', config.base_controller
|
13
13
|
assert_equal %w(created_at updated_at), config.ignored_attributes
|
14
|
+
assert_equal false, config.reload_docs_folder
|
14
15
|
end
|
15
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api_docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-09-
|
14
|
+
date: 2012-09-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -82,10 +82,12 @@ files:
|
|
82
82
|
- app/views/api_docs/docs/_request_params.html.erb
|
83
83
|
- app/views/api_docs/docs/index.html.erb
|
84
84
|
- config/routes.rb
|
85
|
+
- doc/screenshot.png
|
85
86
|
- lib/api_docs.rb
|
86
87
|
- lib/api_docs/configuration.rb
|
87
88
|
- lib/api_docs/engine.rb
|
88
89
|
- lib/api_docs/test_helper.rb
|
90
|
+
- lib/tasks/api_docs.rake
|
89
91
|
- script/rails
|
90
92
|
- test/api_docs_test.rb
|
91
93
|
- test/docs_controller_test.rb
|
@@ -141,7 +143,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
143
|
version: '0'
|
142
144
|
segments:
|
143
145
|
- 0
|
144
|
-
hash: -
|
146
|
+
hash: -4228313556609487798
|
145
147
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
148
|
none: false
|
147
149
|
requirements:
|