cheatset 1.3.0 → 1.3.1

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
  SHA1:
3
- metadata.gz: 9de2377e32fdff1f9f9e5662b2a8eb34b00d6162
4
- data.tar.gz: e541bcf8e42b88b7018de1e03a804690d3721274
3
+ metadata.gz: ca7590968ae9ad2418e0b31d95acf9053b668b2e
4
+ data.tar.gz: 604dc4a5b835266f4bc0ac7c5520c4b87be93324
5
5
  SHA512:
6
- metadata.gz: 05d7b41b10163c0b2cb8a170b5d08b3959ad279bcae0795f77e5ccd6a4ec79f5e969e2e661675bf9d1df397f1874f77cc3bb7b68c0d35286738f9382128ec09a
7
- data.tar.gz: 6c796d238d53291df9c8f26175cf237b6b7d3db9d6a318c5a7922719c0d1ee4dea48d785633fb3588be40d97ec668233bd5ff98ea540fe64233eaf5fe184e035
6
+ metadata.gz: 0878b2492a0e0cfb6a1e555166c69447aa2717ba66bf0eb61fb56454b6be8c700182cde6a9f9f5cddcae4942f03d6a8af1c3e6fcd020af615bd93396c557d23c
7
+ data.tar.gz: 69168d27ad6276ed86c8037763a818aa45b69142cdac83ff0e6a3d6113270d49a3fcff628c960b6042d099f714adb4bccf576e28fe54ec3e638cc0029ac705c5
@@ -90,7 +90,11 @@ class Cheatset::Creator
90
90
  db.execute(sql, category.id, 'Category',
91
91
  "index.html\#//dash_ref/Category/#{category_strip}/1")
92
92
  category.entries.each_with_index do |entry, index|
93
- href = (entry.name || entry.index_name) ? "index.html\#//dash_ref_#{category_strip}/Entry/#{URI.escape((entry.name) ? entry.tags_stripped_name.strip : entry.index_name.strip).gsub(/\//, '%252F')}/0" : ""
93
+ first_command = nil;
94
+ if entry.command && entry.command.length > 0
95
+ first_command = entry.command.first
96
+ end
97
+ href = (entry.name || entry.index_name) ? "index.html\#//dash_ref_#{category_strip}/Entry/#{URI.escape((entry.name) ? entry.tags_stripped_name.strip : entry.index_name.strip).gsub(/\//, '%252F')}/0" : (first_command) ? "index.html\#//dash_ref_#{category_strip}/Command/#{URI.escape(first_command).gsub(/\//, '%252F')}/0" : ""
94
98
  if entry.command
95
99
  entry.command.each do |command|
96
100
  if(!command.strip.empty?)
@@ -15,6 +15,9 @@
15
15
  - if entry.name || entry.index_name
16
16
  - category.hasEntry(true)
17
17
  %link{href: "//dash_ref_#{category.id.strip.gsub(/\//, '%2F')}/Entry/#{(entry.name) ? entry.tags_stripped_name.strip.gsub(/\//, '%2F') : entry.index_name.strip.gsub(/\//, '%2F')}/0"}
18
+ - elsif entry.command && entry.command.length > 0
19
+ - category.hasEntry(true)
20
+ %link{href: "//dash_ref_#{category.id.strip.gsub(/\//, '%2F')}/Command/#{entry.command.first.strip.gsub(/\//, '%2F')}/0"}
18
21
  - if !category.hasEntry
19
22
  %link{href: "//dash_ref/Entry/#{category.id.strip.gsub(/\//, '%2F')}/0"}
20
23
 
@@ -38,7 +41,7 @@
38
41
  %th~ header
39
42
 
40
43
  - category.entries.each_with_index do |entry, index|
41
- %tr{id: ("//dash_ref_#{category.id.strip.gsub(/\//, '%2F')}/Entry/#{(entry.name) ? entry.tags_stripped_name.strip.gsub(/\//, '%2F') : entry.index_name.strip.gsub(/\//, '%2F')}/0" if (entry.name || entry.index_name) )}
44
+ %tr{id: ((entry.name || entry.index_name) ? "//dash_ref_#{category.id.strip.gsub(/\//, '%2F')}/Entry/#{(entry.name) ? entry.tags_stripped_name.strip.gsub(/\//, '%2F') : entry.index_name.strip.gsub(/\//, '%2F')}/0" : "//dash_ref_#{category.id.strip.gsub(/\//, '%2F')}/Command/#{entry.command.first.strip.gsub(/\//, '%2F')}/0" if (entry.name || entry.index_name || (entry.command && entry.command.length > 0)) )}
42
45
  - if entry.command
43
46
  %td.command
44
47
  - entry.command.each do |command|
@@ -1,3 +1,3 @@
1
1
  module Cheatset
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cheatset
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bogdan Popescu