enju_question 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. data/lib/enju_question/version.rb +1 -1
  2. data/lib/enju_question.rb +20 -0
  3. data/spec/cassette_library/enju_ndl/crd.yml +95 -8
  4. data/spec/dummy/app/controllers/application_controller.rb +2 -5
  5. data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +31 -10
  6. data/spec/dummy/db/schema.rb +14 -5
  7. data/spec/dummy/db/test.sqlite3 +0 -0
  8. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  9. data/spec/dummy/solr/data/test/index/segments_1 +0 -0
  10. data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
  11. metadata +4 -40
  12. data/spec/dummy/db/development.sqlite3 +0 -0
  13. data/spec/dummy/solr/data/test/index/_0.fdt +0 -0
  14. data/spec/dummy/solr/data/test/index/_0.fdx +0 -0
  15. data/spec/dummy/solr/data/test/index/_0.fnm +0 -3
  16. data/spec/dummy/solr/data/test/index/_0.frq +0 -1
  17. data/spec/dummy/solr/data/test/index/_0.nrm +0 -1
  18. data/spec/dummy/solr/data/test/index/_0.prx +0 -0
  19. data/spec/dummy/solr/data/test/index/_0.tii +0 -0
  20. data/spec/dummy/solr/data/test/index/_0.tis +0 -0
  21. data/spec/dummy/solr/data/test/index/_0_1.del +0 -0
  22. data/spec/dummy/solr/data/test/index/_1.fdt +0 -0
  23. data/spec/dummy/solr/data/test/index/_1.fdx +0 -0
  24. data/spec/dummy/solr/data/test/index/_1.fnm +0 -3
  25. data/spec/dummy/solr/data/test/index/_1.frq +0 -1
  26. data/spec/dummy/solr/data/test/index/_1.nrm +0 -1
  27. data/spec/dummy/solr/data/test/index/_1.prx +0 -0
  28. data/spec/dummy/solr/data/test/index/_1.tii +0 -0
  29. data/spec/dummy/solr/data/test/index/_1.tis +0 -0
  30. data/spec/dummy/solr/data/test/index/segments_3 +0 -0
@@ -1,3 +1,3 @@
1
1
  module EnjuQuestion
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
data/lib/enju_question.rb CHANGED
@@ -1,4 +1,24 @@
1
1
  require "enju_question/engine"
2
2
 
3
3
  module EnjuQuestion
4
+ def self.included(base)
5
+ base.extend(ClassMethods)
6
+ end
7
+
8
+ module ClassMethods
9
+ def enju_question
10
+ include EnjuQuestion::InstanceMethods
11
+ end
12
+ end
13
+
14
+ module InstanceMethods
15
+ private
16
+
17
+ def get_question
18
+ @question = Question.find(params[:question_id]) if params[:question_id]
19
+ authorize! :show, @question if @question
20
+ end
21
+ end
4
22
  end
23
+
24
+ ActionController::Base.send(:include, EnjuQuestion)
@@ -15,7 +15,7 @@ http_interactions:
15
15
  message: OK
16
16
  headers:
17
17
  date:
18
- - Thu, 15 Dec 2011 08:18:24 GMT
18
+ - Wed, 28 Dec 2011 21:49:09 GMT
19
19
  content-type:
20
20
  - application/xml;charset=UTF-8
21
21
  connection:
@@ -24,16 +24,103 @@ http_interactions:
24
24
 
25
25
  <result_set xmlns="http://crd.ndl.go.jp/refapi/servlet/refapi.RSearchAPI">
26
26
 
27
- <hit_num>4</hit_num>
27
+ <hit_num>5</hit_num>
28
28
 
29
29
  <results_get_position>1</results_get_position>
30
30
 
31
- <results_num>4</results_num>
31
+ <results_num>5</results_num>
32
32
 
33
33
  <results_cd>0001</results_cd>
34
34
 
35
35
  <result>
36
36
 
37
+ <QUESTION>グリーグ「詩人の心」のCDを借りたい。
38
+
39
+ yahooで検索し「自作の歌曲による12のピアノ曲集」(全音楽譜出版社)の曲だということがわかりました。『クラシック音楽作品名辞典』(三省堂)で「自作~」を引くと、「自作~」はop41とop52があり、曲の順番からいって「詩人の心」はop52の3曲目と思われますが、3曲目は「海の永遠の動きをあなたは知らない」となっています。
40
+
41
+ op52の入っているCDは1枚所蔵があったのですが、その3番目の曲は「君知らず、彼の永遠の動きを」です(「グリーグ:ピアノ全曲集⑧」)。この曲と「詩人の心」は同一の曲でしょうか。
42
+
43
+
44
+ (関係ないかもしれませんが、前出の「クラシック~」によると、「4つのデンマーク語の歌『心の歌』」op5の2曲目にも「海の永遠の動きをあなたは知らない」という曲があります。)
45
+
46
+
47
+ 貴館でお持ちの「新・外国楽曲の呼び方」(日本放送出版協会)資料No1511395137と「洋楽索引:作曲者と原題と訳題を引き出すための上、下」(民音音楽資料館)資料No1510796988,1510796996を確認してください。
48
+
49
+
50
+ 「クラシック音楽作品名辞典第3版」(三省堂)および「作曲家別名曲解説ライブラリー18北欧の巨匠」(音楽の友社)は調査済みです。</QUESTION>
51
+
52
+ <REG-ID>OSPR11070035</REG-ID>
53
+
54
+ <ANSWER>「海の永遠の動きをあなたは知らない」(「君知らず、彼の永遠の動きを」)と「詩人の心」は同じものでした。
55
+
56
+
57
+ ①《自作の歌曲によるピアノ曲》Op.52は題名のとおり、グリーグの作曲した歌曲をピアノ曲に編曲したもので、「海の永遠の動きをあなたは知らない」Du fatter
58
+ ej Bolgernes evige Gangは《4つのデンマーク語の歌「心の歌」》Op.5の第2曲に当たります。これは『グリーグ:生涯と作品』(菅野浩和/著 音楽之友社 1984.11)付録28頁に記載されています。
59
+
60
+
61
+ ②「海の永遠の動きをあなたは知らない」は『クラシック音楽作品名辞典:改訂版』(井上和男/編 三省堂 1996.12)174頁にあるようにアンデルセンの詩に曲をつけたものです(事前調査された第3版にも記載されていると思います)。
62
+
63
+
64
+ ③〈NAXOS MUSIC LIBRARY〉のサイトでは、
65
+
66
+ 「 Du fatter ej Boigemes evige Gang (The Poet''s Heart), Op. 5, No. 2」と表記されています。
67
+
68
+
69
+ http://ml.naxos.jp/album/8.553400
70
+
71
+
72
+
73
+ ※『ピアノ作曲家作品事典』(中村菊子/著 大竹紀子/著 ヤマハミュージックメディア 2003.11)は「詩人の心」The Poet''s Heartと表記されています(79頁)。これは全音楽譜出版社の《自作の歌曲による12のピアノ曲》の楽譜に依っています。
74
+
75
+
76
+ なお、以下の資料には「詩人の心」「海の永遠の動きをあなたは知らない」は記載されていませんでした。
77
+
78
+ 『新・外国楽曲の呼び方』(日本放送協会 1962.9)
79
+
80
+ 『洋楽索引:作曲者と原題と訳題を引き出すための 下巻』(民音音楽資料館 1981.2)
81
+
82
+ 『洋楽索引:作曲者と原題と訳題を引き出すための 上巻』(民音音楽資料館 1975.11)
83
+
84
+ </ANSWER>
85
+
86
+ <CRT-DATE>2011/07/25</CRT-DATE>
87
+
88
+ <KEYWORD>Du fatter ej Boigemes evige Gang  The Poet''s Heart</KEYWORD>
89
+
90
+ <NDC>763</NDC>
91
+
92
+ <NDC-NOTE>楽器.器楽(763:8版)</NDC-NOTE>
93
+
94
+ <RES-TYPE>事実調査</RES-TYPE>
95
+
96
+ <BIBL>『グリーグ:生涯と作品』(菅野浩和/著 音楽之友社 1984.11)(ページ:28)</BIBL>
97
+
98
+ <BIBL>『クラシック音楽作品名辞典:改訂版』(井上和男/編 三省堂 1996.12)(ページ:174)</BIBL>
99
+
100
+ <BIBL>『ピアノ作曲家作品事典:152人の作曲家たちとピアノ曲のすべて』(中村菊子/著 大竹紀子/著 ヤマハミュージックメディア 2003.11)(ページ:79)</BIBL>
101
+
102
+ <BIBL>NAXOS MUSIC LIBRARY(2010/7/27現在)(ホームページ:http://ml.naxos.jp/album/8.553400)</BIBL>
103
+
104
+ <REG-DATE>201112160205</REG-DATE>
105
+
106
+ <LST-DATE>201112161258</LST-DATE>
107
+
108
+ <SYS-ID>1000098395</SYS-ID>
109
+
110
+ <LIB-ID>2120005</LIB-ID>
111
+
112
+ <LIB-NAME>大阪府立中央図書館</LIB-NAME>
113
+
114
+ <URL>http://crd.ndl.go.jp/GENERAL/servlet/detail.reference?id=1000098395</URL>
115
+
116
+ <IMAGE>無</IMAGE>
117
+
118
+ <position>0</position>
119
+
120
+ </result>
121
+
122
+ <result>
123
+
37
124
  <QUESTION>「極冷酒」の読み方を知りたい。尾瀬あきら著『さらに極める日本酒味わい入門』の紹介文に「熱燗、燗冷まし、割り水燗、にごり酒、日本酒カクテル、極冷酒・・・。日本酒のオツな楽しみ方が満載」とあり、原本には「極冷酒のファンタジー」の項目がありました。日本酒の辞典類には用語はなく、yahoo検索では極冷酒はありましたが読みはなし。</QUESTION>
38
125
 
39
126
  <REG-ID>5077</REG-ID>
@@ -171,7 +258,7 @@ http_interactions:
171
258
 
172
259
  <IMAGE>無</IMAGE>
173
260
 
174
- <position>0</position>
261
+ <position>1</position>
175
262
 
176
263
  </result>
177
264
 
@@ -213,7 +300,7 @@ http_interactions:
213
300
 
214
301
  <IMAGE>無</IMAGE>
215
302
 
216
- <position>1</position>
303
+ <position>2</position>
217
304
 
218
305
  </result>
219
306
 
@@ -301,7 +388,7 @@ http_interactions:
301
388
 
302
389
  <IMAGE>無</IMAGE>
303
390
 
304
- <position>2</position>
391
+ <position>3</position>
305
392
 
306
393
  </result>
307
394
 
@@ -428,7 +515,7 @@ http_interactions:
428
515
 
429
516
  <IMAGE>無</IMAGE>
430
517
 
431
- <position>3</position>
518
+ <position>4</position>
432
519
 
433
520
  </result>
434
521
 
@@ -436,5 +523,5 @@ http_interactions:
436
523
 
437
524
  '
438
525
  http_version: '1.0'
439
- recorded_at: Thu, 15 Dec 2011 08:18:26 GMT
526
+ recorded_at: Wed, 28 Dec 2011 21:49:10 GMT
440
527
  recorded_with: VCR 2.0.0.rc1
@@ -6,6 +6,8 @@ class ApplicationController < ActionController::Base
6
6
 
7
7
  before_filter :set_locale
8
8
 
9
+ enju_question
10
+
9
11
  private
10
12
  def render_403
11
13
  return if performed?
@@ -68,11 +70,6 @@ class ApplicationController < ActionController::Base
68
70
  @user = User.where(:username => params[:user_id]).first if params[:user_id]
69
71
  end
70
72
 
71
- def get_question
72
- @question = Question.find(params[:question_id]) if params[:question_id]
73
- authorize! :show, @question if @question
74
- end
75
-
76
73
  def convert_charset
77
74
  case params[:format]
78
75
  when 'csv'
@@ -1,19 +1,40 @@
1
1
  class AddDeviseToUsers < ActiveRecord::Migration
2
2
  def self.up
3
3
  change_table(:users) do |t|
4
- t.database_authenticatable :null => false
5
- t.recoverable
6
- t.rememberable
7
- t.trackable
4
+ ## Database authenticatable
5
+ t.string :email, :null => false, :default => ""
6
+ t.string :encrypted_password, :null => false, :default => ""
8
7
 
9
- # t.encryptable
10
- # t.confirmable
11
- # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
12
- # t.token_authenticatable
8
+ ## Recoverable
9
+ t.string :reset_password_token
10
+ t.datetime :reset_password_sent_at
13
11
 
12
+ ## Rememberable
13
+ t.datetime :remember_created_at
14
14
 
15
- # Uncomment below if timestamps were not included in your original model.
16
- # t.timestamps
15
+ ## Trackable
16
+ t.integer :sign_in_count, :default => 0
17
+ t.datetime :current_sign_in_at
18
+ t.datetime :last_sign_in_at
19
+ t.string :current_sign_in_ip
20
+ t.string :last_sign_in_ip
21
+
22
+ ## Encryptable
23
+ t.string :password_salt
24
+
25
+ ## Confirmable
26
+ t.string :confirmation_token
27
+ t.datetime :confirmed_at
28
+ t.datetime :confirmation_sent_at
29
+ t.string :unconfirmed_email # Only if using reconfirmable
30
+
31
+ ## Lockable
32
+ t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
33
+ t.string :unlock_token # Only if unlock strategy is :email or :both
34
+ t.datetime :locked_at
35
+
36
+ # Token authenticatable
37
+ t.string :authentication_token
17
38
  end
18
39
 
19
40
  add_index :users, :email #, :unique => true
@@ -148,18 +148,27 @@ ActiveRecord::Schema.define(:version => 20120418124018) do
148
148
  t.string "username"
149
149
  t.text "note"
150
150
  t.string "locale"
151
- t.datetime "created_at", :null => false
152
- t.datetime "updated_at", :null => false
153
- t.string "email", :default => "", :null => false
154
- t.string "encrypted_password", :limit => 128, :default => "", :null => false
151
+ t.datetime "created_at", :null => false
152
+ t.datetime "updated_at", :null => false
153
+ t.string "email", :default => "", :null => false
154
+ t.string "encrypted_password", :default => "", :null => false
155
155
  t.string "reset_password_token"
156
156
  t.datetime "reset_password_sent_at"
157
157
  t.datetime "remember_created_at"
158
- t.integer "sign_in_count", :default => 0
158
+ t.integer "sign_in_count", :default => 0
159
159
  t.datetime "current_sign_in_at"
160
160
  t.datetime "last_sign_in_at"
161
161
  t.string "current_sign_in_ip"
162
162
  t.string "last_sign_in_ip"
163
+ t.string "password_salt"
164
+ t.string "confirmation_token"
165
+ t.datetime "confirmed_at"
166
+ t.datetime "confirmation_sent_at"
167
+ t.string "unconfirmed_email"
168
+ t.integer "failed_attempts", :default => 0
169
+ t.string "unlock_token"
170
+ t.datetime "locked_at"
171
+ t.string "authentication_token"
163
172
  t.string "answer_feed_token"
164
173
  end
165
174
 
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_question
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-26 00:00:00.000000000 Z
12
+ date: 2012-05-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -387,7 +387,6 @@ files:
387
387
  - spec/dummy/config/locales/en.yml
388
388
  - spec/dummy/config/routes.rb
389
389
  - spec/dummy/config.ru
390
- - spec/dummy/db/development.sqlite3
391
390
  - spec/dummy/db/migrate/006_create_items.rb
392
391
  - spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb
393
392
  - spec/dummy/db/migrate/20111201121636_create_languages.rb
@@ -415,25 +414,8 @@ files:
415
414
  - spec/dummy/solr/conf/spellings.txt
416
415
  - spec/dummy/solr/conf/stopwords.txt
417
416
  - spec/dummy/solr/conf/synonyms.txt
418
- - spec/dummy/solr/data/test/index/_0.fdt
419
- - spec/dummy/solr/data/test/index/_0.fdx
420
- - spec/dummy/solr/data/test/index/_0.fnm
421
- - spec/dummy/solr/data/test/index/_0.frq
422
- - spec/dummy/solr/data/test/index/_0.nrm
423
- - spec/dummy/solr/data/test/index/_0.prx
424
- - spec/dummy/solr/data/test/index/_0.tii
425
- - spec/dummy/solr/data/test/index/_0.tis
426
- - spec/dummy/solr/data/test/index/_0_1.del
427
- - spec/dummy/solr/data/test/index/_1.fdt
428
- - spec/dummy/solr/data/test/index/_1.fdx
429
- - spec/dummy/solr/data/test/index/_1.fnm
430
- - spec/dummy/solr/data/test/index/_1.frq
431
- - spec/dummy/solr/data/test/index/_1.nrm
432
- - spec/dummy/solr/data/test/index/_1.prx
433
- - spec/dummy/solr/data/test/index/_1.tii
434
- - spec/dummy/solr/data/test/index/_1.tis
435
417
  - spec/dummy/solr/data/test/index/segments.gen
436
- - spec/dummy/solr/data/test/index/segments_3
418
+ - spec/dummy/solr/data/test/index/segments_1
437
419
  - spec/dummy/solr/data/test/spellchecker/segments.gen
438
420
  - spec/dummy/solr/data/test/spellchecker/segments_1
439
421
  - spec/factories/answer.rb
@@ -515,7 +497,6 @@ test_files:
515
497
  - spec/dummy/config/locales/en.yml
516
498
  - spec/dummy/config/routes.rb
517
499
  - spec/dummy/config.ru
518
- - spec/dummy/db/development.sqlite3
519
500
  - spec/dummy/db/migrate/006_create_items.rb
520
501
  - spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb
521
502
  - spec/dummy/db/migrate/20111201121636_create_languages.rb
@@ -543,25 +524,8 @@ test_files:
543
524
  - spec/dummy/solr/conf/spellings.txt
544
525
  - spec/dummy/solr/conf/stopwords.txt
545
526
  - spec/dummy/solr/conf/synonyms.txt
546
- - spec/dummy/solr/data/test/index/_0.fdt
547
- - spec/dummy/solr/data/test/index/_0.fdx
548
- - spec/dummy/solr/data/test/index/_0.fnm
549
- - spec/dummy/solr/data/test/index/_0.frq
550
- - spec/dummy/solr/data/test/index/_0.nrm
551
- - spec/dummy/solr/data/test/index/_0.prx
552
- - spec/dummy/solr/data/test/index/_0.tii
553
- - spec/dummy/solr/data/test/index/_0.tis
554
- - spec/dummy/solr/data/test/index/_0_1.del
555
- - spec/dummy/solr/data/test/index/_1.fdt
556
- - spec/dummy/solr/data/test/index/_1.fdx
557
- - spec/dummy/solr/data/test/index/_1.fnm
558
- - spec/dummy/solr/data/test/index/_1.frq
559
- - spec/dummy/solr/data/test/index/_1.nrm
560
- - spec/dummy/solr/data/test/index/_1.prx
561
- - spec/dummy/solr/data/test/index/_1.tii
562
- - spec/dummy/solr/data/test/index/_1.tis
563
527
  - spec/dummy/solr/data/test/index/segments.gen
564
- - spec/dummy/solr/data/test/index/segments_3
528
+ - spec/dummy/solr/data/test/index/segments_1
565
529
  - spec/dummy/solr/data/test/spellchecker/segments.gen
566
530
  - spec/dummy/solr/data/test/spellchecker/segments_1
567
531
  - spec/factories/answer.rb
Binary file
Binary file
Binary file
@@ -1,3 +0,0 @@
1
- ���� idtype
2
- class_name
3
- username_s created_at_d updated_at_dshared_bsolved_banswers_count_i body_textanswer_body_text
@@ -1 +0,0 @@
1
-     
@@ -1 +0,0 @@
1
- NRM�||||||||����
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,3 +0,0 @@
1
- ���� idtype
2
- class_name
3
- username_s created_at_d updated_at_dshared_bsolved_banswers_count_i body_textanswer_body_text
@@ -1 +0,0 @@
1
-     
@@ -1 +0,0 @@
1
- NRM�||||||||����
Binary file
Binary file
Binary file