cheatset 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/cheatset +0 -0
- data/lib/cheatset/creator.rb +5 -5
- data/lib/cheatset/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c3dedf5b4f74b0a764532e30fe35be41d0899a605361d9f42aa8ad1a007cf10
|
4
|
+
data.tar.gz: 4b8fc199fcaf458d3168cecf74421a30023b09569788291a135df57d94631911
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37bc4d9e3422a91adcf92ba90fcedd17baa1e9147b9ddb33557bdf147b291703145b3c3032d72ac5277d0b36010438448b3ca768ed930169687bc70aa8ca82d0
|
7
|
+
data.tar.gz: eef8ce413f0854ed65f8484d181c8d72ed3cf426fea1899dcb281b3d12676609fcef658afd217f21b60c94a14eb6dd987246761b52bdffb06868a805138c3c90
|
data/bin/cheatset
CHANGED
File without changes
|
data/lib/cheatset/creator.rb
CHANGED
@@ -3,7 +3,7 @@ require 'sqlite3'
|
|
3
3
|
require 'fileutils'
|
4
4
|
require 'haml'
|
5
5
|
require 'ostruct'
|
6
|
-
require '
|
6
|
+
require 'cgi'
|
7
7
|
require 'pathname'
|
8
8
|
|
9
9
|
class Cheatset::Creator
|
@@ -84,9 +84,9 @@ class Cheatset::Creator
|
|
84
84
|
sql = 'INSERT INTO searchIndex(name, type, path) VALUES (?, ?, ?)'
|
85
85
|
db.execute(sql, @cheatsheet.title, 'Category',
|
86
86
|
"index.html")
|
87
|
-
|
87
|
+
|
88
88
|
@cheatsheet.categories.each do |category|
|
89
|
-
category_strip =
|
89
|
+
category_strip = CGI.escape(category.id.strip).gsub(/\//, '%252F');
|
90
90
|
if @cheatsheet.title != category.id
|
91
91
|
db.execute(sql, category.id, 'Category',
|
92
92
|
"index.html\#//dash_ref/Category/#{category_strip}/1")
|
@@ -96,7 +96,7 @@ class Cheatset::Creator
|
|
96
96
|
if entry.command && entry.command.length > 0
|
97
97
|
first_command = entry.command.first
|
98
98
|
end
|
99
|
-
href = (entry.name || entry.index_name) ? "index.html\#//dash_ref_#{category_strip}/Entry/#{
|
99
|
+
href = (entry.name || entry.index_name) ? "index.html\#//dash_ref_#{category_strip}/Entry/#{CGI.escape((entry.index_name) ? entry.index_name.strip : entry.tags_stripped_name.strip).gsub(/\//, '%252F')}/0" : (first_command) ? "index.html\#//dash_ref_#{category_strip}/Command/#{URI.escape(first_command).gsub(/\//, '%252F')}/0" : ""
|
100
100
|
if entry.command
|
101
101
|
entry.command.each do |command|
|
102
102
|
if(!command.strip.empty? && !entry.not_in_main_index)
|
@@ -124,4 +124,4 @@ class Cheatset::Creator
|
|
124
124
|
end
|
125
125
|
end
|
126
126
|
end
|
127
|
-
end
|
127
|
+
end
|
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.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bogdan Popescu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
204
|
- !ruby/object:Gem::Version
|
205
205
|
version: '0'
|
206
206
|
requirements: []
|
207
|
-
rubygems_version: 3.0.
|
207
|
+
rubygems_version: 3.0.3
|
208
208
|
signing_key:
|
209
209
|
specification_version: 4
|
210
210
|
summary: Generate cheat sheets for Dash
|