metova 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NWYxMjlmMjEyNzY2ZDI5ODk2ZTQyMjc1MGNmM2JmNTE0MGNjOGQwNg==
4
+ OTdjZWJkNGQ2NTg1ZDJjNzc0YzAzNTI4OTFhYjExOWM1YzUwZWU1NA==
5
5
  data.tar.gz: !binary |-
6
- MWQ2NjA5YjU1NmI2NDYxMTYwZjU2OTNjNGNiZDRhNDlhNDU1NWE0Yg==
6
+ NzBlNDY3ZTcwNGQ1NWY2MjAxN2U0MWJhYTQ5Y2I4MDFjYjRiMjk4OA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjJlYjE2ZGJiNjFjMWJkMGE0Y2ZlNDlmZDNkYjY2YzY4OTY3MzE4MjYyNzA0
10
- MGQxZTZjYzMwM2Q0YzM2YzVlNzA5NDg4MTg4NTBhZmVjYWM0OTcyYTUzMTA4
11
- ZWIzZmQzZTgzNzcxODg1ZjQxODFkMGI3MjJmYzg2NmQzOTAwM2E=
9
+ OTM3ZWEyYjcyNjRjZTUyOGVjZmQ5MDZiNjZhNjQxYjAwZTFhYzNlNDlkMDgy
10
+ MDU3MTkxYzZhZmEzMjJkZTU4YjNkMmM5ZGQ0ZjlkOTE1YjEyM2ZmZTYxM2Zj
11
+ Y2JjMzg3OWQ0OGVmYWYxNjYxYTFlNzE4MTFiYWUwZDhjODQ5NWM=
12
12
  data.tar.gz: !binary |-
13
- NmYyOTU3YzVlOTYzMjc1NzBjNGI0NDlmYzNkNjdjNTY1ZjBkYzBjYzgyMjZm
14
- YzVkNDgzNDA2ZDY2ODcyZmJjZTNlZDkwNjk4NWYxN2ExYjU5NDA1MWNhYzRi
15
- ODAxMmRjNDlmNzg3MTBmZmJiMTJiYjk0ODcyMWUyNWJjODE4NzA=
13
+ NmZlNzVlZjg1YTYwOGM2Zjg0NzhkNmVhNjQwYzJiMTVmMTZlZTNmOTljYTQ0
14
+ YzViZDA5ZWNiYmIzMzIzZGI2NTNiYjAzZTE1MDEwODkzOWJkYjAyMDRkM2Zm
15
+ YjU3OTI2NGUyNWVjNTc3NjA4NDI5MDQ3YTQwZjU3NTVkYWYwYTI=
@@ -6,6 +6,7 @@ require 'metova/responders/ids_filter_responder'
6
6
  require 'metova/responders/sort_responder'
7
7
  require 'metova/responders/nested_association_responder'
8
8
  require 'metova/responders/http_cache_responder'
9
+ require 'metova/responders/display_resource_on_put_delete_responder'
9
10
  require 'metova/responder'
10
11
 
11
12
  require 'metova/versioning/unsupported_version_app'
@@ -5,6 +5,7 @@ module Metova
5
5
  prepend Metova::Responders::IdsFilterResponder
6
6
  prepend Metova::Responders::SortResponder
7
7
  prepend Metova::Responders::NestedAssociationResponder
8
+ prepend Metova::Responders::DisplayResourceOnPutDeleteResponder
8
9
  include Metova::Responders::HttpCacheResponder
9
10
  include ::Responders::FlashResponder
10
11
 
@@ -0,0 +1,23 @@
1
+ module Metova
2
+ module Responders
3
+ module DisplayResourceOnPutDeleteResponder
4
+
5
+ def api_behavior
6
+ if display_resource_on_put_and_delete? && put_or_delete?
7
+ display resource
8
+ else
9
+ super
10
+ end
11
+ end
12
+
13
+ private
14
+ def display_resource_on_put_and_delete?
15
+ controller.try :display_resource_on_put_and_delete?
16
+ end
17
+
18
+ def put_or_delete?
19
+ put? || delete?
20
+ end
21
+ end
22
+ end
23
+ end
@@ -1,3 +1,3 @@
1
1
  module Metova
2
- VERSION = '0.0.11'
2
+ VERSION = '0.0.12'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metova
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logan Serman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-02 00:00:00.000000000 Z
11
+ date: 2015-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -140,16 +140,16 @@ dependencies:
140
140
  name: refile
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ! '>='
143
+ - - ~>
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: 0.5.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ! '>='
150
+ - - ~>
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: 0.5.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: omniauth
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -259,6 +259,7 @@ files:
259
259
  - lib/metova/oauth/google_provider.rb
260
260
  - lib/metova/oauth/twitter_provider.rb
261
261
  - lib/metova/responder.rb
262
+ - lib/metova/responders/display_resource_on_put_delete_responder.rb
262
263
  - lib/metova/responders/http_cache_responder.rb
263
264
  - lib/metova/responders/ids_filter_responder.rb
264
265
  - lib/metova/responders/nested_association_responder.rb