webpurify 0.8.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE +20 -0
  3. data/README.md +4 -4
  4. data/lib/web_purify/request.rb +17 -19
  5. data/lib/web_purify/version.rb +1 -1
  6. data/lib/webpurify.rb +2 -0
  7. data/web_purify.gemspec +5 -5
  8. metadata +10 -49
  9. data/.gitignore +0 -24
  10. data/Gemfile +0 -3
  11. data/spec/fixtures/vcr/WebPurify_ImageFilters/imgaccount/returns_the_number_of_image_submissions_remaining.yml +0 -38
  12. data/spec/fixtures/vcr/WebPurify_ImageFilters/imgcheck/returns_an_image_ID.yml +0 -38
  13. data/spec/fixtures/vcr/WebPurify_ImageFilters/imgstatus/returns_the_status_of_image_moderation.yml +0 -74
  14. data/spec/fixtures/vcr/WebPurify_TextFilters/check/safe_text_returns_false.yml +0 -36
  15. data/spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_a_URL_returns_false_by_default.yml +0 -36
  16. data/spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_a_URL_when_URLs_are_prohibited_returns_true.yml +0 -36
  17. data/spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_a_phone_number_returns_false_by_default.yml +0 -36
  18. data/spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_a_phone_number_when_phone_numbers_are_prohibited_returns_true.yml +0 -36
  19. data/spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_an_email_returns_false_by_default.yml +0 -36
  20. data/spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_an_email_when_emails_are_prohibited_returns_true.yml +0 -36
  21. data/spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_profanity_returns_true.yml +0 -36
  22. data/spec/fixtures/vcr/WebPurify_TextFilters/check_count/no_profanities_returns_0.yml +0 -36
  23. data/spec/fixtures/vcr/WebPurify_TextFilters/check_count/one_profanity_returns_1.yml +0 -36
  24. data/spec/fixtures/vcr/WebPurify_TextFilters/check_count/two_profanities_returns_2.yml +0 -36
  25. data/spec/fixtures/vcr/WebPurify_TextFilters/replace/safe_text_returns_the_text_with_no_changes.yml +0 -37
  26. data/spec/fixtures/vcr/WebPurify_TextFilters/replace/text_with_profanity_returns_the_text_with_profanities_replaced_by_symbols.yml +0 -37
  27. data/spec/fixtures/vcr/WebPurify_TextFilters/return/no_profanities_returns_an_empty_array.yml +0 -36
  28. data/spec/fixtures/vcr/WebPurify_TextFilters/return/one_profanity_returns_an_array_with_one_profanity.yml +0 -36
  29. data/spec/fixtures/vcr/WebPurify_TextFilters/return/two_profanities_returns_an_array_with_two_profanities.yml +0 -36
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2fd086c28b2e5acdf35f54cb703a2b2bb453ab10
4
- data.tar.gz: 2008c40dcc8288ce9e068bbd0d85e6d704549374
2
+ SHA256:
3
+ metadata.gz: 9b370624873ef7328f427155979aae3633b4fd73f14b3e80ecbbd30c4734313a
4
+ data.tar.gz: e1a266a85bb376893f4b49750abd39c402164e15407279f81b1306636a39edb5
5
5
  SHA512:
6
- metadata.gz: af01d847c4111e7c689ac36e28eb9f6aa0b39d63818902efe76f795c27cb5f0658954a7252c4989cd89e3076c1aaf561ca88ec64811ab3dbf837dd7b06f4c5dc
7
- data.tar.gz: 811034a673516c955ee8db32fa3ae0742536be98378ef4b4d4f97f87dd94c6e14e340c67cad6c71c36636e73b883c5bb93e669c7dc2ff80344e0f1da5d74c61d
6
+ metadata.gz: b5aaace36db41cf9fe29a217b2cccdb4ee414379e261774c9be0e3e9b73e20999a93fea41ed1b44023f8a50a3e24a099bea73841e9ce3a2b922c20307cdaf5ff
7
+ data.tar.gz: 43c7bf433d9cb0b0f89ef4094ba19c81708070dcb3500dc2345d2c2834e189b05df4695299435e5f70df39832cea462e42151e4292ee575f003b7700ef4674b9
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Miles Zimmerman
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
- WebPurify RubyGem
2
- =================
1
+ # WebPurify RubyGem #
2
+ [![Gem Version](https://badge.fury.io/rb/webpurify.svg)](https://badge.fury.io/rb/webpurify) [![Build Status](https://travis-ci.org/mileszim/webpurify.svg?branch=master)](https://travis-ci.org/mileszim/webpurify)
3
3
 
4
4
  This gem allows simple interaction with the WebPurify API using Ruby. For more information about WebPurify and the services it offers, check out http://webpurify.com/.
5
5
 
@@ -116,7 +116,7 @@ Add a word to the blacklist.
116
116
  ```rb
117
117
  @wp.add_to_blacklist('my_awesome_word')
118
118
  ```
119
-
119
+
120
120
  For Deep search, add optional parameter 1 after word:
121
121
 
122
122
  ```rb
@@ -222,4 +222,4 @@ p @wp.imgaccount
222
222
 
223
223
  ## To-do:
224
224
  * Handle error responses
225
- * Tests
225
+ * Tests
@@ -1,26 +1,25 @@
1
1
  require 'uri'
2
- require 'net/http'
3
- require 'net/https'
2
+ require 'open-uri'
4
3
  require 'json'
5
4
 
6
5
  module WebPurify
7
-
6
+
8
7
  # WebPurify::Request
9
8
  #
10
9
  # WebPurify::Request handles the HTTP/HTTPS queries to the API endpoints,
11
10
  # converting returned JSON into a usable object.
12
11
  module Request
13
-
12
+
14
13
  WRAPPER = :rsp
15
-
14
+
16
15
  class RequestError < StandardError
17
16
  attr_accessor :code, :msg
18
-
17
+
19
18
  def initialize code, msg
20
19
  @code = code
21
20
  @msg = msg
22
21
  end
23
-
22
+
24
23
  def to_s
25
24
  "[#{@code}] #{@msg}"
26
25
  end
@@ -32,10 +31,12 @@ module WebPurify
32
31
  # @param hash [Hash] The hash to be converted
33
32
  # @return [String] The formatted query string
34
33
  def self.to_query(hash)
35
- return URI.encode(hash.map{|k,v| "#{k}=#{v}"}.join("&"))
34
+ return URI.encode_www_form(hash)
36
35
  end
37
-
38
-
36
+
37
+
38
+ # TODO: Request handling can be dramatically simplified using 'open-uri'
39
+ #
39
40
  # Executes a query to the API endpoint
40
41
  #
41
42
  # @param request_base [Hash] The base parameters for the request (comes from WebPurify::Client initialize())
@@ -47,10 +48,10 @@ module WebPurify
47
48
  uri_builder = (request_base[:scheme]=='https') ? URI::HTTPS : URI::HTTP
48
49
  uri = uri_builder.build(
49
50
  :host => request_base[:host],
50
- :path => request_base[:path],
51
+ :path => request_base[:path],
51
52
  :query => WebPurify::Request.to_query(q)
52
53
  )
53
- res = JSON.parse(WebPurify::Request.get(uri, request_base[:scheme]), :symbolize_names => true)[WRAPPER]
54
+ res = JSON.parse(WebPurify::Request.get(uri), :symbolize_names => true)[WRAPPER]
54
55
  if res[:err]
55
56
  err_attrs = res[:err][:@attributes]
56
57
  raise RequestError.new(err_attrs[:code], err_attrs[:msg])
@@ -59,16 +60,13 @@ module WebPurify
59
60
  end
60
61
  end
61
62
 
62
-
63
+
63
64
  # Handles making the query according to http or https scheme
64
65
  #
65
66
  # @param uri [String] The uri to be queried
66
- # @param scheme [String] The scheme (http, https)
67
67
  # @return [String] The JSON request response
68
- def self.get(uri, scheme)
69
- req = (scheme=='https') ? Net::HTTPS : Net::HTTP
70
- req.get uri
68
+ def self.get(uri)
69
+ URI.parse(uri.to_s).read
71
70
  end
72
-
73
71
  end
74
- end
72
+ end
@@ -1,3 +1,3 @@
1
1
  module WebPurify
2
- VERSION = "0.8.0"
2
+ VERSION = "1.0.2"
3
3
  end
data/lib/webpurify.rb ADDED
@@ -0,0 +1,2 @@
1
+ # This file exists for backward compatbility with require 'webpurify'
2
+ require File.dirname(__FILE__) + '/web_purify'
data/web_purify.gemspec CHANGED
@@ -15,12 +15,12 @@ Gem::Specification.new do |s|
15
15
 
16
16
  s.add_dependency "json"
17
17
 
18
- s.add_development_dependency "rspec", "~> 3.2.0"
18
+ s.add_development_dependency "rspec", "~> 3.10.0"
19
19
  s.add_development_dependency "vcr"
20
20
  s.add_development_dependency "webmock"
21
21
 
22
- s.files = `git ls-files`.split("\n")
23
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
24
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
22
+ s.files = %w(LICENSE README.md web_purify.gemspec)
23
+ s.files += Dir.glob("lib/**/*.rb")
24
+ s.test_files = Dir.glob("spec/**/*.rb")
25
25
  s.require_paths = ["lib"]
26
- end
26
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webpurify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Zimmerman
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-29 00:00:00.000000000 Z
11
+ date: 2021-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.2.0
33
+ version: 3.10.0
34
34
  type: :development
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: 3.2.0
40
+ version: 3.10.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: vcr
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -73,8 +73,7 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - ".gitignore"
77
- - Gemfile
76
+ - LICENSE
78
77
  - README.md
79
78
  - lib/web_purify.rb
80
79
  - lib/web_purify/client.rb
@@ -85,25 +84,7 @@ files:
85
84
  - lib/web_purify/methods/whitelist.rb
86
85
  - lib/web_purify/request.rb
87
86
  - lib/web_purify/version.rb
88
- - spec/fixtures/vcr/WebPurify_ImageFilters/imgaccount/returns_the_number_of_image_submissions_remaining.yml
89
- - spec/fixtures/vcr/WebPurify_ImageFilters/imgcheck/returns_an_image_ID.yml
90
- - spec/fixtures/vcr/WebPurify_ImageFilters/imgstatus/returns_the_status_of_image_moderation.yml
91
- - spec/fixtures/vcr/WebPurify_TextFilters/check/safe_text_returns_false.yml
92
- - spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_a_URL_returns_false_by_default.yml
93
- - spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_a_URL_when_URLs_are_prohibited_returns_true.yml
94
- - spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_a_phone_number_returns_false_by_default.yml
95
- - spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_a_phone_number_when_phone_numbers_are_prohibited_returns_true.yml
96
- - spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_an_email_returns_false_by_default.yml
97
- - spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_an_email_when_emails_are_prohibited_returns_true.yml
98
- - spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_profanity_returns_true.yml
99
- - spec/fixtures/vcr/WebPurify_TextFilters/check_count/no_profanities_returns_0.yml
100
- - spec/fixtures/vcr/WebPurify_TextFilters/check_count/one_profanity_returns_1.yml
101
- - spec/fixtures/vcr/WebPurify_TextFilters/check_count/two_profanities_returns_2.yml
102
- - spec/fixtures/vcr/WebPurify_TextFilters/replace/safe_text_returns_the_text_with_no_changes.yml
103
- - spec/fixtures/vcr/WebPurify_TextFilters/replace/text_with_profanity_returns_the_text_with_profanities_replaced_by_symbols.yml
104
- - spec/fixtures/vcr/WebPurify_TextFilters/return/no_profanities_returns_an_empty_array.yml
105
- - spec/fixtures/vcr/WebPurify_TextFilters/return/one_profanity_returns_an_array_with_one_profanity.yml
106
- - spec/fixtures/vcr/WebPurify_TextFilters/return/two_profanities_returns_an_array_with_two_profanities.yml
87
+ - lib/webpurify.rb
107
88
  - spec/spec_helper.rb
108
89
  - spec/support/vcr.rb
109
90
  - spec/web_purify/methods/image_filters_spec.rb
@@ -112,7 +93,7 @@ files:
112
93
  homepage: https://github.com/mileszim/webpurify-gem
113
94
  licenses: []
114
95
  metadata: {}
115
- post_install_message:
96
+ post_install_message:
116
97
  rdoc_options: []
117
98
  require_paths:
118
99
  - lib
@@ -127,31 +108,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
108
  - !ruby/object:Gem::Version
128
109
  version: '0'
129
110
  requirements: []
130
- rubyforge_project:
131
- rubygems_version: 2.2.2
132
- signing_key:
111
+ rubygems_version: 3.2.22
112
+ signing_key:
133
113
  specification_version: 4
134
114
  summary: A RubyGem for interfacing with the WebPurify API.
135
115
  test_files:
136
- - spec/fixtures/vcr/WebPurify_ImageFilters/imgaccount/returns_the_number_of_image_submissions_remaining.yml
137
- - spec/fixtures/vcr/WebPurify_ImageFilters/imgcheck/returns_an_image_ID.yml
138
- - spec/fixtures/vcr/WebPurify_ImageFilters/imgstatus/returns_the_status_of_image_moderation.yml
139
- - spec/fixtures/vcr/WebPurify_TextFilters/check/safe_text_returns_false.yml
140
- - spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_a_URL_returns_false_by_default.yml
141
- - spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_a_URL_when_URLs_are_prohibited_returns_true.yml
142
- - spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_a_phone_number_returns_false_by_default.yml
143
- - spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_a_phone_number_when_phone_numbers_are_prohibited_returns_true.yml
144
- - spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_an_email_returns_false_by_default.yml
145
- - spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_an_email_when_emails_are_prohibited_returns_true.yml
146
- - spec/fixtures/vcr/WebPurify_TextFilters/check/text_with_profanity_returns_true.yml
147
- - spec/fixtures/vcr/WebPurify_TextFilters/check_count/no_profanities_returns_0.yml
148
- - spec/fixtures/vcr/WebPurify_TextFilters/check_count/one_profanity_returns_1.yml
149
- - spec/fixtures/vcr/WebPurify_TextFilters/check_count/two_profanities_returns_2.yml
150
- - spec/fixtures/vcr/WebPurify_TextFilters/replace/safe_text_returns_the_text_with_no_changes.yml
151
- - spec/fixtures/vcr/WebPurify_TextFilters/replace/text_with_profanity_returns_the_text_with_profanities_replaced_by_symbols.yml
152
- - spec/fixtures/vcr/WebPurify_TextFilters/return/no_profanities_returns_an_empty_array.yml
153
- - spec/fixtures/vcr/WebPurify_TextFilters/return/one_profanity_returns_an_array_with_one_profanity.yml
154
- - spec/fixtures/vcr/WebPurify_TextFilters/return/two_profanities_returns_an_array_with_two_profanities.yml
155
116
  - spec/spec_helper.rb
156
117
  - spec/support/vcr.rb
157
118
  - spec/web_purify/methods/image_filters_spec.rb
data/.gitignore DELETED
@@ -1,24 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- coverage
6
- InstalledFiles
7
- lib/bundler/man
8
- pkg
9
- rdoc
10
- spec/reports
11
- test/tmp
12
- test/version_tmp
13
- tmp
14
-
15
- # YARD artifacts
16
- .yardoc
17
- _yardoc
18
- doc/
19
-
20
- test.rb
21
- Gemfile.lock
22
- .ruby-version
23
- .ruby-gemset
24
- spec/support/webpurify_api_key.rb
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
@@ -1,38 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://im-api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.imgaccount
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - im-api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Tue, 28 Apr 2015 21:55:34 GMT
27
- Content-Type:
28
- - 'application/json; charset: utf-8'
29
- Transfer-Encoding:
30
- - chunked
31
- Connection:
32
- - keep-alive
33
- body:
34
- encoding: UTF-8
35
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.imgaccount","format":"rest","remaining":"96","api_key":"<WEBPURIFY_API_KEY>"}}'
36
- http_version:
37
- recorded_at: Tue, 28 Apr 2015 21:55:04 GMT
38
- recorded_with: VCR 2.9.3
@@ -1,38 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://im-api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&imgurl=http://www.example.com/test.jpg&method=webpurify.live.imgcheck
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - im-api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Tue, 28 Apr 2015 20:13:38 GMT
27
- Content-Type:
28
- - 'application/json; charset: utf-8'
29
- Transfer-Encoding:
30
- - chunked
31
- Connection:
32
- - keep-alive
33
- body:
34
- encoding: UTF-8
35
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.imgcheck","format":"rest","imgid":"a1c9800a4f4a27dd88055fa7529d5101","status":"pending","api_key":"<WEBPURIFY_API_KEY>"}}'
36
- http_version:
37
- recorded_at: Tue, 28 Apr 2015 20:13:08 GMT
38
- recorded_with: VCR 2.9.3
@@ -1,74 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://im-api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&imgurl=http://www.example.com/test.jpg&method=webpurify.live.imgcheck
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - im-api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Tue, 28 Apr 2015 21:46:03 GMT
27
- Content-Type:
28
- - 'application/json; charset: utf-8'
29
- Transfer-Encoding:
30
- - chunked
31
- Connection:
32
- - keep-alive
33
- body:
34
- encoding: UTF-8
35
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.imgcheck","format":"rest","imgid":"d334790fbc44e4b1d95a4fdbeb2f9d6f","status":"pending","api_key":"<WEBPURIFY_API_KEY>"}}'
36
- http_version:
37
- recorded_at: Tue, 28 Apr 2015 21:45:33 GMT
38
- - request:
39
- method: get
40
- uri: http://im-api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&imgid=d334790fbc44e4b1d95a4fdbeb2f9d6f&method=webpurify.live.imgstatus
41
- body:
42
- encoding: US-ASCII
43
- string: ''
44
- headers:
45
- Accept-Encoding:
46
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
47
- Accept:
48
- - "*/*"
49
- User-Agent:
50
- - Ruby
51
- Host:
52
- - im-api1.webpurify.com
53
- response:
54
- status:
55
- code: 200
56
- message: OK
57
- headers:
58
- Server:
59
- - nginx
60
- Date:
61
- - Tue, 28 Apr 2015 21:46:03 GMT
62
- Content-Type:
63
- - 'application/json; charset: utf-8'
64
- Transfer-Encoding:
65
- - chunked
66
- Connection:
67
- - keep-alive
68
- body:
69
- encoding: UTF-8
70
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.imgstatus","format":"rest","imgid":"d334790fbc44e4b1d95a4fdbeb2f9d6f","sdate":"2015-04-28
71
- 14:46:27","mdate":"","status":"pending","api_key":"<WEBPURIFY_API_KEY>"}}'
72
- http_version:
73
- recorded_at: Tue, 28 Apr 2015 21:45:33 GMT
74
- recorded_with: VCR 2.9.3
@@ -1,36 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.check&text=safe%20text
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Mon, 27 Apr 2015 22:29:03 GMT
29
- Content-Length:
30
- - '142'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.check","format":"rest","found":"0","api_key":"<WEBPURIFY_API_KEY>"}}'
34
- http_version:
35
- recorded_at: Mon, 27 Apr 2015 22:27:51 GMT
36
- recorded_with: VCR 2.9.3
@@ -1,36 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.check&text=text%20with%20www.example.com
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Mon, 27 Apr 2015 22:31:53 GMT
29
- Content-Length:
30
- - '142'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.check","format":"rest","found":"0","api_key":"<WEBPURIFY_API_KEY>"}}'
34
- http_version:
35
- recorded_at: Mon, 27 Apr 2015 22:31:03 GMT
36
- recorded_with: VCR 2.9.3
@@ -1,36 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.check&slink=1&text=text%20with%20www.example.com
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Mon, 27 Apr 2015 22:31:38 GMT
29
- Content-Length:
30
- - '142'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.check","format":"rest","found":"1","api_key":"<WEBPURIFY_API_KEY>"}}'
34
- http_version:
35
- recorded_at: Mon, 27 Apr 2015 22:31:03 GMT
36
- recorded_with: VCR 2.9.3
@@ -1,36 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.check&text=text%20with%20555-555-5555
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Mon, 27 Apr 2015 22:35:37 GMT
29
- Content-Length:
30
- - '142'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.check","format":"rest","found":"0","api_key":"<WEBPURIFY_API_KEY>"}}'
34
- http_version:
35
- recorded_at: Mon, 27 Apr 2015 22:34:25 GMT
36
- recorded_with: VCR 2.9.3
@@ -1,36 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.check&sphone=1&text=text%20with%20555-555-5555
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Mon, 27 Apr 2015 22:35:14 GMT
29
- Content-Length:
30
- - '142'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.check","format":"rest","found":"1","api_key":"<WEBPURIFY_API_KEY>"}}'
34
- http_version:
35
- recorded_at: Mon, 27 Apr 2015 22:34:25 GMT
36
- recorded_with: VCR 2.9.3
@@ -1,36 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.check&text=text%20with%20name@example.com
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Mon, 27 Apr 2015 22:30:40 GMT
29
- Content-Length:
30
- - '142'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.check","format":"rest","found":"0","api_key":"<WEBPURIFY_API_KEY>"}}'
34
- http_version:
35
- recorded_at: Mon, 27 Apr 2015 22:29:50 GMT
36
- recorded_with: VCR 2.9.3
@@ -1,36 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.check&semail=1&text=text%20with%20name@example.com
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Mon, 27 Apr 2015 22:30:26 GMT
29
- Content-Length:
30
- - '142'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.check","format":"rest","found":"1","api_key":"<WEBPURIFY_API_KEY>"}}'
34
- http_version:
35
- recorded_at: Mon, 27 Apr 2015 22:29:51 GMT
36
- recorded_with: VCR 2.9.3
@@ -1,36 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.check&text=text%20with%20damn
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Mon, 27 Apr 2015 22:29:03 GMT
29
- Content-Length:
30
- - '142'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.check","format":"rest","found":"1","api_key":"<WEBPURIFY_API_KEY>"}}'
34
- http_version:
35
- recorded_at: Mon, 27 Apr 2015 22:27:51 GMT
36
- recorded_with: VCR 2.9.3
@@ -1,36 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.checkcount&text=safe%20text
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Tue, 28 Apr 2015 14:33:26 GMT
29
- Content-Length:
30
- - '147'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.checkcount","format":"rest","found":"0","api_key":"<WEBPURIFY_API_KEY>"}}'
34
- http_version:
35
- recorded_at: Tue, 28 Apr 2015 14:32:51 GMT
36
- recorded_with: VCR 2.9.3
@@ -1,36 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.checkcount&text=text%20with%20damn
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Tue, 28 Apr 2015 14:33:26 GMT
29
- Content-Length:
30
- - '147'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.checkcount","format":"rest","found":"1","api_key":"<WEBPURIFY_API_KEY>"}}'
34
- http_version:
35
- recorded_at: Tue, 28 Apr 2015 14:32:51 GMT
36
- recorded_with: VCR 2.9.3
@@ -1,36 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.checkcount&text=text%20with%20damn%20and%20hell
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Tue, 28 Apr 2015 14:34:04 GMT
29
- Content-Length:
30
- - '147'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.checkcount","format":"rest","found":"2","api_key":"<WEBPURIFY_API_KEY>"}}'
34
- http_version:
35
- recorded_at: Tue, 28 Apr 2015 14:32:51 GMT
36
- recorded_with: VCR 2.9.3
@@ -1,37 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.replace&replacesymbol=*&text=safe%20text
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Tue, 28 Apr 2015 14:45:43 GMT
29
- Content-Length:
30
- - '163'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.replace","format":"rest","found":"0","text":"safe
34
- text","api_key":"<WEBPURIFY_API_KEY>"}}'
35
- http_version:
36
- recorded_at: Tue, 28 Apr 2015 14:44:53 GMT
37
- recorded_with: VCR 2.9.3
@@ -1,37 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.replace&replacesymbol=*&text=text%20with%20damn%20and%20hell
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Tue, 28 Apr 2015 15:04:27 GMT
29
- Content-Length:
30
- - '177'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.replace","format":"rest","found":"2","text":"text
34
- with **** and ****","api_key":"<WEBPURIFY_API_KEY>"}}'
35
- http_version:
36
- recorded_at: Tue, 28 Apr 2015 15:03:14 GMT
37
- recorded_with: VCR 2.9.3
@@ -1,36 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.return&text=safe%20text
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Tue, 28 Apr 2015 15:04:05 GMT
29
- Content-Length:
30
- - '143'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.return","format":"rest","found":"0","api_key":"<WEBPURIFY_API_KEY>"}}'
34
- http_version:
35
- recorded_at: Tue, 28 Apr 2015 15:03:29 GMT
36
- recorded_with: VCR 2.9.3
@@ -1,36 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.return&text=text%20with%20damn
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Tue, 28 Apr 2015 15:04:15 GMT
29
- Content-Length:
30
- - '162'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.return","format":"rest","found":"1","expletive":"damn","api_key":"<WEBPURIFY_API_KEY>"}}'
34
- http_version:
35
- recorded_at: Tue, 28 Apr 2015 15:03:30 GMT
36
- recorded_with: VCR 2.9.3
@@ -1,36 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://api1.webpurify.com/services/rest/?api_key=<WEBPURIFY_API_KEY>&format=json&method=webpurify.live.return&text=text%20with%20damn%20and%20hell
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- Host:
17
- - api1.webpurify.com
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- X-Powered-By:
26
- - HPHP
27
- Date:
28
- - Tue, 28 Apr 2015 15:04:43 GMT
29
- Content-Length:
30
- - '171'
31
- body:
32
- encoding: UTF-8
33
- string: '{"rsp":{"@attributes":{"stat":"ok"},"method":"webpurify.live.return","format":"rest","found":"2","expletive":["hell","damn"],"api_key":"<WEBPURIFY_API_KEY>"}}'
34
- http_version:
35
- recorded_at: Tue, 28 Apr 2015 15:03:30 GMT
36
- recorded_with: VCR 2.9.3