proxy_rb 0.10.6 → 1.0.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: e46872c1598f6d391255a8f82bd45af392b85a62
4
- data.tar.gz: b6f0b8b2255df3f30b8fb1ae856dcc975b9066d8
3
+ metadata.gz: f54a1d8396d918f84b6116aea14d031d87a98b29
4
+ data.tar.gz: 03894dd8e76fe4d8427942f66b4461bba673bfdf
5
5
  SHA512:
6
- metadata.gz: 298bf3a4892cb3da76e5eec56da220208ff17dec2b1552080fa40d393507bb347b5d25d133ba88a0e7d301be9c0e65aa9309e4d78888340779c22934c2d4914b
7
- data.tar.gz: 5c8ac7581a493ce157398615e738e66b164202926ace2cc1f332a98783500f383b43b9757d4a5f1e4bc7215a2c56b2205f370a55fe3a6b73e501de20ff105676
6
+ metadata.gz: a6af0b967f348e917dd656c47bd968abded3b3e283f2a1baba7c8097b92066fadc3733339b80bf5ca4664e1bcd41eb27dc8caa3cff7971b933e37731032f8d64
7
+ data.tar.gz: c670fed2e2bd57964778e7874e9623e6c99665e95c9013df8a1ae27896a2d9140113a00e95422aa6519e01287c93f4070f2510a606fe74df4f5f1a356c4c8b3a
@@ -1,6 +1,7 @@
1
1
  AllCops:
2
2
  Exclude:
3
3
  - 'tmp/**/*'
4
+ - Gemfile
4
5
  DisplayCopNames: true
5
6
  TargetRubyVersion: 2.3
6
7
 
data/Gemfile CHANGED
@@ -6,7 +6,7 @@ gemspec
6
6
 
7
7
  # Required
8
8
  gem 'poltergeist'
9
- gem 'selenium-webdriver'
9
+ gem 'selenium-webdriver', '~>2.53'
10
10
  gem 'cucumber', require: false
11
11
  gem 'rspec', require: false
12
12
 
data/README.md CHANGED
@@ -193,5 +193,6 @@ commits and tags, and push the `.gem` file to
193
193
 
194
194
  * Authentication against a proxy using BASIC-scheme works fine for `Poltergeist` and `Webkit`-drivers. It fails for `Selenium` as you cannot pass username and password to the browser
195
195
  * Authentication agains a proxy using NEGOTIATE (Kerberos) and NTLM-scheme fails for `Poltergeist` and `Webkit`-drivers due to problems with Qt which is used by both projects
196
+ * Currently only `selenium-webdriver` <= 2.x works with `proxy_rb`. Versions >= 2 fail with `Unable to find Mozilla geckodriver`.
196
197
 
197
198
 
@@ -17,12 +17,14 @@ module ProxyRb
17
17
  @config = config.dup
18
18
  end
19
19
 
20
+ # rubocop:disable Style/MethodMissing
20
21
  def method_missing(name, *args)
21
- raise ArgumentError, 'Options take no argument' if args.count > 0
22
+ raise ArgumentError, 'Options take no argument' if args.count.positive?
22
23
  raise UnknownOptionError, %(Option "#{name}" is unknown. Please use only earlier defined options) unless config.key? name
23
24
 
24
25
  config[name]
25
26
  end
27
+ # rubocop:enable Style/MethodMissing
26
28
  end
27
29
  end
28
30
  end
@@ -77,10 +77,10 @@ module ProxyRb
77
77
  COLORED_REGEXP = /\e\[(?:[34][0-7]|[0-9])?m/
78
78
 
79
79
  def self.included(klass)
80
- if klass == String
81
- ATTRIBUTES.delete(:clear)
82
- ATTRIBUTE_NAMES.delete(:clear)
83
- end
80
+ return unless klass == String
81
+
82
+ ATTRIBUTES.delete(:clear)
83
+ ATTRIBUTE_NAMES.delete(:clear)
84
84
  end
85
85
 
86
86
  # Returns an uncolored version of the string, that is all
@@ -30,11 +30,14 @@ module ProxyRb
30
30
  #
31
31
  # If one method ends with "=", e.g. ":option1=", then notify the event
32
32
  # queue, that the user changes the value of "option1"
33
+ #
34
+ # rubocop:disable Style/MethodMissing
33
35
  def method_missing(name, *args, &block)
34
36
  event_bus.notify Events::ChangedConfiguration.new(changed: { name: name.to_s.gsub(/=$/, ''), value: args.first }) if name.to_s.end_with? '='
35
37
 
36
38
  config.send(name, *args, &block)
37
39
  end
40
+ # rubocop:enable Style/MethodMissing
38
41
 
39
42
  # Pass on respond_to?-calls
40
43
  def respond_to_missing?(name, _include_private)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  RSpec::Matchers.define :be_forbidden do
3
3
  match do |actual|
4
- next true if proxy_rb.config.strict == false && (actual.status_code.nil? || actual.status_code == 0)
4
+ next true if proxy_rb.config.strict == false && (actual.status_code.nil? || actual.status_code.zero?)
5
5
  sleep 0.5 # handle network latency
6
6
 
7
7
  values_match?(403, actual.status_code)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  RSpec::Matchers.define :be_successful do
3
3
  match do |actual|
4
- next true if proxy_rb.config.strict == false && (actual.status_code.nil? || actual.status_code == 0)
4
+ next true if proxy_rb.config.strict == false && (actual.status_code.nil? || actual.status_code.zero?)
5
5
  sleep 0.5 # handle network latency
6
6
 
7
7
  actual.status_code.to_s.start_with?('2', '3')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # Main Module
3
3
  module ProxyRb
4
- VERSION = '0.10.6'
4
+ VERSION = '1.0.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxy_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.6
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Meyer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-08 00:00:00.000000000 Z
11
+ date: 2016-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  version: '0'
224
224
  requirements: []
225
225
  rubyforge_project:
226
- rubygems_version: 2.6.3
226
+ rubygems_version: 2.5.1
227
227
  signing_key:
228
228
  specification_version: 4
229
229
  summary: This gem makes testing your proxy easy.