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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e7eeb4b709d0a2438806f8165bd693f493b38f43f42d7bf02ad11c776f50258
4
- data.tar.gz: 48399e95c0dad8a6ca81055a44aea5a20e946b5e5b61ab2a809d13d594f8f7fc
3
+ metadata.gz: a8fa940672a16773cc8c32985a34d17be69953bfe402720276139d5e0729cab3
4
+ data.tar.gz: 9a06976c0a9853a2f8df682ab226d1d1e99944686f9d928e758c96d5b4a0c0f3
5
5
  SHA512:
6
- metadata.gz: 9dfc4c9282394baba0cdd7fc6ee9bb2245a76cd8db4486f6378df54cf893661273884ab2dd82d46cf2eef549c128182c88d263217f9dddd7375542b8a0c8953c
7
- data.tar.gz: 76b7e0fb15421f3223d765e9b68c9bccd76b4c81134e1994ab432742fa280afd03c78d0734df3cc6f52cc38090d0ca9b5726223ce4da4f0ba7cf195e5ee1abe9
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) 2014-2024 Yegor Bugayenko
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.2'
39
+ version '0.0.3'
40
40
 
41
41
  desc 'Make it more verbose, logging as much as possible'
42
42
  switch([:v, :verbose])
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2022-2024 Yegor Bugayenko
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,4 +1,4 @@
1
- # Copyright (c) 2014-2024 Yegor Bugayenko
1
+ # Copyright (c) 2024 Yegor Bugayenko
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # 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) 2014-2024 Yegor Bugayenko
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,4 +1,4 @@
1
- # Copyright (c) 2014-2024 Yegor Bugayenko
1
+ # Copyright (c) 2024 Yegor Bugayenko
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # 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.2'
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) 2014-2024 Yegor Bugayenko
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
- require s
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) 2014-2024 Yegor Bugayenko
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) 2014-2024 Yegor Bugayenko
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) 2014-2024 Yegor Bugayenko
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/packs'
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: judges
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko