rspectacular 0.29.0 → 0.30.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 156b3e7af9d1d8a507d270ccae8d198bc43a6ead
|
4
|
+
data.tar.gz: 79e4e0f764643e85f29a65463c0059de0d103fd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4c51378589b473054e107f28f0b41e9f6bc948658d7dc89353229a8cae1031d4db59989b92c896211dc04fd145cbbbcb0a71f4192b4f19fabaac2e412f543bc
|
7
|
+
data.tar.gz: 2ad504011c50e4b44bf33aede0ba01c3d6253d86e4635303152e82f4f735d7fac927f8cc15e4fa08613fcb5b68c269fccc9396da1f801822d01b907d5ec1c8ba
|
data/lib/rspectacular/plugins.rb
CHANGED
@@ -7,6 +7,7 @@ require 'rspectacular/plugins/factory_girl.rb'
|
|
7
7
|
require 'rspectacular/plugins/features.rb'
|
8
8
|
require 'rspectacular/plugins/omniauth.rb'
|
9
9
|
require 'rspectacular/plugins/paypal.rb'
|
10
|
+
require 'rspectacular/plugins/rails/engine.rb'
|
10
11
|
require 'rspectacular/plugins/recaptcha.rb'
|
11
12
|
require 'rspectacular/plugins/shoulda.rb'
|
12
13
|
require 'rspectacular/plugins/sidekiq.rb'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module RSpectacular
|
2
|
+
module NamespacedEngineControllerRouteFix
|
3
|
+
def get(action, parameters = nil, session = nil, flash = nil)
|
4
|
+
process_action(action, parameters, session, flash, "GET")
|
5
|
+
end
|
6
|
+
|
7
|
+
def post(action, parameters = nil, session = nil, flash = nil)
|
8
|
+
process_action(action, parameters, session, flash, "POST")
|
9
|
+
end
|
10
|
+
|
11
|
+
def put(action, parameters = nil, session = nil, flash = nil)
|
12
|
+
process_action(action, parameters, session, flash, "PUT")
|
13
|
+
end
|
14
|
+
|
15
|
+
def delete(action, parameters = nil, session = nil, flash = nil)
|
16
|
+
process_action(action, parameters, session, flash, "DELETE")
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def process_action(action, parameters = nil, session = nil, flash = nil, method = "GET")
|
22
|
+
parameters ||= {}
|
23
|
+
engine_name = Dir.pwd.split('/').last.to_sym
|
24
|
+
|
25
|
+
process(action, method, parameters.merge!(:use_route => engine_name), session, flash, )
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -1,5 +1,11 @@
|
|
1
|
+
require 'rspectacular/plugins/rails/engine'
|
2
|
+
|
1
3
|
if defined? RSpec::Rails
|
2
4
|
RSpec.configure do |config|
|
3
5
|
config.infer_base_class_for_anonymous_controllers = true
|
6
|
+
|
7
|
+
if File.join(Dir.pwd, 'spec', 'dummy', 'config', 'environment')
|
8
|
+
config.include RSpectacular::NamespacedEngineControllerRouteFix, :type => :controller
|
9
|
+
end
|
4
10
|
end
|
5
11
|
end
|
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.
|
4
|
+
version: 0.30.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jfelchner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- lib/rspectacular/plugins/features.rb
|
83
83
|
- lib/rspectacular/plugins/omniauth.rb
|
84
84
|
- lib/rspectacular/plugins/paypal.rb
|
85
|
+
- lib/rspectacular/plugins/rails/engine.rb
|
85
86
|
- lib/rspectacular/plugins/recaptcha.rb
|
86
87
|
- lib/rspectacular/plugins/shoulda.rb
|
87
88
|
- lib/rspectacular/plugins/sidekiq.rb
|