railsdav 0.1.2 → 0.1.3

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
- SHA256:
3
- metadata.gz: 771b1048a14bc88f28879e83c5493c6bc3d7f0a60b24f5e24700682119ad35cc
4
- data.tar.gz: b35736f2cf7fe41cfd49b153c57a20fdf681db43c9329a18ff747eaee36d7f98
2
+ SHA1:
3
+ metadata.gz: 915facc8babd0b42d48f618176b81818657ec754
4
+ data.tar.gz: 293e2132c0567c3951ad9d05a5987546b3116f4f
5
5
  SHA512:
6
- metadata.gz: 05545b0fcd291c23fc9b7d6ebb571ccae3b555c0f21e88738532562e765a7d805f93c8e073dc4362605e08924cc03a47cb889261b3df696c1df92b32595d8051
7
- data.tar.gz: ba25ad0b328f6458351bf66efc10b93a4c7760676e6d9205c364ae5022e23ce65186555f9503ef58d9c22c90c4ba264c3ccff6ddab9b140d507f74121258a9bf
6
+ metadata.gz: bcf56dea7546197242c4358dc4a793cf1410bea9ae68c7e7f6a0a2660f1660185a27a1f4edfb001fe793bb72968c9ad8130ea998a85353a4772d1d32cc8622a1
7
+ data.tar.gz: 30203aa6e338d4612491c1ec8e15bb7f172acb534f4d1604e3a36e2cab48c70ec62cf330cd28ce11784352d28191d295f308749bae952e80acf3d8b3a2b2446c
data/README.md CHANGED
@@ -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.3: more Rails 5.0 compatibility
185
186
  * 0.1.2: Rails 5.0 compatibility
186
187
  * 0.1.1: NoMethodError fix if using `format.any` responder
187
188
  * 0.1.0: Rails 4.2 compatibility
@@ -14,7 +14,7 @@ module Railsdav
14
14
  end
15
15
 
16
16
  def format(name, options)
17
- if Mime::EXTENSION_LOOKUP[name.to_s]
17
+ if Mime::Type.lookup_by_extension(name.to_s)
18
18
  if @request_format.to_sym == name
19
19
  # TODO: somehow get the attributes (size, updated-at, ...) from the actual Mime responder block here
20
20
  @resource_options.merge! options
@@ -126,8 +126,12 @@ class ActionDispatch::Routing::Mapper
126
126
 
127
127
  if Rails.version < '3.2'
128
128
  resource_scope(WebDAVSingletonResource.new(resources.pop, options), &sub_block)
129
- else
129
+ elsif Rails.version < '5.0'
130
130
  resource_scope(:webdav_resource, WebDAVSingletonResource.new(resources.pop, options), &sub_block)
131
+ else
132
+ with_scope_level :webdav_resource do
133
+ resource_scope WebDAVResource.new(resources.pop, api_only?, options), &sub_block
134
+ end
131
135
  end
132
136
 
133
137
  self
data/lib/railsdav.rb CHANGED
@@ -22,7 +22,7 @@ module Railsdav
22
22
  response.headers['DAV'] = '1'
23
23
 
24
24
  send_data xml_str,
25
- :content_type => Mime::XML,
25
+ :content_type => Mime[:xml],
26
26
  :status => :multi_status
27
27
  end
28
28
 
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.2
4
+ version: 0.1.3
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: 2018-04-25 00:00:00.000000000 Z
11
+ date: 2018-06-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Provides basic Rails 3/4/5 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.7.6
52
+ rubygems_version: 2.5.2.1
53
53
  signing_key:
54
54
  specification_version: 4
55
55
  summary: Make your Rails 3/4/5 resources accessible via WebDAV