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 +4 -4
- data/lib/gemika/matrix.rb +11 -2
- data/lib/gemika/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4487d4832fe86243497e1bb0e3a9cbb1bfed3e59
|
4
|
+
data.tar.gz: 6f1fb072fb9e67724491c2b273f522965e1f9642
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
50
|
-
rows <<
|
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
|
data/lib/gemika/version.rb
CHANGED