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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 135588ace9eefa6561a26a52b351ea99719ceeb4
4
- data.tar.gz: 5564ddc1d9e6d2a2ff0959dd364c49a9140a28a3
3
+ metadata.gz: cd6444720edc953b1740c3549b017fc03348d07c
4
+ data.tar.gz: e34db979d10aeb1405647bc127c7701003d0b810
5
5
  SHA512:
6
- metadata.gz: d745668de0c5c896624769057d7e47b8acdd7ae041b7373e425040babbd39d4d6968ec6fd4cfe8962152c0106ca8a979f5f54fbba62529741197e4db3ce8c42f
7
- data.tar.gz: 5615408869fb0c3b32d925d0986738cf4be637e35357bc2d6fbcbcce86334e7d581f385148f138512a371523e7d16fe35f230bd4c48685e78002aad75e616877
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' # 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
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
 
@@ -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
- base_dir = File.dirname(@filename)
47
- resources_path = "#{base_dir}/#{resources}"
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
@@ -1,3 +1,3 @@
1
1
  module Cheatset
2
- VERSION = '1.2.10'
2
+ VERSION = '1.2.11'
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.2.10
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-26 00:00:00.000000000 Z
11
+ date: 2014-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler