user_docs 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tasks/user_docs_tasks.rake +24 -4
- data/lib/user_docs/capybara_extension.rb +5 -1
- data/lib/user_docs/railtie.rb +6 -0
- data/lib/user_docs/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 479708398a4aad02dd98ddb186eef5c936b8838dc2680a9cc7d0a55908238d73
|
4
|
+
data.tar.gz: bb388526212fcfc90e4a66d6a37bb1657180f17acec9a1673f1adc393790b27f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad34fca7912ec5bf2be9ff3568a285d32ea9439b161f8feaf4f78c2939c346c6839a3f040096aaaaa23435f1cf8d3b3a331e607cf99a5cb99e7b4aa2e47a6846
|
7
|
+
data.tar.gz: 712e73ded00f2231327966f3bddcb7cae93af8783ad5e43c2e05d2fbca930bdbc6ebb567c7d085f836ed110860fbd868f5a404526ef2917adc5fee9a14cdced2
|
@@ -1,6 +1,26 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
namespace :user_docs do
|
4
|
+
desc "Build site"
|
5
|
+
task build_site: :environment do
|
6
|
+
check_installation
|
7
|
+
|
8
|
+
output_dir = Rails.root.join("public/docs")
|
9
|
+
FileUtils.mkdir_p(output_dir)
|
10
|
+
system("cd docs && jekyll build -b /docs")
|
11
|
+
FileUtils.mv(
|
12
|
+
Dir.glob(Rails.root.join("docs/_site/*")), output_dir, force: true
|
13
|
+
)
|
14
|
+
FileUtils.remove_dir(Rails.root.join("docs/_site"))
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def check_installation
|
20
|
+
return if Dir.exist?(Rails.root.join("docs"))
|
21
|
+
|
22
|
+
# :nocov:
|
23
|
+
abort("ERROR: Run 'rails g user_docs:install.'")
|
24
|
+
# :nocov:
|
25
|
+
end
|
26
|
+
end
|
@@ -60,8 +60,9 @@ module UserDocs
|
|
60
60
|
def make_version_index
|
61
61
|
directory = "#{Rails.root}/docs/versions/#{version}"
|
62
62
|
FileUtils.mkdir_p directory
|
63
|
+
output_file = "#{directory}/index.html"
|
63
64
|
File.write(
|
64
|
-
|
65
|
+
output_file,
|
65
66
|
<<~HTML
|
66
67
|
---
|
67
68
|
layout: default
|
@@ -70,6 +71,9 @@ module UserDocs
|
|
70
71
|
{% include index.html %}
|
71
72
|
HTML
|
72
73
|
)
|
74
|
+
|
75
|
+
entry_file = Rails.root.join("docs/index.html")
|
76
|
+
FileUtils.cp_r(output_file, entry_file, remove_destination: true)
|
73
77
|
end
|
74
78
|
# rubocop:enable Metrics/MethodLength
|
75
79
|
|
data/lib/user_docs/railtie.rb
CHANGED
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.3.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-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -24,20 +24,34 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.32.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jekyll
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 4.0.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 4.0.1
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rails
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: 6.0.3
|
47
|
+
version: 6.0.3.1
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: 6.0.3
|
54
|
+
version: 6.0.3.1
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: selenium-webdriver
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|