Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'develop'

Conflicts:
	milkode.gemspec
  • Loading branch information...
commit be4ccea58c3cb6b81444b6c9f4ab4216f4d4848e 2 parents c2d1015 + 2e774cd
@ongaeshi authored
View
1  Rakefile
@@ -20,6 +20,7 @@ Jeweler::Tasks.new do |gem|
gem.description = %Q{Line based local source code search engine & web-app.}
gem.email = "ongaeshi0621@gmail.com"
gem.authors = ["ongaeshi"]
+ gem.files = FileList['lib/**/*.rb', 'bin/*', '[A-Z]*', 'test/**/*', 'vendor/**/*.rb'].to_a
# Include your dependencies below. Runtime dependencies are required when using your gem,
gem.add_runtime_dependency 'termcolor','>= 1.2.0'
View
2  VERSION
@@ -1 +1 @@
-0.1.7
+0.1.8
View
2  bin/milk
@@ -6,5 +6,5 @@
require 'rubygems'
require 'milkode/cdstk/cli_cdstk'
-Version = "0.1.7"
+Version = "0.1.8"
Milkode::CLI_Cdstk.execute(STDOUT, ARGV)
View
2  lib/milkode/cdweb/app.rb
@@ -18,7 +18,7 @@
set :haml, :format => :html5
get '/' do
- @version = "0.1.7"
+ @version = "0.1.8"
@package_num = Database.instance.fileList('').size
@file_num = Database.instance.fileNum
haml :index
View
37 lib/milkode/common/archive-zip.rb
@@ -1,42 +1,9 @@
# -*- coding: utf-8 -*-
#
# @file
-# @brief archive-zipがRuby1.9.2に対応するまでのパッチ、readbytesが無ければ実装する
+# @brief archive-zipがRuby1.9.2に対応するまでのパッチ
# @author ongaeshi
# @date 2011/08/04
-begin
- require 'readbytes'
-rescue LoadError
- # for Ruby 1.9.2
- class TruncatedDataError<IOError
- def initialize(mesg, data) # :nodoc:
- @data = data
- super(mesg)
- end
-
- # The read portion of an IO#readbytes attempt.
- attr_reader :data
- end
-
- class IO
- # Reads exactly +n+ bytes.
- #
- # If the data read is nil an EOFError is raised.
- #
- # If the data read is too short a TruncatedDataError is raised and the read
- # data is obtainable via its #data method.
- def readbytes(n)
- str = read(n)
- if str == nil
- raise EOFError, "End of file reached"
- end
- if str.size < n
- raise TruncatedDataError.new("data truncated", str)
- end
- str
- end
- end
-end
-
+$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '../../../vendor')
require 'archive/zip'
View
54 milkode.gemspec
@@ -5,20 +5,19 @@
Gem::Specification.new do |s|
s.name = %q{milkode}
- s.version = "0.1.7"
+ s.version = "0.1.8"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = [%q{ongaeshi}]
- s.date = %q{2011-08-03}
+ s.authors = ["ongaeshi"]
+ s.date = %q{2011-08-04}
s.description = %q{Line based local source code search engine & web-app.}
s.email = %q{ongaeshi0621@gmail.com}
- s.executables = [%q{cdv}, %q{cdview}, %q{milk}]
+ s.executables = ["cdv", "milk", "cdview"]
s.extra_rdoc_files = [
"LICENSE.txt",
"README.rdoc"
]
s.files = [
- ".document",
"Gemfile",
"Gemfile.lock",
"HISTORY.rdoc",
@@ -36,7 +35,6 @@ Gem::Specification.new do |s|
"lib/milkode/cdview/cli_cdview.rb",
"lib/milkode/cdweb/app.rb",
"lib/milkode/cdweb/cli_cdweb.rb",
- "lib/milkode/cdweb/config.ru",
"lib/milkode/cdweb/lib/coderay_wrapper.rb",
"lib/milkode/cdweb/lib/command.rb",
"lib/milkode/cdweb/lib/database.rb",
@@ -45,17 +43,6 @@ Gem::Specification.new do |s|
"lib/milkode/cdweb/lib/query.rb",
"lib/milkode/cdweb/lib/search_contents.rb",
"lib/milkode/cdweb/lib/search_files.rb",
- "lib/milkode/cdweb/public/css/coderay.css",
- "lib/milkode/cdweb/public/css/gren.css",
- "lib/milkode/cdweb/public/images/MilkodeIcon135.png",
- "lib/milkode/cdweb/public/images/directory.png",
- "lib/milkode/cdweb/public/images/file.png",
- "lib/milkode/cdweb/views/filelist.haml",
- "lib/milkode/cdweb/views/help.haml",
- "lib/milkode/cdweb/views/index.haml",
- "lib/milkode/cdweb/views/layout.haml",
- "lib/milkode/cdweb/views/search.haml",
- "lib/milkode/cdweb/views/view.haml",
"lib/milkode/common/archive-zip.rb",
"lib/milkode/common/dbdir.rb",
"lib/milkode/common/dir.rb",
@@ -67,7 +54,6 @@ Gem::Specification.new do |s|
"lib/milkode/common/util.rb",
"lib/milkode/findgrep/findgrep.rb",
"lib/milkode/findgrep/result.rb",
- "milkode.gemspec",
"test/data/abc.zip",
"test/data/nodir_abc.zip",
"test/data/nodir_abc_xpi.xpi",
@@ -88,18 +74,40 @@ Gem::Specification.new do |s|
"test/test_mkurl.rb",
"test/test_query.rb",
"test/test_string_snip.rb",
- "test/test_util.rb"
+ "test/test_util.rb",
+ "vendor/archive/support/io.rb"
]
s.homepage = %q{http://github.com/ongaeshi/milkode}
- s.licenses = [%q{MIT}]
- s.require_paths = [%q{lib}]
- s.rubygems_version = %q{1.8.6}
+ s.licenses = ["MIT"]
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.3.6}
s.summary = %q{Line based local source code search engine & web-app.}
+ s.test_files = [
+ "test/file_assert.rb",
+ "test/file_test_utils.rb",
+ "test/rake_test_loader.rb",
+ "test/runner.rb",
+ "test/test_bin_exec.rb",
+ "test/test_cdstk.rb",
+ "test/test_cdstk_yaml.rb",
+ "test/test_coderay_wrapper.rb",
+ "test/test_coderay_wrapper_data.rb",
+ "test/test_database.rb",
+ "test/test_dbdir.rb",
+ "test/test_dir.rb",
+ "test/test_gren_util.rb",
+ "test/test_helper.rb",
+ "test/test_mkurl.rb",
+ "test/test_query.rb",
+ "test/test_string_snip.rb",
+ "test/test_util.rb"
+ ]
if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
s.add_development_dependency(%q<rcov>, [">= 0"])
View
53 vendor/archive/support/io.rb
@@ -0,0 +1,53 @@
+# -*- coding: utf-8 -*-
+#
+# @file
+# @brief archive-zip/lib/archive/support/io.rb patch, removed in the future.
+# @author ongaeshi
+# @date 2011/08/04
+
+begin
+ require 'readbytes'
+rescue LoadError
+ # for Ruby 1.9.2
+ class TruncatedDataError<IOError
+ def initialize(mesg, data) # :nodoc:
+ @data = data
+ super(mesg)
+ end
+
+ # The read portion of an IO#readbytes attempt.
+ attr_reader :data
+ end
+
+ class IO
+ # Reads exactly +n+ bytes.
+ #
+ # If the data read is nil an EOFError is raised.
+ #
+ # If the data read is too short a TruncatedDataError is raised and the read
+ # data is obtainable via its #data method.
+ def readbytes(n)
+ str = read(n)
+ if str == nil
+ raise EOFError, "End of file reached"
+ end
+ if str.size < n
+ raise TruncatedDataError.new("data truncated", str)
+ end
+ str
+ end
+ end
+end
+
+class IO
+ # Returns +true+ if the seek method of this IO instance would succeed, +false+
+ # otherwise.
+ def seekable?
+ begin
+ pos
+ true
+ rescue SystemCallError
+ false
+ end
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.