Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
2 parents 5a524cd + 6c0b078 commit 0bbed841f8b4d07992028f66dcdce4e7ec6f6af9 @ongaeshi committed Sep 6, 2012
View
15 HISTORY.ja.rdoc
@@ -1,3 +1,18 @@
+=== 0.9.2 2012/09/07
+
+* etc
+ * Add emacs plugin : [ongaeshi/emacs-milkode](https://github.com/ongaeshi/emacs-milkode)
+* milk
+ * Add 'milkode plugins' command
+ * [fatal] already exist 'Documents', [fatal] -> [warning]
+* gmilk
+ * strict_packages に対応
+
+=== 0.9.1.1 2012/08/07
+
+* milk web
+ * WebKitで行番号の表示が崩れてしまう問題を修正
+
=== 0.9.1 2012/08/05
* milk web
View
15 HISTORY.rdoc
@@ -1,3 +1,18 @@
+=== 0.9.2 2012/09/07
+
+* etc
+ * Add emacs plugin : [ongaeshi/emacs-milkode](https://github.com/ongaeshi/emacs-milkode)
+* milk
+ * Add 'milkode plugins' command
+ * [fatal] already exist 'Documents', [fatal] -> [warning]
+* gmilk
+ * Support strict_packages
+
+=== 0.9.1.1 2012/08/07
+
+* milk web
+ * Fixed line numbers will fall apart in WebKit
+
=== 0.9.1 2012/08/05
* milk web
View
2 VERSION
@@ -1 +1 @@
-0.9.1
+0.9.2
View
2 bin/gmilk
@@ -6,5 +6,5 @@
require 'rubygems'
require 'milkode/grep/cli_grep'
-Version = "0.9.1"
+Version = "0.9.2"
Milkode::CLI_Grep.execute(STDOUT, ARGV)
View
2 bin/milk
@@ -6,5 +6,5 @@
require 'rubygems'
require 'milkode/cli'
-Version = "0.9.1"
+Version = "0.9.2"
Milkode::CLI.start(ARGV)
View
8 lib/milkode/cdstk/cdstk.rb
@@ -188,7 +188,7 @@ def add_dir(dir, no_yaml = false)
def add_yaml(package)
# すでに同名パッケージがある
if @yaml.find_name(package.name)
- error_alert("already exist '#{package.name}'.")
+ warning_alert("already exist '#{package.name}'.")
return
end
@@ -949,8 +949,12 @@ def alert_info(title, msg)
alert(title, msg) if @is_display_info
end
+ def warning_alert(msg)
+ @out.puts "[warning] #{msg}"
+ end
+
def error_alert(msg)
- @out.puts "[fatal] #{msg}"
+ @out.puts "[error] #{msg}"
end
def update_display_info(options)
View
2 lib/milkode/cdweb/app.rb
@@ -22,7 +22,7 @@
get '/' do
@setting = WebSetting.new
- @version = "0.9.1"
+ @version = "0.9.2"
@package_num = Database.instance.yaml_package_num
@file_num = Database.instance.totalRecords
@package_list = PackageList.new(Database.instance.grndb)
View
4 lib/milkode/cdweb/public/css/milkode.css
@@ -42,6 +42,10 @@ div.pagination {
margin-bottom: 20px;
}
+pre {
+ white-space: pre;
+}
+
pre.lines {
border: 1px solid #dedede;
margin-bottom: 5px;
View
10 lib/milkode/cli.rb
@@ -163,6 +163,16 @@ def grep(*args)
Milkode::CLI_Grep.execute($stdout, args)
end
+ desc "plugins", "Display plugins"
+ long_desc "Display plugin list."
+ def plugins(*args)
+ $stdout.puts <<EOF
+Gitomb https://github.com/tomykaira/gitomb
+redmine_milkode https://github.com/suer/redmine_milkode
+emacs-milkode https://github.com/ongaeshi/emacs-milkode
+EOF
+ end
+
# --------------------------------------------------------------------------
no_tasks do
View
3 lib/milkode/findgrep/findgrep.rb
@@ -24,6 +24,7 @@ class FindGrep
:isSilent,
:debugMode,
:packages,
+ :strict_packages,
:filePatterns,
:suffixs,
:ignoreFiles,
@@ -51,6 +52,7 @@ class FindGrep
[],
[],
[],
+ [],
Platform.get_shell_kcode,
false,
nil,
@@ -212,6 +214,7 @@ def searchDatabase
:keywords => @option.keywords,
:paths => @option.filePatterns,
:packages => @option.packages,
+ :strict_packages => @option.strict_packages,
# :restpaths => ,
:suffixs => @option.suffixs
# :offset => ,
View
20 lib/milkode/grep/cli_grep.rb
@@ -20,8 +20,12 @@ def self.execute(stdout, arguments=[])
my_option = {}
my_option[:packages] = []
+ # current dir's package
+ current_package = nil
+ current_dir = nil
+
begin
- current_dir = package_root_dir(File.expand_path("."))
+ current_package = package_root(File.expand_path("."))
rescue NotFoundPackage => e
current_dir = File.expand_path(".")
end
@@ -101,7 +105,9 @@ def self.execute(stdout, arguments=[])
# 現在位置のパッケージを記録
if option.packages.empty? && !my_option[:all] && !is_abs_path
- if (package_dir_in? current_dir)
+ if (current_package)
+ option.strict_packages << current_package.name
+ elsif (package_dir_in? current_dir)
option.filePatterns << current_dir
else
stdout.puts "fatal: Not package dir '#{current_dir}'."
@@ -190,6 +196,16 @@ def self.package_root_dir(dir)
end
end
+ def self.package_root(dir)
+ package_root = yaml_load.package_root(dir)
+
+ if (package_root)
+ package_root
+ else
+ raise NotFoundPackage.new dir
+ end
+ end
+
def self.yaml_load
YamlFileWrapper.load(Dbdir.select_dbdir)
end
View
4 milkode.gemspec
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = %q{milkode}
- s.version = "0.9.1"
+ s.version = "0.9.2"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["ongaeshi"]
- s.date = %q{2012-08-05}
+ s.date = %q{2012-09-07}
s.description = %q{Line based local source code search engine & grep-command & web-app.}
s.email = %q{ongaeshi0621@gmail.com}
s.executables = ["gmilk", "milk"]

0 comments on commit 0bbed84

Please sign in to comment.