Add new map & fix old maps.
This commit is contained in:
parent
236e095d83
commit
d3309f0344
4 changed files with 33 additions and 11 deletions
|
@ -1,10 +1,8 @@
|
||||||
|
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
require 'pp'
|
require 'pp'
|
||||||
|
|
||||||
module Qasim ; module Map
|
module Qasim ; class Map; class Generic
|
||||||
end ; end
|
|
||||||
|
|
||||||
class Qasim::Map::Generic
|
|
||||||
attr_reader :links
|
attr_reader :links
|
||||||
attr_reader :filename
|
attr_reader :filename
|
||||||
attr_reader :name
|
attr_reader :name
|
||||||
|
@ -70,5 +68,4 @@ class Qasim::Map::Generic
|
||||||
def umount
|
def umount
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
end
|
end
|
||||||
end
|
end ; end ; end
|
||||||
|
|
||||||
|
|
24
lib/qasim/map/smb.rb
Normal file
24
lib/qasim/map/smb.rb
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
|
||||||
|
# vim: set ts=2 sw=2 et:
|
||||||
|
require 'fileutils'
|
||||||
|
require 'qasim/map/generic'
|
||||||
|
|
||||||
|
class Qasim::Map::Webdav < Qasim::Map::Generic
|
||||||
|
def initialize *opts
|
||||||
|
super
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.parameters
|
||||||
|
super.merge({
|
||||||
|
webdav_user: { required: true}, # ex : foo
|
||||||
|
webdav_password: { required: true}, # ex : bar
|
||||||
|
webdav_port: { default: 80}, # ex : 80, 8080, 443
|
||||||
|
webdav_protocol: { default: :http} # ex : http, https
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.handles
|
||||||
|
[ :webdav, :webdavs ]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
require 'qasim/map/generic'
|
require 'qasim/map/generic'
|
||||||
|
|
||||||
class Qasim::Map::Ssh < Qasim::Map::Generic
|
module Qasim ; class Map ; class Ssh < Qasim::Map::Generic
|
||||||
attr_reader :path,
|
attr_reader :path,
|
||||||
:host,
|
:host,
|
||||||
:port,
|
:port,
|
||||||
|
@ -130,5 +130,5 @@ class Qasim::Map::Ssh < Qasim::Map::Generic
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end ; end ; end
|
||||||
|
|
||||||
|
|
|
@ -4,20 +4,21 @@ require 'fileutils'
|
||||||
require 'qasim/map/generic'
|
require 'qasim/map/generic'
|
||||||
|
|
||||||
class Qasim::Map::Webdav < Qasim::Map::Generic
|
class Qasim::Map::Webdav < Qasim::Map::Generic
|
||||||
def initialize
|
def initialize *opts
|
||||||
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.parameters
|
def self.parameters
|
||||||
super.merge({
|
super.merge({
|
||||||
webdav_user: { required: true}, # ex : foo
|
webdav_user: { required: true}, # ex : foo
|
||||||
webdav_password: { required: true}, # ex : bar
|
webdav_password: { required: true}, # ex : bar
|
||||||
webdav_port: { default: 80}, # ex : 80, 8080, ...
|
webdav_port: { default: 80}, # ex : 80, 8080, 443
|
||||||
webdav_protocol: { default: :http} # ex : http, https
|
webdav_protocol: { default: :http} # ex : http, https
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.handles
|
def self.handles
|
||||||
[ :webdav, :fusedav ]
|
[ :webdav, :webdavs ]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue