zenpush 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,11 @@
1
+ == 0.2.0
2
+
3
+ * HTML support: don't convert file before pushing it to Zendesk if it's not a .md or .markdown file.
4
+
5
+ == 0.1.1
6
+
7
+ * New option `:filenames_use_dashes_instead_of_spaces` (@torandu)
8
+
1
9
  == 0.1.0
2
10
 
3
11
  * Original version
data/README.markdown CHANGED
@@ -1,6 +1,6 @@
1
1
  # ZenPush
2
2
 
3
- This gem allows editing your Zendesk knowledge base in Markdown. It's a command-line tool.
3
+ This gem allows editing your Zendesk knowledge base in Markdown (or HTML). It's a command-line tool.
4
4
 
5
5
  ## Getting Started
6
6
 
@@ -32,7 +32,7 @@ You can find your API token at https://myproduct.zendesk.com/settings/api.
32
32
 
33
33
  Additional configuration (optional):
34
34
 
35
- :filenames_use_dashes_instead_of_spaces: false
35
+ :filenames_use_dashes_instead_of_spaces: false
36
36
 
37
37
  ## Usage
38
38
 
@@ -58,6 +58,7 @@ Keep an organized folder of your categories, forums, and entries. Let's say I ha
58
58
  Creating or updating an entry:
59
59
 
60
60
  $ zp push -f <path_to_markdown_file>
61
+ $ zp push -f <path_to_html_file>
61
62
 
62
63
  Following the previous example, you would type:
63
64
 
@@ -74,3 +75,4 @@ The gem will automatically discover the category and forum name of a given entry
74
75
  ## Contributors
75
76
 
76
77
  * @nfo
78
+ * @torandu
@@ -34,7 +34,12 @@ module ZenPush
34
34
  def push(options = {})
35
35
  category_name, forum_name, entry_title = ZenPush.file_to_category_forum_entry(options[:file])
36
36
 
37
- entry_body = ZenPush::Markdown.to_zendesk_html(options[:file])
37
+ entry_body =
38
+ if options[:file].end_with?('.md') || options[:file].end_with?('.markdown')
39
+ ZenPush::Markdown.to_zendesk_html(options[:file])
40
+ else
41
+ File.read(options[:file])
42
+ end
38
43
 
39
44
  entry = ZenPush.z.find_entry(category_name, forum_name, entry_title)
40
45
  if entry
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module ZenPush
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2.0"
4
4
  end
metadata CHANGED
@@ -2,111 +2,111 @@
2
2
  name: zenpush
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.1
5
+ version: 0.2.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Nicolas Fouché
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-11 00:00:00.000000000 Z
12
+ date: 2013-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- type: :runtime
16
15
  version_requirements: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
19
  version: '1.0'
20
+ none: false
22
21
  name: boson
22
+ type: :runtime
23
23
  prerelease: false
24
24
  requirement: !ruby/object:Gem::Requirement
25
- none: false
26
25
  requirements:
27
26
  - - ~>
28
27
  - !ruby/object:Gem::Version
29
28
  version: '1.0'
29
+ none: false
30
30
  - !ruby/object:Gem::Dependency
31
- type: :runtime
32
31
  version_requirements: !ruby/object:Gem::Requirement
33
- none: false
34
32
  requirements:
35
33
  - - ~>
36
34
  - !ruby/object:Gem::Version
37
35
  version: 0.8.0
36
+ none: false
38
37
  name: httparty
38
+ type: :runtime
39
39
  prerelease: false
40
40
  requirement: !ruby/object:Gem::Requirement
41
- none: false
42
41
  requirements:
43
42
  - - ~>
44
43
  - !ruby/object:Gem::Version
45
44
  version: 0.8.0
45
+ none: false
46
46
  - !ruby/object:Gem::Dependency
47
- type: :runtime
48
47
  version_requirements: !ruby/object:Gem::Requirement
49
- none: false
50
48
  requirements:
51
49
  - - ~>
52
50
  - !ruby/object:Gem::Version
53
51
  version: 2.1.0
52
+ none: false
54
53
  name: redcarpet
54
+ type: :runtime
55
55
  prerelease: false
56
56
  requirement: !ruby/object:Gem::Requirement
57
- none: false
58
57
  requirements:
59
58
  - - ~>
60
59
  - !ruby/object:Gem::Version
61
60
  version: 2.1.0
61
+ none: false
62
62
  - !ruby/object:Gem::Dependency
63
- type: :runtime
64
63
  version_requirements: !ruby/object:Gem::Requirement
65
- none: false
66
64
  requirements:
67
65
  - - ~>
68
66
  - !ruby/object:Gem::Version
69
67
  version: 1.0.0
68
+ none: false
70
69
  name: awesome_print
70
+ type: :runtime
71
71
  prerelease: false
72
72
  requirement: !ruby/object:Gem::Requirement
73
- none: false
74
73
  requirements:
75
74
  - - ~>
76
75
  - !ruby/object:Gem::Version
77
76
  version: 1.0.0
77
+ none: false
78
78
  - !ruby/object:Gem::Dependency
79
- type: :runtime
80
79
  version_requirements: !ruby/object:Gem::Requirement
81
- none: false
82
80
  requirements:
83
81
  - - ~>
84
82
  - !ruby/object:Gem::Version
85
83
  version: 1.5.1
84
+ none: false
86
85
  name: json_pure
86
+ type: :runtime
87
87
  prerelease: false
88
88
  requirement: !ruby/object:Gem::Requirement
89
- none: false
90
89
  requirements:
91
90
  - - ~>
92
91
  - !ruby/object:Gem::Version
93
92
  version: 1.5.1
93
+ none: false
94
94
  - !ruby/object:Gem::Dependency
95
- type: :development
96
95
  version_requirements: !ruby/object:Gem::Requirement
97
- none: false
98
96
  requirements:
99
97
  - - ! '>='
100
98
  - !ruby/object:Gem::Version
101
99
  version: '0'
100
+ none: false
102
101
  name: rake
102
+ type: :development
103
103
  prerelease: false
104
104
  requirement: !ruby/object:Gem::Requirement
105
- none: false
106
105
  requirements:
107
106
  - - ! '>='
108
107
  - !ruby/object:Gem::Version
109
108
  version: '0'
109
+ none: false
110
110
  description: Push your markdown files to your Zendesk knowledge base
111
111
  email:
112
112
  - nicolas.fouche@cleverscale.com
@@ -139,23 +139,17 @@ rdoc_options:
139
139
  require_paths:
140
140
  - lib
141
141
  required_ruby_version: !ruby/object:Gem::Requirement
142
- none: false
143
142
  requirements:
144
143
  - - ! '>='
145
144
  - !ruby/object:Gem::Version
146
- segments:
147
- - 0
148
- hash: 1242870539657681757
149
145
  version: '0'
150
- required_rubygems_version: !ruby/object:Gem::Requirement
151
146
  none: false
147
+ required_rubygems_version: !ruby/object:Gem::Requirement
152
148
  requirements:
153
149
  - - ! '>='
154
150
  - !ruby/object:Gem::Version
155
- segments:
156
- - 0
157
- hash: 1242870539657681757
158
151
  version: '0'
152
+ none: false
159
153
  requirements: []
160
154
  rubyforge_project:
161
155
  rubygems_version: 1.8.23
@@ -163,3 +157,4 @@ signing_key:
163
157
  specification_version: 3
164
158
  summary: Push your markdown files to your Zendesk knowledge base
165
159
  test_files: []
160
+ has_rdoc: