tender_import 0.0.5 → 0.0.6
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.
@@ -35,7 +35,7 @@ class TenderImport::ZendeskApiImport
|
|
35
35
|
@opts = options || command_line_options
|
36
36
|
@subdomain = opts[:subdomain]
|
37
37
|
@logger = opts[:logger] || Logger.new(STDOUT).tap {|l| l.level = Logger::INFO}
|
38
|
-
@conn = Faraday::Connection.new("
|
38
|
+
@conn = Faraday::Connection.new("https://#{subdomain}.zendesk.com") do |b|
|
39
39
|
b.adapter :net_http
|
40
40
|
#b.use ResponseJSON
|
41
41
|
b.response :yajl
|
@@ -83,9 +83,9 @@ class TenderImport::ZendeskApiImport
|
|
83
83
|
# In some cases the desired data is not in the top level of the payload. In
|
84
84
|
# that case specify resource_key to pull the data from that key.
|
85
85
|
def fetch_resource resource_url, resource_key = nil
|
86
|
-
debug "fetching
|
86
|
+
debug "fetching api/v1/#{resource_url}"
|
87
87
|
loop do
|
88
|
-
response = conn.get(resource_url)
|
88
|
+
response = conn.get("api/v1/" + resource_url)
|
89
89
|
if response.success? && !response.body.kind_of?(String)
|
90
90
|
return resource_key ? response.body[resource_key] : response.body
|
91
91
|
elsif response.status == 503
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tender_import
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Zack Hobson
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-04-18 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
requirements: []
|
112
112
|
|
113
113
|
rubyforge_project:
|
114
|
-
rubygems_version: 1.
|
114
|
+
rubygems_version: 1.6.2
|
115
115
|
signing_key:
|
116
116
|
specification_version: 3
|
117
117
|
summary: Tools for producing Tender import archives.
|