judges 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/judges +2 -2
- data/features/support/env.rb +1 -1
- data/fixtures/reward_for_good_bug/no-reward.yml +1 -1
- data/fixtures/reward_for_good_bug/reward_it.rb +1 -1
- data/fixtures/reward_for_good_bug/simple-reward.yml +1 -1
- data/judges.gemspec +1 -1
- data/lib/judges/pack.rb +2 -2
- data/lib/judges/packs.rb +1 -1
- data/lib/judges/test.rb +1 -1
- data/lib/judges/update.rb +1 -1
- data/test/test_pack.rb +14 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8fa940672a16773cc8c32985a34d17be69953bfe402720276139d5e0729cab3
|
4
|
+
data.tar.gz: 9a06976c0a9853a2f8df682ab226d1d1e99944686f9d928e758c96d5b4a0c0f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 809aae9b795fc20d590482ed7d5d10f4f67aabfe3d5313e6f91972e285791fcc2c460908535c2fb83d7e6d2459f0d05bc594eb31d5c5ca43ac77f4cd20b2dfd2
|
7
|
+
data.tar.gz: ee8d097cbb5dc297b9abbcdac9d47a7dc826ba1e1d9af68f2a37552eef6f5ee781222e229546bf03236d12c18eaacd1fe9d3eee2452b9efdb365235e9b1f58c5
|
data/bin/judges
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2024 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -36,7 +36,7 @@ class App
|
|
36
36
|
|
37
37
|
program_desc 'Automated executor of judges for a factbase'
|
38
38
|
|
39
|
-
version '0.0.
|
39
|
+
version '0.0.3'
|
40
40
|
|
41
41
|
desc 'Make it more verbose, logging as much as possible'
|
42
42
|
switch([:v, :verbose])
|
data/features/support/env.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2024 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2024 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
data/judges.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
27
27
|
s.required_ruby_version = '>=2.3'
|
28
28
|
s.name = 'judges'
|
29
|
-
s.version = '0.0.
|
29
|
+
s.version = '0.0.3'
|
30
30
|
s.license = 'MIT'
|
31
31
|
s.summary = 'Command-line tool for a Factbase'
|
32
32
|
s.description = 'Runs a collection of judges against a factbase'
|
data/lib/judges/pack.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2024 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -44,7 +44,7 @@ class Judges::Pack
|
|
44
44
|
end
|
45
45
|
s = File.join(@dir, script)
|
46
46
|
raise "Can't load '#{s}'" unless File.exist?(s)
|
47
|
-
|
47
|
+
load s
|
48
48
|
end
|
49
49
|
|
50
50
|
# Get the name of the .rb script in the pack.
|
data/lib/judges/packs.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2024 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
data/lib/judges/test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2024 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
data/lib/judges/update.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2024 Yegor Bugayenko
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
data/test/test_pack.rb
CHANGED
@@ -24,7 +24,7 @@ require 'minitest/autorun'
|
|
24
24
|
require 'tmpdir'
|
25
25
|
require 'factbase'
|
26
26
|
require_relative '../lib/judges'
|
27
|
-
require_relative '../lib/judges/
|
27
|
+
require_relative '../lib/judges/pack'
|
28
28
|
|
29
29
|
# Test.
|
30
30
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
@@ -40,4 +40,17 @@ class TestPack < Minitest::Test
|
|
40
40
|
assert_equal(1, fb.size)
|
41
41
|
end
|
42
42
|
end
|
43
|
+
|
44
|
+
def test_run_isolated
|
45
|
+
Dir.mktmpdir do |d|
|
46
|
+
File.write(File.join(d, 'bar.rb'), '$fb.insert')
|
47
|
+
pack = Judges::Pack.new(d)
|
48
|
+
fb1 = Factbase.new
|
49
|
+
pack.run(fb1, {})
|
50
|
+
assert_equal(1, fb1.size)
|
51
|
+
fb2 = Factbase.new
|
52
|
+
pack.run(fb2, {})
|
53
|
+
assert_equal(1, fb2.size)
|
54
|
+
end
|
55
|
+
end
|
43
56
|
end
|