shadowbq-threatinator 0.5.0 → 0.5.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d824beedaa0a0f9d5ed6c6ab3f10cd853247ae4
4
- data.tar.gz: 9eb80b345937fcdc5673edab41aa850ccbb19880
3
+ metadata.gz: c4a7993812c67ca73da4296e9084ae7af7eedb3d
4
+ data.tar.gz: a769b67625b6913536ca6d93493d5f43292bd598
5
5
  SHA512:
6
- metadata.gz: 8073a95c015ec5318f833692396297c7e06ffab1e41f5b4b670a2d73b447f4191952c6293fa6e627ac4c900d05e3d11fed9bfdf6b20cdd6b36f31d3af4bd83b0
7
- data.tar.gz: e589ab8b562119027fcaeb6ade37b5db2221ec9a5b2ac6b98bb06419152a849695caa21bc64c344eb782f3f373725d12c78c01efc7ea49f7cb66baf7be19d79c
6
+ metadata.gz: b9bbdefecac15c18ee806551ab8739aabdb88c030f037fee72700dd30f35c8032509ffd0fefaaf22bfd6c93a74a3ad08f0a9c44b0beb46047af1071a83b738b9
7
+ data.tar.gz: d06001fc9774e4305fb9f01e0fa5c465bf503a6fe07330ecaa1a4f9fe2d9712a6e084c034d26b9c1fe83b29477df3a9e44860071105b5b5558ca3d5d758332c2
data/README.md CHANGED
@@ -4,9 +4,9 @@ Threatinator is a ruby library for parsing threat data feeds.
4
4
 
5
5
  ## Code Status
6
6
 
7
- [![Build Status](https://travis-ci.org/shadowbq/shadowbq-threatinator.svg?branch=master)](https://travis-ci.org/shadowbq/shadowbq-threatinator)
8
- [![Code Climate](https://codeclimate.com/github/shadowbq/shadowbq-threatinator/badges/gpa.svg)](https://codeclimate.com/github/shadowbq/shadowbq-threatinator)
9
- [![Test Coverage](https://codeclimate.com/github/shadowbq/shadowbq-threatinator/badges/coverage.svg)](https://codeclimate.com/github/shadowbq/shadowbq-threatinator)
7
+ [![Build Status](https://travis-ci.org/shadowbq/threatinator.svg?branch=master)](https://travis-ci.org/shadowbq/threatinator)
8
+ [![Code Climate](https://codeclimate.com/github/shadowbq/threatinator/badges/gpa.svg)](https://codeclimate.com/github/shadowbq/threatinator)
9
+ [![Test Coverage](https://codeclimate.com/github/shadowbq/threatinator/badges/coverage.svg)](https://codeclimate.com/github/shadowbq/threatinator)
10
10
  [![Gem Version](https://badge.fury.io/rb/shadowbq-threatinator.png)](http://badge.fury.io/rb/shadowbq-threatinator)
11
11
  [![Tags](https://img.shields.io/github/tag/shadowbq/threatinator.svg)](https://github.com/shadowbq/threatinator/releases)
12
12
 
@@ -19,14 +19,30 @@ This is a fork published as `shadowbq-threatinator`
19
19
 
20
20
  The repository is located at: https://github.com/shadowbq/threatinator
21
21
 
22
- ## Development
22
+ ## Installation
23
23
 
24
- First, set up your dependencies.
24
+ Install from Gem
25
25
 
26
26
  ```
27
+ gem install shadowbq-threatinator
28
+ ```
29
+
30
+ `threatinator` will be located in your $PATH if installed from gem.
31
+
32
+ -OR-
33
+
34
+ Install from Source.
35
+
36
+ ```
37
+ git clone https://github.com/shadowbq/threatinator
38
+ cd threatinator
27
39
  bundle install
28
40
  ```
29
41
 
42
+ Bundler context
43
+
44
+ `bundle exec bin/threatinator` is used if not running from an installed gem.
45
+
30
46
  ### Listing feeds
31
47
 
32
48
  ```
@@ -99,3 +115,7 @@ Copyright (C) 2014 Michael Ryan (github.com/justfalter)
99
115
  Original code: https://github.com/cikl/threatinator
100
116
 
101
117
  See the LICENSE file for license rights and limitations (LGPLv3).
118
+
119
+ See the CHANGE LOG for significant changes made to software.
120
+
121
+ LGPLv3 in Plain English - https://tldrlegal.com/license/gnu-lesser-general-public-license-v3-(lgpl-3)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -25,6 +25,8 @@ module Threatinator
25
25
  end
26
26
 
27
27
  def handle_event(event)
28
+ # Routing keys are dynamic event_types
29
+ #@routing_key = config.routing_key || 'threatinator.' + event.type.to_s
28
30
  @routing_key = 'threatinator.' + event.type.to_s
29
31
  @exchange.publish(MultiJson.dump(event.to_serializable_hash),
30
32
  routing_key: @routing_key)
@@ -8,8 +8,8 @@ module Threatinator
8
8
  class Config < Threatinator::Output::Config
9
9
  attribute :url, String, description: "The hostname/ip of the RabbitMQ server"
10
10
 
11
- attribute :routing_key, String, default: lambda { |c,a| 'amqp.event' },
12
- description: "Routing key for Amqp events"
11
+ # attribute :routing_key, String, default: 'threatinator.generic',
12
+ # description: "Routing key for Amqp events"
13
13
 
14
14
  end
15
15
  end
@@ -20,7 +20,7 @@ module Threatinator
20
20
  @data[key] = object
21
21
  end
22
22
 
23
- # @param [Object] key
23
+ # @param [Object] key
24
24
  # @return [Object]
25
25
  def get(key)
26
26
  @data[key]
@@ -50,4 +50,3 @@ module Threatinator
50
50
  end
51
51
  end
52
52
  end
53
-
data/spec/spec_helper.rb CHANGED
@@ -2,6 +2,9 @@ require 'rubygems'
2
2
  require 'bundler'
3
3
  Bundler.setup :default, :test
4
4
 
5
+ require "codeclimate-test-reporter"
6
+ CodeClimate::TestReporter.start
7
+
5
8
  require 'pathname'
6
9
  SPEC_ROOT = Pathname.new(__FILE__).dirname.expand_path
7
10
  PROJECT_ROOT = SPEC_ROOT.join('../').expand_path
@@ -35,7 +38,7 @@ SimpleCov.start do
35
38
  add_filter PROJECT_ROOT.join('spec').to_s
36
39
  add_filter PROJECT_ROOT.join('.gem').to_s
37
40
  add_filter PROJECT_ROOT.join('.git').to_s
38
- end
41
+ end
39
42
 
40
43
  require 'factory_girl'
41
44
  Dir.glob(SUPPORT_ROOT.join('**','*.rb')).sort.each { |f| require f}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shadowbq-threatinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Ryan
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-10-25 00:00:00.000000000 Z
13
+ date: 2016-10-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: typhoeus