shelly 0.1.5 → 0.1.6

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.
@@ -260,12 +260,17 @@ We have been notified about it. We will be adding new resources shortly}
260
260
  desc "logs", "Show latest application logs"
261
261
  method_option :cloud, :type => :string, :aliases => "-c", :desc => "Specify cloud"
262
262
  method_option :limit, :type => :numeric, :aliases => "-n", :desc => "Amount of messages to show"
263
+ method_option :from, :type => :string, :desc => "Time from which to find the logs"
263
264
  method_option :tail, :type => :boolean, :aliases => "-f", :desc => "Show new logs automatically"
264
265
  def logs
265
266
  cloud = options[:cloud]
266
267
  app = multiple_clouds(cloud, "logs")
267
268
  begin
268
- logs = app.application_logs(:limit => options[:limit])
269
+ limit = options[:limit].to_i <= 0 ? 100 : options[:limit]
270
+ query = {:limit => limit}
271
+ query.merge!(:from => options[:from]) if options[:from]
272
+
273
+ logs = app.application_logs(query)
269
274
  print_logs(logs)
270
275
 
271
276
  if options[:tail]
@@ -1,3 +1,3 @@
1
1
  module Shelly
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -60,6 +60,7 @@ OUT
60
60
  out.should include("-c, [--cloud=CLOUD] # Specify cloud")
61
61
  out.should include("-n, [--limit=N] # Amount of messages to show")
62
62
  out.should include("-f, [--tail] # Show new logs automatically")
63
+ out.should include("[--from=FROM] # Time from which to find the logs")
63
64
  out.should include("[--debug] # Show debug information")
64
65
  end
65
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shelly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
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-05-18 00:00:00.000000000 Z
12
+ date: 2012-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -323,7 +323,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
323
323
  version: '0'
324
324
  segments:
325
325
  - 0
326
- hash: -1197784161471078284
326
+ hash: -403961491533422523
327
327
  required_rubygems_version: !ruby/object:Gem::Requirement
328
328
  none: false
329
329
  requirements:
@@ -332,7 +332,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
332
332
  version: '0'
333
333
  segments:
334
334
  - 0
335
- hash: -1197784161471078284
335
+ hash: -403961491533422523
336
336
  requirements: []
337
337
  rubyforge_project: shelly
338
338
  rubygems_version: 1.8.23