gimizen 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -38,13 +38,10 @@ Simple Zendesk ticket creation:
38
38
  response.created
39
39
  # => true
40
40
 
41
- Create a Zendesk ticket and receive the response:
41
+ Create a Zendesk ticket with response body:
42
42
 
43
43
  response = Gimizen.create_ticket({subject: 'Gimizen', comment: 'This is a test ticket'}, true)
44
44
  # => #<OpenStruct url="https://gimiscale.zendesk.com/api/v2/tickets/942.json", id=942, external_id=nil, via={:channel=>"api", :source=>{:from=>{}, :to=>{}, :rel=>nil}}, created_at="2013-09-25T13:13:54Z", updated_at="2013-09-25T13:13:54Z", type=nil, subject="Gimizen", description="This is a test ticket", priority=nil, status="new", recipient=nil, requester_id=275909116, submitter_id=275909116, assignee_id=nil, organization_id=nil, group_id=20329092, collaborator_ids=[], forum_topic_id=nil, problem_id=nil, has_incidents=false, due_at=nil, tags=["gimiscale"], custom_fields=[], satisfaction_rating=nil, sharing_agreement_ids=[], fields=[]>
45
-
46
- You can then use:
47
-
48
45
  response.id
49
46
  # => 942
50
47
  response.subject
@@ -1,3 +1,3 @@
1
1
  module Gimizen
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
data/lib/gimizen.rb CHANGED
@@ -6,7 +6,7 @@ require 'gimizen/version'
6
6
 
7
7
  module Gimizen
8
8
  class << self
9
- attr_accessor :api_url, :api_key
9
+ attr_accessor :domain, :email_address, :api_token
10
10
  def configure(&blk); class_eval(&blk); end
11
11
  end
12
12
 
@@ -62,9 +62,7 @@ module Gimizen
62
62
 
63
63
  def self.succes_message(response_code)
64
64
  # Format status message
65
- status_message = {
66
- created: true
67
- }
65
+ status_message = {created: true}
68
66
  # Change hash if tickets was nit created
69
67
  status_message[:created] = false if response_code != 201
70
68
  # Return status message
@@ -26,7 +26,6 @@ describe Gimizen do
26
26
  it 'creates a zendesk ticket' do
27
27
  VCR.use_cassette('create_ticket') do
28
28
  response = Gimizen.create_ticket({subject: 'Gimizen', comment: 'This is a test ticket'})
29
- puts response
30
29
  response.should_not eq nil
31
30
  response.created.should_not eq nil
32
31
  response.created.should eq true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gimizen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-09-25 00:00:00.000000000 Z
13
+ date: 2013-09-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty