railsdav 0.1.0 → 0.1.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: d9214f02f0ddee87b623b108da44fa372465f909
4
- data.tar.gz: c73f172965f4594434f2913ad64213042f9f54a3
3
+ metadata.gz: dd5f799717de2365ef03eff7ea9ec0bb586c6fcc
4
+ data.tar.gz: '09d15fd87f739ae2f185eaf7131b7e812f8cfbb0'
5
5
  SHA512:
6
- metadata.gz: d6fb995d3fb0853b5abfa31d81328e7d4075988c583658bc5d03474080672702dc6399581cad8e08ae27d9283106723716ac63624af83536678532372c1ff17d
7
- data.tar.gz: 605323afd1e7029366a719e56ac2867bbecf9086d3b3babcd82c1324e4033095aeb9ac97b8d207af55180664048eadbda3c3cad4cda7dee52149e84bf48f84c3
6
+ metadata.gz: 710fb87af393f354e0cd6a96551532cbc96551cd69a6ab4105af315deebd2ed0bfb25f525ff5cd2ffdc4d222fb715575dbe198d2f1f0bdc8e08875f875c2b3e1
7
+ data.tar.gz: 5fb4db899de9270e8c6b0bbcffd088c9501b5a5b87ebadb07fdfcf44e006dbdc3baab0ec4396bfc16868580ea6144ed1edc3af2e1485d2ee2944439df12f7eb6
data/README.md CHANGED
@@ -9,10 +9,10 @@ app with client(-libs) such as Konqueror, cadaver, davfs2 or NetDrive.
9
9
 
10
10
  ## Compatibility
11
11
 
12
- Definitely works with Rails 3.0.9, 3.2.13 and 4.2.4, but should also work
13
- with versions in between. This is due to some hacking done "under the
14
- hood" in the Rails routing implementation as well as a simple method
15
- override in ActionController.
12
+ Definitely works with Rails 3.0.9, 3.2.13, 4.2.4, and 4.2.7.1, but should
13
+ also work with versions in between. This is due to some hacking done
14
+ "under the hood" in the Rails routing implementation as well as a simple
15
+ method override in ActionController.
16
16
 
17
17
  If you encounter any problems with other Rails versions, please feel
18
18
  free to report an issue or send me a pull request on github.
@@ -182,6 +182,7 @@ is_webdav_request? checks whether an Incoming request is issued by a WebDAV clie
182
182
 
183
183
  ## Changelog
184
184
 
185
+ * 0.1.1: NoMethodError fix if using `format.any` responder
185
186
  * 0.1.0: Rails 4.2 compatibility
186
187
  * 0.0.9: Add missing file to gemspec
187
188
  * 0.0.8: Merge Contributions from naserca, orospakr, and rutgerg
@@ -23,7 +23,7 @@ module Railsdav
23
23
 
24
24
  # responds to calls like html, xml, json by ignoring them
25
25
  def method_missing(name, *args)
26
- super unless Mime::EXTENSION_LOOKUP[name.to_s]
26
+ super unless Mime::EXTENSION_LOOKUP[name.to_s] or name == :any
27
27
  end
28
28
 
29
29
  def webdav
@@ -52,11 +52,7 @@ class ActionDispatch::Routing::Mapper
52
52
  end
53
53
  end
54
54
 
55
- if Rails.version >= '4.2'
56
- def resource_scope? #:nodoc:
57
- @scope.resource_scope?
58
- end
59
- elsif Rails.version < '3.2'
55
+ if Rails.version < '3.2'
60
56
  # Rails versions after 3.1 expect two arguments here, the first being :resource, :resources,
61
57
  # :webdav_resource etc.so we don't need the inferring logic anymore in newer versions.
62
58
  def resource_scope(resource)
@@ -78,12 +74,11 @@ class ActionDispatch::Routing::Mapper
78
74
  end
79
75
  else
80
76
  def resource_scope?
81
- [:webdav_resource, :webdav_resources, :resource, :resources].include?(@scope[:scope_level])
77
+ [:webdav_resource, :webdav_resources, :resource, :resources].include?(@scope[:scope_level] || @scope.scope_level)
82
78
  end
83
79
  end
84
80
 
85
81
  def dav_options_response(*allowed_http_verbs)
86
- Rails.logger.info "responding to OPTIONS with Allow: #{allowed_http_verbs.flatten.map{|s| s.to_s.upcase}.join(' ')}"
87
82
  proc { [200, {'Allow' => allowed_http_verbs.flatten.map{|s| s.to_s.upcase}.join(' '), 'DAV' => '1'}, [' ']] }
88
83
  end
89
84
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railsdav
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Willem van Kerkhof
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-24 00:00:00.000000000 Z
11
+ date: 2017-08-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Provides basic Rails 3/Rails 4 extensions for making your business resources
14
14
  accessible via WebDAV. This gem does by no means by no means implement the full
@@ -49,7 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
49
  version: '0'
50
50
  requirements: []
51
51
  rubyforge_project:
52
- rubygems_version: 2.2.0
52
+ rubygems_version: 2.5.2
53
53
  signing_key:
54
54
  specification_version: 4
55
55
  summary: Make your Rails 3/4 resources accessible via WebDAV