failspell 0.1.0
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 +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/failspell +9 -0
- data/bin/setup +7 -0
- data/fail_spec.out +242 -0
- data/failspell.gemspec +32 -0
- data/lib/failspell.rb +12 -0
- data/lib/failspell/rspec_json_parser.rb +26 -0
- data/lib/failspell/spec_runner.rb +13 -0
- data/lib/failspell/version.rb +3 -0
- data/result.json +1 -0
- metadata +147 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3299c0758cf61e0831c8c1f4ec21a3f588b576f5
|
4
|
+
data.tar.gz: c62ec4f083d9e0faf54454adcfd56da72758c5e5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a25aa333eca58465db098051e289cba69a2ce6ccd62eba0a86a0cdaf789fa45dc073fd17b55b729fc1c0292edd6411b3e7211821837aead98fc2bb5a4fbe7b6f
|
7
|
+
data.tar.gz: 5d2588c9d3988dd17056af13de573c39af7ae08c8b0b59deb857c0acaac493e0d81e3dcf2e306f841974745ae78f7bac6b9a886dd7eaeea5542592f24b8c4e6e
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Dorian Karter
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all 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,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Failspell
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/failspell`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'failspell'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install failspell
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/failspell.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "failspell"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/failspell
ADDED
data/bin/setup
ADDED
data/fail_spec.out
ADDED
@@ -0,0 +1,242 @@
|
|
1
|
+
Run options: include {:focus=>true}
|
2
|
+
|
3
|
+
All examples were filtered out; ignoring {:focus=>true}
|
4
|
+
FF..FFFFF..
|
5
|
+
|
6
|
+
Failures:
|
7
|
+
|
8
|
+
1) RelateIq::List#items_by_contact_id can accept a single contact id
|
9
|
+
Failure/Error: let(:list_2) { RelateIq::List.find_by_title('Burundi') }
|
10
|
+
WebMock::NetConnectNotAllowedError:
|
11
|
+
Real HTTP connections are disabled. Unregistered request: GET https://test.relateiq.com/lists with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}
|
12
|
+
|
13
|
+
You can stub this request with the following snippet:
|
14
|
+
|
15
|
+
stub_request(:get, "https://test.relateiq.com/lists").
|
16
|
+
with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}).
|
17
|
+
to_return(:status => 200, :body => "", :headers => {})
|
18
|
+
|
19
|
+
registered request stubs:
|
20
|
+
|
21
|
+
stub_request(:get, "https://test.relateiq.com/lists-test/list2id/listitems/?contactIds=contactid")
|
22
|
+
stub_request(:get, "https://test.relateiq.com/lists-test")
|
23
|
+
|
24
|
+
============================================================
|
25
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:114:in `request'
|
26
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:270:in `net_http_do_request'
|
27
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:418:in `block in transmit'
|
28
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:123:in `start_without_connect'
|
29
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:150:in `start'
|
30
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:413:in `transmit'
|
31
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:176:in `execute'
|
32
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:41:in `execute'
|
33
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/resource.rb:51:in `get'
|
34
|
+
# ./lib/relateiq/list.rb:22:in `all'
|
35
|
+
# ./lib/relateiq/list.rb:26:in `find_by_title'
|
36
|
+
# ./spec/lib/relateiq/list_spec.rb:6:in `block (2 levels) in <top (required)>'
|
37
|
+
# ./spec/lib/relateiq/list_spec.rb:125:in `block (3 levels) in <top (required)>'
|
38
|
+
|
39
|
+
2) RelateIq::List#upsert_item creates a post request if no id is provided includes current list id
|
40
|
+
Failure/Error: let(:list_2) { RelateIq::List.find_by_title('Burundi') }
|
41
|
+
WebMock::NetConnectNotAllowedError:
|
42
|
+
Real HTTP connections are disabled. Unregistered request: GET https://test.relateiq.com/lists with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}
|
43
|
+
|
44
|
+
You can stub this request with the following snippet:
|
45
|
+
|
46
|
+
stub_request(:get, "https://test.relateiq.com/lists").
|
47
|
+
with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}).
|
48
|
+
to_return(:status => 200, :body => "", :headers => {})
|
49
|
+
|
50
|
+
registered request stubs:
|
51
|
+
|
52
|
+
stub_request(:post, "https://test.relateiq.com/lists-test/list2id/listitems")
|
53
|
+
stub_request(:put, "https://test.relateiq.com/lists-test/list2id/listitems/listitemid")
|
54
|
+
stub_request(:get, "https://test.relateiq.com/lists-test/list2id/listitems/?contactIds=contactid")
|
55
|
+
stub_request(:get, "https://test.relateiq.com/lists-test")
|
56
|
+
|
57
|
+
============================================================
|
58
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:114:in `request'
|
59
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:270:in `net_http_do_request'
|
60
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:418:in `block in transmit'
|
61
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:123:in `start_without_connect'
|
62
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:150:in `start'
|
63
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:413:in `transmit'
|
64
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:176:in `execute'
|
65
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:41:in `execute'
|
66
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/resource.rb:51:in `get'
|
67
|
+
# ./lib/relateiq/list.rb:22:in `all'
|
68
|
+
# ./lib/relateiq/list.rb:26:in `find_by_title'
|
69
|
+
# ./spec/lib/relateiq/list_spec.rb:6:in `block (2 levels) in <top (required)>'
|
70
|
+
# ./spec/lib/relateiq/list_spec.rb:140:in `block (3 levels) in <top (required)>'
|
71
|
+
|
72
|
+
3) RelateIq::List.find_by_title returns a List with a matching title
|
73
|
+
Failure/Error: expect(list_class.find_by_title('Swaziland')).to eq(list_class.all[2])
|
74
|
+
WebMock::NetConnectNotAllowedError:
|
75
|
+
Real HTTP connections are disabled. Unregistered request: GET https://test.relateiq.com/lists with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}
|
76
|
+
|
77
|
+
You can stub this request with the following snippet:
|
78
|
+
|
79
|
+
stub_request(:get, "https://test.relateiq.com/lists").
|
80
|
+
with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}).
|
81
|
+
to_return(:status => 200, :body => "", :headers => {})
|
82
|
+
|
83
|
+
registered request stubs:
|
84
|
+
|
85
|
+
stub_request(:get, "https://test.relateiq.com/lists-test/list2id/listitems/?contactIds=contactid")
|
86
|
+
stub_request(:get, "https://test.relateiq.com/lists-test")
|
87
|
+
|
88
|
+
============================================================
|
89
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:114:in `request'
|
90
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:270:in `net_http_do_request'
|
91
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:418:in `block in transmit'
|
92
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:123:in `start_without_connect'
|
93
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:150:in `start'
|
94
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:413:in `transmit'
|
95
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:176:in `execute'
|
96
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:41:in `execute'
|
97
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/resource.rb:51:in `get'
|
98
|
+
# ./lib/relateiq/list.rb:22:in `all'
|
99
|
+
# ./lib/relateiq/list.rb:26:in `find_by_title'
|
100
|
+
# ./spec/lib/relateiq/list_spec.rb:75:in `block (3 levels) in <top (required)>'
|
101
|
+
|
102
|
+
4) RelateIq::List.find_by_title is case insensitive
|
103
|
+
Failure/Error: expect(list_class.find_by_title('swaziland')).to eq(list_class.all[2])
|
104
|
+
WebMock::NetConnectNotAllowedError:
|
105
|
+
Real HTTP connections are disabled. Unregistered request: GET https://test.relateiq.com/lists with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}
|
106
|
+
|
107
|
+
You can stub this request with the following snippet:
|
108
|
+
|
109
|
+
stub_request(:get, "https://test.relateiq.com/lists").
|
110
|
+
with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}).
|
111
|
+
to_return(:status => 200, :body => "", :headers => {})
|
112
|
+
|
113
|
+
registered request stubs:
|
114
|
+
|
115
|
+
stub_request(:get, "https://test.relateiq.com/lists-test/list2id/listitems/?contactIds=contactid")
|
116
|
+
stub_request(:get, "https://test.relateiq.com/lists-test")
|
117
|
+
|
118
|
+
============================================================
|
119
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:114:in `request'
|
120
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:270:in `net_http_do_request'
|
121
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:418:in `block in transmit'
|
122
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:123:in `start_without_connect'
|
123
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:150:in `start'
|
124
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:413:in `transmit'
|
125
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:176:in `execute'
|
126
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:41:in `execute'
|
127
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/resource.rb:51:in `get'
|
128
|
+
# ./lib/relateiq/list.rb:22:in `all'
|
129
|
+
# ./lib/relateiq/list.rb:26:in `find_by_title'
|
130
|
+
# ./spec/lib/relateiq/list_spec.rb:79:in `block (3 levels) in <top (required)>'
|
131
|
+
|
132
|
+
5) RelateIq::List.all caches a copy in memory and does not call web method more than once
|
133
|
+
Failure/Error: list_class.all
|
134
|
+
WebMock::NetConnectNotAllowedError:
|
135
|
+
Real HTTP connections are disabled. Unregistered request: GET https://test.relateiq.com/lists with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}
|
136
|
+
|
137
|
+
You can stub this request with the following snippet:
|
138
|
+
|
139
|
+
stub_request(:get, "https://test.relateiq.com/lists").
|
140
|
+
with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}).
|
141
|
+
to_return(:status => 200, :body => "", :headers => {})
|
142
|
+
|
143
|
+
registered request stubs:
|
144
|
+
|
145
|
+
stub_request(:get, "https://test.relateiq.com/lists-test/list2id/listitems/?contactIds=contactid")
|
146
|
+
stub_request(:get, "https://test.relateiq.com/lists-test")
|
147
|
+
|
148
|
+
============================================================
|
149
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:114:in `request'
|
150
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:270:in `net_http_do_request'
|
151
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:418:in `block in transmit'
|
152
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:123:in `start_without_connect'
|
153
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:150:in `start'
|
154
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:413:in `transmit'
|
155
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:176:in `execute'
|
156
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:41:in `execute'
|
157
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/resource.rb:51:in `get'
|
158
|
+
# ./lib/relateiq/list.rb:22:in `all'
|
159
|
+
# ./spec/lib/relateiq/list_spec.rb:67:in `block (3 levels) in <top (required)>'
|
160
|
+
|
161
|
+
6) RelateIq::List.all returns field list_options as an array
|
162
|
+
Failure/Error: status_field = RelateIq::List.all[0].fields.find { |f| f[:name] == 'status' }
|
163
|
+
WebMock::NetConnectNotAllowedError:
|
164
|
+
Real HTTP connections are disabled. Unregistered request: GET https://test.relateiq.com/lists with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}
|
165
|
+
|
166
|
+
You can stub this request with the following snippet:
|
167
|
+
|
168
|
+
stub_request(:get, "https://test.relateiq.com/lists").
|
169
|
+
with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}).
|
170
|
+
to_return(:status => 200, :body => "", :headers => {})
|
171
|
+
|
172
|
+
registered request stubs:
|
173
|
+
|
174
|
+
stub_request(:get, "https://test.relateiq.com/lists-test/list2id/listitems/?contactIds=contactid")
|
175
|
+
stub_request(:get, "https://test.relateiq.com/lists-test")
|
176
|
+
|
177
|
+
============================================================
|
178
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:114:in `request'
|
179
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:270:in `net_http_do_request'
|
180
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:418:in `block in transmit'
|
181
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:123:in `start_without_connect'
|
182
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:150:in `start'
|
183
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:413:in `transmit'
|
184
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:176:in `execute'
|
185
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:41:in `execute'
|
186
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/resource.rb:51:in `get'
|
187
|
+
# ./lib/relateiq/list.rb:22:in `all'
|
188
|
+
# ./spec/lib/relateiq/list_spec.rb:61:in `block (3 levels) in <top (required)>'
|
189
|
+
|
190
|
+
7) RelateIq::List.all returns an array of lists
|
191
|
+
Failure/Error: expect(list_class.all.count).to eq(6)
|
192
|
+
WebMock::NetConnectNotAllowedError:
|
193
|
+
Real HTTP connections are disabled. Unregistered request: GET https://test.relateiq.com/lists with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}
|
194
|
+
|
195
|
+
You can stub this request with the following snippet:
|
196
|
+
|
197
|
+
stub_request(:get, "https://test.relateiq.com/lists").
|
198
|
+
with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'Content-Type'=>'application/json', 'User-Agent'=>'Ruby'}).
|
199
|
+
to_return(:status => 200, :body => "", :headers => {})
|
200
|
+
|
201
|
+
registered request stubs:
|
202
|
+
|
203
|
+
stub_request(:get, "https://test.relateiq.com/lists-test/list2id/listitems/?contactIds=contactid")
|
204
|
+
stub_request(:get, "https://test.relateiq.com/lists-test")
|
205
|
+
|
206
|
+
============================================================
|
207
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:114:in `request'
|
208
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:270:in `net_http_do_request'
|
209
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:418:in `block in transmit'
|
210
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:123:in `start_without_connect'
|
211
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/webmock-1.21.0/lib/webmock/http_lib_adapters/net_http.rb:150:in `start'
|
212
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:413:in `transmit'
|
213
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:176:in `execute'
|
214
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/request.rb:41:in `execute'
|
215
|
+
# /Users/dkarter/.rvm/gems/ruby-2.2.2/gems/rest-client-1.7.2/lib/restclient/resource.rb:51:in `get'
|
216
|
+
# ./lib/relateiq/list.rb:22:in `all'
|
217
|
+
# ./spec/lib/relateiq/list_spec.rb:54:in `block (3 levels) in <top (required)>'
|
218
|
+
|
219
|
+
Finished in 0.11659 seconds (files took 0.49698 seconds to load)
|
220
|
+
11 examples, 7 failures
|
221
|
+
|
222
|
+
Failed examples:
|
223
|
+
|
224
|
+
rspec ./spec/lib/relateiq/list_spec.rb:122 # RelateIq::List#items_by_contact_id can accept a single contact id
|
225
|
+
rspec ./spec/lib/relateiq/list_spec.rb:139 # RelateIq::List#upsert_item creates a post request if no id is provided includes current list id
|
226
|
+
rspec ./spec/lib/relateiq/list_spec.rb:74 # RelateIq::List.find_by_title returns a List with a matching title
|
227
|
+
rspec ./spec/lib/relateiq/list_spec.rb:78 # RelateIq::List.find_by_title is case insensitive
|
228
|
+
rspec ./spec/lib/relateiq/list_spec.rb:65 # RelateIq::List.all caches a copy in memory and does not call web method more than once
|
229
|
+
rspec ./spec/lib/relateiq/list_spec.rb:60 # RelateIq::List.all returns field list_options as an array
|
230
|
+
rspec ./spec/lib/relateiq/list_spec.rb:53 # RelateIq::List.all returns an array of lists
|
231
|
+
Finished spec run
|
232
|
+
Total duration: 0.116591
|
233
|
+
Total: 11
|
234
|
+
Failed: 7
|
235
|
+
Pending: 0
|
236
|
+
|
237
|
+
Finished at 2015-09-24 23:49:55 -0500
|
238
|
+
|
239
|
+
Randomized with seed 57142
|
240
|
+
|
241
|
+
Coverage report generated for RSpec to /Users/dkarter/Dropbox/Developer/relateiq/coverage/coverage.json. 127 / 270 LOC (47.04%) covered.
|
242
|
+
Wrote vim coverage script to .cadre/coverage.vim
|
data/failspell.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'failspell/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "failspell"
|
8
|
+
spec.version = Failspell::VERSION
|
9
|
+
spec.authors = ["Dorian Karter"]
|
10
|
+
spec.email = ["dkarter@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{A gem to help re-run failed specs in your suite}
|
13
|
+
spec.description = %q{A gem to help re-run failed specs in your suite}
|
14
|
+
spec.homepage = "https://github.com/dkarter/FailSpell"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
18
|
+
# delete this section to allow pushing this gem to any host.
|
19
|
+
|
20
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
spec.bindir = "bin"
|
22
|
+
spec.executables = ['failspell'] #spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_dependency 'colorize'
|
26
|
+
spec.add_dependency 'highline'
|
27
|
+
|
28
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
29
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
30
|
+
spec.add_development_dependency "rspec"
|
31
|
+
spec.add_development_dependency "pry"
|
32
|
+
end
|
data/lib/failspell.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
module FailSpell
|
2
|
+
class RspecJsonParser
|
3
|
+
attr_reader :input_str
|
4
|
+
|
5
|
+
def initialize(input_str)
|
6
|
+
@input_str = input_str
|
7
|
+
end
|
8
|
+
|
9
|
+
def parse
|
10
|
+
results = JSON.parse(input_str)
|
11
|
+
failed_specs = results['examples'].select { |e| e['status'] == 'failed' }
|
12
|
+
|
13
|
+
failed_specs.each_with_index do |spec, i|
|
14
|
+
say "(#{i+1}) #{spec['full_description']}"
|
15
|
+
say " #{spec['file_path']}:#{spec['line_number']}".red
|
16
|
+
end
|
17
|
+
|
18
|
+
prompt = "Which one would you like to re-run? (1-#{failed_specs.count})"
|
19
|
+
rerun = ask(prompt, Integer)
|
20
|
+
selected_spec = failed_specs[rerun - 1]
|
21
|
+
spec_path = "#{selected_spec['file_path']}:#{selected_spec['line_number']}"
|
22
|
+
puts "Re-Running rspec #{spec_path}".yellow
|
23
|
+
SpecRunner.new(spec_path).run
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/result.json
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":"3.3.2","examples":[{"description":"runs spec on system","full_description":"FailSpell::SpecRunner#run_spec runs spec on system","status":"passed","file_path":"./spec/failspell/spec_runner_spec.rb","line_number":5,"run_time":0.005417,"pending_message":null},{"description":"has a version number","full_description":"Failspell has a version number","status":"passed","file_path":"./spec/failspell_spec.rb","line_number":4,"run_time":0.000448,"pending_message":null}],"summary":{"duration":0.006427,"example_count":2,"failure_count":0,"pending_count":0},"summary_line":"2 examples, 0 failures"}
|
metadata
ADDED
@@ -0,0 +1,147 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: failspell
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dorian Karter
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-30 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: colorize
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: highline
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.10'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.10'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: A gem to help re-run failed specs in your suite
|
98
|
+
email:
|
99
|
+
- dkarter@gmail.com
|
100
|
+
executables:
|
101
|
+
- failspell
|
102
|
+
extensions: []
|
103
|
+
extra_rdoc_files: []
|
104
|
+
files:
|
105
|
+
- ".gitignore"
|
106
|
+
- ".rspec"
|
107
|
+
- ".travis.yml"
|
108
|
+
- Gemfile
|
109
|
+
- LICENSE.txt
|
110
|
+
- README.md
|
111
|
+
- Rakefile
|
112
|
+
- bin/console
|
113
|
+
- bin/failspell
|
114
|
+
- bin/setup
|
115
|
+
- fail_spec.out
|
116
|
+
- failspell.gemspec
|
117
|
+
- lib/failspell.rb
|
118
|
+
- lib/failspell/rspec_json_parser.rb
|
119
|
+
- lib/failspell/spec_runner.rb
|
120
|
+
- lib/failspell/version.rb
|
121
|
+
- result.json
|
122
|
+
homepage: https://github.com/dkarter/FailSpell
|
123
|
+
licenses:
|
124
|
+
- MIT
|
125
|
+
metadata: {}
|
126
|
+
post_install_message:
|
127
|
+
rdoc_options: []
|
128
|
+
require_paths:
|
129
|
+
- lib
|
130
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
requirements: []
|
141
|
+
rubyforge_project:
|
142
|
+
rubygems_version: 2.4.7
|
143
|
+
signing_key:
|
144
|
+
specification_version: 4
|
145
|
+
summary: A gem to help re-run failed specs in your suite
|
146
|
+
test_files: []
|
147
|
+
has_rdoc:
|