sekka 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7f2b64092011062870613c3906c9855418ca0e68
4
- data.tar.gz: f2b131d6ff3d7b7f181a078fac541e03ac6d5b4c
3
+ metadata.gz: 00d097bb5742731c2ba0f3e31fc5b351bbaa8e3f
4
+ data.tar.gz: 97c2a40bab221f79c2f4972f1caa30d219f69388
5
5
  SHA512:
6
- metadata.gz: b5091ad9ac65a240b45208acff8299269cfcf9210c7b95ccb92d61af5c52bc1cb1836201a9b7049c5c044011fcbae4840b5b20c5b140570456ee958de7ab1bc6
7
- data.tar.gz: a782b597e4c870ca2cd3cf7deb32063b6183fe78d8cf0bc01ad54ceb5f2a2cb7905a9bc86ddbfefca0143944c3738a949ef5a89db46fe82583c873e7f251d5a9
6
+ metadata.gz: 2fa69b1b1e4735fe87b07574f75d8480ee0d9ca29560685e85fc85fe63799f4974bd2d8feb415814c91e20714a12ee8b418e512d77920f02dc95b43bcc6d21ed
7
+ data.tar.gz: 3329fd198f1a35fe4556c6d246e655b5607b929a138e1f8c349562ec707f18afa078ee957ca9b8bae478a14673ae53fa816e4833df4f31df3d941b059ba6aa6a
data/Rakefile CHANGED
@@ -55,7 +55,7 @@ begin
55
55
  gemspec.required_ruby_version = '>= 1.9.2'
56
56
  gemspec.add_dependency( "eventmachine" )
57
57
  gemspec.add_dependency( "memcache-client" )
58
- gemspec.add_dependency( "nendo", "= 0.6.4" )
58
+ gemspec.add_dependency( "nendo", "= 0.6.5" )
59
59
  gemspec.add_dependency( "distributed-trie" )
60
60
  gemspec.add_dependency( "rack" )
61
61
  gemspec.add_dependency( "ruby-progressbar" )
@@ -70,7 +70,7 @@ end
70
70
 
71
71
  task :compile do
72
72
  # generate version.rb
73
- dictVersion = "1.3.0"
73
+ dictVersion = "1.3.1"
74
74
  vh = Jeweler::VersionHelper.new "."
75
75
  open( "./lib/sekka/sekkaversion.rb", "w" ) {|f|
76
76
  f.puts( "class SekkaVersion" )
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 2
4
- :patch: 2
4
+ :patch: 3
data/emacs/sekka.el CHANGED
@@ -317,7 +317,7 @@ non-nil で明示的に呼びだすまでGoogleIMEは起動しない。"
317
317
  sekka-server-url-2)
318
318
  (if (< 0 (length sekka-server-url-3))
319
319
  (setq current-sekka-server-url sekka-server-url-3)
320
- (sekka-next-sekka-server-message "third" "sekka-server-url-3")))
320
+ (setq current-sekka-server-url sekka-server-url)))
321
321
  (t
322
322
  (when (< 0 (length sekka-server-url))
323
323
  (setq current-sekka-server-url sekka-server-url)))))
@@ -337,8 +337,9 @@ non-nil で明示的に呼びだすまでGoogleIMEは起動しない。"
337
337
  (defun one-request (func-name arg-alist)
338
338
  (let ((result (sekka-rest-request-sub func-name arg-alist)))
339
339
  (if (or
340
- (string-match-p "^curl: [(]6[)] " result) ;; Couldn't resolve host 'aaa.example.com'
341
- (string-match-p "^curl: [(]7[)] " result) ;; Couldn't connect to host 'localhost'
340
+ (string-match-p "^curl: [(]6[)] " result) ;; Couldn't resolve host 'aaa.example.com'
341
+ (string-match-p "^curl: [(]7[)] " result) ;; Couldn't connect to host 'localhost'
342
+ (string-match-p "^curl: [(]28[)] " result) ;; Operation timed out after XXXX milliseconds with 0 bytes received
342
343
  )
343
344
  (progn
344
345
  (sekka-next-sekka-server)
@@ -1620,7 +1621,7 @@ point から行頭方向に同種の文字列が続く間を漢字変換しま
1620
1621
  (setq default-input-method "japanese-sekka")
1621
1622
 
1622
1623
  (defconst sekka-version
1623
- "1.2.2" ;;SEKKA-VERSION
1624
+ "1.2.3" ;;SEKKA-VERSION
1624
1625
  )
1625
1626
  (defun sekka-version (&optional arg)
1626
1627
  "入力モード変更"
@@ -105,9 +105,6 @@
105
105
  ((not fields)
106
106
  ;; フォーマットエラー
107
107
  #f)
108
- ((rxmatch #/\;\;/ line)
109
- ;; フォーマットエラー
110
- #f)
111
108
  ((and (is-hiragana (first fields))
112
109
  (= 1 (length fields)))
113
110
  ;; 平仮名フレーズ
@@ -126,16 +126,20 @@
126
126
  (length okuri-ari-list)
127
127
  (length okuri-nashi-list)
128
128
  (length hiragana-phrase-list))))))
129
+ (set! keylist '()) ;; free memory
129
130
 
130
131
  (let1 trie (DistributedTrie::Trie.new kvs (+ okuri-ari-prefix ":" userid ":"))
131
132
  (trie-add-autocommit trie okuri-ari-list progress))
133
+ (set! okuri-ari-list '()) ;; free memory
132
134
 
133
135
  (let1 trie (DistributedTrie::Trie.new kvs (+ okuri-nashi-prefix ":" userid ":"))
134
136
  (trie-add-autocommit trie okuri-nashi-list progress))
137
+ (set! okuri-nashi-list '()) ;; free memory
135
138
 
136
139
  (let1 trie (DistributedTrie::Trie.new kvs (+ hiragana-phrase-prefix ":" userid ":"))
137
- (trie-add-autocommit trie hiragana-phrase-list progress)))))
138
-
140
+ (trie-add-autocommit trie hiragana-phrase-list progress))
141
+ (set! hiragana-phrase-list '()) ;; free memory
142
+ )))
139
143
 
140
144
  (define (append-entry userid kvs _key value)
141
145
  (let1 key (+ userid ":" _key)
@@ -1,4 +1,4 @@
1
1
  class SekkaVersion
2
- def self.version() "1.2.2" end
3
- def self.dictVersion() "1.3.0" end
2
+ def self.version() "1.2.3" end
3
+ def self.dictVersion() "1.3.1" end
4
4
  end
data/lib/sekkaconfig.rb CHANGED
@@ -72,6 +72,10 @@ module SekkaServer
72
72
  def self.proxyPort
73
73
  @@proxyPort
74
74
  end
75
+
76
+ def self.maxQueryLength
77
+ 25
78
+ end
75
79
  end
76
80
  end
77
81
 
data/lib/sekkaserver.rb CHANGED
@@ -77,6 +77,7 @@ module SekkaServer
77
77
  STDERR.printf( " listenPort : %s\n", SekkaServer::Config.listenPort )
78
78
  STDERR.printf( " proxyHost : %s\n", SekkaServer::Config.proxyHost )
79
79
  STDERR.printf( " proxyPort : %s\n", SekkaServer::Config.proxyPort )
80
+ STDERR.printf( " maxQueryLength : %s\n", SekkaServer::Config.maxQueryLength )
80
81
  STDERR.puts( "--------------------------------" )
81
82
 
82
83
  begin
@@ -160,9 +161,13 @@ module SekkaServer
160
161
  _orRedis = if :redis == SekkaServer::Config.dictType then "or Redis-server" else "" end
161
162
  @mutex.synchronize {
162
163
  begin
163
- @core.writeToString( @core.sekkaHenkan( userid, @kvs, @cachesv, _yomi, _limit.to_i, _method ))
164
+ if SekkaServer::Config.maxQueryLength < _yomi.size
165
+ result = sprintf( "sekka-server: query string is too long (over %d character length)", SekkaServer::Config.maxQueryLength )
166
+ else
167
+ @core.writeToString( @core.sekkaHenkan( userid, @kvs, @cachesv, _yomi, _limit.to_i, _method ))
168
+ end
164
169
  rescue MemCache::MemCacheError
165
- "sekka-server: memcached server is down (or may be offline)"
170
+ result = "sekka-server: memcached server is down (or may be offline)"
166
171
  rescue Timeout
167
172
  result = "sekka-server: Timeout to request memcached server #{_orRedis} (may be offline)"
168
173
  rescue SocketError
@@ -1335,4 +1335,4 @@ M:みr /見/観;(字義:みわたす)/視;(字義:じっとみる)/診;(diagnose
1335
1335
  M:わけ /訳/和気;地名/理由;当て字/分け/分/譯;「訳」の旧字/戯奴
1336
1336
  M:わたしh /私
1337
1337
  M:を /小/緒/雄/男/牡/尾/悪/汚/惡;「悪」の旧字(人名用漢字)
1338
- SEKKA:VERSION 1.3.0
1338
+ SEKKA:VERSION 1.3.1
@@ -48,4 +48,3 @@ wake /ウェイク/
48
48
  んん //
49
49
  ;; くみこむ ("動詞" "自立")
50
50
  くみこむ //
51
- くみこむ // ;; くみこむ ("動詞" "自立")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sekka
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kiyoka Nishiyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-24 00:00:00.000000000 Z
11
+ date: 2013-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.6.4
47
+ version: 0.6.5
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.6.4
54
+ version: 0.6.5
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: distributed-trie
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: 0.6.4
131
+ version: 0.6.5
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - '='
137
137
  - !ruby/object:Gem::Version
138
- version: 0.6.4
138
+ version: 0.6.5
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: distributed-trie
141
141
  requirement: !ruby/object:Gem::Requirement