gd_bam 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/bam/version.rb +1 -1
  2. data/lib/base/project.rb +9 -0
  3. metadata +1 -1
data/lib/bam/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bam
2
- VERSION = '0.1.18'
2
+ VERSION = '0.1.19'
3
3
  end
data/lib/base/project.rb CHANGED
@@ -47,6 +47,15 @@ module GoodData
47
47
  taps = Pathname.glob(p + "*.json").map do |p|
48
48
  Tap.create(JSON.parse(File.read(p), :symbolize_names => true))
49
49
  end
50
+
51
+ groups = taps.group_by {|t| t[:id]}.map {|k,v| [k, v.count]}
52
+ bad_groups = groups.find_all do |group|
53
+ group[1] > 1
54
+ end
55
+ unless bad_groups.empty?
56
+ fail "There are several taps that have the same id. Namely #{bad_groups.map {|g| g.first}.join(', ')}. The ids of taps need to be unique."
57
+ end
58
+
50
59
  Project.create(project.merge({:taps => taps.map {|tap| Tap.create(tap)}}))
51
60
  end
52
61
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gd_bam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: