user_docs 0.6.0 → 0.7.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: 17570ca7f142aca7a866a337055a720d2acae9ea4c851f0b9a6b8ca3274c5be9
4
- data.tar.gz: 7b7226c0791a3256f6c718d5388d001c9cab842e9798fe5b32ef02b4e32f532e
3
+ metadata.gz: f228c6cb3ca1e8592a67e4e0ee6dc8e6a209544606772749a246502176babe6c
4
+ data.tar.gz: e4ba2e9cda4db54c58b119bcce3dcd10d8885c67e3b624d540b987b16464b0ac
5
5
  SHA512:
6
- metadata.gz: bff557e8d7dc2f577bbd9789c1f4bd928f45b776cb7b4f824303d2513e20a4498ec439f90eee27c29d0589f30f586b3b224226f76a4251a37a60ef534a5c2b2f
7
- data.tar.gz: 94710b2d8796ab802bf14068787ea5dccc007477289b0b42a0a13e7a30be1394c153e403bd2fbeb2b35df99ed3d9bc07282384844b3f861a8d231dc0fc301f83
6
+ metadata.gz: cb27d9911c94b771df7694184f2d15cd608deba4502e95b4691d6572367739112e982e63095367707fed1f14aa940b615dc50a31cc41532b4d8a263edaa75ef1
7
+ data.tar.gz: 5dd84a8f0cd6fe49236d5af72fe7189a89cf7f11cec57486acc42d80bed7bf8ba18f729a3ec6ff3c6d8278a896358d48b45560ad55234c37d76591976d1c931f
@@ -10,7 +10,6 @@ module UserDocs
10
10
  def create
11
11
  check_for_version
12
12
 
13
- template "_config", ".docs/_config.yml"
14
13
  template "index", ".docs/index.html"
15
14
  template "_layouts/default", ".docs/_layouts/default.html"
16
15
  template "_includes/index", ".docs/_includes/index.html"
@@ -2,7 +2,7 @@
2
2
 
3
3
  {% assign version_directory = page.version | default: site.version | replace: '.', '_' %}
4
4
  {% for feature in site.data.versions[version_directory] %}
5
- <h2 class="mt-3">{{feature[0]}}</h2>
5
+ <h2 class="mt-3">{{feature[0] | replace: '_', ' ' | capitalize}}</h2>
6
6
 
7
7
  <div class="accordian" id="{{feature[0]}}">
8
8
  {% for methods in feature[1] %}
@@ -24,7 +24,7 @@
24
24
  <div class="dropdown-menu" aria-labelledby="navbarDropdown">
25
25
  {% for version in site.data.versions %}
26
26
  {% assign dot_version = version.first | replace: '_', '.' %}
27
- {% assign version_path = "/versions/" | append: dot_version %}
27
+ {% assign version_path = "/versions/" | append: version.first %}
28
28
  {% assign css_class = "" %}
29
29
  {% if dot_version == current_page_version %}
30
30
  {% assign css_class = " active" %}
@@ -4,15 +4,15 @@ namespace :user_docs do
4
4
  desc "Build site"
5
5
  task build_site: :environment do
6
6
  procedures_dir = Rails.root.join("docs")
7
- temp_dir = Rails.root.join(".docs")
7
+ hidden_dir = Rails.root.join(".docs")
8
8
  output_dir = Rails.root.join("public/docs")
9
9
 
10
- Rails::Generators.invoke("user_docs:install")
10
+ Rails::Generators.invoke("user_docs:install") unless Dir.exist?(hidden_dir)
11
+
11
12
  system("rails test #{procedures_dir}/*")
12
13
  system <<~CMD.squish
13
14
  jekyll build
14
- --source #{temp_dir} --destination #{output_dir} --baseurl /docs
15
+ --source #{hidden_dir} --destination #{output_dir} --baseurl /docs
15
16
  CMD
16
- FileUtils.rm_rf(temp_dir)
17
17
  end
18
18
  end
@@ -39,7 +39,7 @@ module UserDocs
39
39
  end
40
40
 
41
41
  def version
42
- Rails.application.class.module_parent::VERSION
42
+ Rails.application.class.module_parent::VERSION.tr(".", "_")
43
43
  end
44
44
 
45
45
  def klass_name
@@ -63,7 +63,7 @@ module UserDocs
63
63
  <<~HTML
64
64
  ---
65
65
  layout: default
66
- version: #{version}
66
+ version: #{version.tr!('_', '.')}
67
67
  ---
68
68
  {% include index.html %}
69
69
  HTML
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UserDocs
4
- VERSION = "0.6.0"
4
+ VERSION = "0.7.0"
5
5
  end
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.6.0
4
+ version: 0.7.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-26 00:00:00.000000000 Z
11
+ date: 2020-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -175,7 +175,6 @@ 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
179
178
  - lib/generators/user_docs/templates/_includes/index.tt
180
179
  - lib/generators/user_docs/templates/_layouts/default.tt
181
180
  - lib/generators/user_docs/templates/index.tt
@@ -1 +0,0 @@
1
- keep_files: ['versions', 'assets']