mumukit-assistant 0.2.1 → 0.3.0

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
  SHA256:
3
- metadata.gz: 518474522ae613afe0b7304efbac59c26aa0151baf03709e4364e257d4712e3c
4
- data.tar.gz: 7d287f14be1ab7ff6885517a1660572352aaae5fb1b6b0bf17f6935dc1990174
3
+ metadata.gz: 29885fb93c1ff49b04ede27436856e8e7549d80289fde87d4fe8718cbaaf5c4d
4
+ data.tar.gz: 140e8f60b57c926d1d742597a0b452fa60c433b2a027b97b3da5ac435322e516
5
5
  SHA512:
6
- metadata.gz: 4e46e653a4fee5e2b65e4f679de06710395a4e83bb7679a04f0eb58fc8f42b68a802476a05463858036094c4f6088970778c12919b939c0a17b253da60968f5a
7
- data.tar.gz: c7c5300ac824bb579cfa19969a45502f0cddc830dd3412fa73d795e7317cf9457f7c63f84d89c9bd8ef2d46fa24b467a47cbf689c65b52ef28bec67b1d4fcbcb
6
+ metadata.gz: 5e8416c033c88103c41cd856f97c10a2dc761ae31b307f26a1f648b56fe7e8129f641ee21613de3873da210972df97ee1c7db716edc8b475b7c01835b09af2d4
7
+ data.tar.gz: 769602b7fe979b352c2a8de7e4cde8ed91933823bf25e7c618f670e9944c791c16c5dce6398c2634946311678926fae51bb94041dfff25a3238ecffdd986bfb3
@@ -1,7 +1,7 @@
1
1
  module Mumukit::Assistant::Rule
2
2
  def self.parse(hash)
3
- message = Mumukit::Assistant::Message.parse hash[:then]
4
- w = hash[:when]
3
+ message = Mumukit::Assistant::Message.parse hash.indifferent_get(:then)
4
+ w = hash.indifferent_get(:when)
5
5
  if w.is_a? Hash
6
6
  parse_complex_when w.first, message
7
7
  else
@@ -1,5 +1,5 @@
1
1
  class Mumukit::Assistant::Rule::ContentEmpty < Mumukit::Assistant::Rule::Base
2
2
  def matches?(submission)
3
- submission.solution.empty?
3
+ submission.solution.blank?
4
4
  end
5
5
  end
@@ -17,11 +17,11 @@ class Mumukit::Assistant::Rule::TheseExpectationsFailed < Mumukit::Assistant::Ru
17
17
  end
18
18
 
19
19
  def failed_expectations(submission)
20
- @failed_expectations ||= submission.expectation_results.select { |it| it[:result].failed? }
20
+ @failed_expectations ||= submission.expectation_results.select { |it| it.indifferent_get(:result).failed? }
21
21
  end
22
22
 
23
23
  def includes_failing_expectation?(humanized_expectation, submission)
24
24
  binding, inspection = humanized_expectation.split(' ')
25
- failed_expectations(submission).any? { |it| it[:binding] == binding && it[:inspection] == inspection }
25
+ failed_expectations(submission).any? { |it| it.indifferent_get(:binding) == binding && it.indifferent_get(:inspection) == inspection }
26
26
  end
27
- end
27
+ end
@@ -16,10 +16,10 @@ class Mumukit::Assistant::Rule::TheseTestsFailed < Mumukit::Assistant::Rule::Sub
16
16
  end
17
17
 
18
18
  def includes_failing_test?(title, submission)
19
- failed_tests(submission).map { |it| it[:title].strip }.include?(title.strip)
19
+ failed_tests(submission).map { |it| it.indifferent_get(:title).strip }.include?(title.strip)
20
20
  end
21
21
 
22
22
  def failed_tests(submission)
23
- @failed_tests ||= submission.test_results.select { |it| it[:status].failed? }
23
+ @failed_tests ||= submission.test_results.select { |it| it.indifferent_get(:status).failed? }
24
24
  end
25
25
  end
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  class Assistant
3
- VERSION = "0.2.1"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumukit-assistant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julián Berbel Alt
@@ -9,56 +9,50 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-03-22 00:00:00.000000000 Z
12
+ date: 2020-05-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
19
- - !ruby/object:Gem::Version
20
- version: '1.16'
21
- - - "<"
18
+ - - "~>"
22
19
  - !ruby/object:Gem::Version
23
- version: '3'
20
+ version: '2.0'
24
21
  type: :development
25
22
  prerelease: false
26
23
  version_requirements: !ruby/object:Gem::Requirement
27
24
  requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- version: '1.16'
31
- - - "<"
25
+ - - "~>"
32
26
  - !ruby/object:Gem::Version
33
- version: '3'
27
+ version: '2.0'
34
28
  - !ruby/object:Gem::Dependency
35
29
  name: rake
36
30
  requirement: !ruby/object:Gem::Requirement
37
31
  requirements:
38
32
  - - "~>"
39
33
  - !ruby/object:Gem::Version
40
- version: '10.0'
34
+ version: '12.3'
41
35
  type: :development
42
36
  prerelease: false
43
37
  version_requirements: !ruby/object:Gem::Requirement
44
38
  requirements:
45
39
  - - "~>"
46
40
  - !ruby/object:Gem::Version
47
- version: '10.0'
41
+ version: '12.3'
48
42
  - !ruby/object:Gem::Dependency
49
43
  name: rspec
50
44
  requirement: !ruby/object:Gem::Requirement
51
45
  requirements:
52
46
  - - "~>"
53
47
  - !ruby/object:Gem::Version
54
- version: '3'
48
+ version: '3.0'
55
49
  type: :development
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
52
  requirements:
59
53
  - - "~>"
60
54
  - !ruby/object:Gem::Version
61
- version: '3'
55
+ version: '3.0'
62
56
  - !ruby/object:Gem::Dependency
63
57
  name: mumukit-core
64
58
  requirement: !ruby/object:Gem::Requirement