From 0ab3cf9cb911ddc780607e7b04bd1b5e0e0de4af Mon Sep 17 00:00:00 2001 From: BeenaShetty Date: Wed, 3 Oct 2012 13:46:27 +0530 Subject: [PATCH 1/6] changed download functionality of attachment Added file extension and converted to binary format before writing into tempfile. In ruby 1.9.x higher there is issue of encoding --- lib/kayako_client/mixins/attachment.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/kayako_client/mixins/attachment.rb b/lib/kayako_client/mixins/attachment.rb index 8a38500..a2a57c1 100644 --- a/lib/kayako_client/mixins/attachment.rb +++ b/lib/kayako_client/mixins/attachment.rb @@ -55,7 +55,8 @@ def file @file elsif contents raise RuntimeError, "not a remote file" unless id && !new? - @file = Tempfile.new(file_name.split('.').first || 'kayako_attachment') + @file = Tempfile.new([file_name.split('.').first || 'kayako_attachment', "."+file_name.split('.').last]) + @file.binmode @file.write(contents) @file.flush @file.rewind From b8c0d7605b504713f16830b1d32459c2133d3a79 Mon Sep 17 00:00:00 2001 From: BeenaShetty Date: Wed, 3 Oct 2012 17:48:14 +0530 Subject: [PATCH 2/6] Update README --- README | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README b/README index 729103f..725cf2a 100644 --- a/README +++ b/README @@ -2,4 +2,10 @@ For guidance and usage examples, visit: http://forge.kayako.com/projects/kayako-ruby-api-library For help and support from the Kayako developer community, visit: -http://forums.kayako.com/ \ No newline at end of file +http://forums.kayako.com/ + + +In this there is some major changes while downloading attachment. +It is compatible with ruby 1.9.x. + +As in higher version of ruby there is a support for encodings. \ No newline at end of file From 9b0f389f622485c657a3532f4af7bbf29d0b5b1b Mon Sep 17 00:00:00 2001 From: BeenaShetty Date: Wed, 3 Oct 2012 17:48:53 +0530 Subject: [PATCH 3/6] Update README --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 725cf2a..2784d48 100644 --- a/README +++ b/README @@ -8,4 +8,4 @@ http://forums.kayako.com/ In this there is some major changes while downloading attachment. It is compatible with ruby 1.9.x. -As in higher version of ruby there is a support for encodings. \ No newline at end of file +As in higher version of ruby there is a support for encodings this issue has been solved in this commit. \ No newline at end of file From 68142a43f77d3e0ad85fb21fbeaf304db6b500ce Mon Sep 17 00:00:00 2001 From: BeenaShetty Date: Wed, 3 Oct 2012 17:50:42 +0530 Subject: [PATCH 4/6] Update README --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 2784d48..5bfd11f 100644 --- a/README +++ b/README @@ -5,7 +5,7 @@ For help and support from the Kayako developer community, visit: http://forums.kayako.com/ -In this there is some major changes while downloading attachment. +In this there is some major changes related to download of attachment. It is compatible with ruby 1.9.x. As in higher version of ruby there is a support for encodings this issue has been solved in this commit. \ No newline at end of file From c9af91022344c6ac5a561a71e74195ba71b1e6e4 Mon Sep 17 00:00:00 2001 From: BeenaShetty Date: Tue, 20 Nov 2012 15:57:08 +0530 Subject: [PATCH 5/6] password can be updated --- lib/kayako_client/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kayako_client/user.rb b/lib/kayako_client/user.rb index e4ea021..bff52aa 100644 --- a/lib/kayako_client/user.rb +++ b/lib/kayako_client/user.rb @@ -26,7 +26,7 @@ class User < KayakoClient::Base property :enable_dst, :boolean property :sla_plan_id, :integer property :sla_plan_expiry, :date - property :password, :string, :new => true, :required => :post + property :password, :string :required => :post property :send_welcome_email, :boolean, :new => true associate :user_group, :user_group_id, UserGroup From 4895234144125173e7f693c24a1c5e06cfb1da52 Mon Sep 17 00:00:00 2001 From: BeenaShetty Date: Tue, 20 Nov 2012 15:59:18 +0530 Subject: [PATCH 6/6] remove new=> true from password --- lib/kayako_client/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kayako_client/user.rb b/lib/kayako_client/user.rb index bff52aa..55e304c 100644 --- a/lib/kayako_client/user.rb +++ b/lib/kayako_client/user.rb @@ -26,7 +26,7 @@ class User < KayakoClient::Base property :enable_dst, :boolean property :sla_plan_id, :integer property :sla_plan_expiry, :date - property :password, :string :required => :post + property :password, :string, :required => :post property :send_welcome_email, :boolean, :new => true associate :user_group, :user_group_id, UserGroup