nanoc-sprockets3 1.0.4 → 1.0.5

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: 0aa75452f945f8ae6fb22cfebc74a85b293c358e
4
- data.tar.gz: bbdcce9f92ebdb8da2765129766284369eb53744
3
+ metadata.gz: afebd912a2e6687d88ef00263aba7f161024488c
4
+ data.tar.gz: 8ece79d7bcd4dd111ddea20e66957b66fa3d177d
5
5
  SHA512:
6
- metadata.gz: c36c427fd2e67b68d45d6c1304c47039061c8d06792a4b1786b1c1089e7934eed886c0b20c7f9e163815ffb9e53c124d93de6b888a0ad30da76e3c0db8404672
7
- data.tar.gz: bd13938df00b7e9ce2410c5f0f347ce2a668f292f1eec95eb55899014060c208c64cf36a93a20046ee7f3307061311bddeb2b1a309ec25505f1990ee36f7dfb3
6
+ metadata.gz: b3fcaafdf5b160a72f9bf455e2ee404aa8e2e92844f55f55bf5447383baf299171d13296cd0c5ac8f4bf2ee530e54feb161d8835d24ea3344922d5abb9bec3cd
7
+ data.tar.gz: 8e4a87d0effb7b47c4019c00ca66415b1e20cceb4a94c8d3cabfc5126bbd2e57c2dd8efd6f556db8360724f692734b5e75a2786a0a1645b8b6c5b97e76573586
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ nanoc-sprockets (1.0.5) stable;
2
+
3
+ * add support for both Nanoc 3.x and Nanoc 4.x
4
+ * provide better error output
5
+ * fix missing documentation on debug mode
6
+
1
7
  nanoc-sprockets (1.0.4) stable;
2
8
 
3
9
  * add support for Sprockets ~> 3.2, >= 3.0.0
data/README.md CHANGED
@@ -6,6 +6,8 @@ You are using [nanoc-sprockets-filter][nanoc-sprockets-filter] or [nanoc-sprocke
6
6
  you would like to use Sprockets 3.x to take advantages of the news features then [nanoc-sprockets3] is
7
7
  what you are looking for !
8
8
 
9
+ *Compatible* with **Nanoc 3.x** and **Nanoc 4.x**
10
+
9
11
  **Note:** *Unlike [nanoc-sprockets-filter] or [nanoc-sprockets] that lack a support
10
12
  for dependency tracking, which is annoying when working with partials and/or livereload, [nanoc-sprockets3] is built
11
13
  on top of [Sprockets 3.x][sprockets] and integrates seamlessly with Nanoc3/nanoc4 and livereload.
@@ -35,6 +37,7 @@ Currently you can configure [nanoc-sprockets3][nanoc-sprockets3] with the follow
35
37
  - **prefix** *[default: '/asset']* which is the prefix to give to all assets
36
38
  - **digest** *[default: false]* which when true will return digest paths instead of logical path
37
39
  - **environment** which is the Sprockets environment to use
40
+ - **debug** *[default: false]* which when set to true activate verbosity
38
41
 
39
42
  The default environment is configured with the following paths
40
43
  - content/assets/
@@ -61,10 +61,10 @@ module Nanoc::Sprockets
61
61
 
62
62
  # Returns the path to an item or a filename in the Sprockets environment.
63
63
  def asset_path(item_or_filename, options = {})
64
- if item_or_filename.is_a?(::Nanoc::Item)
65
- filename = item_or_filename[:filename]
66
- else
64
+ if item_or_filename.is_a? String
67
65
  filename = item_or_filename
66
+ else
67
+ filename = item_or_filename[:filename]
68
68
  end
69
69
  filename = File.basename(filename).gsub(/^(\w+\.\w+).*/, '\1')
70
70
 
@@ -75,8 +75,10 @@ module Nanoc::Sprockets
75
75
  File.join(Helper.prefix, asset.logical_path)
76
76
  end
77
77
  else
78
- raise "error locating #{filename}."
78
+ raise "Something is wrong: unable to locate #{filename}."
79
79
  end
80
+ rescue TypeError => error
81
+ raise "Unable to process `#{item_or_filename}` ensure that you provided a valid Nanoc::Item or a filename: #{error}"
80
82
  end
81
83
  end
82
84
 
@@ -1,5 +1,5 @@
1
1
  module Nanoc
2
2
  module Sprockets
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,47 +1,47 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-sprockets3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Remi Barraquand
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-17 00:00:00.000000000 Z
11
+ date: 2015-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.2'
20
- - - '>='
20
+ - - ">="
21
21
  - !ruby/object:Gem::Version
22
22
  version: 3.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ~>
27
+ - - "~>"
28
28
  - !ruby/object:Gem::Version
29
29
  version: '3.2'
30
- - - '>='
30
+ - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 3.0.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: bundler
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ~>
37
+ - - "~>"
38
38
  - !ruby/object:Gem::Version
39
39
  version: '1.5'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ~>
44
+ - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '1.5'
47
47
  description: Provides Sprockets 3.x helper and filter for nanoc.
@@ -53,7 +53,7 @@ extra_rdoc_files:
53
53
  - LICENSE
54
54
  - README.md
55
55
  files:
56
- - .gitignore
56
+ - ".gitignore"
57
57
  - CHANGELOG
58
58
  - Gemfile
59
59
  - LICENSE
@@ -71,23 +71,23 @@ licenses:
71
71
  metadata: {}
72
72
  post_install_message:
73
73
  rdoc_options:
74
- - --main
74
+ - "--main"
75
75
  - README.md
76
76
  require_paths:
77
77
  - lib
78
78
  required_ruby_version: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.9.3
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - '>='
85
+ - - ">="
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
89
  rubyforge_project:
90
- rubygems_version: 2.2.1
90
+ rubygems_version: 2.4.6
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: Sprockets 3.x support for nanoc.