tender_import 0.0.1 → 0.0.2
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.
- data/README.md +19 -1
- data/bin/zendesk2tender +3 -2
- data/lib/tender_import/version.rb +1 -1
- data/lib/tender_import/zendesk_api_import.rb +6 -2
- metadata +4 -4
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Tender Import
|
1
|
+
# Tender Import Tools
|
2
2
|
|
3
3
|
This is a repository of code for producing [Tender import
|
4
4
|
archives](https://help.tenderapp.com/faqs/setup-installation/importing),
|
@@ -16,3 +16,21 @@ produce a script for importing from a new service, please
|
|
16
16
|
[open a Tender discussion](https://help.tenderapp.com/discussions/suggestions#new_topic_form)
|
17
17
|
or send a pull request to let us know.
|
18
18
|
|
19
|
+
## Installation
|
20
|
+
|
21
|
+
This toolset can be installed as a Ruby gem:
|
22
|
+
|
23
|
+
$ gem install tender_import
|
24
|
+
|
25
|
+
## Command-line
|
26
|
+
|
27
|
+
The only command-line tool included is zendesk2tender:
|
28
|
+
|
29
|
+
$ zendesk2tender --help
|
30
|
+
|
31
|
+
## API
|
32
|
+
|
33
|
+
There is also an API for building Tender import archives with Ruby.
|
34
|
+
|
35
|
+
See lib/tender_import/archive.rb for an example of API usage.
|
36
|
+
|
data/bin/zendesk2tender
CHANGED
@@ -11,8 +11,9 @@
|
|
11
11
|
# `zendesk2tender --help' displays detailed option info.
|
12
12
|
#
|
13
13
|
# Prerequisites:
|
14
|
-
#
|
15
|
-
#
|
14
|
+
#
|
15
|
+
# # Ruby gems (should be installed as part of the gem)
|
16
|
+
# gem install faraday
|
16
17
|
# gem install trollop
|
17
18
|
# gem install yajl-ruby
|
18
19
|
# # Python tools (must be in your PATH)
|
@@ -124,10 +124,11 @@ class TenderImport::ZendeskApiImport
|
|
124
124
|
#{$0} -e <email> -p <password> -s <subdomain>
|
125
125
|
|
126
126
|
Prerequisites:
|
127
|
-
# Ruby gems
|
128
|
-
gem install faraday
|
127
|
+
# Ruby gems (should already be installed)
|
128
|
+
gem install faraday
|
129
129
|
gem install trollop
|
130
130
|
gem install yajl-ruby
|
131
|
+
|
131
132
|
# Python tools (must be in your PATH)
|
132
133
|
html2text.py: http://www.aaronsw.com/2002/html2text/
|
133
134
|
|
@@ -221,6 +222,8 @@ class TenderImport::ZendeskApiImport
|
|
221
222
|
log "exporting ticket #{ticket['nice_id']}"
|
222
223
|
@archive.add_discussion category,
|
223
224
|
:title => ticket['subject'],
|
225
|
+
:state => ticket['is_locked'] ? 'resolved' : 'open',
|
226
|
+
:private => !ticket['is_public'],
|
224
227
|
:author_email => author_email(ticket['submitter_id']),
|
225
228
|
:created_at => ticket['created_at'],
|
226
229
|
:updated_at => ticket['updated_at'],
|
@@ -258,6 +261,7 @@ class TenderImport::ZendeskApiImport
|
|
258
261
|
def create_archive # {{{
|
259
262
|
export_file = @archive.write_archive
|
260
263
|
log "created #{export_file}"
|
264
|
+
return export_file
|
261
265
|
end # }}}
|
262
266
|
|
263
267
|
protected
|
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: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
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: 2011-08-
|
18
|
+
date: 2011-08-10 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|