vigilion 1.0.1 → 1.0.2

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
  SHA1:
3
- metadata.gz: 10b4c38751fd1fd34676937ab9a7653bdb003ebf
4
- data.tar.gz: 53e88cbd504435d9f552128072a3ebf6fc442ae0
3
+ metadata.gz: 8f0ff763d97c3b9210f607f266fd65c240756194
4
+ data.tar.gz: ef3ebfc14ddf806ef4acc65edfa1a886845a6d90
5
5
  SHA512:
6
- metadata.gz: a2e8b3cd387102ba0a0aeece76a7f5c33b276f41a000182279cdb7d248329d847dd8802c0b4fc7970d154be866eac2d6199a3c0170009133777777ea0f5c7885
7
- data.tar.gz: 7122e42286d3cd6b20aa93f118846b6c9f5358a39370eba469218f5059fdffd5410d4eb26c5dbebcdb0eab6be3bb6ec4535566ed621fe4b3c65d639375fa0c13
6
+ metadata.gz: 86d9021edede257536ce4e2b40cb946598e3bc1c99ebb80abc73b075fd47c15f0809533ca3f8d83af5ac94966aa14ebea902ffb4d0189aeb82a9ad38d6c99600
7
+ data.tar.gz: 3ef73820995c1b059701776d7dbddb5561365ea962a7015288247b46ed162a771830ac6f0acf9dbc24d8dfd4d4e8adc74d36a28f8d3683ba7e44dd484a22c63f
data/Gemfile CHANGED
@@ -1,9 +1,4 @@
1
1
  source "https://rubygems.org"
2
2
 
3
+ # Specify your gem's dependencies in vigilion.gemspec
3
4
  gemspec
4
-
5
- group :test do
6
- gem "webmock"
7
- gem "mocha"
8
- gem "shoulda"
9
- end
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Vigilion
2
2
 
3
+ [![Circle CI](https://circleci.com/gh/vigilion/vigilion-ruby.svg?style=shield)](https://circleci.com/gh/vigilion/vigilion-ruby)
4
+ [![Code Climate](https://codeclimate.com/repos/573cf901083c0a124a008778/badges/5ca311f1f7ac8dfa6dd2/gpa.svg)](https://codeclimate.com/repos/573cf901083c0a124a008778/feed)
5
+
6
+
3
7
  This Ruby gem is for integrating with the [Vigilion Anti-Virus & Malware file scanning service](https://www.vigilion.com/).
4
8
 
5
9
  If you are using Rails, you should use our [Rails gem](
@@ -30,6 +34,6 @@ Vigilion.configure do |config|
30
34
  end
31
35
  ```
32
36
 
33
- Vigilion documentation [https://vigilion.readme.io/docs/ruby](https://vigilion.readme.io/docs/ruby)
37
+ Vigilion [API documentation](https://docs.vigilion.com/)
34
38
 
35
39
  (c) 2015 Bit Zesty Ltd.
data/Rakefile CHANGED
@@ -1,5 +1,4 @@
1
- require "rubygems"
2
- require "rake"
1
+ require "bundler/gem_tasks"
3
2
  require "rake/testtask"
4
3
 
5
4
  Rake::TestTask.new(:test) do |t|
@@ -9,3 +8,7 @@ Rake::TestTask.new(:test) do |t|
9
8
  end
10
9
 
11
10
  task default: :test
11
+
12
+ task :console do
13
+ exec "irb -r vigilion -I ./lib"
14
+ end
data/circle.yml ADDED
@@ -0,0 +1,7 @@
1
+ machine:
2
+ ruby:
3
+ version: 2.2.2
4
+ dependencies:
5
+ pre:
6
+ - echo "export rvm_ignore_gemsets_flag=1" >> ~/.rvmrc
7
+ - gem install bundler
@@ -1,3 +1,3 @@
1
1
  module Vigilion
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  require_relative "./test_helper.rb"
2
2
 
3
3
  describe Vigilion::Configuration do
4
- describe "configure" do
4
+ describe ".configure" do
5
5
  it "allows set attributes" do
6
6
  Vigilion.configure do |config|
7
7
  config.attribute = "something"
@@ -14,4 +14,4 @@ describe Vigilion::Configuration do
14
14
  refute_nil Vigilion::Configuration.server_url
15
15
  end
16
16
  end
17
- end
17
+ end
data/test/http_test.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require_relative "./test_helper.rb"
2
2
 
3
+
3
4
  describe Vigilion::HTTP do
4
5
 
5
6
  describe "constructor" do
@@ -29,7 +30,7 @@ describe Vigilion::HTTP do
29
30
  describe "#scan_url" do
30
31
  it "returns status of job if posted with success" do
31
32
  # stub POST request for providing URL to files for scan
32
- stub_request(:post, "localhost:5000/scans").to_return(
33
+ stub_request(:post, "https://api.vigilion.com/scans").to_return(
33
34
  body: { "status" => "scanning" }.to_json)
34
35
 
35
36
  # check if stubbed URL provides status for scan job
@@ -39,7 +40,7 @@ describe Vigilion::HTTP do
39
40
 
40
41
  it "accepts options" do
41
42
  # stub POST request for providing URL to files for scan
42
- stub_request(:post, "localhost:5000/scans").to_return(
43
+ stub_request(:post, "https://api.vigilion.com/scans").to_return(
43
44
  body: { "status" => "scanning" }.to_json)
44
45
 
45
46
  # check if stubbed URL provides status for scan job
@@ -51,7 +52,7 @@ describe Vigilion::HTTP do
51
52
  describe "#scan_path" do
52
53
  it "returns status of job if posted with success" do
53
54
  # stub POST request for providing URL to files for scan
54
- stub_request(:post, "localhost:5000/scans").to_return(
55
+ stub_request(:post, "https://api.vigilion.com/scans").to_return(
55
56
  body: { "status" => "scanning" }.to_json)
56
57
 
57
58
  # check if stubbed URL provides status for scan job
@@ -61,7 +62,7 @@ describe Vigilion::HTTP do
61
62
 
62
63
  it "accepts options" do
63
64
  # stub POST request for providing URL to files for scan
64
- stub_request(:post, "localhost:5000/scans").to_return(
65
+ stub_request(:post, "https://api.vigilion.com/scans").to_return(
65
66
  body: { "status" => "scanning" }.to_json)
66
67
 
67
68
  # check if stubbed URL provides status for scan job
@@ -77,7 +78,7 @@ describe Vigilion::HTTP do
77
78
  md5: "69630e4574ec6798239b091cda43dca0",
78
79
  status: "error" }.to_json
79
80
 
80
- stub_request(:get, "localhost:5000/scans/de401fdf-08b0-44a8-810b-20794c5c98c7").to_return(
81
+ stub_request(:get, "https://api.vigilion.com/scans/de401fdf-08b0-44a8-810b-20794c5c98c7").to_return(
81
82
  body: body)
82
83
 
83
84
  result = Vigilion.check_status("de401fdf-08b0-44a8-810b-20794c5c98c7")
data/vigilion.gemspec CHANGED
@@ -3,23 +3,27 @@ lib = File.expand_path("../lib", __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require "vigilion/version"
5
5
 
6
- Gem::Specification.new do |s|
7
- s.name = "vigilion"
8
- s.version = Vigilion::VERSION
9
- s.authors = ["Bit Zesty Ltd"]
10
- s.email = ["help@vigilion.com"]
11
- s.description = "API client for Vigilion Anti-Virus & Malware file scanning service"
12
- s.summary = "API client for Vigilion Anti-Virus & Malware file scanning service"
13
- s.homepage = "https://github.com/vigilion/vigilion-ruby"
14
- s.license = "MIT"
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "vigilion"
8
+ spec.version = Vigilion::VERSION
9
+ spec.authors = ["Bit Zesty Ltd"]
10
+ spec.email = ["help@vigilion.com"]
11
+ spec.description = "API client for Vigilion Anti-Virus & Malware file scanning service"
12
+ spec.summary = "API client for Vigilion Anti-Virus & Malware file scanning service"
13
+ spec.homepage = "https://github.com/vigilion/vigilion-ruby"
14
+ spec.license = "MIT"
15
15
 
16
- s.files = `git ls-files`.split($/)
17
- s.executables = s.files.grep(%q{^bin/}) { |f| File.basename(f) }
18
- s.require_paths = ["lib"]
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%q{^bin/}) { |f| File.basename(f) }
18
+ spec.require_paths = ["lib"]
19
19
 
20
- s.add_dependency "faraday"
21
- s.add_dependency "faraday_middleware"
22
- s.add_dependency "faraday-detailed_logger"
20
+ spec.add_dependency "faraday"
21
+ spec.add_dependency "faraday_middleware"
22
+ spec.add_dependency "faraday-detailed_logger"
23
23
 
24
- s.add_development_dependency "rake"
24
+ spec.add_development_dependency "bundler", "~> 1.11"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "webmock"
27
+ spec.add_development_dependency "mocha"
28
+ spec.add_development_dependency "shoulda"
25
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vigilion
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bit Zesty Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-18 00:00:00.000000000 Z
11
+ date: 2016-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -52,8 +52,64 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.11'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.11'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '10.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '10.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: webmock
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: mocha
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: shoulda
57
113
  requirement: !ruby/object:Gem::Requirement
58
114
  requirements:
59
115
  - - ">="
@@ -79,6 +135,7 @@ files:
79
135
  - LICENSE.md
80
136
  - README.md
81
137
  - Rakefile
138
+ - circle.yml
82
139
  - lib/vigilion.rb
83
140
  - lib/vigilion/configuration.rb
84
141
  - lib/vigilion/errors.rb