ruby-taxii2 0.3.1 → 0.3.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: fc528f87e1d77992648872b73b304cadd0770fcd61104a013b968da7c6db8712
4
- data.tar.gz: d84191bbf3ef2aa98e43e6ab76c73e63f277387141bd406f5ee670b6a1c1b879
3
+ metadata.gz: 63e72e43df228b51f6e48e1dce072dd46b5ea9b78a21976e15652db519cb0bfb
4
+ data.tar.gz: 1087dc2974412eee95183b7ad4cad21b2368fc0125216c717a53b3bb0754aaf7
5
5
  SHA512:
6
- metadata.gz: ca13340ef9443169c8aafba8ee2181398eb1c26c8544c463508236d717ea1697eec8627fc23b6f34391356bd6816f71eee28c50aea2ea06b8a259b4d3f36a6ac
7
- data.tar.gz: eaee116e0eb3ddae02329cd3c6287b81ad00bf80bb7ac3afb961fd5dcda7f2d53ceb0927230b041f38e43fce2c227cdd2ede6b9189376d69879dd8648276f4fb
6
+ metadata.gz: 20c9964fd2ef313301bb39011b997e7ae48047fba14c1de0d87aacc4abb5e4fddc6360d332abed47eeaad6a342a4d5fb263d76d496bcf4561eb2e277709dfe34
7
+ data.tar.gz: 8006a381beb5cdd27a967d630323b999b07fe7c163382c80bafc90745614bccb5acb38c85e3b9c45a8a9b92c638e98c1f7d6b8ddb6099fa7a933940e3d5b61d8
@@ -7,12 +7,25 @@ on:
7
7
  jobs:
8
8
  build:
9
9
  name: RSpec
10
- runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ os: [ubuntu-latest, windows-latest]
13
+ ruby: ['2.7', '3.0', '3.1', head]
14
+ runs-on: ${{ matrix.os }}
15
+ permissions: write-all
11
16
  steps:
12
17
  - uses: actions/checkout@v3
13
18
  - name: Set up Ruby
14
19
  uses: ruby/setup-ruby@v1
15
20
  with:
16
- ruby-version: 3.1.2
21
+ ruby-version: ${{ matrix.ruby }}
22
+ bundler: latest
17
23
  - run: bundle
18
24
  - run: bundle exec rspec
25
+ - name: SimpleCov Ruby ${{ matrix.ruby }}
26
+ uses: joshmfrankel/simplecov-check-action@main
27
+ if: ${{ matrix.os == 'ubuntu-latest' && matrix.ruby == '3.1' }}
28
+ with:
29
+ github_token: ${{ secrets.GITHUB_TOKEN }}
30
+ check_job_name: SimpleCov ${{ matrix.ruby }}
31
+ - run: bundle exec gem build
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
  /spec/fixtures/spec_ca/
11
11
  /tmp/
12
12
  /vendor/bundle/
13
+ *.gem
data/README.md CHANGED
@@ -9,7 +9,7 @@ Currently under development - likely to break at a moment's notice.
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'ruby-taxii'
12
+ gem 'ruby-taxii2'
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -18,14 +18,45 @@ And then execute:
18
18
 
19
19
  Or install it yourself as:
20
20
 
21
- $ gem install ruby-taxii
21
+ $ gem install ruby-taxii2
22
22
 
23
23
  ## Usage
24
24
 
25
+ ```ruby
26
+ require 'taxii'
27
+
28
+ # You can use a json file configuration
29
+ # client = Taxii::configure(config: 'my.config.json')
30
+ # or a direct configuration
31
+ client = Taxii::configure(user: 'user', pass: 'pass', url: 'url', logger: Logger.new(STDOUT))
32
+ collections = client.discover_collections
33
+
34
+ # List collections (name, type and availability)
35
+ puts "Listing collections:"
36
+ collections.each do |collection|
37
+ puts "#{collection['@collection_name']} #{collection['@collection_type']} #{collection['@available']}"
38
+ end
39
+
40
+ # Pick up the first available collection
41
+ collection_name = collections.find{ |collection| collection['@available'] == 'true' }['@collection_name']
42
+
43
+ puts "Retrieving data for collection: #{collection_name}"
44
+ poll_request_message = Taxii::Messages::PollRequest.new(
45
+ collection_name: collection_name,
46
+ poll_parameters: Taxii::Messages::Parameters::Poll.new(response_type: 'FULL')
47
+ )
48
+
49
+ client.get_content_blocks(poll_request_message).each do |message|
50
+ message = Taxii.parse(body)
51
+ puts "Received a #{message.class}"
52
+ puts message.as_json if message.is_a?(Taxii::Messages::ContentBlock)
53
+ end
54
+ ```
25
55
 
