rspec-roda 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +1 -0
- data/Rakefile +2 -1
- data/bin/bundle-audit +1 -0
- data/bin/rake +1 -0
- data/bin/rspec +1 -0
- data/bin/rubocop +1 -0
- data/bin/yard +1 -0
- data/bin/yardoc +1 -0
- data/bin/yri +1 -0
- data/lib/rspec/roda.rb +13 -2
- data/lib/rspec/roda/version.rb +1 -1
- data/rakelib/bundle_audit.rake +1 -0
- data/rakelib/bundler.rake +1 -0
- data/rakelib/rspec.rake +1 -0
- data/rakelib/rubocop.rake +1 -0
- data/rakelib/yard.rake +1 -0
- data/rspec-roda.gemspec +5 -11
- metadata +20 -105
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e7ea8ea5a63ad88aae65509327564a7d129c370
|
4
|
+
data.tar.gz: f8a7e70cc8816e18d38d4545af0e11a916503c03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 459b2670e415f8b9b401470243126fe9f5f5354a806f027195261dd4f26545d0e03eb37dd583d0b64028674b8bfca7e29c99d7e223d5f384d318bc01fdf6abfd
|
7
|
+
data.tar.gz: dd5bedb8dde31655b1c2f9f096ebe15e1d956ac1a9d07868c5306df4d2e9ea9cee272d70b267d4f5ba21712c44f9b477cc53d2b4719f6eca989008a2472a7c3c
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/bin/bundle-audit
CHANGED
data/bin/rake
CHANGED
data/bin/rspec
CHANGED
data/bin/rubocop
CHANGED
data/bin/yard
CHANGED
data/bin/yardoc
CHANGED
data/bin/yri
CHANGED
data/lib/rspec/roda.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'rspec/roda/version'
|
3
4
|
require 'rspec'
|
4
5
|
require 'rspec/its'
|
5
6
|
require 'rack/test'
|
6
7
|
require 'inflecto'
|
8
|
+
require 'rspec/mocks/standalone'
|
9
|
+
require 'rspec/matchers'
|
7
10
|
|
8
11
|
module RSpec
|
9
12
|
# Module containing different contexts for Roda.
|
@@ -14,7 +17,7 @@ module RSpec
|
|
14
17
|
|
15
18
|
# @return [Class(Roda)]
|
16
19
|
def roda_class
|
17
|
-
described_class
|
20
|
+
respond_to?(:_roda_class) ? _roda_class : described_class
|
18
21
|
end
|
19
22
|
|
20
23
|
# Rack-, and Rack::Test-compliant Roda app
|
@@ -37,9 +40,12 @@ module RSpec
|
|
37
40
|
# @param [Symbol] plugin
|
38
41
|
# @param [Proc] block
|
39
42
|
def roda(plugin = metadata[:name], &block)
|
40
|
-
let(:
|
43
|
+
let(:_roda_class) do
|
41
44
|
route_block = self.route_block
|
42
45
|
self.class.const_set(:TestApp, Class.new(::Roda) do
|
46
|
+
include ::RSpec::Matchers
|
47
|
+
include ::RSpec::Mocks::ExampleMethods
|
48
|
+
|
43
49
|
plugin plugin
|
44
50
|
instance_exec(&block) if block
|
45
51
|
route { |r| instance_exec(r, &route_block) } if route_block
|
@@ -78,4 +84,9 @@ RSpec.shared_context 'Roda plugin', roda: :plugin do
|
|
78
84
|
include_context 'Roda app'
|
79
85
|
|
80
86
|
let(:route_block) { proc { |r| } }
|
87
|
+
let(:plugin) { described_class }
|
88
|
+
|
89
|
+
it { expect(plugin).to be_a Module }
|
81
90
|
end
|
91
|
+
|
92
|
+
RSpec::Mocks::Syntax.enable_should
|
data/lib/rspec/roda/version.rb
CHANGED
data/rakelib/bundle_audit.rake
CHANGED
data/rakelib/bundler.rake
CHANGED
data/rakelib/rspec.rake
CHANGED
data/rakelib/rubocop.rake
CHANGED
data/rakelib/yard.rake
CHANGED
data/rspec-roda.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
|
+
|
3
4
|
lib = File.expand_path('../lib', __FILE__)
|
4
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
6
|
require 'rspec/roda/version'
|
6
7
|
|
7
|
-
# rubocop:disable Metrics/BlockLength
|
8
8
|
Gem::Specification.new do |spec|
|
9
9
|
spec.name = 'rspec-roda'
|
10
10
|
spec.version = RSpec::Roda::VERSION
|
@@ -23,21 +23,15 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
|
+
spec.add_runtime_dependency 'inflecto'
|
27
|
+
spec.add_runtime_dependency 'rack-test', '~> 0.6.3'
|
28
|
+
spec.add_runtime_dependency 'roda'
|
26
29
|
spec.add_runtime_dependency 'rspec', '~> 3.0'
|
27
30
|
spec.add_runtime_dependency 'rspec-its', '~> 1.2.0'
|
28
|
-
spec.add_runtime_dependency 'roda'
|
29
|
-
spec.add_runtime_dependency 'rack-test'
|
30
|
-
spec.add_runtime_dependency 'inflecto'
|
31
31
|
|
32
|
-
spec.add_development_dependency '
|
33
|
-
spec.add_development_dependency 'bundler-audit', '~> 0.5.0'
|
34
|
-
spec.add_development_dependency 'rack-test', '~> 0.6.3'
|
35
|
-
spec.add_development_dependency 'rake', '~> 12.0'
|
36
|
-
spec.add_development_dependency 'rspec', '~> 3.5'
|
32
|
+
spec.add_development_dependency 'development-toolbox', '~> 0.7'
|
37
33
|
spec.add_development_dependency 'rspec-its', '~> 1.2.0'
|
38
|
-
spec.add_development_dependency 'rubocop', '~> 0.47.0'
|
39
34
|
spec.add_development_dependency 'simplecov', '~> 0.12.0'
|
40
|
-
spec.add_development_dependency 'yard', '~> 0.9.5'
|
41
35
|
spec.add_development_dependency 'rom-repository', '>= 0.3.1'
|
42
36
|
spec.add_development_dependency 'rom-sql', '>= 0.9'
|
43
37
|
spec.add_development_dependency 'sequel'
|
metadata
CHANGED
@@ -1,45 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-roda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Semyonov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '3.0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '3.0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rspec-its
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.2.0
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 1.2.0
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: roda
|
14
|
+
name: inflecto
|
43
15
|
requirement: !ruby/object:Gem::Requirement
|
44
16
|
requirements:
|
45
17
|
- - ">="
|
@@ -56,18 +28,18 @@ dependencies:
|
|
56
28
|
name: rack-test
|
57
29
|
requirement: !ruby/object:Gem::Requirement
|
58
30
|
requirements:
|
59
|
-
- - "
|
31
|
+
- - "~>"
|
60
32
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
33
|
+
version: 0.6.3
|
62
34
|
type: :runtime
|
63
35
|
prerelease: false
|
64
36
|
version_requirements: !ruby/object:Gem::Requirement
|
65
37
|
requirements:
|
66
|
-
- - "
|
38
|
+
- - "~>"
|
67
39
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
40
|
+
version: 0.6.3
|
69
41
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
42
|
+
name: roda
|
71
43
|
requirement: !ruby/object:Gem::Requirement
|
72
44
|
requirements:
|
73
45
|
- - ">="
|
@@ -81,75 +53,47 @@ dependencies:
|
|
81
53
|
- !ruby/object:Gem::Version
|
82
54
|
version: '0'
|
83
55
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '1.13'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '1.13'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: bundler-audit
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 0.5.0
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 0.5.0
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rack-test
|
56
|
+
name: rspec
|
113
57
|
requirement: !ruby/object:Gem::Requirement
|
114
58
|
requirements:
|
115
59
|
- - "~>"
|
116
60
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0
|
118
|
-
type: :
|
61
|
+
version: '3.0'
|
62
|
+
type: :runtime
|
119
63
|
prerelease: false
|
120
64
|
version_requirements: !ruby/object:Gem::Requirement
|
121
65
|
requirements:
|
122
66
|
- - "~>"
|
123
67
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0
|
68
|
+
version: '3.0'
|
125
69
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
70
|
+
name: rspec-its
|
127
71
|
requirement: !ruby/object:Gem::Requirement
|
128
72
|
requirements:
|
129
73
|
- - "~>"
|
130
74
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
132
|
-
type: :
|
75
|
+
version: 1.2.0
|
76
|
+
type: :runtime
|
133
77
|
prerelease: false
|
134
78
|
version_requirements: !ruby/object:Gem::Requirement
|
135
79
|
requirements:
|
136
80
|
- - "~>"
|
137
81
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
82
|
+
version: 1.2.0
|
139
83
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
84
|
+
name: development-toolbox
|
141
85
|
requirement: !ruby/object:Gem::Requirement
|
142
86
|
requirements:
|
143
87
|
- - "~>"
|
144
88
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
89
|
+
version: '0.7'
|
146
90
|
type: :development
|
147
91
|
prerelease: false
|
148
92
|
version_requirements: !ruby/object:Gem::Requirement
|
149
93
|
requirements:
|
150
94
|
- - "~>"
|
151
95
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
96
|
+
version: '0.7'
|
153
97
|
- !ruby/object:Gem::Dependency
|
154
98
|
name: rspec-its
|
155
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,20 +108,6 @@ dependencies:
|
|
164
108
|
- - "~>"
|
165
109
|
- !ruby/object:Gem::Version
|
166
110
|
version: 1.2.0
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: rubocop
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - "~>"
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: 0.47.0
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - "~>"
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: 0.47.0
|
181
111
|
- !ruby/object:Gem::Dependency
|
182
112
|
name: simplecov
|
183
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -192,20 +122,6 @@ dependencies:
|
|
192
122
|
- - "~>"
|
193
123
|
- !ruby/object:Gem::Version
|
194
124
|
version: 0.12.0
|
195
|
-
- !ruby/object:Gem::Dependency
|
196
|
-
name: yard
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
198
|
-
requirements:
|
199
|
-
- - "~>"
|
200
|
-
- !ruby/object:Gem::Version
|
201
|
-
version: 0.9.5
|
202
|
-
type: :development
|
203
|
-
prerelease: false
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
205
|
-
requirements:
|
206
|
-
- - "~>"
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: 0.9.5
|
209
125
|
- !ruby/object:Gem::Dependency
|
210
126
|
name: rom-repository
|
211
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -260,7 +176,6 @@ files:
|
|
260
176
|
- ".gitlab-ci.yml"
|
261
177
|
- ".rspec"
|
262
178
|
- ".rubocop.yml"
|
263
|
-
- ".ruby-version"
|
264
179
|
- ".simplecov"
|
265
180
|
- ".travis.yml"
|
266
181
|
- CODE_OF_CONDUCT.md
|
@@ -306,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
306
221
|
version: '0'
|
307
222
|
requirements: []
|
308
223
|
rubyforge_project:
|
309
|
-
rubygems_version: 2.6.
|
224
|
+
rubygems_version: 2.6.11
|
310
225
|
signing_key:
|
311
226
|
specification_version: 4
|
312
227
|
summary: RSpec and Roda integration
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.4.0
|