smashing_docs 1.2.0 → 1.2.1
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.
- checksums.yaml +4 -4
- data/README.md +17 -10
- data/lib/generators/smashing_documentation/install_generator.rb +1 -0
- data/smashing_docs.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2273885225ce2b5c9814c5b84d15656801a9102c
|
4
|
+
data.tar.gz: 6f2daad5d6fa014ee9cdc06e4771bcee7cc21641
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b09843efd0e3b0c004c7bf294166163217eaa0049b7e9c400b77b828009e84c74e7ad33c7a5574fdf695b0bb55fa0d479d59e4bcde4398065b2bcbf708d87b4
|
7
|
+
data.tar.gz: 48982149bc959da7efc80d9ffe4a7f670ed6b22724e7e9cf6fdd0d5426c3df9d1605f665fc0ccd68cb38229b0e4b934d42e439f4c16397eb902cd8d87e8c410b
|
data/README.md
CHANGED
@@ -35,14 +35,14 @@ Add this to your `rails_helper.rb` It should go outside of other blocks
|
|
35
35
|
SmashingDocs.config do |c|
|
36
36
|
c.template_file = 'smashing_docs/template.md'
|
37
37
|
c.output_file = 'smashing_docs/api_docs.md'
|
38
|
-
c.auto_push = false
|
39
38
|
c.run_all = true
|
39
|
+
c.auto_push = false
|
40
40
|
end
|
41
41
|
```
|
42
42
|
|
43
43
|
Add the following content to `spec_helper.rb` inside the `RSpec.configure` block
|
44
44
|
|
45
|
-
|
45
|
+
`# config.after(:suite) { SmashingDocs.finish! }`
|
46
46
|
|
47
47
|
It should look like this
|
48
48
|
```ruby
|
@@ -61,8 +61,8 @@ Set the `c.run_all` line to `false` in `rails_helper.rb`
|
|
61
61
|
SmashingDocs.config do |c|
|
62
62
|
c.template_file = 'smashing_docs/template.md'
|
63
63
|
c.output_file = 'smashing_docs/api_docs.md'
|
64
|
-
c.auto_push = false
|
65
64
|
c.run_all = false
|
65
|
+
c.auto_push = false
|
66
66
|
end
|
67
67
|
```
|
68
68
|
|
@@ -84,8 +84,8 @@ class ActiveSupport::TestCase
|
|
84
84
|
SmashingDocs.config do |c|
|
85
85
|
c.template_file = 'smashing_docs/template.md'
|
86
86
|
c.output_file = 'smashing_docs/api_docs.md'
|
87
|
-
c.auto_push = false
|
88
87
|
c.run_all = true
|
88
|
+
c.auto_push = false
|
89
89
|
end
|
90
90
|
# More code
|
91
91
|
end
|
@@ -105,8 +105,8 @@ Set the `c.run_all` line to `false` in `test_helper.rb`
|
|
105
105
|
SmashingDocs.config do |c|
|
106
106
|
c.template_file = 'smashing_docs/template.md'
|
107
107
|
c.output_file = 'smashing_docs/api_docs.md'
|
108
|
-
c.auto_push = false
|
109
108
|
c.run_all = false
|
109
|
+
c.auto_push = false
|
110
110
|
end
|
111
111
|
```
|
112
112
|
|
@@ -121,8 +121,8 @@ end
|
|
121
121
|
|
122
122
|
## Setting a template
|
123
123
|
|
124
|
-
If you copied the code from above, SmashingDocs will
|
125
|
-
`smashing_docs/template.md`
|
124
|
+
If you used the auto-installer or copied the code from above, SmashingDocs will
|
125
|
+
look for a template file located in `smashing_docs/template.md`
|
126
126
|
|
127
127
|
This template may be customized to fit your needs.
|
128
128
|
|
@@ -136,8 +136,9 @@ This template may be customized to fit your needs.
|
|
136
136
|
|
137
137
|
## Where to find the docs
|
138
138
|
|
139
|
-
By default, the docs are output to `api_docs.md` in the
|
140
|
-
You can change this by altering the config in `test_helper.rb` or
|
139
|
+
By default, the docs are output to `smashing_docs/api_docs.md` in the Rails project.
|
140
|
+
You can change this by altering the config in `test_helper.rb` (MiniTest) or
|
141
|
+
`rails_helper.rb`(RSpec).
|
141
142
|
|
142
143
|
## Additional Features
|
143
144
|
|
@@ -179,7 +180,7 @@ SmashingDocs can automatically push your generated docs to your project wiki.
|
|
179
180
|
|
180
181
|
../projects/my_rails_app.wiki
|
181
182
|
|
182
|
-
2. Set auto_push to true in `
|
183
|
+
2. Set auto_push to true in `rails_helper.rb` or `test_helper.rb`
|
183
184
|
|
184
185
|
``` ruby
|
185
186
|
SmashingDocs.config do |c|
|
@@ -189,3 +190,9 @@ SmashingDocs can automatically push your generated docs to your project wiki.
|
|
189
190
|
```
|
190
191
|
|
191
192
|
3. Build your docs with `rails g smashing_documentation:build_docs`
|
193
|
+
|
194
|
+
#### Generate Docs on Every Test Suite Run
|
195
|
+
|
196
|
+
If you prefer to have your docs built every time you run the test suite, and do
|
197
|
+
not want to run the build command, then uncomment the `SmashingDocs.finish` line
|
198
|
+
in your `rails_helper` or `test_helper`
|
@@ -73,6 +73,7 @@ module SmashingDocumentation
|
|
73
73
|
config = "SmashingDocs.config do |c|\n"\
|
74
74
|
" c.template_file = 'smashing_docs/template.md'\n"\
|
75
75
|
" c.output_file = 'smashing_docs/api_docs.md'\n"\
|
76
|
+
" c.run_all = true\n"\
|
76
77
|
" c.auto_push = false\n"\
|
77
78
|
"end\n"
|
78
79
|
if using_minitest?
|
data/smashing_docs.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.require_paths = ['lib']
|
11
11
|
s.summary = "Uses your test cases to write example documentation for your API."
|
12
12
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
13
|
-
s.version = '1.2.
|
13
|
+
s.version = '1.2.1'
|
14
14
|
|
15
15
|
s.add_development_dependency "bundler", "~> 1.11"
|
16
16
|
s.add_development_dependency "rake", "~> 10.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smashing_docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler Rockwell
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-03-
|
13
|
+
date: 2016-03-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|