zen_freshdesk 0.0.6 → 0.0.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 420180765165927d70cc4626a02be7d94d1e1573
|
4
|
+
data.tar.gz: 39d00046a0a4e32f65f0b275efd4a6b9c7f6a350
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0acbf112f8bcc0cb58aedea80003d77d1e57a5b68a8771ef8ff306fe0df5312fc7c1573f3ca04f9a1cd4d452a180cdb140c613492d44d356d78e6f6b323d298b
|
7
|
+
data.tar.gz: eac2f6378be75a972fd3e6245ed0c64828dd118e5b56320edb47843a40832ff02d1adc9b6b4647a0d5d2740d36f031e32ddac6f8b9fb7666c5c4bc001f96760a
|
@@ -7,7 +7,7 @@ module ZenFreshdesk
|
|
7
7
|
source_root File.expand_path("../templates", __FILE__)
|
8
8
|
|
9
9
|
def create_initializer
|
10
|
-
template 'initializer.rb.erb', 'config/initializers/
|
10
|
+
template 'initializer.rb.erb', 'config/initializers/zen_freshdesk.rb'
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
data/lib/zen_freshdesk.rb
CHANGED
@@ -19,24 +19,11 @@ module ZenFreshdesk
|
|
19
19
|
yield(configuration)
|
20
20
|
end
|
21
21
|
|
22
|
-
|
22
|
+
class Configuration
|
23
23
|
attr_accessor :uri_api, :api_key, :projects, :requester_id, :submitter_id, :responder_id,
|
24
24
|
:subject, :description, :header, :email
|
25
25
|
end
|
26
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
27
|
|
41
28
|
def self.create_ticket()
|
42
29
|
header = {:content_type => "application/json", :Authorization => "Basic #{Base64.encode64(ZenFreshdesk.configuration.api_key)}"}
|
@@ -57,23 +44,8 @@ module ZenFreshdesk
|
|
57
44
|
res = RestClient.post(ZenFreshdesk.configuration.uri_api, body, header )
|
58
45
|
puts res.code
|
59
46
|
puts res
|
60
|
-
end
|
61
47
|
end
|
62
|
-
|
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
48
|
end
|
74
49
|
|
75
|
-
puts "-------------------------"
|
76
|
-
puts __FILE__
|
77
|
-
puts "-------------------------"
|
78
50
|
# ZenFreshdesk.create_ticket()
|
79
51
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zen_freshdesk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hoangtrungchinh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|