forward 0.1.1 → 0.1.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.
@@ -67,6 +67,7 @@ module Forward
67
67
  end
68
68
 
69
69
  def self.create_error(errors)
70
+ Forward.log(:debug, "An error occured creating tunnel:\n#{errors.inspect}")
70
71
  base_errors = errors['base']
71
72
 
72
73
  if base_errors && base_errors.any? { |e| e.include? 'limit' }
@@ -74,9 +75,13 @@ module Forward
74
75
  Forward.log(:debug, 'Tunnel limit reached')
75
76
  ask_to_destroy(message)
76
77
  else
77
- message = "An error occured creating your tunnel: \n"
78
+ message = "We were unable to create your tunnel for the following reasons: \n"
78
79
  errors.each do |key, value|
79
- message << " #{key} #{value.join(', ')}" if key != 'base'
80
+ if key != 'base'
81
+ message << " #{key} #{value.join(', ')}\n"
82
+ elsif key == 'base' && value.include? 'account'
83
+ message << " #{value}\n"
84
+ end
80
85
  end
81
86
  Forward::Client.cleanup_and_exit!(message)
82
87
  end
@@ -71,7 +71,7 @@ module Forward
71
71
  end
72
72
 
73
73
  def self.cleanup_and_exit!(message = 'exiting...')
74
- puts message
74
+ puts message.chomp
75
75
 
76
76
  @session.close if @session && !@session.closed?
77
77
  if @client && @client.tunnel && @client.tunnel.id
@@ -1,3 +1,3 @@
1
1
  module Forward
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forward
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-06 00:00:00.000000000 Z
12
+ date: 2012-10-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json