present 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -65,6 +65,7 @@ spec = Gem::Specification.new do |s|
65
65
  s.add_dependency('ncurses')
66
66
  s.add_dependency('text')
67
67
  s.add_dependency('escape')
68
+ s.add_dependency('redgreen')
68
69
  #s.required_ruby_version = '>= 1.8.2'
69
70
 
70
71
  s.files = %w(README ChangeLog Rakefile) +
@@ -9,4 +9,8 @@ opt.banner = "Usage: present [options] file [duration] [page]"
9
9
  opt.on_tail('-v', '--version', 'Show version.'){puts opt.ver; exit}
10
10
  opt.order!(ARGV)
11
11
 
12
- Present.new(*ARGV).start
12
+ if ARGV.empty?
13
+ system $0, '-h'
14
+ else
15
+ Present.new(*ARGV).start
16
+ end
@@ -6,7 +6,7 @@ require 'nkf'
6
6
  require 'present/page'
7
7
 
8
8
  class Present
9
- VERSION = '0.0.2'
9
+ VERSION = '0.0.3'
10
10
  TIOCGWINSZ = 0x5413
11
11
 
12
12
  def initialize(path, timer = 5, page = 1)
@@ -2,4 +2,8 @@ require File.dirname(__FILE__) + '/test_helper.rb'
2
2
 
3
3
  require "test/unit"
4
4
  class PresentTest < Test::Unit::TestCase
5
+ def test_run
6
+ bin = File.join(File.dirname(__FILE__), '..', 'bin', 'present')
7
+ assert system("#{bin} 2>&1 > /dev/null")
8
+ end
5
9
  end
@@ -1,3 +1,5 @@
1
1
  require 'test/unit'
2
2
  require File.dirname(__FILE__) + '/../lib/present'
3
+ require 'rubygems'
4
+ require 'redgreen'
3
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: present
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Takiuchi
@@ -42,6 +42,16 @@ dependencies:
42
42
  - !ruby/object:Gem::Version
43
43
  version: "0"
44
44
  version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: redgreen
47
+ type: :runtime
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: "0"
54
+ version:
45
55
  description: Presentation tool for terminal.
46
56
  email: genki@s21g.com
47
57
  executables: