ascii_binder 0.1.5 → 0.1.6

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: 5e46fc5bec124115e6057d804df19fe32f791d85
4
- data.tar.gz: 06512c6be9db989118b8af3dfd4b49f560082c56
3
+ metadata.gz: d18f48c4d3a375a016de45f0e47737c1b32ab07a
4
+ data.tar.gz: 7b0b662b3f881776229518077135fb6c40c92459
5
5
  SHA512:
6
- metadata.gz: fb26aab0abe17ed2fedba192f2b4722d9f0330096fc5e2116e7b19f00bc6820200b4dc262fb0446cd959126a0db0e8909ce0fbe83bc93a1eba3a0f4f3ddaa074
7
- data.tar.gz: 86c0a7e51ab5f08975592b0edde1c0701bde3e76a6646d5f06bafe381a4816273136e4fa0b307f4022bb0e56ac4e3b5d0157d4cfeec9a4b79cdf08080c87796c
6
+ metadata.gz: 026e842c5c884d0ff9e164c008ae7bbd87a9df5d8e7a173cf4203d9495af896c3e80a2bea3639c4cfdc8fe0c6330ab79c2db8ae9ff27b7f9910dcf2720ec4866
7
+ data.tar.gz: 7a729e900f87874e46dfd782599c2b42ea69b9db02a4d0a1efa82f0e7a28a180fec451e96baf26828a5fd030bb2c776dd48863e686931d887a7a837afdbff551
@@ -845,16 +845,27 @@ module AsciiBinder
845
845
  if File.directory?(site_dir)
846
846
  puts "\nBuilding #{site} site."
847
847
 
848
- # With this update, site index files will always come from the master branch
849
- working_branch_site_index = File.join(source_dir,'index-' + site + '.html')
850
- if File.exists?(working_branch_site_index)
851
- FileUtils.cp(working_branch_site_index,File.join(package_dir,site,'index.html'))
852
- ['_images','_stylesheets'].each do |support_dir|
853
- FileUtils.cp_r(File.join(source_dir,support_dir),File.join(package_dir,site,support_dir))
848
+ # Any files in the root of the docs repo with names ending in:
849
+ # *-#{site}.html
850
+ # will get copied into the root dir of the packaged site with
851
+ # the site name stripped out.
852
+ #
853
+ # Example: for site name 'commercial', the files:
854
+ # * index-commercial.html would end up as #{site_root}/index.html
855
+ # * search-commercial.html would end up as #{site_root}/search.html
856
+ # * index-community.html would be ignored
857
+ site_files = Dir.glob(File.join(source_dir, '*-' + site + '.html'))
858
+ unless site_files.empty?
859
+ site_files.each do |fpath|
860
+ target_basename = File.basename(fpath).gsub(/-#{site}\.html$/, '.html')
861
+ FileUtils.cp(fpath,File.join(package_dir,site,target_basename))
854
862
  end
855
863
  else
856
864
  FileUtils.cp(File.join(preview_dir,distro,'index.html'),File.join(package_dir,site,'index.html'))
857
865
  end
866
+ ['_images','_stylesheets'].each do |support_dir|
867
+ FileUtils.cp_r(File.join(source_dir,support_dir),File.join(package_dir,site,support_dir))
868
+ end
858
869
 
859
870
  # Now build a sitemap
860
871
  site_dir_path = Pathname.new(site_dir)
@@ -1,3 +1,3 @@
1
1
  module AsciiBinder
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ascii_binder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - N. Harrison Ripps
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-09-14 00:00:00.000000000 Z
12
+ date: 2016-11-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler