cheatset 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cheatset/creator.rb +5 -1
- data/lib/cheatset/templates/template.haml +4 -1
- data/lib/cheatset/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca7590968ae9ad2418e0b31d95acf9053b668b2e
|
4
|
+
data.tar.gz: 604dc4a5b835266f4bc0ac7c5520c4b87be93324
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0878b2492a0e0cfb6a1e555166c69447aa2717ba66bf0eb61fb56454b6be8c700182cde6a9f9f5cddcae4942f03d6a8af1c3e6fcd020af615bd93396c557d23c
|
7
|
+
data.tar.gz: 69168d27ad6276ed86c8037763a818aa45b69142cdac83ff0e6a3d6113270d49a3fcff628c960b6042d099f714adb4bccf576e28fe54ec3e638cc0029ac705c5
|
data/lib/cheatset/creator.rb
CHANGED
@@ -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
|
-
|
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|
|
data/lib/cheatset/version.rb
CHANGED