ngrok-rspec 1.1.0 → 1.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -8
- data/lib/ngrok/rspec.rb +6 -6
- data/lib/ngrok/rspec/version.rb +1 -1
- data/ngrok-rspec.gemspec +1 -1
- data/spec/ngrok-rspec/ngrok-rspec_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -6
- metadata +27 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b2aa7d0087ae76a52dc06bb38739ac866d520a8
|
4
|
+
data.tar.gz: 4bafaaf19118f1f0d4864a76bc9b71f0622be284
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7da41e67339e86026183c2730cbcff6f97d938e2185f805c06ed3d5ee1b6084b66a8614f09288e71bc82cf9436032741ece836d0ac84b2115eba097e872e317c
|
7
|
+
data.tar.gz: 66eb05f2bbb57375b017f954e772cc4d10857d01500fe547034c535beb4170d3426fe0249808e66d8af03080aea8160f314e38244e59034bed5aba4b98da58e5
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Ngrok-rspec gem provides ability to run capybara specs through ngrok.
|
4
4
|
|
5
|
-
[![Gem Version](https://badge.fury.io/rb/ngrok-rspec.svg)](http://badge.fury.io/rb/ngrok-rspec)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/ngrok-rspec.svg)](http://badge.fury.io/rb/ngrok-rspec) [![Code Climate](https://codeclimate.com/github/bogdanovich/ngrok-rspec/badges/gpa.svg)](https://codeclimate.com/github/bogdanovich/ngrok-rspec)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -39,19 +39,23 @@ Write specs using filter ngrok: true
|
|
39
39
|
|
40
40
|
```ruby
|
41
41
|
context "Using ngrok", ngrok: true do
|
42
|
-
it "should
|
43
|
-
#
|
42
|
+
it "should use ngrok tunnel" do
|
43
|
+
# your test code
|
44
44
|
end
|
45
45
|
end
|
46
46
|
```
|
47
47
|
|
48
|
+
Custom tunnel options available:
|
49
|
+
|
48
50
|
```ruby
|
49
51
|
# custom tunnel options
|
50
|
-
Ngrok::Rspec.tunnel = {
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
Ngrok::Rspec.tunnel = {
|
53
|
+
port: Capybara.server_port,
|
54
|
+
subdomain: 'MY_SUBDOMAIN',
|
55
|
+
authtoken: 'MY_TOKEN',
|
56
|
+
log: 'ngrok.log',
|
57
|
+
config: '~/.ngrok'
|
58
|
+
}
|
55
59
|
```
|
56
60
|
|
57
61
|
|
data/lib/ngrok/rspec.rb
CHANGED
@@ -7,28 +7,28 @@ module Ngrok
|
|
7
7
|
|
8
8
|
module Rspec
|
9
9
|
class << self; attr_accessor :original_app_host, :tunnel; end
|
10
|
-
|
10
|
+
|
11
11
|
def self.included(base)
|
12
12
|
|
13
13
|
Ngrok::Rspec.original_app_host = Capybara.app_host
|
14
14
|
|
15
15
|
::RSpec.configure do |config|
|
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
19
|
Ngrok::Tunnel.start(Ngrok::Rspec.tunnel) unless Ngrok::Tunnel.running?
|
20
|
-
|
20
|
+
|
21
21
|
Capybara.app_host = Ngrok::Tunnel.ngrok_url
|
22
|
-
|
22
|
+
|
23
23
|
example.run
|
24
|
-
|
24
|
+
|
25
25
|
Capybara.app_host = Ngrok::Rspec::original_app_host
|
26
26
|
end
|
27
27
|
|
28
28
|
config.after(:suite) do
|
29
29
|
Ngrok::Tunnel.stop if Ngrok::Tunnel.running?
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
data/lib/ngrok/rspec/version.rb
CHANGED
data/ngrok-rspec.gemspec
CHANGED
@@ -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", "~> 2.0"
|
21
|
+
spec.add_dependency "ngrok-tunnel", "~> 2.0.16"
|
22
22
|
spec.add_dependency "rspec", "~> 3.1"
|
23
23
|
spec.add_dependency "capybara", "~> 2.4"
|
24
24
|
|
@@ -11,13 +11,13 @@ describe Ngrok::Rspec do
|
|
11
11
|
|
12
12
|
context "with ngrok", ngrok: true do
|
13
13
|
it "should have ngrok app_host" do
|
14
|
-
expect(Capybara.app_host =~ /ngrok
|
14
|
+
expect(Capybara.app_host =~ /ngrok\.io$/).to_not be_nil
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
context "after ngrok" do
|
19
19
|
it "should have default app host" do
|
20
|
-
expect(Capybara.app_host =~ /ngrok
|
20
|
+
expect(Capybara.app_host =~ /ngrok\.io$/).to be_nil
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
data/spec/spec_helper.rb
CHANGED
@@ -18,7 +18,7 @@ RSpec.configure do |config|
|
|
18
18
|
|
19
19
|
Capybara.server_port = 3001
|
20
20
|
Ngrok::Rspec.tunnel = {port: Capybara.server_port}
|
21
|
-
|
21
|
+
|
22
22
|
config.include Ngrok::Rspec
|
23
23
|
|
24
24
|
|
@@ -31,11 +31,7 @@ RSpec.configure do |config|
|
|
31
31
|
if NGROK_SPEC_DEBUG
|
32
32
|
Capybara.default_driver = :selenium
|
33
33
|
else
|
34
|
-
Capybara.default_driver = :selenium #:poltergeist
|
34
|
+
Capybara.default_driver = :selenium #:poltergeist
|
35
35
|
Capybara.javascript_driver = :selenium #:poltergeist
|
36
36
|
end
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
37
|
end
|
metadata
CHANGED
@@ -1,139 +1,139 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ngrok-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Bogdanovich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ngrok-tunnel
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.0.16
|
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:
|
26
|
+
version: 2.0.16
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '3.1'
|
34
34
|
type: :runtime
|
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: '3.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: capybara
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '2.4'
|
48
48
|
type: :runtime
|
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: '2.4'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pry
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0.10'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.10'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: pry-byebug
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '2.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '2.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '1.7'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.7'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '10.0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '10.0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: poltergeist
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '1.5'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '1.5'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: selenium-webdriver
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '2.43'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ~>
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '2.43'
|
139
139
|
description: Ngrok-rspec gem provides ability to run capybara specs with ngrok tunnel
|
@@ -143,8 +143,8 @@ executables: []
|
|
143
143
|
extensions: []
|
144
144
|
extra_rdoc_files: []
|
145
145
|
files:
|
146
|
-
-
|
147
|
-
-
|
146
|
+
- .gitignore
|
147
|
+
- .rspec
|
148
148
|
- Gemfile
|
149
149
|
- LICENSE.txt
|
150
150
|
- README.md
|
@@ -164,12 +164,12 @@ require_paths:
|
|
164
164
|
- lib
|
165
165
|
required_ruby_version: !ruby/object:Gem::Requirement
|
166
166
|
requirements:
|
167
|
-
- -
|
167
|
+
- - '>='
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: '0'
|
170
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
171
|
requirements:
|
172
|
-
- -
|
172
|
+
- - '>='
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: '0'
|
175
175
|
requirements: []
|
@@ -181,3 +181,4 @@ summary: Ngrok-rspec gem - run capybara specs with ngrok tunnel
|
|
181
181
|
test_files:
|
182
182
|
- spec/ngrok-rspec/ngrok-rspec_spec.rb
|
183
183
|
- spec/spec_helper.rb
|
184
|
+
has_rdoc:
|