browsermob-rest 0.1.0 → 0.1.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 +13 -5
- data/.travis.yml +7 -1
- data/Gemfile +1 -1
- data/README.md +145 -1
- data/lib/browsermob/rest.rb +4 -0
- data/lib/browsermob/rest/version.rb +4 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YzgwN2VkMDhjMzliNjM1M2I0NWMxYjIwOTFhZTZhOWNjZDNiMDFlOA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YTM0NjBlNTAyY2UyMDU0MzQ0NWQ4NGM0ZjNiNjU3OTliYjQxMWE5Mg==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZWU2NDEyMGEwMjE4NDUyMmRjZGZiNmRiNTVjMDU4MWI5M2Y2YjFkN2RmMzkz
|
10
|
+
Mjk0NzRhYzc5MTVjYmY5MjY3YTM5YmNjNzcxZWUyYWRiZTE5OGY5OGVmNmNk
|
11
|
+
OTIwOWRmY2MxM2ZjNDk4MTdhMzc4MjkwZjczMmY4MzM5MTBiYTg=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NDE5NmQyYTA0MDgxZGQwMjA1YjVlZTk4M2NhMTFmYTJjODcxYmQwZjkxMWJi
|
14
|
+
ODg4OWI1YWVlZmQ3MzdlNzU3ZjE4OGRkMTQ4NmYzMDRlMTJjMzRiM2ExNzQ4
|
15
|
+
Yzc2M2M3OTNiYjA5OTU5NDk2ZjM1MzU2YWVhY2E3ZTU4ZDYxZjc=
|
data/.travis.yml
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
sudo: false
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
|
-
|
4
|
+
- 2.3.0
|
5
5
|
before_install: gem install bundler -v 1.12.4
|
6
|
+
deploy:
|
7
|
+
provider: rubygems
|
8
|
+
api_key:
|
9
|
+
secure: 2kqrl2SaKnzMIFpjIjo765mF5eN+2bk2n0D/QKfvB+siFF+99kQth9RnhPYUfsFdIZ9+zJwv07/pfRbGBHZWRcULOirG+JPolV2HdGOPNz0Ns5XFMae3ZZjbHR7tKKaR+cz1UXvVQInRu+Na8PhvzId1gvcfyYwwjUoaJmlbz7WiC8fEn7xBY8A8MpPj5+wG13f4en2c54IHmQ1BtjH5CzjupEOP//vXXwZK5xk8fdMDRMiD2+0xVreSiD8laOaQj6Mu21hDuv8U6BiK3M3pQM3tlb4B2l9BhJL4ggRXOEdU2Dry58RXoU+iJBLo16++CoyELX5F453CWfQyIHU0GDMKGzsz2isnB5iq+zqlLM+7Uog990yTvWBUHNV6MQUKQN8mmcy6c0pIfuX4bB6nBPcP6F+pG4X/jU5BoMrnJhiSlGh6Y/EPKWZpOYv5RYSu/oa/gSskig1uSorJUd54SMKWZxY4obyLXnWcuNZwj++knn1qJs6xB8B5JNvH21PR18JZfdyy9jBGwRE20MFBu69ZWZ0o5KEqU3LkASxlrk83UsRXp39AB7SmXNs9kieYpiXgUAKAiGwKoodpjoqo9EglZCRerBzJ+keMljCuCKZLGEVBB0v9ivTPF8db+UE5FvadGy/st6V8gTPIiO81AIwXg/ZI57x6OCrv9QsULXk=
|
10
|
+
on:
|
11
|
+
branch: master
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -20,7 +20,151 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
|
23
|
+
Configure the base url of your Browsermob proxy
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
Browsermob::Rest::Util::Config.configure do |config|
|
27
|
+
config[:endpoints][:base_url] = "example_url"
|
28
|
+
end
|
29
|
+
```
|
30
|
+
|
31
|
+
Create API client
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
@client = Browsermob::Rest::Api.new
|
35
|
+
```
|
36
|
+
|
37
|
+
Get a list of ports attached to ProxyServer instances managed by ProxyManager
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
@client.get_proxies
|
41
|
+
```
|
42
|
+
|
43
|
+
Creates a new HAR attached to the proxy and returns the HAR content if there was a previous HAR
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
@client.update_proxy_har(port, data)
|
47
|
+
```
|
48
|
+
|
49
|
+
Starts a new page on the existing HAR
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
@client.update_proxy_har_pageref(port, data)
|
53
|
+
```
|
54
|
+
|
55
|
+
Shuts down the proxy and closes the port
|
56
|
+
|
57
|
+
```ruby
|
58
|
+
@client.remove_proxy
|
59
|
+
```
|
60
|
+
|
61
|
+
Returns the JSON/HAR content representing all the HTTP traffic passed through the proxy
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
@client.get_proxy_har(port)
|
65
|
+
```
|
66
|
+
|
67
|
+
Displays whitelisted items
|
68
|
+
|
69
|
+
```ruby
|
70
|
+
@client.get_proxy_whitelist(port)
|
71
|
+
```
|
72
|
+
|
73
|
+
Sets a list of URL patterns to whitelist
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
@client.update_proxy_whitelist(port, data)
|
77
|
+
```
|
78
|
+
|
79
|
+
Clears all URL patterns from the whitelist
|
80
|
+
|
81
|
+
```ruby
|
82
|
+
@client.remove_proxy_whitelist(port)
|
83
|
+
```
|
84
|
+
|
85
|
+
Displays blacklisted items
|
86
|
+
|
87
|
+
```ruby
|
88
|
+
@client.get_proxy_blacklist(port)
|
89
|
+
```
|
90
|
+
|
91
|
+
Set a URL to blacklist
|
92
|
+
|
93
|
+
```ruby
|
94
|
+
@client.update_proxy_blacklist(port, data)
|
95
|
+
```
|
96
|
+
|
97
|
+
Clears all URL patterns from the blacklist
|
98
|
+
|
99
|
+
```ruby
|
100
|
+
@client.remove_proxy_blacklist(port)
|
101
|
+
```
|
102
|
+
|
103
|
+
Limit the bandwidth through the proxy
|
104
|
+
|
105
|
+
```ruby
|
106
|
+
@client.update_proxy_limit(port, data)
|
107
|
+
```
|
108
|
+
|
109
|
+
Displays the amount of data remaining to be uploaded/downloaded until the limit is reached
|
110
|
+
|
111
|
+
```ruby
|
112
|
+
@client.get_proxy_limit(port)
|
113
|
+
```
|
114
|
+
|
115
|
+
Set and override HTTP Request headers
|
116
|
+
|
117
|
+
```ruby
|
118
|
+
@client.add_proxy_headers(port, data)
|
119
|
+
```
|
120
|
+
|
121
|
+
Overrides normal DNS lookups and remaps the given hosts with the associated IP address
|
122
|
+
|
123
|
+
```ruby
|
124
|
+
@client.add_proxy_hosts(port, data)
|
125
|
+
```
|
126
|
+
|
127
|
+
Sets automatic basic authentication for the specified domain
|
128
|
+
|
129
|
+
```ruby
|
130
|
+
@client.add_proxy_authentication(port, domain, data)
|
131
|
+
```
|
132
|
+
|
133
|
+
Wait till all request are being made
|
134
|
+
|
135
|
+
```ruby
|
136
|
+
@client.update_proxy_wait(port, data)
|
137
|
+
```
|
138
|
+
|
139
|
+
Handles different proxy timeouts
|
140
|
+
|
141
|
+
```ruby
|
142
|
+
@client.update_proxy_timeout(port, data)
|
143
|
+
```
|
144
|
+
|
145
|
+
Redirecting URL's
|
146
|
+
|
147
|
+
```ruby
|
148
|
+
@client.update_proxy_redirect(port, data)
|
149
|
+
```
|
150
|
+
|
151
|
+
Removes all URL redirection rules currently in effect
|
152
|
+
|
153
|
+
```ruby
|
154
|
+
@client.remove_proxy_redirect(port)
|
155
|
+
```
|
156
|
+
|
157
|
+
Setting the retry count
|
158
|
+
|
159
|
+
```ruby
|
160
|
+
@client.add_proxy_retry_count(port, data)
|
161
|
+
```
|
162
|
+
|
163
|
+
Empties the Cache
|
164
|
+
|
165
|
+
```ruby
|
166
|
+
@client.remove_proxy_dns_cache(port)
|
167
|
+
```
|
24
168
|
|
25
169
|
## Development
|
26
170
|
|
data/lib/browsermob/rest.rb
CHANGED
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: browsermob-rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- THamilton2014@gmail.com
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.12'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.12'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '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
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
description:
|
@@ -59,9 +59,9 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
-
|
63
|
-
-
|
64
|
-
-
|
62
|
+
- .gitignore
|
63
|
+
- .rspec
|
64
|
+
- .travis.yml
|
65
65
|
- CODE_OF_CONDUCT.md
|
66
66
|
- Gemfile
|
67
67
|
- LICENSE.txt
|
@@ -91,17 +91,17 @@ require_paths:
|
|
91
91
|
- lib
|
92
92
|
required_ruby_version: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ! '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
|
-
- -
|
99
|
+
- - ! '>='
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.
|
104
|
+
rubygems_version: 2.4.5
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: Browsermob Rest Client
|