cheatset 1.1.3 → 1.1.4

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: 6ff7c204890ac4b633dd4d8f6e572552ad729668
4
- data.tar.gz: d528124246da08fec16b427f9b45be02ada11b9c
3
+ metadata.gz: c6ecd818ba745c3c04ff097182d2f9e8f3419331
4
+ data.tar.gz: 0f418a6f8aad8fa20188e8d6e79571eeb37f7637
5
5
  SHA512:
6
- metadata.gz: ab416caa56ba8d044075c7d70d8ef51a44245695aa10a47a49c6a4a04394a7b49795dcf11dbcba1370c222e4c999ff10eda3a7b6e9b13bb7d91ad4930a09a4fb
7
- data.tar.gz: abf59ef9dde9210cb76c9723cd385e496cc65efa0a74094aa03465900fbdef884b4dc8e6608a4d24f65d1983c340be31c78f2cf898487fde06f41c61c51c1d94
6
+ metadata.gz: 4e38c2a1dd9f5a7d9038aad480450710a9a02fb4c1f4dde5aa97037276da334a26cd354710d2d251bb6952e7ff67fd5aced2071a336c61de0fef5967c6036169
7
+ data.tar.gz: 8157dd1d6610a50995675eb07fcc4660acff1b47f7acf08cea7a64584180c92cbd42651b9e0e3a100513b7460e9d85e88d0c8f4b6aa32c720486416408b84c6e
data/README.md CHANGED
@@ -2,25 +2,31 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/cheatset.png)](http://badge.fury.io/rb/cheatset)
4
4
 
5
- Generate your own cheatsheets as docsets for [Dash](http://kapeli.com/dash)!
6
- Use this simple command line tool and write your cheatsheets in an easy
5
+ Generate your own cheat sheets as docsets for [Dash](http://kapeli.com/dash)!
6
+ Use this simple command line tool and write your cheat sheets in an easy
7
7
  language (Ruby DSL).
8
8
 
9
9
  ## Installation
10
10
 
11
11
  $ gem install cheatset
12
12
 
13
+ ## Contributing
14
+
15
+ If you make an useful cheat sheet, please [contribute it](https://github.com/Kapeli/cheatsheets#readme) to Dash.
16
+
13
17
  ## Usage
14
18
 
15
- Write a file (here `sample.cheatsheet`) containing your cheatsheet data, e.g.:
19
+ Write a file (here `sample.rb`) containing your cheat sheet data, e.g.:
16
20
 
17
21
  ```ruby
18
22
  cheatsheet do
19
- title 'Sample' # Will be displayed by Dash in the docset list
20
- short_name 'sample' # Used for the filename of the docset
21
- introduction 'My *awesome* cheatsheet' # Can contain markdown and multiple lines
23
+ title 'Sample' # Will be displayed by Dash in the docset list
24
+ docset_file_name 'Sample' # Used for the filename of the docset
25
+ keyword 'sample' # Used as the initial search keyword (listed in Preferences > Docsets)
26
+
27
+ introduction 'My *awesome* cheat sheet' # Optional, can contain markdown and multiple lines
22
28
 
23
- # A cheatsheet must consist of categories
29
+ # A cheat sheet must consist of categories
24
30
  category do
25
31
  id 'Windows' # Must be unique and is used as title of the category
26
32
 
@@ -49,26 +55,20 @@ cheatsheet do
49
55
  end
50
56
  end
51
57
 
52
- notes 'Some notes at the end of the cheatsheet'
58
+ notes 'Some notes at the end of the cheat sheet'
53
59
  end
54
60
  ```
55
61
  The following values may contain markdown formatted text:
56
62
 
57
- * The `introduction` and the `notes` of the cheatsheet
63
+ * The `introduction` and the `notes` of the cheat sheet
58
64
  * The `name` and the `notes` of the entries
59
65
 
60
66
  For more complete examples look at some of
61
- [the actual cheatsheets](https://github.com/Kapeli/cheatsheets).
67
+ [the actual cheat sheets](https://github.com/Kapeli/cheatsheets).
62
68
 
63
69
  To convert this file to a docset, call
64
70
 
65
- $ cheatset generate sample.cheatsheet
66
-
67
-
68
- ## Contributing
69
-
70
- Yes, please! Open issues and pull requests on the
71
- [GitHub page](https://github.com/Kapeli/cheatset).
71
+ $ cheatset generate sample.rb
72
72
 
73
73
  ## Thanks
74
74
 
@@ -8,7 +8,7 @@ require 'uri'
8
8
  class Cheatset::Creator
9
9
  def initialize(cheatsheet)
10
10
  @cheatsheet = cheatsheet
11
- @docset_path = "#{@cheatsheet.short_name}.docset"
11
+ @docset_path = "#{@cheatsheet.docset_file_name}.docset"
12
12
  @path = "#{@docset_path}/Contents/"
13
13
  end
14
14
 
@@ -44,9 +44,9 @@ class Cheatset::Creator
44
44
 
45
45
  def generate_plist_file
46
46
  plist_data = {
47
- 'CFBundleIdentifier' => @cheatsheet.short_name,
47
+ 'CFBundleIdentifier' => @cheatsheet.keyword,
48
48
  'CFBundleName' => @cheatsheet.title,
49
- 'DocSetPlatformFamily' => @cheatsheet.short_name,
49
+ 'DocSetPlatformFamily' => @cheatsheet.keyword,
50
50
  'DashDocSetFamily' => 'cheatsheet',
51
51
  'isDashDocset' => true,
52
52
  'dashIndexFilePath' => 'index.html'
@@ -2,7 +2,7 @@ module Cheatset
2
2
  module DSL
3
3
  class Cheatsheet < Base
4
4
  attr_reader :categories
5
- define_attrs :title, :short_name, :source_url, :platform
5
+ define_attrs :title, :docset_file_name, :keyword, :source_url, :platform
6
6
  define_markdown_attrs :introduction, :notes
7
7
 
8
8
  def initialize(&block)
@@ -1,3 +1,3 @@
1
1
  module Cheatset
2
- VERSION = '1.1.3'
2
+ VERSION = '1.1.4'
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.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bogdan Popescu