cheatset 1.2.14 → 1.2.15
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 +4 -4
- data/lib/cheatset/creator.rb +5 -7
- data/lib/cheatset/templates/template.haml +7 -6
- data/lib/cheatset/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 543d5b532d6c40d2194f9657a38738716e0f3255
|
|
4
|
+
data.tar.gz: 2c8364567d3982eceb92abbd30627e96671204e3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0d709062d3517643dc61f00638e637eec0d86250238bf885fd4ffe37ab95df96c948531aff84b460d910fd80ce4c77aab1becf119a2ee5bbd329a658d4f87ba
|
|
7
|
+
data.tar.gz: d2d690590d3a05c48c409adb6df43e3d5c8d8e5556a893d36f8d181956cbceb2ef901f45b51e4ced7249b953f48d3cbad849dcf1db2408d421fbc3006324cca0
|
data/lib/cheatset/creator.rb
CHANGED
|
@@ -90,25 +90,23 @@ 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
94
|
if entry.command
|
|
94
95
|
entry.command.each do |command|
|
|
95
96
|
if(!command.strip.empty?)
|
|
96
|
-
db.execute(sql, command.strip, 'Command',
|
|
97
|
-
"index.html\#//dash_ref_#{category_strip}/Entry/#{URI.escape(entry.tags_stripped_name.strip).gsub(/\//, '%252F')}/0")
|
|
97
|
+
db.execute(sql, command.strip, 'Command', href)
|
|
98
98
|
end
|
|
99
99
|
end
|
|
100
100
|
end
|
|
101
101
|
if entry.td_command
|
|
102
102
|
entry.td_command.each do |command|
|
|
103
103
|
if(!command.strip.empty?)
|
|
104
|
-
db.execute(sql, command.strip, 'Command',
|
|
105
|
-
"index.html\#//dash_ref_#{category_strip}/Entry/#{URI.escape(entry.tags_stripped_name.strip).gsub(/\//, '%252F')}/0")
|
|
104
|
+
db.execute(sql, command.strip, 'Command', href)
|
|
106
105
|
end
|
|
107
106
|
end
|
|
108
107
|
end
|
|
109
|
-
if entry.name
|
|
110
|
-
db.execute(sql, (entry.index_name) ? entry.index_name.strip : entry.tags_stripped_name.strip, 'Entry',
|
|
111
|
-
"index.html\#//dash_ref_#{category_strip}/Entry/#{URI.escape(entry.tags_stripped_name.strip).gsub(/\//, '%252F')}/0")
|
|
108
|
+
if entry.name || entry.index_name
|
|
109
|
+
db.execute(sql, (entry.index_name) ? entry.index_name.strip : entry.tags_stripped_name.strip, 'Entry', href)
|
|
112
110
|
end
|
|
113
111
|
end
|
|
114
112
|
end
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
%link{href: "//dash_ref/Category/#{category.id.strip.gsub(/\//, '%2F')}/1"}
|
|
11
11
|
- category.hasEntry(false)
|
|
12
12
|
- category.entries.each_with_index do |entry, index|
|
|
13
|
-
- if entry.name
|
|
13
|
+
- if entry.name || entry.index_name
|
|
14
14
|
- category.hasEntry(true)
|
|
15
|
-
%link{href: "//dash_ref_#{category.id.strip.gsub(/\//, '%2F')}/Entry/#{entry.tags_stripped_name.strip.gsub(/\//, '%2F')}/0"}
|
|
15
|
+
%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"}
|
|
16
16
|
- if !category.hasEntry
|
|
17
17
|
%link{href: "//dash_ref/Entry/#{category.id.strip.gsub(/\//, '%2F')}/0"}
|
|
18
18
|
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
%th~ header
|
|
37
37
|
|
|
38
38
|
- category.entries.each_with_index do |entry, index|
|
|
39
|
-
%tr{id: ("//dash_ref_#{category.id.strip.gsub(/\//, '%2F')}/Entry/#{entry.tags_stripped_name.strip.gsub(/\//, '%2F')}/0" if entry.name)}
|
|
39
|
+
%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) )}
|
|
40
40
|
- if entry.command
|
|
41
41
|
%td.command
|
|
42
42
|
- entry.command.each do |command|
|
|
@@ -47,9 +47,10 @@
|
|
|
47
47
|
%td.td_command
|
|
48
48
|
- if !command.empty?
|
|
49
49
|
%code= CGI.escapeHTML(command)
|
|
50
|
-
|
|
51
|
-
.
|
|
52
|
-
|
|
50
|
+
- if entry.name || entry.notes
|
|
51
|
+
%td.description{:colspan => ("2" unless entry.command || entry.td_command || entry.td_notes)}
|
|
52
|
+
.name~ entry.name
|
|
53
|
+
.notes~ entry.notes
|
|
53
54
|
- if entry.td_notes
|
|
54
55
|
- entry.td_notes.each do |notes|
|
|
55
56
|
%td.td_notes
|
data/lib/cheatset/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cheatset
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bogdan Popescu
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-04-
|
|
11
|
+
date: 2014-04-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|