26
- ## Development
56
+ ## Contributing
27
57
 
58
+ Bug reports and pull requests are welcome on GitHub at https://github.com/crondaemon/ruby-taxii2.
28
59
 
29
- ## Contributing
60
+ # See also
30
61
 
31
- Bug reports and pull requests are welcome on GitHub at https://github.com/ryanbreed/ruby-taxii.
62
+ Ruby Stix2: https://github.com/crondaemon/ruby-stix2
data/lib/taxii/client.rb CHANGED
@@ -2,19 +2,17 @@ module Taxii
2
2
  module Client
3
3
  def self.included(klass)
4
4
  klass.class_eval do
5
- attr_accessor :url, :user, :pass, :client_cert, :client_key, :ca_cert
5
+ attr_accessor :url, :user, :pass, :logger, :client_cert, :client_key, :ca_cert
6
6
  attr_reader :xml
7
7
  def initialize(*args)
8
8
  Hash[*args].each {|k,v| self.send(format('%s=',k),v)}
9
- @user ||= 'admin'
10
- @pass ||= 'avalanche'
11
9
  @xml = Nori.new(strip_namespaces: true)
12
10
  self
13
11
  end
14
12
  end
15
13
  end
16
14
 
17
- def build_request(url: self.url,payload: {}, format: Taxii::Messages::TAXII_11_HEADERS)
15
+ def build_request(url: self.url, payload: {}, format: Taxii::Messages::TAXII_11_HEADERS)
18
16
  RestClient::Request.new(
19
17
  method: :post,
20
18
  url: url,
@@ -33,7 +31,7 @@ module Taxii
33
31
 
34
32
  def get_service_address(service_name)
35
33
  service = discover_services.find do |svc|
36
- svc['@service_type']==service_name && svc['@available']=='true'
34
+ svc['@service_type'] == service_name && svc['@available'] == 'true'
37
35
  end
38
36
  service.nil? ? nil : service['Address']
39
37
  end
@@ -42,7 +40,9 @@ module Taxii
42
40
  payload = Taxii::Messages::DiscoveryRequest.new.to_xml
43
41
  response = build_request(url: self.url, payload: payload).execute
44
42
  parsed = xml.parse(response.body)
45
- parsed['Discovery_Response'].fetch('Service_Instance',[])
43
+ discovery_response = parsed['Discovery_Response']
44
+ raise("Error getting Discovery_Response: #{parsed}") if !discovery_response
45
+ discovery_response.fetch('Service_Instance', [])
46
46
  end
47
47
 
48
48
  def discovery_service_url
@@ -61,11 +61,22 @@ module Taxii
61
61
  @poll_service_url ||= get_service_address('POLL')
62
62
  end
63
63
 
64
- def discover_feeds(url=self.collection_management_service_url)
64
+ def discover_feeds(url: self.collection_management_service_url, format: Taxii::Messages::TAXII_10_HEADERS)
65
65
  msg = Taxii::Messages::FeedInformationRequest.new.to_xml
66
- http = build_request(url: url, payload: msg, format: Taxii::Messages::TAXII_10_HEADERS)
66
+ http = build_request(url: url, payload: msg, format: format)
67
67
  parsed = xml.parse(http.execute.body)
68
- parsed['Feed_Information_Response'].fetch('Feed',[])
68
+ feed_information_response = parsed['Feed_Information_Response']
69
+ raise("Error getting Feed_Information_Response: #{parsed}") if !feed_information_response
70
+ feed_information_response.fetch('Feed', [])
71
+ end
72
+
73
+ def discover_collections(url: self.collection_management_service_url, format: Taxii::Messages::TAXII_10_HEADERS)
74
+ msg = Taxii::Messages::CollectionInformationRequest.new.to_xml
75
+ http = build_request(url: url, payload: msg, format: format)
76
+ parsed = xml.parse(http.execute.body)
77
+ collection_information_response = parsed['Collection_Information_Response']
78
+ raise("Error getting Collection_Information_Response: #{parsed}") if !collection_information_response
79
+ collection_information_response.fetch('Collection', [])
69
80
  end
70
81
 
71
82
  def scheme_protocol
@@ -0,0 +1,18 @@
1
+ module Taxii
2
+ module Messages
3
+ class CollectionInformationRequest < Hashie::Dash
4
+ property :message_id, default: -> { Taxii::Messages.generate_id }
5
+
6
+ def to_h
7
+ Taxii::Messages::NAMESPACE_ATTRIBUTES.merge({
8
+ '@message_id': message_id
9
+ })
10
+ end
11
+
12
+ def to_xml
13
+ Gyoku.xml({'taxii_11:Collection_Information_Request/': to_h}, key_converter: :none)
14
+ end
15
+
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,9 @@
1
+ module Taxii
2
+ module Messages
3
+ class ContentBlock < Message
4
+ def self.object_path
5
+ ['Content_Block', 'Content']
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ module Taxii
2
+ module Messages
3
+ class ExclusiveBeginTimestamp < Message
4
+ def self.object_path
5
+ ['Exclusive_Begin_Timestamp']
6
+ end
7
+
8
+ def as_json
9
+ @body
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Taxii
2
+ module Messages
3
+ class InclusiveEndTimestamp < Message
4
+ def self.object_path
5
+ ['Inclusive_End_Timestamp']
6
+ end
7
+
8
+ def as_json
9
+ @body
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,28 @@
1
+ require 'json'
2
+
3
+ module Taxii
4
+ module Messages
5
+ class Message
6
+ def initialize(body)
7
+ parsed = Nori.new(strip_namespaces: true).parse(body)
8
+ @body = parsed.dig(*self.class.object_path)
9
+ end
10
+
11
+ def to_s
12
+ @body.to_s
13
+ end
14
+
15
+ def inspect
16
+ self.to_s
17
+ end
18
+
19
+ def as_json
20
+ JSON.parse(@body)
21
+ end
22
+
23
+ def pretty_print(pp)
24
+ puts self.to_s
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,25 @@
1
+ module Taxii
2
+ module Messages
3
+ class PollFulfillmentRequest < Hashie::Dash
4
+ include Hashie::Extensions::Coercion
5
+
6
+ property :collection_name, default: 'system.Default'
7
+ property :result_id
8
+ property :result_part_number
9
+ property :message_id, default: -> { Taxii::Messages.generate_id }
10
+
11
+ def to_h
12
+ NAMESPACE_ATTRIBUTES.merge({
13
+ '@message_id': message_id,
14
+ '@collection_name': collection_name,
15
+ '@result_id': result_id,
16
+ '@result_part_number': result_part_number,
17
+ })
18
+ end
19
+
20
+ def to_xml
21
+ Gyoku.xml({'taxii_11:Poll_Fulfillment': to_h}, key_converter: :none)
22
+ end
23
+ end
24
+ end
25
+ end
@@ -21,7 +21,7 @@ module Taxii
21
21
  if exclusive_begin_timestamp.nil?
22
22
  {}
23
23
  else
24
- {'Exclusive_Begin_Timestamp': exclusive_begin_timestamp.strftime(TS_FORMAT)}
24
+ {'taxii_11:Exclusive_Begin_Timestamp': exclusive_begin_timestamp.strftime(TS_FORMAT)}
25
25
  end
26
26
  end
27
27
 
@@ -29,7 +29,7 @@ module Taxii
29
29
  if inclusive_end_timestamp.nil?
30
30
  {}
31
31
  else
32
- {'Inclusive_End_Timestamp': inclusive_end_timestamp.strftime(TS_FORMAT)}
32
+ {'taxii_11:Inclusive_End_Timestamp': inclusive_end_timestamp.strftime(TS_FORMAT)}
33
33
  end
34
34
  end
35
35
  def requested_info
@@ -0,0 +1,9 @@
1
+ module Taxii
2
+ module Messages
3
+ class RecordCount < Message
4
+ def self.object_path
5
+ ['Record_Count']
6
+ end
7
+ end
8
+ end
9
+ end
@@ -3,29 +3,68 @@ module Taxii
3
3
  include Client
4
4
 
5
5
  PARSE_OPTIONS = Nokogiri::XML::ParseOptions::DEFAULT_XML | Nokogiri::XML::ParseOptions::NOBLANKS
6
- CONTENT_XPATH = '/taxii_11:Poll_Response/taxii_11:Content_Block/taxii_11:Content'
6
+ POLL_RESPONSE_PATH = '/taxii_11:Poll_Response'
7
+ CONTENT_XPATH = "#{POLL_RESPONSE_PATH}/taxii_11:Content_Block/taxii_11:Content"
7
8
 
8
- def get( poll_request_message, url: self.poll_service_url)
9
+ def get(poll_request_message, url: self.poll_service_url)
9
10
  msg = format_request(poll_request_message)
10
11
  build_request(url: url, payload: msg).execute
11
12
  end
12
13
 
13
- def get_content_blocks( poll_request_message,
14
+ def get_content_blocks(poll_request_message,
14
15
  url: self.poll_service_url,
15
- xpath: CONTENT_XPATH )
16
+ xpath: CONTENT_XPATH)
16
17
  response = self.get(poll_request_message, url: url)
17
- content_xml = Nokogiri::XML(response.body,nil,nil,PARSE_OPTIONS)
18
- content_xml.xpath(xpath).flat_map { |blk| blk.children.map(&:to_s) }
18
+ @content_xml = Nokogiri::XML(response.body, nil, nil, PARSE_OPTIONS)
19
+
20
+ blocks = response_blocks
21
+
22
+ # We have a muulti-part message
23
+ # http://docs.oasis-open.org/cti/taxii/v1.1.1/cs01/part2-services/taxii-v1.1.1-cs01-part2-services.html#_Toc450734190
24
+ while attribute_more == 'true'
25
+ poll_fulfillment_message = Taxii::Messages::PollFulfillmentRequest.new(
26
+ collection_name: poll_request_message.collection_name,
27
+ result_id: result_id,
28
+ result_part_number: result_part_number + 1)
29
+
30
+ response = self.get(poll_fulfillment_message, url: url)
31
+ @content_xml = Nokogiri::XML(response.body, nil, nil, PARSE_OPTIONS)
32
+
33
+ blocks += response_blocks
34
+ @logger.info("#{blocks.count} blocks received") if @logger
35
+ end
36
+
37
+ blocks
38
+ end
39
+
40
+ private
41
+
42
+ def response_blocks
43
+ @content_xml.xpath(POLL_RESPONSE_PATH).flat_map { |blk| blk.children.map(&:to_s) }
44
+ end
45
+
46
+ def attribute_more
47
+ @content_xml.at_xpath(POLL_RESPONSE_PATH).attributes['more'].value
48
+ end
49
+
50
+ def result_id
51
+ @content_xml.at_xpath(POLL_RESPONSE_PATH).attributes['result_id'].value
52
+ end
53
+
54
+ def result_part_number
55
+ @content_xml.at_xpath(POLL_RESPONSE_PATH).attributes['result_part_number'].value.to_i
19
56
  end
20
57
 
21
58
  def format_request(request_message)
22
59
  case request_message
23
60
  when String
24
61
  request_message
25
- when Taxii::Messages::PollRequest
62
+ when Taxii::Messages::PollRequest, Taxii::Messages::PollFulfillmentRequest
26
63
  request_message.to_xml
27
64
  else
65
+ # :nocov:
28
66
  fail ArgumentError, 'request message must be String or PollRequest'
67
+ # :nocov:
29
68
  end
30
69
  end
31
70
  end
data/lib/taxii/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Taxii
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.3'
3
3
  end
data/lib/taxii.rb CHANGED
@@ -4,20 +4,43 @@ require 'rest-client'
4
4
  require 'uri'
5
5
  require 'nori'
6
6
  require 'gyoku'
7
+ require 'json'
7
8
 
8
9
  require 'taxii/version'
9
10
  require 'taxii/time_extensions'
10
11
  require 'taxii/messages'
12
+ require 'taxii/messages/message'
11
13
  require 'taxii/messages/parameters'
12
14
  require 'taxii/messages/discovery_request'
13
15
  require 'taxii/messages/poll_request'
16
+ require 'taxii/messages/poll_fulfillment_request'
14
17
  require 'taxii/messages/feed_information_request'
18
+ require 'taxii/messages/collection_information_request'
19
+ require 'taxii/messages/content_block'
20
+ require 'taxii/messages/record_count'
21
+ require 'taxii/messages/exclusive_begin_timestamp'
22
+ require 'taxii/messages/inclusive_end_timestamp'
15
23
  require 'taxii/client'
16
24
  require 'taxii/poll_client'
17
25
 
18
26
  module Taxii
19
- def self.configure(config: File.join(ENV['HOME'],'.taxii.json'), client: PollClient)
20
- configuration = JSON.parse(File.read(config))
27
+ def self.configure(options = {})
28
+ client = options.fetch(:client, PollClient)
29
+ config = options.fetch(:config, File.join(ENV['HOME'],'.taxii.json'))
30
+ user = options[:user]
31
+ pass = options[:pass]
32
+ url = options[:url]
33
+
34
+ if url
35
+ configuration = { user: user, pass: pass, url: url }
36
+ elsif File.exist?(config)
37
+ configuration = JSON.parse(File.read(config))
38
+ else
39
+ raise('You must provide user+pass+url, ora a config file, or have a default $HOME/.taxii.json')
40
+ end
41
+
42
+ configuration[:logger] = options[:logger]
43
+
21
44
  client.new(configuration)
22
45
  end
23
46
 
@@ -29,4 +52,18 @@ module Taxii
29
52
  PollClient.new(user: 'guest', pass: 'guest', url: 'http://taxiitest.mitre.org/services/discovery/')
30
53
  end
31
54
 
55
+ def self.parse(body)
56
+ parsed = Nori.new(strip_namespaces: true).parse(body)
57
+ if parsed['Content_Block']
58
+ Messages::ContentBlock.new(body)
59
+ elsif parsed['Exclusive_Begin_Timestamp']
60
+ Messages::ExclusiveBeginTimestamp.new(body)
61
+ elsif parsed['Inclusive_End_Timestamp']
62
+ Messages::InclusiveEndTimestamp.new(body)
63
+ elsif parsed['Record_Count']
64
+ Messages::RecordCount.new(body)
65
+ else
66
+ raise("Message unsupported. Objects: #{parsed.keys}")
67
+ end
68
+ end
32
69
  end
data/ruby-taxii.gemspec CHANGED
@@ -8,6 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Taxii::VERSION
9
9
  spec.authors = ['Dario Lombardo']
10
10
  spec.email = ['lomato@gmail.com']
11
+ spec.license = 'GPL-2.0-or-later'
11
12
 
12
13
  spec.summary = %q{ ruby taxii client }
13
14
  spec.description = %q{ implement api-alike for python libtaxii https://github.com/TAXIIProject/libtaxii }
@@ -18,19 +19,21 @@ Gem::Specification.new do |spec|
18
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
20
  spec.require_paths = ['lib']
20
21
 
21
- spec.add_dependency 'nokogiri'
22
- spec.add_dependency 'nori'
23
- spec.add_dependency 'gyoku'
24
- spec.add_dependency 'hashie'
25
- spec.add_dependency 'rest-client'
22
+ spec.add_dependency 'nokogiri', '~> 1.15.2'
23
+ spec.add_dependency 'nori', '~> 2.6.0'
24
+ spec.add_dependency 'gyoku', '~> 1.4.0'
25
+ spec.add_dependency 'hashie', '~> 5.0.0'
26
+ spec.add_dependency 'rest-client', '~> 2.1.0'
26
27
 
27
28
  spec.add_development_dependency 'bundler', '~> 2.3'
28
29
  spec.add_development_dependency 'rake', '~> 13.0'
29
- spec.add_development_dependency 'rspec'
30
- spec.add_development_dependency 'guard'
31
- spec.add_development_dependency 'guard-rspec'
32
- spec.add_development_dependency 'guard-bundler'
33
- spec.add_development_dependency 'simplecov'
34
- spec.add_development_dependency 'vcr'
35
- spec.add_development_dependency 'webmock'
30
+ spec.add_development_dependency 'rspec', '~> 3.12.0'
31
+ spec.add_development_dependency 'guard', '~> 2.18.0'
32
+ spec.add_development_dependency 'guard-rspec', '~> 4.7.3'
33
+ spec.add_development_dependency 'guard-bundler', '~> 3.0.1'
34
+ spec.add_development_dependency 'simplecov', '~> 0.22.0'
35
+ spec.add_development_dependency 'vcr', '~> 6.1.0'
36
+ spec.add_development_dependency 'webmock', '~> 3.18.1'
37
+ spec.add_development_dependency 'pry', '~> 0.13.0'
38
+ spec.add_development_dependency 'pry-byebug', '~> 3.10.1'
36
39
  end
metadata CHANGED
@@ -1,85 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-taxii2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dario Lombardo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-27 00:00:00.000000000 Z
11
+ date: 2023-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 1.15.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 1.15.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nori
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 2.6.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 2.6.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: gyoku
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 1.4.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 1.4.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: hashie
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 5.0.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 5.0.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rest-client
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 2.1.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 2.1.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -112,100 +112,128 @@ dependencies:
112
112
  name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: 3.12.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: 3.12.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: guard
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: 2.18.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: 2.18.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: guard-rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: 4.7.3
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: 4.7.3
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: guard-bundler
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '0'
159
+ version: 3.0.1
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '0'
166
+ version: 3.0.1
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: simplecov
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ">="
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '0'
173
+ version: 0.22.0
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '0'
180
+ version: 0.22.0
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: vcr
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '0'
187
+ version: 6.1.0
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '0'
194
+ version: 6.1.0
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: webmock
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ">="
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: 3.18.1
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: 3.18.1
209
+ - !ruby/object:Gem::Dependency
210
+ name: pry
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
200
214
  - !ruby/object:Gem::Version
201
- version: '0'
215
+ version: 0.13.0
202
216
  type: :development
203
217
  prerelease: false
204
218
  version_requirements: !ruby/object:Gem::Requirement
205
219
  requirements:
206
- - - ">="
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: 0.13.0
223
+ - !ruby/object:Gem::Dependency
224
+ name: pry-byebug
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - "~>"
228
+ - !ruby/object:Gem::Version
229
+ version: 3.10.1
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - "~>"
207
235
  - !ruby/object:Gem::Version
208
- version: '0'
236
+ version: 3.10.1
209
237
  description: " implement api-alike for python libtaxii https://github.com/TAXIIProject/libtaxii "
210
238
  email:
211
239
  - lomato@gmail.com
@@ -225,17 +253,25 @@ files:
225
253
  - lib/taxii.rb
226
254
  - lib/taxii/client.rb
227
255
  - lib/taxii/messages.rb
256
+ - lib/taxii/messages/collection_information_request.rb
257
+ - lib/taxii/messages/content_block.rb
228
258
  - lib/taxii/messages/discovery_request.rb
259
+ - lib/taxii/messages/exclusive_begin_timestamp.rb
229
260
  - lib/taxii/messages/feed_information_request.rb
261
+ - lib/taxii/messages/inclusive_end_timestamp.rb
262
+ - lib/taxii/messages/message.rb
230
263
  - lib/taxii/messages/parameters.rb
264
+ - lib/taxii/messages/poll_fulfillment_request.rb
231
265
  - lib/taxii/messages/poll_request.rb
266
+ - lib/taxii/messages/record_count.rb
232
267
  - lib/taxii/parsers/sax_poll_response.rb
233
268
  - lib/taxii/poll_client.rb
234
269
  - lib/taxii/time_extensions.rb
235
270
  - lib/taxii/version.rb
236
271
  - ruby-taxii.gemspec
237
272
  homepage: https://github.com/crondaemon/ruby-taxii2
238
- licenses: []
273
+ licenses:
274
+ - GPL-2.0-or-later
239
275
  metadata: {}
240
276
  post_install_message:
241
277
  rdoc_options: []
@@ -252,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
252
288
  - !ruby/object:Gem::Version
253
289
  version: '0'
254
290
  requirements: []
255
- rubygems_version: 3.3.7
291
+ rubygems_version: 3.3.26
256
292
  signing_key:
257
293
  specification_version: 4
258
294
  summary: ruby taxii client