prospectus 0.5.2 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prospectus/item.rb +6 -4
- data/lib/prospectus/list.rb +1 -1
- data/lib/prospectus/modules/github_release.rb +1 -1
- data/lib/prospectus/state.rb +12 -0
- data/lib/prospectus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98e4943311a0f54dfb48595d48746fb5270b109b
|
4
|
+
data.tar.gz: 14e9a8b1a8325797096f9e11d12221ea516232f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6cc639fa2ecd224c6a270d61d7997e72f0f2e4ff24faaa9f3cd91322e99c6fdcaf0d6a63249d1d923dc3eedea643cea06b9ecacadebfceab7b697a9bbb6ce8b
|
7
|
+
data.tar.gz: be74c72f50bb7cb4276c2a5506335788ca5aa86d9cbc6965ab98792a550361721db0b34dca2ae2f614558a0576d41a82b05172a3344e374b004b3cfe63cdee62
|
data/lib/prospectus/item.rb
CHANGED
@@ -25,8 +25,10 @@ module Prospectus
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def noop
|
28
|
-
|
29
|
-
|
28
|
+
x = State.new
|
29
|
+
x.value = 'noop'
|
30
|
+
@expected = x
|
31
|
+
@actual = x
|
30
32
|
end
|
31
33
|
|
32
34
|
def expected
|
@@ -38,7 +40,7 @@ module Prospectus
|
|
38
40
|
end
|
39
41
|
|
40
42
|
def to_json(_ = {})
|
41
|
-
{ name: name, expected: expected, actual: actual }.to_json
|
43
|
+
{ name: name, expected: expected.value, actual: actual.value }.to_json
|
42
44
|
end
|
43
45
|
end
|
44
46
|
|
@@ -75,7 +77,7 @@ module Prospectus
|
|
75
77
|
|
76
78
|
def state(name, &block)
|
77
79
|
state = Prospectus::State.from_block(@options, &block)
|
78
|
-
@item.instance_variable_set(name, state
|
80
|
+
@item.instance_variable_set(name, state)
|
79
81
|
rescue => e
|
80
82
|
raise("Failed to set #{name} state for #{@item.name}: #{e.message}")
|
81
83
|
end
|
data/lib/prospectus/list.rb
CHANGED
@@ -21,7 +21,7 @@ module LogCabin
|
|
21
21
|
return @release if @release
|
22
22
|
releases = github_api.releases(@repo)
|
23
23
|
%i[draft prerelease].each { |x| releases.reject!(&x) }
|
24
|
-
@release = filter_helper(releases.map(&:tag_name).first
|
24
|
+
@release = filter_helper(releases.map(&:tag_name)).first
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
data/lib/prospectus/state.rb
CHANGED
@@ -15,6 +15,18 @@ module Prospectus
|
|
15
15
|
dsl.load!
|
16
16
|
state
|
17
17
|
end
|
18
|
+
|
19
|
+
def =~(other)
|
20
|
+
return super unless other.is_a? Prospectus::State
|
21
|
+
ov = other.value
|
22
|
+
return ov.include?(@value) if ov.is_a? Enumerable
|
23
|
+
return @value =~ ov if ov.is_a? Regexp
|
24
|
+
@value == ov
|
25
|
+
end
|
26
|
+
|
27
|
+
def to_s
|
28
|
+
@value.to_s
|
29
|
+
end
|
18
30
|
end
|
19
31
|
|
20
32
|
##
|
data/lib/prospectus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prospectus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mercenary
|