ngrok-rspec 1.0.2 → 1.1.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: 90ea985afdffca83398ccd9e824f7adb40c8c41d
4
- data.tar.gz: 65c1bae448bf21e72cb295617bcce93ac661e05a
3
+ metadata.gz: fbbc3e83654f1afe0bda80a750f0107d9ee2b1c2
4
+ data.tar.gz: 18206805c2ee1617c4a194cf31efea169df68754
5
5
  SHA512:
6
- metadata.gz: 5b8b855315b65eaac423cfe9d33bd4caafa1920264572fcda1c668dc6cff8a6c0a2c47f184a523e607911d8366716e8bffe6129d8c359029bde40d693635400b
7
- data.tar.gz: b11e867fd0f3dc1a8cdc2edbc3b51e2521f4c3a240c351bcfdce3745f119ac1c9b18d9d3fa763a7d8a8c8fd1f46d4c92260e66d501a24f2914520219e32d6efc
6
+ metadata.gz: 8a38ec018eb63db26601eaf662c9db9cab7bf4f2040db9a48735319c5f06b62d98ff554c7dc2ad2d61334329f2f940692c755626776748a1b85cee37de4be583
7
+ data.tar.gz: 3f567f15047cfd885552220cb0c75d3ed98d6e4e755bc126f63f2fb1f52c746974e127e430e4f9c33a587fa96b8948d132f722d87fc0147c94ed301f98061638
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Ngrok::Rspec
2
2
 
3
- Ngrok-rspec gem allows you to run capybara specs through ngrok.
3
+ Ngrok-rspec gem provides ability to run capybara specs through ngrok.
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/ngrok-rspec.svg)](http://badge.fury.io/rb/ngrok-rspec)
4
6
 
5
7
  ## Installation
6
8
 
@@ -25,8 +27,10 @@ Or install it yourself as:
25
27
  Configure rspec
26
28
  ```ruby
27
29
  RSpec.configure do |config|
28
-
29
- Capybara.server_port = 3001 # any port can be used
30
+ # any port can be used
31
+ Capybara.server_port = 3001
32
+ Ngrok::Rspec.tunnel = { port: Capybara.server_port }
33
+
30
34
  config.include Ngrok::Rspec
31
35
  end
32
36
  ```
@@ -41,11 +45,19 @@ context "Using ngrok", ngrok: true do
41
45
  end
42
46
  ```
43
47
 
48
+ ```ruby
49
+ # custom tunnel options
50
+ Ngrok::Rspec.tunnel = { port: Capybara.server_port,
51
+ subdomain: 'MY_SUBDOMAIN',
52
+ authtoken: 'MY_TOKEN',
53
+ log: 'ngrok.log',
54
+ config: '~/.ngrok' }
55
+ ```
44
56
 
45
57
 
46
58
  ## Contributing
47
59
 
48
- 1. Fork it ( https://github.com/[my-github-username]/ngrok-rspec/fork )
60
+ 1. Fork it ( https://github.com/bogdanovich/ngrok-rspec/fork )
49
61
  2. Create your feature branch (`git checkout -b my-new-feature`)
50
62
  3. Commit your changes (`git commit -am 'Add some feature'`)
51
63
  4. Push to the branch (`git push origin my-new-feature`)
@@ -6,7 +6,7 @@ module Ngrok
6
6
  class UnknownServerPort < StandardError; end
7
7
 
8
8
  module Rspec
9
- class << self; attr_accessor :original_app_host; end
9
+ class << self; attr_accessor :original_app_host, :tunnel; end
10
10
 
11
11
  def self.included(base)
12
12
 
@@ -16,7 +16,7 @@ module Ngrok
16
16
 
17
17
  config.around(:each, ngrok: true) do |example|
18
18
  raise UnknownServerPort, "Define Capybara.server_port in RSpec.config" unless Capybara.server_port
19
- Ngrok::Tunnel.start(Capybara.server_port) unless Ngrok::Tunnel.running?
19
+ Ngrok::Tunnel.start(Ngrok::Rspec.tunnel) unless Ngrok::Tunnel.running?
20
20
 
21
21
  Capybara.app_host = Ngrok::Tunnel.ngrok_url
22
22
 
@@ -1,5 +1,5 @@
1
1
  module Ngrok
2
2
  module Rspec
3
- VERSION = "1.0.2"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "ngrok-tunnel", "~> 1.0"
21
+ spec.add_dependency "ngrok-tunnel", "~> 2.0"
22
22
  spec.add_dependency "rspec", "~> 3.1"
23
23
  spec.add_dependency "capybara", "~> 2.4"
24
24
 
@@ -17,8 +17,11 @@ RSpec.configure do |config|
17
17
  config.include Capybara::DSL
18
18
 
19
19
  Capybara.server_port = 3001
20
+ Ngrok::Rspec.tunnel = {port: Capybara.server_port}
21
+
20
22
  config.include Ngrok::Rspec
21
23
 
24
+
22
25
  Capybara.register_driver :poltergeist do |app|
23
26
  Capybara::Poltergeist::Driver.new(app,
24
27
  :phantomjs_options => ['--debug=no', '--load-images=no', '--ignore-ssl-errors=yes', '--ssl-protocol=any'], :debug => false)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ngrok-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Bogdanovich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-23 00:00:00.000000000 Z
11
+ date: 2014-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ngrok-tunnel
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement