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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34c9e3abbc694a088709003978294cc500338c8e
4
- data.tar.gz: 1cc97bcb81bb1198f1bd936d1080a9ee0307b7bd
3
+ metadata.gz: e29ecf585930ccdb1f334709b051986e2ca043d0
4
+ data.tar.gz: 8d12fb7333a8fc3055180a643ad8ef67f3a56945
5
5
  SHA512:
6
- metadata.gz: bb54356ef11e5bc7f23cdf192f06870546390725959898294fb1d70b4a5315764ad311fb5e42467192722033de2e6b48583815f17c49993812ee479e7eb07cca
7
- data.tar.gz: 54c8b8957a0590a66bfbd365fd00477a012032658f59e4bd069a310354312fbc626b194806519d37360f5326e5d9fd5518012a1752dad5e10fd993c224449aea
6
+ metadata.gz: f46164a13a4faf7a9d27480d23c10fd511325cfb49b97609c9f3918f591cdaabfbc9213c4f33b782f232a337ce07ce5799892ff948b866fe64505f06819d1932
7
+ data.tar.gz: 73d475bf401c14a6e0577d503432a7bda868c875364c8ef566bf1ed882192709253de26eb1724ae78f7a86e44d4635a774f37692a5a8cfbedce2528e4ad35492
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- doggy (2.0.26)
4
+ doggy (2.0.27)
5
5
  json (~> 1.8.3)
6
6
  parallel (~> 1.6.1)
7
7
  rugged (~> 0.23.2)
@@ -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
- forked_resource.title = "[#{ salt }] " + forked_resource.title
76
- forked_resource.description = "[fork of #{ resource.id }] " + forked_resource.title
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
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Doggy
4
- VERSION = "2.0.26"
4
+ VERSION = "2.0.27"
5
5
  end
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.26
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-06-28 00:00:00.000000000 Z
12
+ date: 2016-07-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json