rspectacular 0.70.0 → 0.70.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +22 -0
- data/lib/rspectacular/plugins/authentication.rb +5 -5
- data/lib/rspectacular/plugins/code_climate.rb +1 -1
- data/lib/rspectacular/plugins/omniauth.rb +5 -5
- data/lib/rspectacular/plugins/rails/strong_parameters.rb +1 -1
- data/lib/rspectacular/plugins/shoulda.rb +23 -9
- data/lib/rspectacular/plugins/simple_cov.rb +1 -1
- data/lib/rspectacular/spec_helpers/active_record_basic.rb +1 -1
- data/lib/rspectacular/spec_helpers/rails_engine.rb +1 -1
- data/lib/rspectacular/support/failures.rb +3 -0
- data/lib/rspectacular/support/heroku.rb +1 -0
- data/lib/rspectacular/support/i18n.rb +3 -0
- data/lib/rspectacular/support/misc.rb +1 -0
- data/lib/rspectacular/version.rb +1 -1
- metadata +29 -14
- data/bin/deploy +0 -109
- data/bin/rspectacular_test_bootstrap +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6f2cfc9f60bd467f54f93e97f267c9e96b53c17
|
4
|
+
data.tar.gz: 9444e2568ecbf5c10fbe88e5f3948765d9c9823d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cde2d3563616c11f79a6754505ff8749ae472f5445b11205994761484d14dbc2ee3c21480f7b67c788eb350553022290677e0b067f928a6b7af0109c62261e26
|
7
|
+
data.tar.gz: 983db7b394c7d7e775c7351c3c6e700acf9bcbfd93b207566478978eb7b42f3725987cddff2c5174a4f62ca5394f635022e3a9563995ffa8831a7b92417bd4d0
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Jeff Felchner
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -57,11 +57,11 @@ RSpec.configure do |config|
|
|
57
57
|
authentication_result = authentication_successful ? instance : nil
|
58
58
|
|
59
59
|
if authentication_type == :standard
|
60
|
-
authentication_method
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
60
|
+
authentication_method = if authentication_controller_instance.respond_to?(inferred_auth_method, true)
|
61
|
+
inferred_auth_method
|
62
|
+
elsif authentication_controller_instance.respond_to?(:authenticate, true)
|
63
|
+
:authenticate
|
64
|
+
end
|
65
65
|
|
66
66
|
authentication_controller_class.__send__(:define_method, authentication_method) { authentication_successful }
|
67
67
|
authentication_controller_class.__send__(:define_method, current_class_method) { authentication_result }
|
@@ -34,11 +34,11 @@ begin
|
|
34
34
|
end
|
35
35
|
|
36
36
|
config.before(:each, type: :controller, mock_oauth: ->(v) { !!v }) do |example|
|
37
|
-
if example.metadata[:mock_oauth].is_a? Symbol
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
37
|
+
request.env['omniauth.auth'] = if example.metadata[:mock_oauth].is_a? Symbol
|
38
|
+
OmniAuth.config.mock_auth[example.metadata[:mock_oauth]]
|
39
|
+
else
|
40
|
+
OmniAuth::AuthHash.new(example.metadata[:mock_oauth])
|
41
|
+
end
|
42
42
|
end
|
43
43
|
end
|
44
44
|
rescue LoadError
|
@@ -8,18 +8,32 @@ rescue LoadError
|
|
8
8
|
end
|
9
9
|
|
10
10
|
if defined? Shoulda
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
Shoulda::Matchers.configure do |config|
|
12
|
+
config.integrate do |with|
|
13
|
+
with.test_framework :rspec
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
if defined? ActiveRecord
|
18
|
+
Shoulda::Matchers.configure do |config|
|
19
|
+
config.integrate do |with|
|
20
|
+
with.library :active_record
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
if defined? ActiveModel
|
26
|
+
Shoulda::Matchers.configure do |config|
|
27
|
+
config.integrate do |with|
|
28
|
+
with.library :active_model
|
15
29
|
end
|
16
30
|
end
|
31
|
+
end
|
17
32
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
end
|
33
|
+
if defined? ActionController
|
34
|
+
Shoulda::Matchers.configure do |config|
|
35
|
+
config.integrate do |with|
|
36
|
+
with.library :action_controller
|
23
37
|
end
|
24
38
|
end
|
25
39
|
end
|
@@ -1,4 +1,4 @@
|
|
1
1
|
require File.expand_path(File.join('..', 'active_record_connection_setup'), __FILE__)
|
2
2
|
require 'rspectacular'
|
3
3
|
|
4
|
-
Dir[File.join(Dir.pwd, 'spec', 'support', '**', '*.rb')].each { |f| require f }
|
4
|
+
Dir[File.join(Dir.pwd, 'spec', 'support', '**', '*.rb')].sort.each { |f| require f }
|
@@ -0,0 +1 @@
|
|
1
|
+
abort('DATABASE_URL environment variable is set') if ENV['DATABASE_URL']
|
@@ -0,0 +1 @@
|
|
1
|
+
RSpec.configure(&:disable_monkey_patching!)
|
data/lib/rspectacular/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspectacular
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.70.
|
4
|
+
version: 0.70.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jfelchner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -38,20 +38,30 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: coderay
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.1'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.1'
|
41
55
|
description: We rock some RSpec configurations and matchers like it ain't nobody's
|
42
56
|
bidnezz.
|
43
57
|
email: accounts+git@thekompanee.com
|
44
|
-
executables:
|
45
|
-
- deploy
|
46
|
-
- rspectacular_test_bootstrap
|
58
|
+
executables: []
|
47
59
|
extensions: []
|
48
|
-
extra_rdoc_files:
|
49
|
-
- README.md
|
60
|
+
extra_rdoc_files: []
|
50
61
|
files:
|
62
|
+
- LICENSE
|
51
63
|
- README.md
|
52
64
|
- Rakefile
|
53
|
-
- bin/deploy
|
54
|
-
- bin/rspectacular_test_bootstrap
|
55
65
|
- lib/rspectacular.rb
|
56
66
|
- lib/rspectacular/helpers.rb
|
57
67
|
- lib/rspectacular/helpers/factories.rb
|
@@ -94,9 +104,13 @@ files:
|
|
94
104
|
- lib/rspectacular/spec_helpers/rails_engine.rb
|
95
105
|
- lib/rspectacular/support.rb
|
96
106
|
- lib/rspectacular/support/expectations.rb
|
107
|
+
- lib/rspectacular/support/failures.rb
|
97
108
|
- lib/rspectacular/support/focused.rb
|
98
109
|
- lib/rspectacular/support/formatters.rb
|
99
110
|
- lib/rspectacular/support/garbage_collection.rb
|
111
|
+
- lib/rspectacular/support/heroku.rb
|
112
|
+
- lib/rspectacular/support/i18n.rb
|
113
|
+
- lib/rspectacular/support/misc.rb
|
100
114
|
- lib/rspectacular/support/mocks.rb
|
101
115
|
- lib/rspectacular/support/output.rb
|
102
116
|
- lib/rspectacular/support/pending.rb
|
@@ -106,11 +120,11 @@ files:
|
|
106
120
|
- lib/rspectacular/vcr_matchers/uri_without_trailing_id.rb
|
107
121
|
- lib/rspectacular/version.rb
|
108
122
|
homepage: https://github.com/jfelchner/rspectacular
|
109
|
-
licenses:
|
123
|
+
licenses:
|
124
|
+
- MIT
|
110
125
|
metadata: {}
|
111
126
|
post_install_message:
|
112
|
-
rdoc_options:
|
113
|
-
- "--charset = UTF-8"
|
127
|
+
rdoc_options: []
|
114
128
|
require_paths:
|
115
129
|
- lib
|
116
130
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -124,9 +138,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
138
|
- !ruby/object:Gem::Version
|
125
139
|
version: '0'
|
126
140
|
requirements: []
|
127
|
-
rubyforge_project:
|
128
|
-
rubygems_version: 2.4.
|
141
|
+
rubyforge_project:
|
142
|
+
rubygems_version: 2.4.5.1
|
129
143
|
signing_key:
|
130
144
|
specification_version: 4
|
131
145
|
summary: RSpec Support And Matchers
|
132
146
|
test_files: []
|
147
|
+
has_rdoc:
|
data/bin/deploy
DELETED
@@ -1,109 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
gem_name="rspectacular"
|
4
|
-
current_sha="$(git rev-parse HEAD)"
|
5
|
-
|
6
|
-
function chamber_env_var {
|
7
|
-
local var_key="$1"
|
8
|
-
|
9
|
-
bundle exec chamber show --as-env |
|
10
|
-
grep $var_key |
|
11
|
-
sed -r -n 's/.*=\"(.*)\"/\1/p'
|
12
|
-
}
|
13
|
-
|
14
|
-
export RUBYGEMS_API_KEY="$(chamber_env_var RUBYGEMS_API_KEY)"
|
15
|
-
|
16
|
-
if [ -n "$CIRCLECI" ]; then
|
17
|
-
echo ""
|
18
|
-
echo "Adding Rubygems Credentials to $HOME/.netrc"
|
19
|
-
echo "--------------------------------------------------------------------------------"
|
20
|
-
echo ""
|
21
|
-
|
22
|
-
echo ":rubygems_api_key: ${RUBYGEMS_API_KEY}" > $HOME/.gem/credentials
|
23
|
-
chmod 0600 $HOME/.gem/credentials
|
24
|
-
|
25
|
-
echo "Done."
|
26
|
-
fi
|
27
|
-
|
28
|
-
echo ""
|
29
|
-
echo "Detecting the Version to Release"
|
30
|
-
echo "--------------------------------------------------------------------------------"
|
31
|
-
latest_release_tag="$(git tag | grep -E 'releases' | sort --version-sort | tail -n 1)"
|
32
|
-
|
33
|
-
if [ -n "$latest_release_tag" ]; then
|
34
|
-
echo "The latest release detected was '${latest_release_tag}'."
|
35
|
-
echo ""
|
36
|
-
else
|
37
|
-
echo "No release tag found."
|
38
|
-
echo "Skipping deploy."
|
39
|
-
echo ""
|
40
|
-
|
41
|
-
exit
|
42
|
-
fi
|
43
|
-
|
44
|
-
echo ""
|
45
|
-
echo "Current Version Information"
|
46
|
-
echo "--------------------------------------------------------------------------------"
|
47
|
-
echo ""
|
48
|
-
echo "Current SHA: $(git rev-parse HEAD)"
|
49
|
-
echo "Current Tag: $(git describe --exact-match HEAD 2> /dev/null)"
|
50
|
-
echo ""
|
51
|
-
|
52
|
-
if [ -n "$(git describe --exact-match HEAD 2> /dev/null | grep $latest_release_tag)" ]; then
|
53
|
-
echo "The commit being built contains the release tag. Releasing now."
|
54
|
-
else
|
55
|
-
echo "The commit does not contain the latest release tag."
|
56
|
-
echo "Skipping deploy."
|
57
|
-
echo ""
|
58
|
-
|
59
|
-
exit
|
60
|
-
fi
|
61
|
-
|
62
|
-
echo ""
|
63
|
-
echo "Pushing to Rubygems"
|
64
|
-
echo "--------------------------------------------------------------------------------"
|
65
|
-
deploy_successful=false
|
66
|
-
|
67
|
-
gem build *.gemspec | tee push.log
|
68
|
-
|
69
|
-
gem_file="$(cat push.log | grep -o ' File: .*' | sed -e 's- File: \(.*\)-\1-')"
|
70
|
-
|
71
|
-
if gem push $gem_file | tee push.log; then
|
72
|
-
deploy_successful=true
|
73
|
-
fi
|
74
|
-
|
75
|
-
if [[ "$deploy_successful" == "false" ]]; then
|
76
|
-
echo "There was a problem pushing your gem to Rubygems."
|
77
|
-
echo ""
|
78
|
-
echo "Aborting deploy"
|
79
|
-
echo ""
|
80
|
-
fi
|
81
|
-
|
82
|
-
echo ""
|
83
|
-
echo "Sending notification to Slack"
|
84
|
-
echo "--------------------------------------------------------------------------------"
|
85
|
-
|
86
|
-
release_message=""
|
87
|
-
color=""
|
88
|
-
|
89
|
-
if [ -n "$(cat push.log | grep 'Successfully registered gem')" ]; then
|
90
|
-
release_message="${gem_name} ${latest_release_tag} has been successfully released to Rubygems"
|
91
|
-
color="success"
|
92
|
-
elif [ -n "$(cat push.log | grep 'Repushing of gem versions is not allowed')" ]; then
|
93
|
-
release_message="${gem_name} ${latest_release_tag} has already been pushed to Rubygems"
|
94
|
-
color="warning"
|
95
|
-
else
|
96
|
-
release_message="There was a problem pushing ${gem_name} ${latest_release_tag} to Rubygems"
|
97
|
-
color="danger"
|
98
|
-
fi
|
99
|
-
|
100
|
-
curl -X POST --data-urlencode "payload={\"username\": \"rubygems\", \"text\": \"${release_message}\", \"icon_url\": \"https://pbs.twimg.com/profile_images/535452674729078784/5jL6-BA5_400x400.jpeg\"}" https://goodscout.slack.com/services/hooks/incoming-webhook?token=i7p6sAtGqMYG0owvtqmwVaDv
|
101
|
-
|
102
|
-
if ! $deploy_successful; then
|
103
|
-
exit 1;
|
104
|
-
fi
|
105
|
-
|
106
|
-
echo ""
|
107
|
-
echo ""
|
108
|
-
echo "Deploy completed"
|
109
|
-
echo ""
|
@@ -1,20 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
fifo_dir = 'tmp'
|
4
|
-
fifo_file = 'test_fifo'
|
5
|
-
fifo_path = ['.', fifo_dir, fifo_file].join('/')
|
6
|
-
|
7
|
-
trap 2 do
|
8
|
-
File.delete(fifo_path)
|
9
|
-
exit
|
10
|
-
end
|
11
|
-
|
12
|
-
Dir.mkdir(fifo_dir) unless Dir.exist?(fifo_dir)
|
13
|
-
|
14
|
-
`mkfifo #{fifo_path}` unless File.exist?(fifo_path)
|
15
|
-
|
16
|
-
input = open(fifo_path, 'r+')
|
17
|
-
|
18
|
-
loop do
|
19
|
-
system input.gets
|
20
|
-
end
|