EICAR 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/lib/eicar/version.rb +1 -1
  3. data/lib/eicar.rb +8 -3
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjlhMmQxY2JiY2ZkM2RhOGVhMmU5YWY2NzA0NDI4NTdlMDVkOWY5Yw==
4
+ MTQ0OTkzNTMyMjRkMGU0YjJkMzdkMGZhZjdiYTFmNGNkNWZlMTNmYQ==
5
5
  data.tar.gz: !binary |-
6
- NDRmNzcxZDA4NzI4NDUzMjVkMGE1ZDY5YzY4NGNjZDk4N2UwY2I5Nw==
6
+ NmE0MzlhYWUyMjI2ZTc0NTgzMDc2ZjY4MTUxYTVhZWU3NzJhN2E5OQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODdmYzVjODJiYjc5N2U1NTRlNjM3ZGI1NTVhY2QyOTk1NDY0NWJlNmU0NDIx
10
- ODU1ODg0ODJmOGFlNWJlNzJmZjU1MGY0ZWM0ZTIxZTgwYjBlYWUwM2Y0YzBk
11
- MGNhYTIxNDdkOWZkOTg1NGQzOGMyNzc0YWU1Mjg1M2RjZGRhNDI=
9
+ Yzg0YTNjYTNhNzA4MTVlNWIxNTFmMmVmNTUxNzgxZjIwMTNjNzhhOWY0Mzkw
10
+ YjhhYzQ2NzZhZjVjNGJlN2EwMTgzOWZiYjg2NDVkZWFhYjU2ZTk4NTRkMDAz
11
+ ZmIwMGRjOWJlYzcwOWViYzBkZGI3ZWJhNDc1MjQ2YTM5YzBmN2I=
12
12
  data.tar.gz: !binary |-
13
- YmI4ZDc0MDRiYTMyNjNiMmE3MzUyMDE2MWJmZDQ5ODAxMmNkYTk0NTk5YmY4
14
- MGFiMGI0MzYyNWYzZmJiMzAyYzYwMjdmYThmOTc0Nzg1ZGU0MmQxYjgwMGI3
15
- YTExM2I3YmNkM2MyYmE5MTZiNzdkNzQ5NzdmMjdjNzQ4OTA3YzU=
13
+ N2MxZDYyMTkxNDlmYzk2OTI0OGJlZjQyYjY5OWU1ZWNhMWVjOTQzZWY2N2Rl
14
+ ZjMwNmVlZTkwYjRmOTMyOTlkODEzZDk0N2VjMDlhMTM2NTQ3MmUxZjliOTAw
15
+ ZWUxMGRjNjNkZDQ3OTk2YjI2MWIwMWJhODkxODZiN2RiNzRjN2M=
data/lib/eicar/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module EICAR
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
data/lib/eicar.rb CHANGED
@@ -46,12 +46,17 @@ module EICAR
46
46
  end
47
47
 
48
48
  # Returns a TrueClass if the file was created and is readable in the
49
- # expected path. For system-wide gem installs, this will usually need
49
+ # given path (by default, the expected path for the EICAR test file).
50
+ #
51
+ # For system-wide gem installs, this will usually need
50
52
  # to be run as root, or else you'll raise.
51
- def self.create
53
+ #
54
+ # TODO: yardify this
55
+ def self.create(path=nil)
52
56
  data = self.rot13(ROT13_DOWNCASE_EICAR).upcase
53
57
  begin
54
- File.open(self.test_file_path, "wb") {|f| f.write data}
58
+ path ||= self.test_file_path
59
+ File.open(path, "wb") {|f| f.write data}
55
60
  rescue SystemCallError
56
61
  raise EICAR::EICARWriteError
57
62
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: EICAR
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
  - Tod Beardsley