Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
2 parents 490a92f + ba550f5 commit a431c5df2dbb11965b60aa9367966c7282f94dd9 @ongaeshi committed Jul 31, 2011
Showing with 18 additions and 5 deletions.
  1. +4 −0 HISTORY.rdoc
  2. +1 −1 VERSION
  3. +1 −1 bin/milk
  4. +11 −2 lib/milkode/cdstk/cdstk.rb
  5. +1 −1 lib/milkode/cdweb/app.rb
View
@@ -1,3 +1,7 @@
+=== 0.1.4 2011/08/01
+
+* To act reasonably even if it fails to require 'readline'.
+
=== 0.1.3 2011/07/30
* Change Icon.
View
@@ -1 +1 @@
-0.1.3
+0.1.4
View
@@ -6,5 +6,5 @@
require 'rubygems'
require 'milkode/cdstk/cli_cdstk'
-Version = "0.1.3"
+Version = "0.1.4"
Milkode::CLI_Cdstk.execute(STDOUT, ARGV)
View
@@ -11,7 +11,11 @@
require 'milkode/common/util'
include Milkode
require 'kconv'
-require 'readline'
+begin
+ require 'readline'
+rescue LoadError
+ $no_readline = true
+end
require 'milkode/cdweb/lib/database'
require 'open-uri'
@@ -200,7 +204,12 @@ def remove(args, options)
end
def yes_or_no(msg)
- @out.puts msg
+ if ($no_readline)
+ @out.puts "Pass Cdstk#yes_or_no, because fail \"require 'readline'\"."
+ return true
+ end
+
+ @out.puts msg
while buf = Readline.readline("> ")
case buf
when 'yes'
View
@@ -18,7 +18,7 @@
set :haml, :format => :html5
get '/' do
- @version = "0.1.3"
+ @version = "0.1.4"
@package_num = Database.instance.fileList('').size
@file_num = Database.instance.fileNum
haml :index

0 comments on commit a431c5d

Please sign in to comment.