logaling-command 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ = 0.2.3 / 2013-1-25
2
+ * rroonga 2.1.0 と互換性のないAPIの問題を修正しました
3
+
1
4
  = 0.2.2 / 2012-12-25
2
5
  * 内部構造の見直し
3
6
 
@@ -17,6 +17,6 @@
17
17
 
18
18
  module Logaling
19
19
  module Command
20
- VERSION = "0.2.2"
20
+ VERSION = "0.2.3"
21
21
  end
22
22
  end
@@ -130,6 +130,7 @@ module Logaling
130
130
  {:key=>"glossary", :order=>'ascending'},
131
131
  {:key=>"source_term", :order=>'ascending'},
132
132
  {:key=>"target_term", :order=>'ascending'}])
133
+ records = records.collect {|record| record.value }
133
134
 
134
135
  options = {:width => 5000,
135
136
  :html_escape => true,
@@ -161,6 +162,7 @@ module Logaling
161
162
  {:key=>"_score", :order=>'descending'},
162
163
  {:key=>"source_term", :order=>'ascending'},
163
164
  {:key=>"target_term", :order=>'ascending'}])
165
+ records = records.collect {|record| record.value }
164
166
 
165
167
  options = {:width => 5000,
166
168
  :html_escape => true,
@@ -192,6 +194,7 @@ module Logaling
192
194
  {:key => "source_term", :order => order},
193
195
  {:key => "target_term", :order => order}
194
196
  ])
197
+ records = records.collect {|record| record.value }
195
198
 
196
199
  struct_result(records)
197
200
  end
@@ -227,9 +230,11 @@ module Logaling
227
230
  end
228
231
 
229
232
  def get_all_glossary_sources
230
- source_paths = Groonga["glossary_sources"].sort([
233
+ records = Groonga["glossary_sources"].sort([
231
234
  {:key=>"_key", :order=>'ascending'}
232
- ]).map{|record| [record.key, record.project_type]}
235
+ ])
236
+ records = records.collect {|record| record.value }
237
+ source_paths = records.map{|record| [record.key, record.project_type]}
233
238
  source_paths.map do |source_path, project_type|
234
239
  glossary_name, source_language, target_language = File.basename(source_path).split(/\./)
235
240
  project = Logaling.const_get(project_type).new(Logaling::Project.find_path(source_path))
@@ -246,9 +251,11 @@ module Logaling
246
251
  end
247
252
 
248
253
  def get_all_glossary
249
- Groonga["glossaries"].sort([
254
+ records = Groonga["glossaries"].sort([
250
255
  {:key=>"_key", :order=>'ascending'}
251
- ]).map{|record| record.key}
256
+ ])
257
+ records = records.collect {|record| record.value }
258
+ records.map{|record| record.key}
252
259
  end
253
260
 
254
261
  private
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
38
38
 
39
39
  s.add_runtime_dependency 'thor', ['>= 0.14.6']
40
40
  s.add_runtime_dependency 'bundler', ['>= 1.0']
41
- s.add_runtime_dependency 'rroonga', ['>= 2.0.3']
41
+ s.add_runtime_dependency 'rroonga', ['>= 2.1.0']
42
42
  s.add_runtime_dependency 'rainbow'
43
43
  s.add_runtime_dependency 'nokogiri'
44
44
  s.add_runtime_dependency 'activesupport'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logaling-command
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2012-12-25 00:00:00.000000000 Z
16
+ date: 2013-01-25 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: thor
@@ -54,7 +54,7 @@ dependencies:
54
54
  requirements:
55
55
  - - ! '>='
56
56
  - !ruby/object:Gem::Version
57
- version: 2.0.3
57
+ version: 2.1.0
58
58
  type: :runtime
59
59
  prerelease: false
60
60
  version_requirements: !ruby/object:Gem::Requirement
@@ -62,7 +62,7 @@ dependencies:
62
62
  requirements:
63
63
  - - ! '>='
64
64
  - !ruby/object:Gem::Version
65
- version: 2.0.3
65
+ version: 2.1.0
66
66
  - !ruby/object:Gem::Dependency
67
67
  name: rainbow
68
68
  requirement: !ruby/object:Gem::Requirement