ood_appkit 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ood_appkit/urls/editor.rb +10 -4
- data/lib/ood_appkit/urls/files.rb +17 -7
- data/lib/ood_appkit/urls/shell.rb +11 -4
- data/lib/ood_appkit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e93d18a9dde285e2ea4192e6432c335fb7a8f0f6
|
4
|
+
data.tar.gz: 064f4bea76929a57b553bcd3b9cba6f9b55407af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db8d0a58f9555aeed9dc4bd5a96fa826f34994fe78c45c913b608fe10ddebdf2ac4bacf8cd9bc7a0729eec344c8764099708a1bef844973f35d40acd0c87259b
|
7
|
+
data.tar.gz: dd1715a1ee4d7c5403344c4d84cc6a5f668d70a51187980bee0bbb599278e4297d0a6d2603f9991e5e6b674b98872d84cc0eac5e9843df24a3f9523439ce2748
|
@@ -10,10 +10,16 @@ module OodAppkit
|
|
10
10
|
end
|
11
11
|
|
12
12
|
# URL to access this app's file editor API for a given absolute file path
|
13
|
-
# @param
|
14
|
-
# @
|
15
|
-
|
16
|
-
|
13
|
+
# @param opts [#to_h] the available options for this method
|
14
|
+
# @option opts [#to_s, nil] :path ("") The absolute path to the file on
|
15
|
+
# the filesystem
|
16
|
+
# @return [Addressable::URI] absolute url to access path in file editor
|
17
|
+
# api
|
18
|
+
def edit(opts = {})
|
19
|
+
opts = opts.to_h.compact.symbolize_keys
|
20
|
+
|
21
|
+
path = opts.fetch(:path, "").to_s
|
22
|
+
@template.expand url: @base_url + @edit_url, path: path
|
17
23
|
end
|
18
24
|
end
|
19
25
|
end
|
@@ -12,17 +12,27 @@ module OodAppkit
|
|
12
12
|
end
|
13
13
|
|
14
14
|
# URL to access this app for a given absolute file path
|
15
|
-
# @param
|
16
|
-
# @
|
17
|
-
|
18
|
-
|
15
|
+
# @param opts [#to_h] the available options for this method
|
16
|
+
# @option opts [#to_s, nil] :path ("") The absolute path to the file on
|
17
|
+
# the filesystem
|
18
|
+
# @return [Addressable::URI] absolute url to access path in file app
|
19
|
+
def url(opts = {})
|
20
|
+
opts = opts.to_h.compact.symbolize_keys
|
21
|
+
|
22
|
+
path = opts.fetch(:path, "").to_s
|
23
|
+
@template.expand url: @base_url + @fs_url, path: path
|
19
24
|
end
|
20
25
|
|
21
26
|
# URL to access this app's API for a given absolute file path
|
22
|
-
# @param
|
27
|
+
# @param opts [#to_h] the available options for this method
|
28
|
+
# @option opts [#to_s, nil] :path ("") The absolute path to the file on
|
29
|
+
# the filesystem
|
23
30
|
# @return [Addressable::URI] absolute url to access path in files app api
|
24
|
-
def api(
|
25
|
-
|
31
|
+
def api(opts = {})
|
32
|
+
opts = opts.to_h.compact.symbolize_keys
|
33
|
+
|
34
|
+
path = opts.fetch(:path, "").to_s
|
35
|
+
@template.expand url: @base_url + @api_url, path: path
|
26
36
|
end
|
27
37
|
end
|
28
38
|
end
|
@@ -10,11 +10,18 @@ module OodAppkit
|
|
10
10
|
end
|
11
11
|
|
12
12
|
# URL to access this app for a given host and absolute file path
|
13
|
-
# @param
|
14
|
-
# @
|
13
|
+
# @param opts [#to_h] the available options for this method
|
14
|
+
# @option opts [#to_s, nil] :host ("default") The host the app will make
|
15
|
+
# an ssh connection to
|
16
|
+
# @option opts [#to_s, nil] :path ("") The absolute path to the directory
|
17
|
+
# the ssh app opens up in
|
15
18
|
# @return [Addressable::URI] the url used to access the app
|
16
|
-
def url(
|
17
|
-
|
19
|
+
def url(opts = {})
|
20
|
+
opts = opts.to_h.compact.symbolize_keys
|
21
|
+
|
22
|
+
host = opts.fetch(:host, "default").to_s
|
23
|
+
path = opts.fetch(:path, "").to_s
|
24
|
+
@template.expand url: @base_url + @ssh_url, host: host, path: path
|
18
25
|
end
|
19
26
|
end
|
20
27
|
end
|
data/lib/ood_appkit/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ood_appkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Franz
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-04-
|
12
|
+
date: 2017-04-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|