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: 3d9735b16da4e9ec696c0e0ebe1194044a2061ae
4
- data.tar.gz: 92712a3ad91cf4091270004c6f69191c76c6c1f4
3
+ metadata.gz: 156b3e7af9d1d8a507d270ccae8d198bc43a6ead
4
+ data.tar.gz: 79e4e0f764643e85f29a65463c0059de0d103fd8
5
5
  SHA512:
6
- metadata.gz: b64a3e6ff85705d7d43eddccb926908027f4d3d2d23883b72469598d79a11c6f7e08f9ecaddfafbb132c6f022b0bf4aefbd9f3dde0dcaf3ac42e2c18f40980af
7
- data.tar.gz: dd868b869e39c856cff79706f716adc707504585e211596d1243d5a720b3930db1ffc5f3abcf590b60889616e9a49ff9177bd9a88b23c3cb3b6357503b0f8813
6
+ metadata.gz: f4c51378589b473054e107f28f0b41e9f6bc948658d7dc89353229a8cae1031d4db59989b92c896211dc04fd145cbbbcb0a71f4192b4f19fabaac2e412f543bc
7
+ data.tar.gz: 2ad504011c50e4b44bf33aede0ba01c3d6253d86e4635303152e82f4f735d7fac927f8cc15e4fa08613fcb5b68c269fccc9396da1f801822d01b907d5ec1c8ba
@@ -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
@@ -1,3 +1,3 @@
1
1
  module RSpectacular
2
- VERSION = '0.29.0'
2
+ VERSION = '0.30.0'
3
3
  end
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.29.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-25 00:00:00.000000000 Z
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