ddbcli 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/bin/ddbcli CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
3
3
 
4
- Version = '0.2.2'
4
+ Version = '0.2.3'
5
5
 
6
6
  HISTORY_FILE = File.join((ENV['HOME'] || ENV['USERPROFILE'] || '.'), '.ddbcli_history')
7
7
  HISTSIZE = 500
@@ -1,6 +1,6 @@
1
1
  require 'tempfile'
2
2
 
3
- def print_help
3
+ def print_help(options = {})
4
4
  doc =<<EOS
5
5
  ##### Query #####
6
6
 
@@ -130,12 +130,16 @@ Shell
130
130
 
131
131
  EOS
132
132
 
133
- Tempfile.open("ddbcli.#{$$}.#{Time.now.to_i}") do |f|
134
- f.puts(doc)
135
- f.flush
133
+ if options[:pagerize]
134
+ Tempfile.open("ddbcli.#{$$}.#{Time.now.to_i}") do |f|
135
+ f.puts(doc)
136
+ f.flush
136
137
 
137
- unless system("less #{f.path}")
138
- puts doc
138
+ unless system("less #{f.path}")
139
+ puts doc
140
+ end
139
141
  end
142
+ else
143
+ puts doc
140
144
  end
141
145
  end
@@ -46,8 +46,6 @@ def parse_options
46
46
 
47
47
  opt.on('-h', '--help') {
48
48
  puts opt.help
49
- puts
50
- print_help
51
49
  exit
52
50
  }
53
51
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddbcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: