impermium 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc CHANGED
@@ -1 +1 @@
1
- rvm --create ruby-1.9.3-p0@whi
1
+ rvm --create ruby-1.9.3-p0@impermium
data/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  Ruby wrapper for the [Impermium API](http://impermium.com).
4
4
 
5
5
  * gem version 1.0.0 supports the Impermium API version 3.1
6
+ * gem version 1.1.0 supports the Impermium API version 3.1 (upgraded hashie and yajl-ruby gems)
6
7
 
7
8
  ## Usage ##
8
9
 
@@ -10,15 +11,15 @@ In order to use Impermium gem you must get an Impermium API key.
10
11
 
11
12
  ### Instantiate and configure a client ###
12
13
 
13
- The Impermium client can be instantiated and configured in several ways. A new client can be created with
14
+ The Impermium client can be instantiated and configured in several ways. A new client can be created with:
14
15
 
15
16
  client = Impermium.new(:api_key => <your_api_key>)
16
17
 
17
- which is actually short way of
18
+ which is actually short for
18
19
 
19
20
  client = Impermium::Client.new(:api_key => <your_api_key>)
20
21
 
21
- Constructor accepts a hash of options that can be used to configure the Impermium client. Valid hash keys are
22
+ Constructor accepts a hash of options that can be used to configure the Impermium client. Valid hash keys are:
22
23
 
23
24
  * `:adapter` (sets Faraday adapter)
24
25
  * `:api_version` (sets Impermium API version - default 3.1)
@@ -27,13 +28,13 @@ Constructor accepts a hash of options that can be used to configure the Impermiu
27
28
  * `:client_id` (sets client ID)
28
29
  * `:endpoint` (sets URL to Impermium server - default http://api.impermium.com)
29
30
 
30
- Either of these values can be set directly too:
31
+ Any of these values can be set directly too:
31
32
 
32
33
  * client = Impermium.new
33
34
  * client.api_key = <your_api_key>
34
35
  * client.endpoint = "http://api-test.impermium.com"
35
36
 
36
- Finally, Impermium client can be configured through a block with:
37
+ Finally, the Impermium client can be configured through a block with:
37
38
 
38
39
  Impermium.configure do |conf|
39
40
  conf.api_key = <your_api_key>
@@ -44,7 +45,7 @@ Finally, Impermium client can be configured through a block with:
44
45
 
45
46
  ### Calling API methods ###
46
47
 
47
- Each method accepts the mandatory arguments of the correspondent API call, and have an options hash and a block as optional arguments. Here is the list of all supported methods and their mandatory arguments:
48
+ Each method accepts the mandatory arguments of the corresponding API call, and takes an options hash and a block as optional arguments. Here is the list of all supported methods and their mandatory arguments:
48
49
 
49
50
  * __USER__
50
51
  + __Account:__
@@ -90,7 +91,7 @@ Additional arguments can be passed through the hash which is the last argument f
90
91
 
91
92
  client.account('33', '255.255.255.255', {:alias => "user33", :password_hash=>'7d222a5d269a'})
92
93
 
93
- If request headers have to be set it can be done through block
94
+ If request headers have to be set it can be done through a block:
94
95
 
95
96
  Impermium.account('33', '255.255.255.255') do |req|
96
97
  req.headers = {:http_user_agent => "Impermium gem 1.0.0"}
@@ -100,7 +101,7 @@ You can find the complete arguments lists and types in the official Impermium AP
100
101
 
101
102
  ### Responses ###
102
103
 
103
- Any method call receiving a successful response from impermium API will return a Hash like structure containing the body of the response, typically including `response_id`, `timestamp` and posibly `spam_classifier` and any other additional classifiers.
104
+ Any method call receiving a successful response from impermium API will return a Hash-like structure containing the body of the response, typically including `response_id`, `timestamp` and possibly `spam_classifier` and any other additional classifiers.
104
105
 
105
106
  Any 4XX response will raise an Impermium Exception with the body of the response in the error message.
106
107
 
data/impermium.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = Impermium::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.date = Time.now.strftime('%Y-%m-%d')
10
-
10
+
11
11
  s.authors = ["Juanjo Bazán", "Bosko Ivanisevic", "Neil Berkman"]
12
12
  s.email = ["jjbazan@gmail.com"]
13
13
  s.homepage = "https://github.com/weheartit/impermium"
@@ -16,14 +16,14 @@ Gem::Specification.new do |s|
16
16
 
17
17
  s.add_dependency "faraday", "~> 0.7.4"
18
18
  s.add_dependency "faraday_middleware", "~> 0.7.0"
19
- s.add_dependency "hashie", "~> 1.1.0"
20
- s.add_dependency "yajl-ruby", "~> 0.8.3"
19
+ s.add_dependency "hashie", "~> 1.2.0"
20
+ s.add_dependency "yajl-ruby", "~> 1.1.0"
21
21
  s.add_dependency "multi_json"
22
22
 
23
23
  s.add_development_dependency "rspec", "~> 2.8.0"
24
24
  s.add_development_dependency "webmock", "~> 1.8.1"
25
25
  s.add_development_dependency "vcr", "~> 2.0.0"
26
-
26
+
27
27
  s.files = `git ls-files`.split("\n")
28
28
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
29
29
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -1,3 +1,3 @@
1
1
  module Impermium
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: impermium
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-03-06 00:00:00.000000000 Z
14
+ date: 2012-04-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: faraday
18
- requirement: &2152468160 !ruby/object:Gem::Requirement
18
+ requirement: &2155953860 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ~>
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 0.7.4
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *2152468160
26
+ version_requirements: *2155953860
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday_middleware
29
- requirement: &2152467600 !ruby/object:Gem::Requirement
29
+ requirement: &2155953260 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ~>
@@ -34,32 +34,32 @@ dependencies:
34
34
  version: 0.7.0
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *2152467600
37
+ version_requirements: *2155953260
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: hashie
40
- requirement: &2152467100 !ruby/object:Gem::Requirement
40
+ requirement: &2155952580 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 1.1.0
45
+ version: 1.2.0
46
46
  type: :runtime
47
47
  prerelease: false
48
- version_requirements: *2152467100
48
+ version_requirements: *2155952580
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: yajl-ruby
51
- requirement: &2152466600 !ruby/object:Gem::Requirement
51
+ requirement: &2155952020 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ~>
55
55
  - !ruby/object:Gem::Version
56
- version: 0.8.3
56
+ version: 1.1.0
57
57
  type: :runtime
58
58
  prerelease: false
59
- version_requirements: *2152466600
59
+ version_requirements: *2155952020
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: multi_json
62
- requirement: &2152466220 !ruby/object:Gem::Requirement
62
+ requirement: &2155951480 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: '0'
68
68
  type: :runtime
69
69
  prerelease: false
70
- version_requirements: *2152466220
70
+ version_requirements: *2155951480
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: rspec
73
- requirement: &2152373820 !ruby/object:Gem::Requirement
73
+ requirement: &2155950640 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ~>
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: 2.8.0
79
79
  type: :development
80
80
  prerelease: false
81
- version_requirements: *2152373820
81
+ version_requirements: *2155950640
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: webmock
84
- requirement: &2152372720 !ruby/object:Gem::Requirement
84
+ requirement: &2155949780 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ~>
@@ -89,10 +89,10 @@ dependencies:
89
89
  version: 1.8.1
90
90
  type: :development
91
91
  prerelease: false
92
- version_requirements: *2152372720
92
+ version_requirements: *2155949780
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: vcr
95
- requirement: &2152371800 !ruby/object:Gem::Requirement
95
+ requirement: &2155949120 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ~>
@@ -100,7 +100,7 @@ dependencies:
100
100
  version: 2.0.0
101
101
  type: :development
102
102
  prerelease: false
103
- version_requirements: *2152371800
103
+ version_requirements: *2155949120
104
104
  description: Ruby wrapper for the Impermium social spam API
105
105
  email:
106
106
  - jjbazan@gmail.com