vitepress-rails 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13c5b41037eb03ea1741a3c22c26852bb30c55fe06d9fd462e1bfd9b36df3753
4
- data.tar.gz: 619b3b0f6f5fce0f5307911951802f8c3ad919daf783d177ffc261c841e0d5a3
3
+ metadata.gz: c636f90fd6fdf0dbc716b1f76d004fe6e1ebf9ed6e1a8938715d8b5a824fe21f
4
+ data.tar.gz: d060c216290429ffe1b1eb0ecc82da14346e5703a5d1efbad4bba6b54ec1026a
5
5
  SHA512:
6
- metadata.gz: 278a577f49d1227a645636c0064c92e508dcec77f9e9311c9d87c227bab55945402f9d606631aae80d7b3c152c0dab5eccff2980fca7b2995757fc88760a399e
7
- data.tar.gz: 95142f46e97aeec20ec8ef2852bbbe13b30fa29e55fec443738808bf25f48e359ab1ba7c7bc6deb410dbacafa77650c5e2622ad635a09e9b8ce3b37b61fd8606
6
+ metadata.gz: ae912ab669c78d0836ec5fdeb32b63cf4cb5e201e0ffe8a9b0d7e8ad971a328ffe4f6737c498903cadce74e63cba98516f87875c0dacc6e3bf988d83216e2777
7
+ data.tar.gz: 2d31ac3be029f6b39f56b6399f39187d79c4a10f50ff3a9f423c614ddb93c8421373d43c92b10cfd99f139bc8422b486341f0b151b9e88d1b3779bcf3792ae81
data/Gemfile.lock ADDED
@@ -0,0 +1,217 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ vitepress-rails (0.1.4)
5
+ high_voltage (~> 3.1)
6
+ rails (>= 5.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (7.0.4.3)
12
+ actionpack (= 7.0.4.3)
13
+ activesupport (= 7.0.4.3)
14
+ nio4r (~> 2.0)
15
+ websocket-driver (>= 0.6.1)
16
+ actionmailbox (7.0.4.3)
17
+ actionpack (= 7.0.4.3)
18
+ activejob (= 7.0.4.3)
19
+ activerecord (= 7.0.4.3)
20
+ activestorage (= 7.0.4.3)
21
+ activesupport (= 7.0.4.3)
22
+ mail (>= 2.7.1)
23
+ net-imap
24
+ net-pop
25
+ net-smtp
26
+ actionmailer (7.0.4.3)
27
+ actionpack (= 7.0.4.3)
28
+ actionview (= 7.0.4.3)
29
+ activejob (= 7.0.4.3)
30
+ activesupport (= 7.0.4.3)
31
+ mail (~> 2.5, >= 2.5.4)
32
+ net-imap
33
+ net-pop
34
+ net-smtp
35
+ rails-dom-testing (~> 2.0)
36
+ actionpack (7.0.4.3)
37
+ actionview (= 7.0.4.3)
38
+ activesupport (= 7.0.4.3)
39
+ rack (~> 2.0, >= 2.2.0)
40
+ rack-test (>= 0.6.3)
41
+ rails-dom-testing (~> 2.0)
42
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
43
+ actiontext (7.0.4.3)
44
+ actionpack (= 7.0.4.3)
45
+ activerecord (= 7.0.4.3)
46
+ activestorage (= 7.0.4.3)
47
+ activesupport (= 7.0.4.3)
48
+ globalid (>= 0.6.0)
49
+ nokogiri (>= 1.8.5)
50
+ actionview (7.0.4.3)
51
+ activesupport (= 7.0.4.3)
52
+ builder (~> 3.1)
53
+ erubi (~> 1.4)
54
+ rails-dom-testing (~> 2.0)
55
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
56
+ activejob (7.0.4.3)
57
+ activesupport (= 7.0.4.3)
58
+ globalid (>= 0.3.6)
59
+ activemodel (7.0.4.3)
60
+ activesupport (= 7.0.4.3)
61
+ activerecord (7.0.4.3)
62
+ activemodel (= 7.0.4.3)
63
+ activesupport (= 7.0.4.3)
64
+ activestorage (7.0.4.3)
65
+ actionpack (= 7.0.4.3)
66
+ activejob (= 7.0.4.3)
67
+ activerecord (= 7.0.4.3)
68
+ activesupport (= 7.0.4.3)
69
+ marcel (~> 1.0)
70
+ mini_mime (>= 1.1.0)
71
+ activesupport (7.0.4.3)
72
+ concurrent-ruby (~> 1.0, >= 1.0.2)
73
+ i18n (>= 1.6, < 2)
74
+ minitest (>= 5.1)
75
+ tzinfo (~> 2.0)
76
+ ast (2.4.2)
77
+ builder (3.2.4)
78
+ concurrent-ruby (1.2.2)
79
+ crass (1.0.6)
80
+ date (3.3.3)
81
+ diff-lcs (1.5.0)
82
+ erubi (1.12.0)
83
+ globalid (1.1.0)
84
+ activesupport (>= 5.0)
85
+ high_voltage (3.1.2)
86
+ i18n (1.13.0)
87
+ concurrent-ruby (~> 1.0)
88
+ json (2.6.3)
89
+ loofah (2.20.0)
90
+ crass (~> 1.0.2)
91
+ nokogiri (>= 1.5.9)
92
+ mail (2.8.1)
93
+ mini_mime (>= 0.1.1)
94
+ net-imap
95
+ net-pop
96
+ net-smtp
97
+ marcel (1.0.2)
98
+ method_source (1.0.0)
99
+ mini_mime (1.1.2)
100
+ minitest (5.18.0)
101
+ net-imap (0.3.4)
102
+ date
103
+ net-protocol
104
+ net-pop (0.1.2)
105
+ net-protocol
106
+ net-protocol (0.2.1)
107
+ timeout
108
+ net-smtp (0.3.3)
109
+ net-protocol
110
+ nio4r (2.5.9)
111
+ nokogiri (1.14.3-x86_64-linux)
112
+ racc (~> 1.4)
113
+ parallel (1.23.0)
114
+ parser (3.2.2.1)
115
+ ast (~> 2.4.1)
116
+ racc (1.6.2)
117
+ rack (2.2.7)
118
+ rack-test (2.1.0)
119
+ rack (>= 1.3)
120
+ rails (7.0.4.3)
121
+ actioncable (= 7.0.4.3)
122
+ actionmailbox (= 7.0.4.3)
123
+ actionmailer (= 7.0.4.3)
124
+ actionpack (= 7.0.4.3)
125
+ actiontext (= 7.0.4.3)
126
+ actionview (= 7.0.4.3)
127
+ activejob (= 7.0.4.3)
128
+ activemodel (= 7.0.4.3)
129
+ activerecord (= 7.0.4.3)
130
+ activestorage (= 7.0.4.3)
131
+ activesupport (= 7.0.4.3)
132
+ bundler (>= 1.15.0)
133
+ railties (= 7.0.4.3)
134
+ rails-dom-testing (2.0.3)
135
+ activesupport (>= 4.2.0)
136
+ nokogiri (>= 1.6)
137
+ rails-html-sanitizer (1.5.0)
138
+ loofah (~> 2.19, >= 2.19.1)
139
+ railties (7.0.4.3)
140
+ actionpack (= 7.0.4.3)
141
+ activesupport (= 7.0.4.3)
142
+ method_source
143
+ rake (>= 12.2)
144
+ thor (~> 1.0)
145
+ zeitwerk (~> 2.5)
146
+ rainbow (3.1.1)
147
+ rake (13.0.6)
148
+ regexp_parser (2.8.0)
149
+ rexml (3.2.5)
150
+ rspec (3.12.0)
151
+ rspec-core (~> 3.12.0)
152
+ rspec-expectations (~> 3.12.0)
153
+ rspec-mocks (~> 3.12.0)
154
+ rspec-core (3.12.0)
155
+ rspec-support (~> 3.12.0)
156
+ rspec-expectations (3.12.1)
157
+ diff-lcs (>= 1.2.0, < 2.0)
158
+ rspec-support (~> 3.12.0)
159
+ rspec-mocks (3.12.1)
160
+ diff-lcs (>= 1.2.0, < 2.0)
161
+ rspec-support (~> 3.12.0)
162
+ rspec-support (3.12.0)
163
+ rubocop (1.50.2)
164
+ json (~> 2.3)
165
+ parallel (~> 1.10)
166
+ parser (>= 3.2.0.0)
167
+ rainbow (>= 2.2.2, < 4.0)
168
+ regexp_parser (>= 1.8, < 3.0)
169
+ rexml (>= 3.2.5, < 4.0)
170
+ rubocop-ast (>= 1.28.0, < 2.0)
171
+ ruby-progressbar (~> 1.7)
172
+ unicode-display_width (>= 2.4.0, < 3.0)
173
+ rubocop-ast (1.28.0)
174
+ parser (>= 3.2.1.0)
175
+ rubocop-capybara (2.18.0)
176
+ rubocop (~> 1.41)
177
+ rubocop-performance (1.17.1)
178
+ rubocop (>= 1.7.0, < 2.0)
179
+ rubocop-ast (>= 0.4.0)
180
+ rubocop-rails (2.19.1)
181
+ activesupport (>= 4.2.0)
182
+ rack (>= 1.1)
183
+ rubocop (>= 1.33.0, < 2.0)
184
+ rubocop-rspec (2.20.0)
185
+ rubocop (~> 1.33)
186
+ rubocop-capybara (~> 2.17)
187
+ rubocop-shopify (2.13.0)
188
+ rubocop (~> 1.50)
189
+ ruby-progressbar (1.13.0)
190
+ switchcop (0.1.3)
191
+ rubocop (~> 1.48)
192
+ rubocop-performance (~> 1.16)
193
+ rubocop-rails (~> 2.18)
194
+ rubocop-rspec (~> 2.19)
195
+ rubocop-shopify (~> 2.12)
196
+ thor (1.2.1)
197
+ timeout (0.3.2)
198
+ tzinfo (2.0.6)
199
+ concurrent-ruby (~> 1.0)
200
+ unicode-display_width (2.4.2)
201
+ websocket-driver (0.7.5)
202
+ websocket-extensions (>= 0.1.0)
203
+ websocket-extensions (0.1.5)
204
+ zeitwerk (2.6.7)
205
+
206
+ PLATFORMS
207
+ x86_64-linux
208
+
209
+ DEPENDENCIES
210
+ rake (~> 13.0)
211
+ rspec (~> 3.0)
212
+ rubocop (~> 1.21)
213
+ switchcop
214
+ vitepress-rails!
215
+
216
+ BUNDLED WITH
217
+ 2.4.10
data/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Integrate [Vitepress](https://vitepress.vuejs.org/) into your Rails application.
4
4
 
5
+ ## When you should use this gem?
6
+
7
+ - The primary use case is for private documentation that utilizes your Rails authentication system
8
+
5
9
  ## Installation
6
10
 
7
11
  Add this line to your application's Gemfile:
@@ -25,17 +29,19 @@ This command creates docs folder that contains the Vitepress default application
25
29
  2. Adds the following line to your `config/routes.rb` file:
26
30
 
27
31
  ```ruby
28
- mount Vitepress::Engine, at: "/"
32
+ mount Vitepress::Engine, at: "/docs"
29
33
  ```
30
- ***Only works with / path for now***
34
+
35
+ - ***Only works with /docs path for now***
36
+ - In your vitepress config file needs to have base: '/docs/'.
31
37
 
32
38
  ## Usage
33
39
 
34
- 1. Write your `.md` doc inside the `docs` folder.
40
+ 1. Write your `.md` doc inside the `docs` folder.
35
41
  2. Run `rails assets:precompile`.
36
42
  3. Your page can be accessed at `/docs/<your-page-name>`
37
43
 
38
- Your `/` path always will be `docs/index.md`
44
+ Your `/docs` path always will be `docs/index.md`
39
45
 
40
46
  ## Development
41
47
 
@@ -59,4 +65,5 @@ The gem is available as open source under the terms of the [MIT License](https:/
59
65
  ## Code of Conduct
60
66
 
61
67
  Everyone interacting in the Vitepress::Rails project's codebases, issue trackers, chat rooms and mailing lists is
62
- expected to follow the [code of conduct](https://github.com/SwitchDreams/vitepress-rails/blob/master/CODE_OF_CONDUCT.md).
68
+ expected to follow
69
+ the [code of conduct](https://github.com/SwitchDreams/vitepress-rails/blob/master/CODE_OF_CONDUCT.md).
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Vitepress
4
4
  module Rails
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
  end
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ DEFAULT_BASE_PATH = "docs/"
4
+ DOCS_PUBLIC_FOLDER_PATH = "../public/#{DEFAULT_BASE_PATH}"
5
+
3
6
  namespace :vitepress do
4
7
  desc "Build your docs"
5
8
  task build: :environment do
@@ -19,14 +22,17 @@ namespace :vitepress do
19
22
  FileUtils.copy_file(file, File.join(dest, filename))
20
23
  end
21
24
 
25
+ # Create docs public folder
26
+ Dir.mkdir(DOCS_PUBLIC_FOLDER_PATH) unless Dir.exist?(DOCS_PUBLIC_FOLDER_PATH)
27
+
22
28
  # Move assets files to public
23
29
  if Dir.exist?(".vitepress/dist/assets")
24
- FileUtils.copy_entry(".vitepress/dist/assets", "../public/assets")
30
+ FileUtils.copy_entry(".vitepress/dist/assets", "#{DOCS_PUBLIC_FOLDER_PATH}assets")
25
31
  end
26
32
 
27
33
  # Copy public files
28
34
  if Dir.exist?("public")
29
- FileUtils.copy_entry("public", "../public")
35
+ FileUtils.copy_entry("public", DOCS_PUBLIC_FOLDER_PATH)
30
36
  end
31
37
  end
32
38
  end
@@ -1,4 +1,6 @@
1
1
  export default {
2
2
  title: 'VitePress Rails',
3
3
  description: 'Docs with vitepress-rails',
4
+ base: '/docs/',
5
+ cleanUrls: true,
4
6
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vitepress-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - PedroAugustoRamalhoDuarte
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-27 00:00:00.000000000 Z
11
+ date: 2023-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: high_voltage
@@ -46,6 +46,7 @@ extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
48
  - Gemfile
49
+ - Gemfile.lock
49
50
  - README.md
50
51
  - Rakefile
51
52
  - app/controllers/concerns/vitepress/page.rb