ascii_binder 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d18f48c4d3a375a016de45f0e47737c1b32ab07a
4
- data.tar.gz: 7b0b662b3f881776229518077135fb6c40c92459
3
+ metadata.gz: 878113e6748a9b16930064bfbca7294abfbd4811
4
+ data.tar.gz: 5dc71d9c9bb8d08ed4f27a310d3ccc2b9afef6e6
5
5
  SHA512:
6
- metadata.gz: 026e842c5c884d0ff9e164c008ae7bbd87a9df5d8e7a173cf4203d9495af896c3e80a2bea3639c4cfdc8fe0c6330ab79c2db8ae9ff27b7f9910dcf2720ec4866
7
- data.tar.gz: 7a729e900f87874e46dfd782599c2b42ea69b9db02a4d0a1efa82f0e7a28a180fec451e96baf26828a5fd030bb2c776dd48863e686931d887a7a837afdbff551
6
+ metadata.gz: bc00c724fd33063a9d3ca29b753ab8f018331aa0d03a9ed282336cc61f24c912ddd97edb68338f0e2d017c7187e1efdff79d8c31bc71e93ee3913b60b759cf9c
7
+ data.tar.gz: f8299dfc924f81e82f453b224c688312bea48997bd41d31d8d35ba71fb20ab864bfa3e9aff5256d393217f4fae7eb0529f70d305d1a4544201f4937dc20e312d
data/bin/asciibinder CHANGED
@@ -291,8 +291,9 @@ when "build"
291
291
  call_generate(branch_group,build_distro,refresh_page)
292
292
  when "package"
293
293
  clean_up
294
- call_generate(:publish,'',nil)
295
294
  package_site = cmd_opts[:site] || ''
295
+ branch_group = package_site == '' ? :publish : "publish_#{package_site}".to_sym
296
+ call_generate(branch_group,'',nil)
296
297
  package_docs(package_site)
297
298
  when "watch"
298
299
  if !dir_empty?(preview_dir)
@@ -245,16 +245,20 @@ module AsciiBinder
245
245
  site_map = {}
246
246
  distro_map.each do |distro,distro_config|
247
247
  if not site_map.has_key?(distro_config["site"])
248
- site_map[distro_config["site"]] = { :distros => {}, :name => distro_config['site_name'], :url => distro_config['site_url'] }
248
+ site_map[distro_config["site"]] = { :distros => {}, :name => distro_config['site_name'], :url => distro_config['site_url'], :branches => [] }
249
249
  end
250
250
  site_map[distro_config["site"]][:distros][distro] = distro_config["branches"]
251
+ distro_config["branches"].keys.each do |branch_key|
252
+ next if site_map[distro_config["site"]][:branches].include?(branch_key)
253
+ site_map[distro_config["site"]][:branches] << branch_key
254
+ end
251
255
  end
252
256
  site_map
253
257
  end
254
258
 
255
259
  def distro_branches(use_distro='')
256
260
  use_distro_list = use_distro == '' ? distro_map.keys : [use_distro]
257
- distro_map.select{ |dkey,dval| use_distro_list.include?(dkey) }.map{ |distro,dconfig| dconfig["branches"].keys }.flatten
261
+ distro_map.select{ |dkey,dval| use_distro_list.include?(dkey) }.map{ |distro,dconfig| dconfig["branches"].keys }.flatten.uniq
258
262
  end
259
263
 
260
264
  def branch_group_branches
@@ -262,6 +266,9 @@ module AsciiBinder
262
266
  group_branches = Hash.new
263
267
  group_branches[:working_only] = [local_branches[0]]
264
268
  group_branches[:publish] = distro_branches
269
+ site_map.each do |site,site_config|
270
+ group_branches["publish_#{site}".to_sym] = site_config[:branches]
271
+ end
265
272
  group_branches[:all] = local_branches
266
273
  group_branches
267
274
  end
@@ -582,7 +589,7 @@ module AsciiBinder
582
589
  current_distro_branches = distro_branches(distro)
583
590
 
584
591
  # In publish mode we only build "valid" distro-branch combos from the distro map
585
- if branch_group == :publish and not current_distro_branches.include?(local_branch)
592
+ if branch_group.to_s.start_with?("publish") and not current_distro_branches.include?(local_branch)
586
593
  next
587
594
  end
588
595
 
@@ -1,3 +1,3 @@
1
1
  module AsciiBinder
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
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.6
4
+ version: 0.1.7
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-11-07 00:00:00.000000000 Z
12
+ date: 2016-11-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler