doggy 2.0.26 → 2.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/doggy/cli/edit.rb +36 -2
- data/lib/doggy/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: e29ecf585930ccdb1f334709b051986e2ca043d0
|
4
|
+
data.tar.gz: 8d12fb7333a8fc3055180a643ad8ef67f3a56945
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f46164a13a4faf7a9d27480d23c10fd511325cfb49b97609c9f3918f591cdaabfbc9213c4f33b782f232a337ce07ce5799892ff948b866fe64505f06819d1932
|
7
|
+
data.tar.gz: 73d475bf401c14a6e0577d503432a7bda868c875364c8ef566bf1ed882192709253de26eb1724ae78f7a86e44d4635a774f37692a5a8cfbedce2528e4ad35492
|
data/Gemfile.lock
CHANGED
data/lib/doggy/cli/edit.rb
CHANGED
@@ -25,6 +25,32 @@ module Doggy
|
|
25
25
|
new_resource.path = resource.path
|
26
26
|
new_resource.save_local
|
27
27
|
|
28
|
+
forked_resource.destroy
|
29
|
+
elsif resource.class.to_s.downcase =~ /screen/
|
30
|
+
forked_resource = fork(resource)
|
31
|
+
system("open '#{ forked_resource.human_edit_url }'")
|
32
|
+
|
33
|
+
wait_for_edit
|
34
|
+
|
35
|
+
new_resource = Doggy::Models::Screen.find(forked_resource.id)
|
36
|
+
new_resource.id = resource.id
|
37
|
+
new_resource.board_title = resource.board_title
|
38
|
+
new_resource.path = resource.path
|
39
|
+
new_resource.save_local
|
40
|
+
|
41
|
+
forked_resource.destroy
|
42
|
+
elsif resource.class.to_s.downcase =~ /monitor/
|
43
|
+
forked_resource = fork(resource)
|
44
|
+
system("open '#{ forked_resource.human_edit_url }'")
|
45
|
+
|
46
|
+
wait_for_edit
|
47
|
+
|
48
|
+
new_resource = Doggy::Models::Monitor.find(forked_resource.id)
|
49
|
+
new_resource.id = resource.id
|
50
|
+
new_resource.name = resource.name
|
51
|
+
new_resource.path = resource.path
|
52
|
+
new_resource.save_local
|
53
|
+
|
28
54
|
forked_resource.destroy
|
29
55
|
else
|
30
56
|
system("open '#{ resource.human_edit_url }'")
|
@@ -72,8 +98,16 @@ module Doggy
|
|
72
98
|
|
73
99
|
forked_resource = resource.dup
|
74
100
|
forked_resource.id = nil
|
75
|
-
|
76
|
-
|
101
|
+
if resource.class.to_s.downcase =~ /dashboard/
|
102
|
+
forked_resource.title = "[#{ salt }] " + forked_resource.title
|
103
|
+
forked_resource.description = "[fork of #{ resource.id }] " + forked_resource.title
|
104
|
+
elsif resource.class.to_s.downcase =~ /screen/
|
105
|
+
forked_resource.board_title = "[#{ salt }] " + forked_resource.board_title
|
106
|
+
elsif resource.class.to_s.downcase =~ /monitor/
|
107
|
+
forked_resource.name = "[#{ salt }] " + forked_resource.name
|
108
|
+
else
|
109
|
+
raise StandardError.new('Unknown resource type, cannot edit.')
|
110
|
+
end
|
77
111
|
forked_resource.save
|
78
112
|
forked_resource
|
79
113
|
end
|
data/lib/doggy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doggy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vlad Gorodetsky
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-07-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|