vigilion 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -6
- data/README.md +5 -1
- data/Rakefile +5 -2
- data/circle.yml +7 -0
- data/lib/vigilion/version.rb +1 -1
- data/test/configuration_test.rb +2 -2
- data/test/http_test.rb +6 -5
- data/vigilion.gemspec +20 -16
- metadata +59 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 8f0ff763d97c3b9210f607f266fd65c240756194
         | 
| 4 | 
            +
              data.tar.gz: ef3ebfc14ddf806ef4acc65edfa1a886845a6d90
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 86d9021edede257536ce4e2b40cb946598e3bc1c99ebb80abc73b075fd47c15f0809533ca3f8d83af5ac94966aa14ebea902ffb4d0189aeb82a9ad38d6c99600
         | 
| 7 | 
            +
              data.tar.gz: 3ef73820995c1b059701776d7dbddb5561365ea962a7015288247b46ed162a771830ac6f0acf9dbc24d8dfd4d4e8adc74d36a28f8d3683ba7e44dd484a22c63f
         | 
    
        data/Gemfile
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -1,5 +1,9 @@ | |
| 1 1 | 
             
            # Vigilion
         | 
| 2 2 |  | 
| 3 | 
            +
            [](https://circleci.com/gh/vigilion/vigilion-ruby)
         | 
| 4 | 
            +
            [](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 | 
| 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 " | 
| 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
    
    
    
        data/lib/vigilion/version.rb
    CHANGED
    
    
    
        data/test/configuration_test.rb
    CHANGED
    
    | @@ -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, " | 
| 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, " | 
| 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, " | 
| 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, " | 
| 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, " | 
| 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 | | 
| 7 | 
            -
               | 
| 8 | 
            -
               | 
| 9 | 
            -
               | 
| 10 | 
            -
               | 
| 11 | 
            -
               | 
| 12 | 
            -
               | 
| 13 | 
            -
               | 
| 14 | 
            -
               | 
| 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 | 
            -
               | 
| 17 | 
            -
               | 
| 18 | 
            -
               | 
| 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 | 
            -
               | 
| 21 | 
            -
               | 
| 22 | 
            -
               | 
| 20 | 
            +
              spec.add_dependency "faraday"
         | 
| 21 | 
            +
              spec.add_dependency "faraday_middleware"
         | 
| 22 | 
            +
              spec.add_dependency "faraday-detailed_logger"
         | 
| 23 23 |  | 
| 24 | 
            -
               | 
| 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. | 
| 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- | 
| 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
         |