1
0
mirror of https://github.com/seejohnrun/haste-client.git synced 2025-12-16 08:45:55 +00:00

9 Commits

Author SHA1 Message Date
John Crepezzi
ea7750c3bb Remove unused pieces of Rakefile 2013-11-08 14:04:24 -05:00
John Crepezzi
d380711d26 Bump version to 0.1.7 2013-11-08 14:03:46 -05:00
John Crepezzi
a195f017e2 Merge pull request #15 from TsCl/master
Fixed the JSON::ParserError rescue message
2013-11-08 11:03:04 -08:00
John Crepezzi
4e3e90f7cc Merge pull request #14 from tommcdo/master
Do not trim leading whitespace
2013-11-08 11:01:18 -08:00
Pierre MONTAGNIER
a7df62a0a5 Fixed the JSON::ParserError rescue message
I guess this message may be more appropriate for this error.
2013-09-22 00:26:29 +02:00
Tom McDonald
ce764ca7c4 Do not trim leading whitespace
For pastes of code snippets, removing leading whitespace usually
results in mis-aligned code.
2013-07-12 12:05:49 -04:00
John Crepezzi
e6532aa100 Bump to 0.1.6 2013-06-03 12:37:39 -04:00
John Crepezzi
82d191fc5e Merge pull request #13 from zertrin/master
Make HTTPS support to actually work (require 'net/https')
2013-06-03 09:36:29 -07:00
zertrin
2ef8f926af Make HTTPS support to actually work (require 'net/https') 2013-06-02 02:03:55 +02:00
3 changed files with 6 additions and 17 deletions

View File

@@ -1,7 +1,6 @@
require 'rspec/core/rake_task'
require File.dirname(__FILE__) + '/lib/haste/version'
task :build => :test do
task :build do
system "gem build haste.gemspec"
end
@@ -12,14 +11,3 @@ task :release => :build do
# push the gem
system "gem push haste-#{Haste::VERSION}.gem"
end
RSpec::Core::RakeTask.new(:test) do |t|
t.pattern = 'spec/**/*_spec.rb'
fail_on_error = true # be explicit
end
RSpec::Core::RakeTask.new(:rcov) do |t|
t.pattern = 'spec/**/*_spec.rb'
t.rcov = true
fail_on_error = true # be explicit
end

View File

@@ -1,5 +1,6 @@
require 'json'
require 'net/http'
require 'net/https'
require 'uri'
module Haste
@@ -19,7 +20,7 @@ module Haste
@input = STDIN.readlines.join
end
# clean up
@input.strip!
@input.rstrip!
end
# Upload the and output the URL we get back
@@ -39,7 +40,7 @@ module Haste
abort "failure uploading: #{response.code}"
end
rescue JSON::ParserError => e
abort "failure uploading: #{response.code}"
abort "failure parsing response: #{e.message}"
rescue Errno::ECONNREFUSED => e
abort "failure connecting: #{e.message}"
end

View File

@@ -1,5 +1,5 @@
module Haste
VERSION = '0.1.5'
VERSION = '0.1.7'
end