tests_doc 0.0.2 → 0.0.3
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 +3 -0
- data/examples/rails-4.2.5/Gemfile.lock +1 -1
- data/lib/tests_doc/configuration.rb +1 -0
- data/lib/tests_doc/interaction.rb +4 -3
- data/lib/tests_doc/version.rb +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: 36daab5dc76caf8d5e40caefec0aeef2eeac048e
|
|
4
|
+
data.tar.gz: 1c6fb21fab993de63a0055ba00b481140ff85a82
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 68071ad2d90621ad152762c4fccbd65f0059c908a3d2b483ebc400401b6958ab4e2ab8aa3db4104abec560ac577102a18466d842e8a79fe8c5922847cbf84f50
|
|
7
|
+
data.tar.gz: 4d5b57030f580f889ce36e72b155ae1919fae743fdeb98197e3d515060cb6c435d27f517d04bced3a5b41c7566d47a5f0d5293181fe80d8e93ef72f96bb1671b
|
data/README.md
CHANGED
|
@@ -75,6 +75,9 @@ TestsDoc.configure do |config|
|
|
|
75
75
|
# Folder name where the tests doc will be stored
|
|
76
76
|
config.doc_folder = 'api' # default: api
|
|
77
77
|
|
|
78
|
+
# Key separator between the path and the key
|
|
79
|
+
config.key_separator = '@' # default: @
|
|
80
|
+
|
|
78
81
|
# Add RSpec line number to the test doc
|
|
79
82
|
config.add_spec_file_number = false # default: true
|
|
80
83
|
|
|
@@ -51,7 +51,7 @@ module TestsDoc
|
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
def file_path
|
|
54
|
-
[file_base_path, options.key.to_s].reject(&:blank?).compact.join(
|
|
54
|
+
[file_base_path, options.key.to_s].reject(&:blank?).compact.join(TestsDoc.configuration.key_separator) + '.md'
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
def file_base_path
|
|
@@ -59,11 +59,12 @@ module TestsDoc
|
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
def _path
|
|
62
|
-
options.path ? options.path
|
|
62
|
+
_path = options.path ? options.path : request_path_without_format
|
|
63
|
+
_path.gsub(/^\//, '') # remove initial / if present
|
|
63
64
|
end
|
|
64
65
|
|
|
65
66
|
def request_path_without_format
|
|
66
|
-
request.path
|
|
67
|
+
request.path.gsub(/(\.[\w]+)?$/, '') # remove .json if present
|
|
67
68
|
end
|
|
68
69
|
|
|
69
70
|
def formatted_example_location
|
data/lib/tests_doc/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tests_doc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jean-Richard Lai
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-09-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|