logs-cf-plugin 0.0.23.pre → 0.0.24.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTI0ZDYyMGIwNjE4YTMwZjhmYWFlMDNmOTg5NmFmZGMyM2E0MjhkYQ==
4
+ NDA3NzFjNjIxMDIwOTU1Mjg4NjI5MWM5NjYzMGUxMzBhZjU1MjY2OA==
5
5
  data.tar.gz: !binary |-
6
- NGI4NDQxYTUxYmM3Njc3MTBkZDVmNGI2YzM2NGY3NDYwZjY2ZTMzNw==
6
+ YWE4NWY4MDVjYzNiYzkzMjIxOTI4YzI5OTY0NzBhYmJlZmQ3ZjJmZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NmYwNjE5NWE0MjRhMzBjZDBlYmVkM2FiZjg5OGMwYzZiNDE4ZjUxODQ1YTU0
10
- NDBlZTNhM2RmNWMxYWRkZTBkZjU0YTllMTI5NTkzODc4YTY2ZjYyMTUzOGFm
11
- YWQ0MTFjMmQyZjhhOGE4ZGRlMjE2OWQ0NWViMGY4MjYzNGZlMzE=
9
+ NzdjMDVjYzQzMDZhZTgwOTg1MDQzODMyN2EyOTNkNWFmZjRjZGE3MzNjNzQ2
10
+ NDYxODVjZTI0ODQ3ZTZkMTQ0Nzg4M2IwNjU5MzQyYjBiMzJiMTViZjdlOGIw
11
+ NmZjMWI0YmJkMjI5ODYzYzM4ZmRkZDE4YTFiMzEyNTAyNzI1ZTU=
12
12
  data.tar.gz: !binary |-
13
- MmUyMWRkNDc5ZTFhMGRiMDM5NmI1M2EzMDE4ZWMzZDc3NGYyZjc5MTJkMDkw
14
- NzdiNDgzNjU5NmYxYzI2OTk0MmQ4N2M3NTEyMDIyZTgyNWExMjUyMmFkZDQx
15
- ZWM5NGI2MTZjY2E1NmY2Mjg4ZjVhZDJiZWFkOGVmZDZmNGYxYmY=
13
+ ZDZiNjMxNDc4YmEzOGI1Y2Q4N2E1MTQ3ODk0MzdhYmQ3MzdhMDYwMTJlZjA3
14
+ NzY3YmNmNzNjMzRhYzY3NTY1OWFjYzFjZmI3ZjZiMzRiMWI2NmU1OGE3ODU1
15
+ MTZjOWU2MjE0MzM2OTJiMzA5N2FjYTAzZDdkZDcyNGFjZjBkY2I=
data/README.md CHANGED
@@ -18,6 +18,7 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
+
21
22
  After installing you can run cf logs and see your application's logs stream to the console.
22
23
 
23
24
  ## Contributing
@@ -29,8 +29,12 @@ module LogsCfPlugin
29
29
  end
30
30
 
31
31
  ws.on :message do |event|
32
- received_message = LogMessage.decode(event.data.pack("C*"))
33
- MessageWriter.write(output, received_message)
32
+ begin
33
+ received_message = LogMessage.decode(event.data.pack("C*"))
34
+ MessageWriter.write(output, received_message)
35
+ rescue Beefcake::Message::WrongTypeError, Beefcake::Message::RequiredFieldNotSetError, Beefcake::Message::InvalidValueError
36
+ output.puts("Error parsing data. Please ensure your gem is the latest version.")
37
+ end
34
38
  end
35
39
 
36
40
  ws.on :error do |event|
@@ -89,6 +93,8 @@ module LogsCfPlugin
89
93
  end
90
94
 
91
95
  messages
96
+ rescue Beefcake::Message::WrongTypeError, Beefcake::Message::RequiredFieldNotSetError, Beefcake::Message::InvalidValueError
97
+ output.puts("Error parsing data. Please ensure your gem is the latest version.")
92
98
  end
93
99
 
94
100
  private
@@ -16,6 +16,7 @@ module LogsCfPlugin
16
16
  input :recent, :type => :boolean, :desc => "Dump recent logs instead of tailing", :default => false
17
17
 
18
18
  def logs
19
+ client.current_organization.name # resolve org name so CC will validate AuthToken
19
20
  guids = [client.current_organization.guid, client.current_space.guid, input[:app].try(:guid)]
20
21
 
21
22
  log_target = LogTarget.new(input[:org], input[:space], guids)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logs-cf-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.23.pre
4
+ version: 0.0.24.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pivotal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-12 00:00:00.000000000 Z
11
+ date: 2013-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cf