gemika 0.1.1 → 0.1.2

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: b4c5655b3f616e132d01d22f50a6de28b11a5fa6
4
- data.tar.gz: 5e0e381d61905db6a25f9b51f0f2a976da9ee369
3
+ metadata.gz: 4487d4832fe86243497e1bb0e3a9cbb1bfed3e59
4
+ data.tar.gz: 6f1fb072fb9e67724491c2b273f522965e1f9642
5
5
  SHA512:
6
- metadata.gz: f867ed9e9bae056e1e9b1a48d8b4a1440ebd9b2e2df776adcbe78ed827b11ef31b6c82ee55bfc59fc022971da856c5c802dc7a19799ab9784d332fc71638ccc8
7
- data.tar.gz: 8c400e5f38a76d55a012597f3ae8ccdd697ce3958af25020c06318188557111b1510f920fd4eb3ab457b1626ae8321332e3b447c18e54564067a751d925a1848
6
+ metadata.gz: d4080aab8951b3db75af4e56e7f5711cd916358adf9e579c64e42d35a59f0e61dcba09626b57584724fb50e6337be211887e3e28f649bac4ed4a034525601e8a
7
+ data.tar.gz: fe893e603da1b8b1bba3b1eee29116098681f6807130e7828e41d513fb21a4ca0da2df94d80251b9b120cff9da543c2ca8e9bbf0b674e7e96dec0e449172dc9f
data/lib/gemika/matrix.rb CHANGED
@@ -11,6 +11,7 @@ module Gemika
11
11
 
12
12
  def initialize(options)
13
13
  @rows = options.fetch(:rows)
14
+ @rows.each { |row| validate_row(row) }
14
15
  @results = {}
15
16
  @all_passed = nil
16
17
  end
@@ -46,14 +47,22 @@ module Gemika
46
47
  rows = []
47
48
  rubies.each do |ruby|
48
49
  gemfiles.each do |gemfile|
49
- entry = { 'rvm' => ruby, 'gemfile' => gemfile }
50
- rows << entry unless excludes.include?(entry)
50
+ row = { 'rvm' => ruby, 'gemfile' => gemfile }
51
+ rows << row unless excludes.include?(row)
51
52
  end
52
53
  end
53
54
  rows += includes
54
55
  new(:rows => rows)
55
56
  end
56
57
 
58
+ def validate_row(row)
59
+ gemfile = row['gemfile']
60
+ File.exists?(gemfile) or raise ArgumentError, "Gemfile not found: #{gemfile}"
61
+ contents = File.read(gemfile)
62
+ contents.include?('gemika') or raise ArgumentError, "Gemfile is missing gemika dependency: #{gemfile}"
63
+ row
64
+ end
65
+
57
66
  private
58
67
 
59
68
  attr_reader :rows
@@ -1,3 +1,3 @@
1
1
  module Gemika
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemika
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch