cheatset 1.1.4 → 1.1.5

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: c6ecd818ba745c3c04ff097182d2f9e8f3419331
4
- data.tar.gz: 0f418a6f8aad8fa20188e8d6e79571eeb37f7637
3
+ metadata.gz: 77340c45e3e9671109aa4a87ab8de7f163a26320
4
+ data.tar.gz: 4faddc27be17912c227cf389b83ebc68c34326b4
5
5
  SHA512:
6
- metadata.gz: 4e38c2a1dd9f5a7d9038aad480450710a9a02fb4c1f4dde5aa97037276da334a26cd354710d2d251bb6952e7ff67fd5aced2071a336c61de0fef5967c6036169
7
- data.tar.gz: 8157dd1d6610a50995675eb07fcc4660acff1b47f7acf08cea7a64584180c92cbd42651b9e0e3a100513b7460e9d85e88d0c8f4b6aa32c720486416408b84c6e
6
+ metadata.gz: ca2bc3c320ee6a1e59ce6f6c9ecdb1ba0a5c36d0e00da38eb5c7acee8678a374288f471a9919b07401541372baf8ddc6deea0757dcf6fe553fd76f5ff7c1ad27
7
+ data.tar.gz: 935dfee6e5ef3ed21e315b18d17965edb5286fe5126b84db66487a62ff48978d2d76ce876c09fcdeb2ff1ed1cb6ca6fff121cb7467a8930e93f9b3975e28c2d1
data/README.md CHANGED
@@ -10,7 +10,7 @@ language (Ruby DSL).
10
10
 
11
11
  $ gem install cheatset
12
12
 
13
- ## Contributing
13
+ ## Contributions
14
14
 
15
15
  If you make an useful cheat sheet, please [contribute it](https://github.com/Kapeli/cheatsheets#readme) to Dash.
16
16
 
@@ -24,7 +24,7 @@ cheatsheet do
24
24
  docset_file_name 'Sample' # Used for the filename of the docset
25
25
  keyword 'sample' # Used as the initial search keyword (listed in Preferences > Docsets)
26
26
 
27
- introduction 'My *awesome* cheat sheet' # Optional, can contain markdown and multiple lines
27
+ introduction 'My *awesome* cheat sheet' # Optional, can contain Markdown or HTML
28
28
 
29
29
  # A cheat sheet must consist of categories
30
30
  category do
@@ -33,8 +33,8 @@ cheatsheet do
33
33
  entry do
34
34
  command 'CMD-n' # Optional
35
35
  command 'CMD-N' # Multiple commands are supported
36
- name 'Create window' # A short name, can contain markdown
37
- notes 'Some notes' # Optional longer explanation, can contain markdown
36
+ name 'Create window' # A short name, can contain Markdown or HTML
37
+ notes 'Some notes' # Optional longer explanation, can contain Markdown or HTML
38
38
  end
39
39
  entry do
40
40
  command 'CMD-w'
@@ -50,7 +50,7 @@ cheatsheet do
50
50
  ```ruby
51
51
  sample = "You can include code snippets as well"
52
52
  ```
53
- Or anything else **markdown**.
53
+ Or anything else **Markdown** or HTML.
54
54
  END
55
55
  end
56
56
  end
@@ -58,7 +58,7 @@ cheatsheet do
58
58
  notes 'Some notes at the end of the cheat sheet'
59
59
  end
60
60
  ```
61
- The following values may contain markdown formatted text:
61
+ The following values may contain Markdown or HTML:
62
62
 
63
63
  * The `introduction` and the `notes` of the cheat sheet
64
64
  * The `name` and the `notes` of the entries
@@ -2,7 +2,7 @@ module Cheatset
2
2
  module DSL
3
3
  class Category < Base
4
4
  attr_reader :entries
5
- define_attrs :id
5
+ define_attrs :id, :hasEntry
6
6
 
7
7
  def initialize(&block)
8
8
  @entries = []
@@ -6,9 +6,14 @@
6
6
  %link{rel: 'stylesheet', href: 'style.css'}
7
7
  - categories.each do |category|
8
8
  %link{href: "//dash_ref/Category/#{category.id.strip.gsub(/\//, '%2F')}/1"}
9
+ - category.hasEntry(false)
9
10
  - category.entries.each_with_index do |entry, index|
10
11
  - if entry.name
12
+ - category.hasEntry(true)
11
13
  %link{href: "//dash_ref_#{category.id.strip.gsub(/\//, '%2F')}/Entry/#{entry.tags_stripped_name.strip.gsub(/\//, '%2F')}/0"}
14
+ - if !category.hasEntry
15
+ %link{href: "//dash_ref/Entry/#{category.id.strip.gsub(/\//, '%2F')}/0"}
16
+
12
17
  %body
13
18
  %header
14
19
  %h1= title
@@ -18,6 +23,8 @@
18
23
 
19
24
  - categories.each do |category|
20
25
  %section.category
26
+ - if !category.hasEntry
27
+ %a{name: "//dash_ref/Entry/#{category.id.strip.gsub(/\//, '%2F')}/0"}
21
28
  %h2{id:"//dash_ref/Category/#{category.id.strip.gsub(/\//, '%2F')}/1"}
22
29
  = category.id
23
30
  %table
@@ -1,3 +1,3 @@
1
1
  module Cheatset
2
- VERSION = '1.1.4'
2
+ VERSION = '1.1.5'
3
3
  end
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.1.4
4
+ version: 1.1.5
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-02-20 00:00:00.000000000 Z
11
+ date: 2014-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler