milkode 0.9.1.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,18 @@
1
+ === 0.9.2 2012/09/07
2
+
3
+ * etc
4
+ * Add emacs plugin : [ongaeshi/emacs-milkode](https://github.com/ongaeshi/emacs-milkode)
5
+ * milk
6
+ * Add 'milkode plugins' command
7
+ * [fatal] already exist 'Documents', [fatal] -> [warning]
8
+ * gmilk
9
+ * strict_packages に対応
10
+
11
+ === 0.9.1.1 2012/08/07
12
+
13
+ * milk web
14
+ * WebKitで行番号の表示が崩れてしまう問題を修正
15
+
1
16
  === 0.9.1 2012/08/05
2
17
 
3
18
  * milk web
@@ -1,3 +1,18 @@
1
+ === 0.9.2 2012/09/07
2
+
3
+ * etc
4
+ * Add emacs plugin : [ongaeshi/emacs-milkode](https://github.com/ongaeshi/emacs-milkode)
5
+ * milk
6
+ * Add 'milkode plugins' command
7
+ * [fatal] already exist 'Documents', [fatal] -> [warning]
8
+ * gmilk
9
+ * Support strict_packages
10
+
11
+ === 0.9.1.1 2012/08/07
12
+
13
+ * milk web
14
+ * Fixed line numbers will fall apart in WebKit
15
+
1
16
  === 0.9.1 2012/08/05
2
17
 
3
18
  * milk web
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.1.1
1
+ 0.9.2
data/bin/gmilk CHANGED
@@ -6,5 +6,5 @@
6
6
  require 'rubygems'
7
7
  require 'milkode/grep/cli_grep'
8
8
 
9
- Version = "0.9.1"
9
+ Version = "0.9.2"
10
10
  Milkode::CLI_Grep.execute(STDOUT, ARGV)
data/bin/milk CHANGED
@@ -6,5 +6,5 @@
6
6
  require 'rubygems'
7
7
  require 'milkode/cli'
8
8
 
9
- Version = "0.9.1"
9
+ Version = "0.9.2"
10
10
  Milkode::CLI.start(ARGV)
@@ -188,7 +188,7 @@ module Milkode
188
188
  def add_yaml(package)
189
189
  # すでに同名パッケージがある
190
190
  if @yaml.find_name(package.name)
191
- error_alert("already exist '#{package.name}'.")
191
+ warning_alert("already exist '#{package.name}'.")
192
192
  return
193
193
  end
194
194
 
@@ -949,8 +949,12 @@ EOF
949
949
  alert(title, msg) if @is_display_info
950
950
  end
951
951
 
952
+ def warning_alert(msg)
953
+ @out.puts "[warning] #{msg}"
954
+ end
955
+
952
956
  def error_alert(msg)
953
- @out.puts "[fatal] #{msg}"
957
+ @out.puts "[error] #{msg}"
954
958
  end
955
959
 
956
960
  def update_display_info(options)
@@ -22,7 +22,7 @@ set :haml, :format => :html5
22
22
 
23
23
  get '/' do
24
24
  @setting = WebSetting.new
25
- @version = "0.9.1"
25
+ @version = "0.9.2"
26
26
  @package_num = Database.instance.yaml_package_num
27
27
  @file_num = Database.instance.totalRecords
28
28
  @package_list = PackageList.new(Database.instance.grndb)
@@ -163,6 +163,16 @@ EOF
163
163
  Milkode::CLI_Grep.execute($stdout, args)
164
164
  end
165
165
 
166
+ desc "plugins", "Display plugins"
167
+ long_desc "Display plugin list."
168
+ def plugins(*args)
169
+ $stdout.puts <<EOF
170
+ Gitomb https://github.com/tomykaira/gitomb
171
+ redmine_milkode https://github.com/suer/redmine_milkode
172
+ emacs-milkode https://github.com/ongaeshi/emacs-milkode
173
+ EOF
174
+ end
175
+
166
176
  # --------------------------------------------------------------------------
167
177
 
168
178
  no_tasks do
@@ -24,6 +24,7 @@ module FindGrep
24
24
  :isSilent,
25
25
  :debugMode,
26
26
  :packages,
27
+ :strict_packages,
27
28
  :filePatterns,
28
29
  :suffixs,
29
30
  :ignoreFiles,
@@ -51,6 +52,7 @@ module FindGrep
51
52
  [],
52
53
  [],
53
54
  [],
55
+ [],
54
56
  Platform.get_shell_kcode,
55
57
  false,
56
58
  nil,
@@ -212,6 +214,7 @@ module FindGrep
212
214
  :keywords => @option.keywords,
213
215
  :paths => @option.filePatterns,
214
216
  :packages => @option.packages,
217
+ :strict_packages => @option.strict_packages,
215
218
  # :restpaths => ,
216
219
  :suffixs => @option.suffixs
217
220
  # :offset => ,
@@ -20,8 +20,12 @@ module Milkode
20
20
  my_option = {}
21
21
  my_option[:packages] = []
22
22
 
23
+ # current dir's package
24
+ current_package = nil
25
+ current_dir = nil
26
+
23
27
  begin
24
- current_dir = package_root_dir(File.expand_path("."))
28
+ current_package = package_root(File.expand_path("."))
25
29
  rescue NotFoundPackage => e
26
30
  current_dir = File.expand_path(".")
27
31
  end
@@ -101,7 +105,9 @@ EOF
101
105
 
102
106
  # 現在位置のパッケージを記録
103
107
  if option.packages.empty? && !my_option[:all] && !is_abs_path
104
- if (package_dir_in? current_dir)
108
+ if (current_package)
109
+ option.strict_packages << current_package.name
110
+ elsif (package_dir_in? current_dir)
105
111
  option.filePatterns << current_dir
106
112
  else
107
113
  stdout.puts "fatal: Not package dir '#{current_dir}'."
@@ -190,6 +196,16 @@ EOF
190
196
  end
191
197
  end
192
198
 
199
+ def self.package_root(dir)
200
+ package_root = yaml_load.package_root(dir)
201
+
202
+ if (package_root)
203
+ package_root
204
+ else
205
+ raise NotFoundPackage.new dir
206
+ end
207
+ end
208
+
193
209
  def self.yaml_load
194
210
  YamlFileWrapper.load(Dbdir.select_dbdir)
195
211
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{milkode}
8
- s.version = "0.9.1.1"
8
+ s.version = "0.9.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["ongaeshi"]
12
- s.date = %q{2012-08-08}
12
+ s.date = %q{2012-09-07}
13
13
  s.description = %q{Line based local source code search engine & grep-command & web-app.}
14
14
  s.email = %q{ongaeshi0621@gmail.com}
15
15
  s.executables = ["gmilk", "milk"]
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: milkode
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 63
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 1
10
- - 1
11
- version: 0.9.1.1
9
+ - 2
10
+ version: 0.9.2
12
11
  platform: ruby
13
12
  authors:
14
13
  - ongaeshi
@@ -16,7 +15,7 @@ autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2012-08-08 00:00:00 +09:00
18
+ date: 2012-09-07 00:00:00 +09:00
20
19
  default_executable:
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency