user_docs 0.5.0 → 0.6.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17570ca7f142aca7a866a337055a720d2acae9ea4c851f0b9a6b8ca3274c5be9
|
4
|
+
data.tar.gz: 7b7226c0791a3256f6c718d5388d001c9cab842e9798fe5b32ef02b4e32f532e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bff557e8d7dc2f577bbd9789c1f4bd928f45b776cb7b4f824303d2513e20a4498ec439f90eee27c29d0589f30f586b3b224226f76a4251a37a60ef534a5c2b2f
|
7
|
+
data.tar.gz: 94710b2d8796ab802bf14068787ea5dccc007477289b0b42a0a13e7a30be1394c153e403bd2fbeb2b35df99ed3d9bc07282384844b3f861a8d231dc0fc301f83
|
@@ -0,0 +1 @@
|
|
1
|
+
keep_files: ['versions', 'assets']
|
@@ -11,23 +11,19 @@ module UserDocs
|
|
11
11
|
|
12
12
|
check_installation
|
13
13
|
|
14
|
-
@class_name = class_name.chomp("
|
14
|
+
@class_name = class_name.chomp("Procedure")
|
15
15
|
@method = name.sub("test_", "")
|
16
16
|
make_version_data_directory
|
17
17
|
make_version_index
|
18
18
|
Capybara.save_path =
|
19
|
-
Rails.root.join(".docs
|
19
|
+
Rails.root.join(".docs/assets/#{version}/#{klass_name}/#{@method}")
|
20
20
|
|
21
21
|
@json = { name: @method.humanize, steps: [] }
|
22
22
|
end
|
23
23
|
|
24
24
|
def before_teardown
|
25
|
-
|
26
|
-
|
27
|
-
".docs", "_data", "versions", version_data_directory_name,
|
28
|
-
@class_name, "#{@method}.json"
|
29
|
-
), @json.to_json
|
30
|
-
)
|
25
|
+
path = ".docs/_data/versions/#{version}/#{klass_name}/#{@method}.json"
|
26
|
+
File.write(Rails.root.join(path), @json.to_json)
|
31
27
|
|
32
28
|
super
|
33
29
|
end
|
@@ -46,22 +42,22 @@ module UserDocs
|
|
46
42
|
Rails.application.class.module_parent::VERSION
|
47
43
|
end
|
48
44
|
|
49
|
-
def
|
50
|
-
|
45
|
+
def klass_name
|
46
|
+
@class_name.underscore
|
51
47
|
end
|
52
48
|
|
53
49
|
def make_version_data_directory
|
54
|
-
|
55
|
-
|
56
|
-
version_data_directory_name, @class_name)
|
57
|
-
)
|
50
|
+
data_path = Rails.root.join(".docs/_data/versions/#{version}/#{klass_name}")
|
51
|
+
FileUtils.mkdir_p(data_path)
|
58
52
|
end
|
59
53
|
|
60
54
|
# rubocop:disable Metrics/MethodLength
|
61
55
|
def make_version_index
|
62
|
-
directory =
|
63
|
-
|
64
|
-
|
56
|
+
directory = Rails.root.join(".docs/versions/#{version}")
|
57
|
+
output_file = directory + "index.html"
|
58
|
+
entry_file = Rails.root.join(".docs/index.html")
|
59
|
+
|
60
|
+
FileUtils.mkdir_p(directory)
|
65
61
|
File.write(
|
66
62
|
output_file,
|
67
63
|
<<~HTML
|
@@ -73,7 +69,6 @@ module UserDocs
|
|
73
69
|
HTML
|
74
70
|
)
|
75
71
|
|
76
|
-
entry_file = Rails.root.join(".docs/index.html")
|
77
72
|
FileUtils.cp_r(output_file, entry_file, remove_destination: true)
|
78
73
|
end
|
79
74
|
# rubocop:enable Metrics/MethodLength
|
@@ -102,7 +97,7 @@ module UserDocs
|
|
102
97
|
image += ".png"
|
103
98
|
super
|
104
99
|
|
105
|
-
path = "/docs/assets/#{
|
100
|
+
path = "/docs/assets/#{version}/#{klass_name}/#{@method}/#{image}"
|
106
101
|
@json[:steps] << "<img src='#{path}' class='img-fluid'>"
|
107
102
|
end
|
108
103
|
|
data/lib/user_docs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: user_docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jtopgi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -175,6 +175,7 @@ files:
|
|
175
175
|
- README.md
|
176
176
|
- Rakefile
|
177
177
|
- lib/generators/user_docs/install_generator.rb
|
178
|
+
- lib/generators/user_docs/templates/_config.tt
|
178
179
|
- lib/generators/user_docs/templates/_includes/index.tt
|
179
180
|
- lib/generators/user_docs/templates/_layouts/default.tt
|
180
181
|
- lib/generators/user_docs/templates/index.tt
|