jekyll-theme-isotc211-helpers 0.5.3 → 0.5.4

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
  SHA256:
3
- metadata.gz: a19be54334566d9366bb222905e81133f92a1b8ed09ea11bfd5261e2dbca8665
4
- data.tar.gz: 1e7edb76846dec56242e309c6b053837bd91ba3ea9ab8a6ba7ef966d7c44a2f9
3
+ metadata.gz: bdd6687af1b24e4f6a76bc7b6727dc6ee1d0d5b0e76a500fc921d9d8ff203088
4
+ data.tar.gz: 5aec5305397b6e3b63acd36c49430508a84e3941d055ec862ecf26fc68a8be21
5
5
  SHA512:
6
- metadata.gz: c33fc7b204158b9066b8474afb3dc3f49c30270bf47397c53f7b4f44d978fd34256e4861ff25f124951e227acf00f424ba75ab4e1c2835845667222e9c631259
7
- data.tar.gz: 63f9ba10be1342c79fceca3c298c4eb4d02c6c835558ea738bfbc72479b30b40990c4fddc299941e02d50e10f4ae101f33163123e82fc43706204d43262de43a
6
+ metadata.gz: 0b01721a690d8b8b1a3fb9b6f35a3f49c76ce0b562b9a4e8601b011a26d0879e3c60b0a2051ca7e46d8f11f73fa4da36459872b2a25aeacfec8ec7684b659b62
7
+ data.tar.gz: 59cf59b75bdeaba16f0b8bd808324e08a353af7d4ba711a415e0d142ae93376218913f71145ac90a4221b017897ce3bba8a5abc6c7c5fbcd56455ec0c7aa68fd
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'jekyll-theme-isotc211-helpers'
5
- s.version = '0.5.3'
5
+ s.version = '0.5.4'
6
6
  s.authors = ['Ribose Inc.']
7
7
  s.email = ['open.source@ribose.com']
8
8
 
@@ -1,4 +1,5 @@
1
1
  require 'jekyll-theme-isotc211-helpers/resource_listing'
2
+ require 'jekyll-theme-isotc211-helpers/resource_copy'
2
3
 
3
4
 
4
5
  module Jekyll
@@ -0,0 +1,13 @@
1
+ # Copies resource contents as is to site destination, bypassing Jekyll’s conversion
2
+
3
+ Jekyll::Hooks.register :site, :post_write do |site|
4
+ if site.config.key?('resource_listings')
5
+ site.config['resource_listings'].each do |listing_id, cfg|
6
+ copy_resource_contents(cfg, site.config['destination'])
7
+ end
8
+ end
9
+ end
10
+
11
+ def copy_resource_contents(resource_cfg, site_dest)
12
+ FileUtils.cp_r("#{resource_cfg['resource_root']}/.", "#{site_dest}/#{resource_cfg['index_url']}")
13
+ end
@@ -75,6 +75,7 @@ module Jekyll
75
75
  contents_tree)
76
76
  end
77
77
 
78
+ # Returns a data structure representing a tree of resource subdirectories & files
78
79
  def read_resource_contents(dir, id, listing_id)
79
80
  cfg = self.config['resource_listings'][listing_id]
80
81
  return directory_hash(dir, "#{cfg['resource_label'].capitalize} #{id}")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-isotc211-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-18 00:00:00.000000000 Z
11
+ date: 2019-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -64,6 +64,7 @@ files:
64
64
  - develop/release
65
65
  - jekyll-theme-isotc211-helpers.gemspec
66
66
  - lib/jekyll-theme-isotc211-helpers.rb
67
+ - lib/jekyll-theme-isotc211-helpers/resource_copy.rb
67
68
  - lib/jekyll-theme-isotc211-helpers/resource_listing.rb
68
69
  homepage: https://github.com/riboseinc/jekyll-theme-isotc211-helpers/
69
70
  licenses: