rspectacular 0.54.0 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 796d95e9597ba531bdd39c4a4a84da84bbfd3806
4
- data.tar.gz: 5f5d66574ea95ad662055e8ab8d76a36f6bd4bd1
3
+ metadata.gz: 5205f61437450030ffafeaaa8970b813ab249fa7
4
+ data.tar.gz: 35c26fa1788bf710fb4e0b44e2af6bd13ba40427
5
5
  SHA512:
6
- metadata.gz: 8c5b57496c33941c989f2ae399cf905b7a433b8c4d0286c1c3c804d4569f05329cc687a64019bc8823047e21ec8994afcb04198109304945ce132d3f44c1f7e2
7
- data.tar.gz: 8d8c3cb0ca6f386ddd95d823fada2ff04007b8f13a0a2aeb91202283a5e8c14fc132a6a588e1fb3fb0cb543949676bc8cc1ed5d78f7296e0ac60517dc66e685c
6
+ metadata.gz: 90cf065a6215260bfeef53b6cd3d39af783806df7895791030bd0a9f94c908c68d16c2ff774846bef02fafcf6172aef48d2845ad8fde11b975696b7340419282
7
+ data.tar.gz: ce2a73a89bfd4e0971f1a28277776ddd7a32ebe435568dff387d05138c05a96e663d766527584269f648ea2dfc42bd5d750054bd4a04662feb70045f06936b6b
@@ -1,28 +1,10 @@
1
1
  module Rspectacular
2
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
3
+ def self.included(base)
4
+ engine_name = Dir.pwd.split('/').last.camelize
5
+ engine_class = "::#{engine_name}::Engine".constantize
24
6
 
25
- process(action, method, parameters.merge!(:use_route => engine_name), session, flash)
7
+ base.routes { engine_class.routes }
26
8
  end
27
9
  end
28
10
  end
@@ -1,4 +1,13 @@
1
1
  if Object.const_defined?('ActionController::Parameters')
2
- ActionController::Parameters::NEVER_UNPERMITTED_PARAMS << 'id'
2
+ always_permitted_parameters = %w(id)
3
+
4
+ if ActionController::Parameters.respond_to?(:always_permitted_parameters)
5
+ ActionController::Parameters.always_permitted_parameters += always_permitted_parameters
6
+ else
7
+ always_permitted_parameters.each do |always_permitted_parameter|
8
+ ActionController::Parameters::NEVER_UNPERMITTED_PARAMS << always_permitted_parameter
9
+ end
10
+ end
11
+
3
12
  ActionController::Parameters.action_on_unpermitted_parameters = :raise
4
13
  end
@@ -1,4 +1,7 @@
1
1
  if defined? ActiveRecord::Migration
2
- ActiveRecord::Migration.check_pending! if ActiveRecord::Migration.respond_to?(:check_pending!)
3
- ActiveRecord::Migration.maintain_test_schema! if ActiveRecord::Migration.respond_to?(:maintain_test_schema!)
2
+ if RSpec::Rails::FeatureCheck.can_maintain_test_schema?
3
+ ActiveRecord::Migration.maintain_test_schema!
4
+ elsif RSpec::Rails::FeatureCheck.can_check_pending_migrations?
5
+ ActiveRecord::Migration.check_pending!
6
+ end
4
7
  end
@@ -1,3 +1,3 @@
1
1
  module Rspectacular
2
- VERSION = '0.54.0'
2
+ VERSION = '0.55.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.54.0
4
+ version: 0.55.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-11-07 00:00:00.000000000 Z
11
+ date: 2015-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -137,9 +137,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  version: '0'
138
138
  requirements: []
139
139
  rubyforge_project: rspectacular
140
- rubygems_version: 2.4.2
140
+ rubygems_version: 2.2.2
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: RSpec Support And Matchers
144
144
  test_files:
145
145
  - spec/spec_helper.rb
146
+ has_rdoc: