rocket_pants 1.8.0 → 1.8.1

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: faa4d8c1b00d94400456cf629e82be17e220d9b0
4
- data.tar.gz: 1483ff1f8246de1ff36d5eb9166e0bf7f9e3829f
3
+ metadata.gz: 83f96519546c16ade7d8447f2d12e02553e6adb7
4
+ data.tar.gz: 162b8da5912c0eb0f94ccd0167f73aa24ed112eb
5
5
  SHA512:
6
- metadata.gz: e13d4dc41f47653b6fe95b5f6d79d194ea89c11776752e52ac70062f27cba8ad792576347361abdfb62b672f9740dcd46ac293ee7d7bface7c4b6ed65e3ff79d
7
- data.tar.gz: bb9dd86ae4a6dae9baad05fcfa195a851832197f5628c34260e4c23ef48d3115146ec38cad233682a7ea475cd0091a4856281b7ff5527d0b73fe22f85d32a9a1
6
+ metadata.gz: 7752b43465ba01f35e31dd9b3450f4bb372933b6d0e8d864b877cb99f0a2b551cc2d019b843ab965deb281cf00c77dbd6b7264108c52624cc8ff3f9e63931c3f
7
+ data.tar.gz: 7c1363bcdeaa33a1c1b50aa0d06db23a56caeb61dc1feb7099aa808ae898b4a7ddfab192a58dcaeb4105a7305d1ff24202b0eb2f10ff8a75977e0b7939a20553
@@ -74,8 +74,21 @@ module RocketPants
74
74
 
75
75
  protected
76
76
 
77
+ def insert_action_controller_testing_into_base
78
+ if defined?(ActionController::Testing)
79
+ unless RocketPants::Base < ActionController::Testing
80
+ RocketPants::Base.class_eval do
81
+ include ActionController::Testing
82
+ end
83
+ end
84
+ end
85
+ end
86
+
77
87
  # Like process, but automatically adds the api version.
78
88
  def process(action, http_method = 'GET', *args)
89
+
90
+ insert_action_controller_testing_into_base
91
+
79
92
  # Rails 4 changes the method signature. In rails 3, http_method is actually
80
93
  # the parameters.
81
94
  if http_method.kind_of?(String)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocket_pants
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darcy Laycock