zen_freshdesk 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92afde6988d878206ec64481062db30049e59884
4
- data.tar.gz: 2be16a604d7197e8bc37d197d05691ad89f20965
3
+ metadata.gz: e07985a6f05f4e03b871fef3b842414bdada9a59
4
+ data.tar.gz: 7a4c1c016384f082422b7cb5a88004e9bba1c389
5
5
  SHA512:
6
- metadata.gz: 5e4f03a04539ba472c8f0df6667d491064e63741a0853076ea7982e911f1de158f7f6326977db759af71d28cfb95b954b5fa647cfbbbc33288228eef298d5043
7
- data.tar.gz: 9b827a7b6b57738cc70c1ed48ed21d1d7399ae71a19b5903b94fa312aaa80dad4670ef85981cedc1c135da40943935d6bb58d8fa28b065300e3c7319a9b2ffd3
6
+ metadata.gz: 7bce92f1744df6feda4e013ea015035ec8c6db44a6ab02c92ef96f79bd4f719f9d5b321b2301ed58d6d93d9edb7fbb6d5dd45c73c7945c02ccce7a1b794a0d02
7
+ data.tar.gz: a71c769e25a132f57183948ae52f635cdca65533af4fd1641a1fdb4df05c089611e68ea35a31177cde41c1d9d260322c216a429238818866c025b3171877ba4b
@@ -1,3 +1,3 @@
1
1
  module ZenFreshdesk
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/zen_freshdesk.rb CHANGED
@@ -3,6 +3,12 @@ require 'rest_client'
3
3
  require 'base64'
4
4
  require 'json'
5
5
 
6
+
7
+ require 'thor'
8
+ require 'thor/group'
9
+
10
+
11
+
6
12
  module ZenFreshdesk
7
13
  class << self
8
14
  attr_accessor :configuration
@@ -13,11 +19,25 @@ module ZenFreshdesk
13
19
  yield(configuration)
14
20
  end
15
21
 
16
- class Configuration
22
+ class Configuration
17
23
  attr_accessor :uri_api, :api_key, :projects, :requester_id, :submitter_id, :responder_id,
18
24
  :subject, :description, :header, :email
19
25
  end
20
26
 
27
+ # class InstallGenerator < Rails::Generators::Base
28
+ # include Thor::Actions
29
+ # source_root File.expand_path("../templates", __FILE__)
30
+
31
+ # def create_initializer
32
+ # template 'initializer.rb.erb', 'config/initializers/zen_freshdeskkkkk.rb'
33
+ # end
34
+ # end
35
+
36
+
37
+
38
+
39
+
40
+
21
41
  def self.create_ticket()
22
42
  header = {:content_type => "application/json", :Authorization => "Basic #{Base64.encode64(ZenFreshdesk.configuration.api_key)}"}
23
43
 
@@ -40,17 +60,20 @@ module ZenFreshdesk
40
60
  end
41
61
  end
42
62
 
43
- # ZenFreshdesk.configure do |config|
44
- # config.api_key = "UPf8ktY8VePpIOQPsNsq"
45
- # config.uri_api = "http://chinh.freshdesk.com/helpdesk/tickets.json?tags=test"
46
- # config.projects = ""
47
- # config.requester_id = "1"
48
- # config.submitter_id = ""
49
- # config.responder_id = "3"
50
- # config.subject = "chinh Support needed.."
51
- # config.description = "chinh Some details on the issue ..."
52
- # config.email = "tom@outerspace.com"
53
- # end
54
-
55
- ZenFreshdesk.create_ticket()
63
+ ZenFreshdesk.configure do |config|
64
+ config.api_key = "UPf8ktY8VePpIOQPsNsq"
65
+ config.uri_api = "http://chinh.freshdesk.com/helpdesk/tickets.json?tags=test"
66
+ config.projects = ""
67
+ config.requester_id = "1"
68
+ config.submitter_id = ""
69
+ config.responder_id = "3"
70
+ config.subject = "chinh Support needed.."
71
+ config.description = "chinh Some details on the issue ..."
72
+ config.email = "tom@outerspace.com"
73
+ end
74
+
75
+ puts "-------------------------"
76
+ puts __FILE__
77
+ puts "-------------------------"
78
+ # ZenFreshdesk.create_ticket()
56
79
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zen_freshdesk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - hoangtrungchinh