otx_ruby 0.8.0 → 0.9.0

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: 7934c02ca3191b73093883c9e5c1ca6daa18d175
4
- data.tar.gz: 3a0320e544d2d7f0864c64fc18c89c2d38bbc603
3
+ metadata.gz: a393a7e3ddff72c1b18faf37eaf3a9f6704ee5a8
4
+ data.tar.gz: 7455235c496ac4f7aee1af952c19df1e4603967d
5
5
  SHA512:
6
- metadata.gz: 0a89b9e968eb3ea1b53296e3d749b6da872dc389d699bfaa0927acc2636be5509c0fd2abc917b97c5e6aec7f9642ec70b8321c69ffe5748c0d19032e61ff9f7a
7
- data.tar.gz: 674f4eefb4f5fc1a48bc05954e17f272f1b31cbc830e1d20abd8ff61bfec447a0757875ab4fe179bfbcd19265d59a9c47f3fcabcbe593609a2c8db51a71dbbaa
6
+ metadata.gz: b81cb190205a665ea1da2fa520ded662e6bd9df970f18bf11cef85faf98c33eb9e853de35ac1615227990ac8d7db7e4e398ee83d2d539454e398b72f4b194b8c
7
+ data.tar.gz: 8f742dd37289a728fa5f87d181b8fea156bfb8f2e44219ad8ea9939dca2b39c1e25bd5f5c48153f1f593c44904ebf9d008ec2a5bf580810b77d745bc6d52e5a7
@@ -7,7 +7,7 @@ module OTX
7
7
  #
8
8
  attr_accessor :as, :threat_score, :first_seen, :city, :allow_ping, :reputation_rel_checked, :counts,
9
9
  :lon, :status, :last_seen, :state, :activities, :server_type, :matched_bl, :address, :lat, :date_added,
10
- :country, :up, :reputation_rel, :matched_wl, :domains, :reputation_val_checked, :reputation_val, :id
10
+ :country, :up, :reputation_rel, :matched_wl, :domains, :reputation_val_checked, :reputation_val, :id, :organization
11
11
 
12
12
  def _id=(id)
13
13
  @id = id['$id']
@@ -15,8 +15,14 @@ module OTX
15
15
 
16
16
  def initialize(attributes={})
17
17
  attributes.each do |key, value|
18
- if key != 'activities'
19
- send("#{key.downcase}=", value)
18
+ _key = key.gsub('-', '_')
19
+
20
+ unless self.respond_to?(_key.downcase)
21
+ self.class.send(:attr_accessor, _key.downcase)
22
+ end
23
+
24
+ if _key != 'activities'
25
+ send("#{_key.downcase}=", value)
20
26
  else
21
27
  @activities = []
22
28
  value.each do |activity|
@@ -1,4 +1,4 @@
1
1
  module OTX
2
2
  # Library Version Number
3
- VERSION = "0.8.0"
3
+ VERSION = "0.9.0"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: otx_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Kapp
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-06 00:00:00.000000000 Z
11
+ date: 2017-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday