ticket_sharing 0.6.10 → 0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.md +7 -3
- data/lib/ticket_sharing/base.rb +9 -1
- metadata +6 -5
data/Readme.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Ticket Sharing
|
1
|
+
# Ticket Sharing [![Build Status](https://secure.travis-ci.org/zendesk/ticket_sharing.png)](http://travis-ci.org/zendesk/ticket_sharing)
|
2
2
|
|
3
3
|
A ruby implementation of the [Networked Help Desk] [1] API
|
4
4
|
|
@@ -15,12 +15,12 @@ A ruby implementation of the [Networked Help Desk] [1] API
|
|
15
15
|
|
16
16
|
### Sending a ticket
|
17
17
|
|
18
|
-
ticket = TicketSharing::Ticket.new(
|
18
|
+
ticket = TicketSharing::Ticket.new(
|
19
19
|
'uuid' => 'fc8daf77',
|
20
20
|
'subject' => 'the subject',
|
21
21
|
'requested_at' => '2011-01-17 01:01:01',
|
22
22
|
'status' => 'new'
|
23
|
-
|
23
|
+
)
|
24
24
|
ticket.send_to('http://example.com/sharing')
|
25
25
|
|
26
26
|
### Updating a ticket
|
@@ -35,3 +35,7 @@ A ruby implementation of the [Networked Help Desk] [1] API
|
|
35
35
|
|
36
36
|
[1]: http://networkedhelpdesk.org/api/ "Networked Help Desk"
|
37
37
|
[2]: https://github.com/zendesk/ticket_sharing/issues "Issues"
|
38
|
+
|
39
|
+
## Author
|
40
|
+
[Josh Lubaway](https://github.com/jish)<br/>
|
41
|
+
License: MIT
|
data/lib/ticket_sharing/base.rb
CHANGED
@@ -12,8 +12,16 @@ module TicketSharing
|
|
12
12
|
@fields || []
|
13
13
|
end
|
14
14
|
|
15
|
+
def self.first_ancestor
|
16
|
+
ancestors.detect { |a| a != self }
|
17
|
+
end
|
18
|
+
|
15
19
|
def field_list
|
16
|
-
self.class.field_list
|
20
|
+
if self.class.field_list.any?
|
21
|
+
self.class.field_list
|
22
|
+
else
|
23
|
+
self.class.first_ancestor.field_list
|
24
|
+
end
|
17
25
|
end
|
18
26
|
|
19
27
|
def initialize(attrs = {})
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ticket_sharing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email: josh@zendesk.com
|
@@ -30,12 +30,13 @@ files:
|
|
30
30
|
- lib/ticket_sharing/ticket.rb
|
31
31
|
- lib/ticket_sharing/time.rb
|
32
32
|
- Readme.md
|
33
|
-
homepage:
|
34
|
-
licenses:
|
33
|
+
homepage: https://github.com/zendesk/ticket_sharing
|
34
|
+
licenses:
|
35
|
+
- MIT
|
35
36
|
post_install_message:
|
36
37
|
rdoc_options:
|
37
38
|
- --main
|
38
|
-
-
|
39
|
+
- Readme.md
|
39
40
|
require_paths:
|
40
41
|
- lib
|
41
42
|
required_ruby_version: !ruby/object:Gem::Requirement
|