sekka 1.6.1 → 1.6.2

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: a108787776bb4c040bef99de3012afb6d93f9d78
4
- data.tar.gz: 97bf95254efdc53092f53da5abd9df9cd41a1367
3
+ metadata.gz: 2887ee7935af58c6a120baa0a4c5c2a0cbb45f36
4
+ data.tar.gz: f176b203351a4a5e239680aad03b7da0bd8e1472
5
5
  SHA512:
6
- metadata.gz: a322326b0b334e5aed6dc6ff67970b0c27ae86bc8209418f8d1d2b3d240885a9f4cde7f854dab19723c02b0ba0d8e1018f74a221c1de955649d576c25f5af0d5
7
- data.tar.gz: d280fef49d24019299d72cc11f4e41fc3dc822a9988f5a63e0da288668ae13853a7e8335005fceeb0ca923e2c96c908b13dc6921347c6ec8fef7904f40aae211
6
+ metadata.gz: 0952e5ff9710e90543043ded89983e06b0e2d8d5fc5a130a393fae20e381097c70667f5af9bfcd010fd4fe3a7700bd73579979345b6bf97fd6a73d049360bd12
7
+ data.tar.gz: 4c99ab92b87bd229364548ca39ae726d6658eedeaa74b8799a4598a32f37a4b6463d3733880f9e9fe0bfdceb63057206d2c50332bf2ca0f427a310760c34949c
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 6
4
- :patch: 1
4
+ :patch: 2
@@ -85772,7 +85772,6 @@ zyklus /チクルス/ツィクルス/
85772
85772
  これ> /之/是/此れ;-幸い,-何如に/
85773
85773
  これい /古例/古礼/
85774
85774
  これいじょう /これ以上/
85775
- これお /是雄/
85776
85775
  これかた /是方/
85777
85776
  これき /古暦/
85778
85777
  これさだ /是定/
@@ -165827,7 +165826,6 @@ zyklus /チクルス/ツィクルス/
165827
165826
  ものうち /物打ち/物打/
165828
165827
  ものうらやみ /物羨み/
165829
165828
  ものうり /物売り/
165830
- ものお /桃生/
165831
165829
  ものおき /物置/
165832
165830
  ものおしみ /物惜しみ/
165833
165831
  ものおじ /物怖じ/物怖/
@@ -19644,7 +19644,6 @@
19644
19644
  げるなどして //
19645
19645
  こしたことある //
19646
19646
  こしたりする //
19647
- ことお //
19648
19647
  これまでより //
19649
19648
  ごつい //
19650
19649
  させたりして //
@@ -24206,7 +24205,6 @@
24206
24205
  くらしのなか //
24207
24206
  けていたので //
24208
24207
  けんこう //
24209
- これお //
24210
24208
  ころしあむ //
24211
24209
  させようして //
24212
24210
  させられたため //
@@ -78,8 +78,6 @@ sur /する/
78
78
  という //
79
79
  しかし //
80
80
  ための /ための/
81
- ことを /ことを/
82
- これを /これを/
83
81
  からの /からの/
84
82
  なったので //
85
83
  だけなので //
data/emacs/sekka.el CHANGED
@@ -3,7 +3,7 @@
3
3
  ;; Copyright (C) 2010-2014 Kiyoka Nishiyama
4
4
  ;;
5
5
  ;; Author: Kiyoka Nishiyama <kiyoka@sumibi.org>
6
- ;; Version: 1.6.1 ;;SEKKA-VERSION
6
+ ;; Version: 1.6.2 ;;SEKKA-VERSION
7
7
  ;; Keywords: ime, skk, japanese
8
8
  ;; Package-Requires: ((cl-lib "0.3") (concurrent "0.3.1") (popup "0.5.2"))
9
9
  ;; URL: https://github.com/kiyoka/sekka
@@ -1756,7 +1756,7 @@ point から行頭方向に同種の文字列が続く間を漢字変換しま
1756
1756
  (setq default-input-method "japanese-sekka")
1757
1757
 
1758
1758
  (defconst sekka-version
1759
- "1.6.1" ;;SEKKA-VERSION
1759
+ "1.6.2" ;;SEKKA-VERSION
1760
1760
  )
1761
1761
  (defun sekka-version (&optional arg)
1762
1762
  "入力モード変更"
data/lib/sekka/henkan.nnd CHANGED
@@ -2,7 +2,7 @@
2
2
  ;;;
3
3
  ;;; henkan.nnd - 変換エンジンのコア
4
4
  ;;;
5
- ;;; Copyright (c) 2010 Kiyoka Nishiyama <kiyoka@sumibi.org>
5
+ ;;; Copyright (c) 2015 Kiyoka Nishiyama <kiyoka@sumibi.org>
6
6
  ;;;
7
7
  ;;; Redistribution and use in source and binary forms, with or without
8
8
  ;;; modification, are permitted provided that the following conditions
@@ -387,7 +387,7 @@
387
387
 
388
388
  ;; conversion #f => nil for EmacsLisp
389
389
  (define (sekkaHenkan userid kvs cachesv keyword limit roman-method)
390
- (define cache-exp-second (* 60 60))
390
+ (define cache-exp-second (* 10 60))
391
391
  (let* ((keyword (keyword.strip))
392
392
  (sekka-keyword (+ "sekka:" roman-method ":" (limit.to_s) ":" keyword)))
393
393
  (if-let1 fetched (and cachesv
@@ -1,4 +1,4 @@
1
1
  class SekkaVersion
2
- def self.version() "1.6.1" end
2
+ def self.version() "1.6.2" end
3
3
  def self.dictVersion() "1.6.0" end
4
4
  end
data/lib/sekkaserver.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # sekkaserver.rb - "a sekka server"
5
5
  #
6
- # Copyright (c) 2010 Kiyoka Nishiyama <kiyoka@sumibi.org>
6
+ # Copyright (c) 2015 Kiyoka Nishiyama <kiyoka@sumibi.org>
7
7
  #
8
8
  # Redistribution and use in source and binary forms, with or without
9
9
  # modification, are permitted provided that the following conditions
@@ -60,10 +60,12 @@ module SekkaServer
60
60
  @core.evalStr( "(use sekka.henkan)" )
61
61
  @core.evalStr( '(define (writeToString sexp) (write-to-string sexp))' )
62
62
  @core.evalStr( '(export-to-ruby writeToString)' )
63
- (@kvs,@cachesv) = @core.openSekkaJisyo( SekkaServer::Config.dictType,
64
- SekkaServer::Config.dictSource,
65
- SekkaServer::Config.cacheSource )
66
-
63
+ (@kvs,@initialCachesv) = @core.openSekkaJisyo( SekkaServer::Config.dictType,
64
+ SekkaServer::Config.dictSource,
65
+ SekkaServer::Config.cacheSource )
66
+ @cachesv = @initialCachesv
67
+ @downTime = DateTime.now
68
+
67
69
  version = @kvs.get( "SEKKA:VERSION" )
68
70
  if not SekkaVersion.dictVersion == version
69
71
  STDERR.printf( "Sekka Error: require dict version [%s] but got [%s].\n", SekkaVersion.dictVersion, version )
@@ -166,6 +168,8 @@ module SekkaServer
166
168
  else
167
169
  case req.request_method
168
170
  when 'POST'
171
+ revertMemcache()
172
+
169
173
  userid = URI.decode( req.params['userid'].force_encoding("UTF-8") )
170
174
  format = URI.decode( req.params['format'].force_encoding("UTF-8") )
171
175
  case req.path
@@ -183,12 +187,16 @@ module SekkaServer
183
187
  end
184
188
  rescue MemCache::MemCacheError
185
189
  result = "sekka-server: memcached server is down (or may be offline)"
190
+ disableMemcache()
186
191
  rescue Timeout
187
- result = "sekka-server: Timeout to request memcached server #{_orRedis} (may be offline)"
192
+ result = "sekka-server: Timeout to request memcached server #{_orRedis} (or may be offline)"
193
+ disableMemcache()
188
194
  rescue SocketError
189
- result = "sekka-server: SocketError to request memcached server #{_orRedis} (may be offline)"
195
+ result = "sekka-server: SocketError to request memcached server #{_orRedis} (or may be offline)"
196
+ disableMemcache()
190
197
  rescue Errno::ECONNREFUSED
191
- result = "sekka-server: ConnectionRefused to request memcached server #{_orRedis} (may be offline)"
198
+ result = "sekka-server: ConnectionRefused to request memcached server #{_orRedis} (or may be offline)"
199
+ disableMemcache()
192
200
  end
193
201
  }
194
202
  when "/kakutei"
@@ -234,5 +242,22 @@ module SekkaServer
234
242
  }
235
243
  res.finish
236
244
  end
245
+
246
+ def revertMemcache()
247
+ now = DateTime.now
248
+ ## STDERR.printf( "Sekka Debug: [%d]/[%d]\n", @downTime.to_time.to_i, now.to_time.to_i )
249
+ if not @cachesv
250
+ if (@downTime.to_time.to_i + (10 * 60)) < now.to_time.to_i
251
+ @cachesv = @initialCachesv
252
+ STDERR.printf( "Sekka Info: revert using memcache server. [%s]\n", @downTime )
253
+ end
254
+ end
255
+ end
256
+
257
+ def disableMemcache()
258
+ @cachesv = false
259
+ @downTime = DateTime.now
260
+ STDERR.printf( "Sekka Warning: disabled using memcache server. [%s]\n", @downTime )
261
+ end
237
262
  end
238
263
  end
@@ -1 +1 @@
1
- 64aa1cf5d25a3e01a5a4b3b81c5172cd ./data/SEKKA-JISYO-1.6.0.N.tsv
1
+ 5c3b25121494df59d27397b588534e16 ./data/SEKKA-JISYO-1.6.0.N.tsv
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.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kiyoka Nishiyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-18 00:00:00.000000000 Z
11
+ date: 2015-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -149,7 +149,6 @@ files:
149
149
  - data/.gitignore
150
150
  - data/MY-JISYO.hira-kata
151
151
  - data/SEKKA-JISYO.S.201001
152
- - data/SKK-JISYO.L.201008
153
152
  - data/SKK-JISYO.L.201501
154
153
  - data/SKK-JISYO.L.hira-kata
155
154
  - data/SKK-JISYO.S.201001