cheatset 1.2.10 → 1.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/cheatset/creator.rb +8 -2
- 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: cd6444720edc953b1740c3549b017fc03348d07c
|
4
|
+
data.tar.gz: e34db979d10aeb1405647bc127c7701003d0b810
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d6b24949654f2aa9ae2f7aa213f8d55ef30233d90bc4ff9f12678b5b71d920d340c416239de6652df2094d8e4e535221be8d67178e281a2501acfe883ee04fc
|
7
|
+
data.tar.gz: 1aaaed8f34de52dc6d17ecd09fea47864dc94c261708d6483dd9a4006f38c0f7aaeb74fefa56c6ea4687e739698796fc9e52a0b1ae5588b8bc0638f24f651a73
|
data/README.md
CHANGED
@@ -26,10 +26,10 @@ Write a file (here `sample.rb`) containing your cheat sheet data, e.g.:
|
|
26
26
|
|
27
27
|
```ruby
|
28
28
|
cheatsheet do
|
29
|
-
title 'Sample'
|
30
|
-
docset_file_name 'Sample'
|
31
|
-
keyword 'sample'
|
32
|
-
resources 'resources_dir' # An optional resources folder which can contain images or anything else
|
29
|
+
title 'Sample' # Will be displayed by Dash in the docset list
|
30
|
+
docset_file_name 'Sample' # Used for the filename of the docset
|
31
|
+
keyword 'sample' # Used as the initial search keyword (listed in Preferences > Docsets)
|
32
|
+
# resources 'resources_dir' # An optional resources folder which can contain images or anything else
|
33
33
|
|
34
34
|
introduction 'My *awesome* cheat sheet' # Optional, can contain Markdown or HTML
|
35
35
|
|
data/lib/cheatset/creator.rb
CHANGED
@@ -4,6 +4,7 @@ require 'fileutils'
|
|
4
4
|
require 'haml'
|
5
5
|
require 'ostruct'
|
6
6
|
require 'uri'
|
7
|
+
require 'pathname'
|
7
8
|
|
8
9
|
class Cheatset::Creator
|
9
10
|
def initialize(cheatsheet, filename)
|
@@ -43,8 +44,13 @@ class Cheatset::Creator
|
|
43
44
|
FileUtils.cp_r("#{tpl_path}/cheatset_resources", doc_path)
|
44
45
|
resources = @cheatsheet.resources
|
45
46
|
if resources && !resources.empty?
|
46
|
-
|
47
|
-
|
47
|
+
if Pathname.new(resources).absolute?
|
48
|
+
resources_path = resources
|
49
|
+
else
|
50
|
+
base_dir = File.dirname(@filename)
|
51
|
+
resources_path = "#{base_dir}/#{resources}"
|
52
|
+
end
|
53
|
+
|
48
54
|
FileUtils.cp_r(resources_path, doc_path)
|
49
55
|
end
|
50
56
|
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.2.
|
4
|
+
version: 1.2.11
|
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-03-
|
11
|
+
date: 2014-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|