enju_question 0.0.15 → 0.0.16
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.
- data/MIT-LICENSE +1 -1
 - data/Rakefile +9 -0
 - data/app/controllers/answers_controller.rb +2 -1
 - data/app/controllers/questions_controller.rb +2 -1
 - data/app/models/answer.rb +2 -1
 - data/app/models/answer_has_item.rb +1 -0
 - data/app/models/question.rb +1 -0
 - data/lib/enju_question/engine.rb +1 -1
 - data/lib/enju_question/version.rb +1 -1
 - data/spec/cassette_library/enju_ndl/crd.yml +8 -95
 - data/spec/controllers/answers_controller_spec.rb +1 -1
 - data/spec/controllers/questions_controller_spec.rb +1 -1
 - data/spec/dummy/config/environments/development.rb +8 -1
 - data/spec/dummy/config/environments/production.rb +8 -1
 - data/spec/dummy/config/environments/test.rb +4 -6
 - data/spec/dummy/db/development.sqlite3 +0 -0
 - data/spec/dummy/db/test.sqlite3 +0 -0
 - data/spec/dummy/solr/data/test/index/_0.fdt +0 -0
 - data/spec/dummy/solr/data/test/index/_0.fdx +0 -0
 - data/spec/dummy/solr/data/test/index/_0.fnm +3 -0
 - data/spec/dummy/solr/data/test/index/_0.frq +1 -0
 - data/spec/dummy/solr/data/test/index/_0.nrm +1 -0
 - data/spec/dummy/solr/data/test/index/_0.prx +0 -0
 - data/spec/dummy/solr/data/test/index/_0.tii +0 -0
 - data/spec/dummy/solr/data/test/index/_0.tis +0 -0
 - data/spec/dummy/solr/data/test/index/_0_1.del +0 -0
 - data/spec/dummy/solr/data/test/index/_1.fdt +0 -0
 - data/spec/dummy/solr/data/test/index/_1.fdx +0 -0
 - data/spec/dummy/solr/data/test/index/_1.fnm +3 -0
 - data/spec/dummy/solr/data/test/index/_1.frq +1 -0
 - data/spec/dummy/solr/data/test/index/_1.nrm +1 -0
 - data/spec/dummy/solr/data/test/index/_1.prx +0 -0
 - data/spec/dummy/solr/data/test/index/_1.tii +0 -0
 - data/spec/dummy/solr/data/test/index/_1.tis +0 -0
 - data/spec/dummy/solr/data/test/index/segments.gen +0 -0
 - data/spec/dummy/solr/data/test/index/segments_3 +0 -0
 - data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
 - metadata +40 -8
 - data/spec/dummy/log/sunspot-solr-test.log +0 -222
 - data/spec/dummy/log/test.log +0 -3065
 - data/spec/dummy/solr/data/test/index/segments_1 +0 -0
 
    
        data/MIT-LICENSE
    CHANGED
    
    
    
        data/Rakefile
    CHANGED
    
    | 
         @@ -23,6 +23,12 @@ end 
     | 
|
| 
       23 
23 
     | 
    
         
             
            APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
         
     | 
| 
       24 
24 
     | 
    
         
             
            load 'rails/tasks/engine.rake'
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
      
 26 
     | 
    
         
            +
            Rake::TestTask.new(:test) do |t|
         
     | 
| 
      
 27 
     | 
    
         
            +
              t.libs << 'lib'
         
     | 
| 
      
 28 
     | 
    
         
            +
              t.libs << 'test'
         
     | 
| 
      
 29 
     | 
    
         
            +
              t.pattern = 'test/**/*_test.rb'
         
     | 
| 
      
 30 
     | 
    
         
            +
              t.verbose = false
         
     | 
| 
      
 31 
     | 
    
         
            +
            end
         
     | 
| 
       26 
32 
     | 
    
         | 
| 
       27 
33 
     | 
    
         
             
            Bundler::GemHelper.install_tasks
         
     | 
| 
       28 
34 
     | 
    
         | 
| 
         @@ -33,4 +39,7 @@ RSpec::Core::RakeTask.new(:spec) do |spec| 
     | 
|
| 
       33 
39 
     | 
    
         
             
                spec.pattern = FileList['spec/**/*_spec.rb']
         
     | 
| 
       34 
40 
     | 
    
         
             
            end
         
     | 
| 
       35 
41 
     | 
    
         | 
| 
      
 42 
     | 
    
         
            +
            require 'rake/testtask'
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
       36 
45 
     | 
    
         
             
            task :default => :spec
         
     | 
| 
         @@ -92,7 +92,8 @@ class AnswersController < ApplicationController 
     | 
|
| 
       92 
92 
     | 
    
         
             
              # POST /answers
         
     | 
| 
       93 
93 
     | 
    
         
             
              # POST /answers.json
         
     | 
| 
       94 
94 
     | 
    
         
             
              def create
         
     | 
| 
       95 
     | 
    
         
            -
                @answer =  
     | 
| 
      
 95 
     | 
    
         
            +
                @answer = Answer.new(params[:answer])
         
     | 
| 
      
 96 
     | 
    
         
            +
                @answer.user = current_user
         
     | 
| 
       96 
97 
     | 
    
         
             
                unless @answer.question
         
     | 
| 
       97 
98 
     | 
    
         
             
                  redirect_to questions_url
         
     | 
| 
       98 
99 
     | 
    
         
             
                  return
         
     | 
| 
         @@ -129,7 +129,8 @@ class QuestionsController < ApplicationController 
     | 
|
| 
       129 
129 
     | 
    
         
             
              # POST /questions
         
     | 
| 
       130 
130 
     | 
    
         
             
              # POST /questions.json
         
     | 
| 
       131 
131 
     | 
    
         
             
              def create
         
     | 
| 
       132 
     | 
    
         
            -
                @question =  
     | 
| 
      
 132 
     | 
    
         
            +
                @question = Question.new(params[:question])
         
     | 
| 
      
 133 
     | 
    
         
            +
                @question.user = current_user
         
     | 
| 
       133 
134 
     | 
    
         | 
| 
       134 
135 
     | 
    
         
             
                respond_to do |format|
         
     | 
| 
       135 
136 
     | 
    
         
             
                  if @question.save
         
     | 
    
        data/app/models/answer.rb
    CHANGED
    
    | 
         @@ -1,6 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # -*- encoding: utf-8 -*-
         
     | 
| 
       2 
2 
     | 
    
         
             
            class Answer < ActiveRecord::Base
         
     | 
| 
       3 
     | 
    
         
            -
               
     | 
| 
      
 3 
     | 
    
         
            +
              attr_accessible :question_id, :body, :item_identifier_list, :url_list
         
     | 
| 
      
 4 
     | 
    
         
            +
              default_scope :order => 'answers.id ASC'
         
     | 
| 
       4 
5 
     | 
    
         
             
              #scope :public_answers, where(:shared => true)
         
     | 
| 
       5 
6 
     | 
    
         
             
              #scope :private_answers, where(:shared => false)
         
     | 
| 
       6 
7 
     | 
    
         
             
              belongs_to :user, :validate => true
         
     | 
    
        data/app/models/question.rb
    CHANGED
    
    | 
         @@ -1,6 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # -*- encoding: utf-8 -*-
         
     | 
| 
       2 
2 
     | 
    
         
             
            require 'timeout'
         
     | 
| 
       3 
3 
     | 
    
         
             
            class Question < ActiveRecord::Base
         
     | 
| 
      
 4 
     | 
    
         
            +
              attr_accessible :body, :shared, :solved, :note
         
     | 
| 
       4 
5 
     | 
    
         
             
              default_scope :order => 'id DESC'
         
     | 
| 
       5 
6 
     | 
    
         
             
              scope :public_questions, where(:shared => true)
         
     | 
| 
       6 
7 
     | 
    
         
             
              scope :private_questions, where(:shared => false)
         
     | 
    
        data/lib/enju_question/engine.rb
    CHANGED
    
    
| 
         @@ -15,7 +15,7 @@ http_interactions: 
     | 
|
| 
       15 
15 
     | 
    
         
             
                  message: OK
         
     | 
| 
       16 
16 
     | 
    
         
             
                headers:
         
     | 
| 
       17 
17 
     | 
    
         
             
                  date:
         
     | 
| 
       18 
     | 
    
         
            -
                  -  
     | 
| 
      
 18 
     | 
    
         
            +
                  - Thu, 15 Dec 2011 08:18:24 GMT
         
     | 
| 
       19 
19 
     | 
    
         
             
                  content-type:
         
     | 
| 
       20 
20 
     | 
    
         
             
                  - application/xml;charset=UTF-8
         
     | 
| 
       21 
21 
     | 
    
         
             
                  connection:
         
     | 
| 
         @@ -24,103 +24,16 @@ http_interactions: 
     | 
|
| 
       24 
24 
     | 
    
         | 
| 
       25 
25 
     | 
    
         
             
                  <result_set xmlns="http://crd.ndl.go.jp/refapi/servlet/refapi.RSearchAPI">
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
     | 
    
         
            -
                  <hit_num> 
     | 
| 
      
 27 
     | 
    
         
            +
                  <hit_num>4</hit_num>
         
     | 
| 
       28 
28 
     | 
    
         | 
| 
       29 
29 
     | 
    
         
             
                  <results_get_position>1</results_get_position>
         
     | 
| 
       30 
30 
     | 
    
         | 
| 
       31 
     | 
    
         
            -
                  <results_num> 
     | 
| 
      
 31 
     | 
    
         
            +
                  <results_num>4</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 
     | 
    
         
            -
             
     | 
| 
       124 
37 
     | 
    
         
             
                  <QUESTION>「極冷酒」の読み方を知りたい。尾瀬あきら著『さらに極める日本酒味わい入門』の紹介文に「熱燗、燗冷まし、割り水燗、にごり酒、日本酒カクテル、極冷酒・・・。日本酒のオツな楽しみ方が満載」とあり、原本には「極冷酒のファンタジー」の項目がありました。日本酒の辞典類には用語はなく、yahoo検索では極冷酒はありましたが読みはなし。</QUESTION>
         
     | 
| 
       125 
38 
     | 
    
         | 
| 
       126 
39 
     | 
    
         
             
                  <REG-ID>5077</REG-ID>
         
     | 
| 
         @@ -258,7 +171,7 @@ http_interactions: 
     | 
|
| 
       258 
171 
     | 
    
         | 
| 
       259 
172 
     | 
    
         
             
                  <IMAGE>無</IMAGE>
         
     | 
| 
       260 
173 
     | 
    
         | 
| 
       261 
     | 
    
         
            -
                  <position> 
     | 
| 
      
 174 
     | 
    
         
            +
                  <position>0</position>
         
     | 
| 
       262 
175 
     | 
    
         | 
| 
       263 
176 
     | 
    
         
             
                  </result>
         
     | 
| 
       264 
177 
     | 
    
         | 
| 
         @@ -300,7 +213,7 @@ http_interactions: 
     | 
|
| 
       300 
213 
     | 
    
         | 
| 
       301 
214 
     | 
    
         
             
                  <IMAGE>無</IMAGE>
         
     | 
| 
       302 
215 
     | 
    
         | 
| 
       303 
     | 
    
         
            -
                  <position> 
     | 
| 
      
 216 
     | 
    
         
            +
                  <position>1</position>
         
     | 
| 
       304 
217 
     | 
    
         | 
| 
       305 
218 
     | 
    
         
             
                  </result>
         
     | 
| 
       306 
219 
     | 
    
         | 
| 
         @@ -388,7 +301,7 @@ http_interactions: 
     | 
|
| 
       388 
301 
     | 
    
         | 
| 
       389 
302 
     | 
    
         
             
                  <IMAGE>無</IMAGE>
         
     | 
| 
       390 
303 
     | 
    
         | 
| 
       391 
     | 
    
         
            -
                  <position> 
     | 
| 
      
 304 
     | 
    
         
            +
                  <position>2</position>
         
     | 
| 
       392 
305 
     | 
    
         | 
| 
       393 
306 
     | 
    
         
             
                  </result>
         
     | 
| 
       394 
307 
     | 
    
         | 
| 
         @@ -515,7 +428,7 @@ http_interactions: 
     | 
|
| 
       515 
428 
     | 
    
         | 
| 
       516 
429 
     | 
    
         
             
                  <IMAGE>無</IMAGE>
         
     | 
| 
       517 
430 
     | 
    
         | 
| 
       518 
     | 
    
         
            -
                  <position> 
     | 
| 
      
 431 
     | 
    
         
            +
                  <position>3</position>
         
     | 
| 
       519 
432 
     | 
    
         | 
| 
       520 
433 
     | 
    
         
             
                  </result>
         
     | 
| 
       521 
434 
     | 
    
         | 
| 
         @@ -523,5 +436,5 @@ http_interactions: 
     | 
|
| 
       523 
436 
     | 
    
         | 
| 
       524 
437 
     | 
    
         
             
            '
         
     | 
| 
       525 
438 
     | 
    
         
             
                http_version: '1.0'
         
     | 
| 
       526 
     | 
    
         
            -
              recorded_at:  
     | 
| 
      
 439 
     | 
    
         
            +
              recorded_at: Thu, 15 Dec 2011 08:18:26 GMT
         
     | 
| 
       527 
440 
     | 
    
         
             
            recorded_with: VCR 2.0.0.rc1
         
     | 
| 
         @@ -325,7 +325,7 @@ describe AnswersController do 
     | 
|
| 
       325 
325 
     | 
    
         
             
                  describe "with valid params" do
         
     | 
| 
       326 
326 
     | 
    
         
             
                    it "assigns a newly created answer as @answer" do
         
     | 
| 
       327 
327 
     | 
    
         
             
                      post :create, :answer => @attrs
         
     | 
| 
       328 
     | 
    
         
            -
                      assigns(:answer). 
     | 
| 
      
 328 
     | 
    
         
            +
                      assigns(:answer).should_not be_valid
         
     | 
| 
       329 
329 
     | 
    
         
             
                    end
         
     | 
| 
       330 
330 
     | 
    
         | 
| 
       331 
331 
     | 
    
         
             
                    it "redirects to the created answer" do
         
     | 
| 
         @@ -337,7 +337,7 @@ describe QuestionsController do 
     | 
|
| 
       337 
337 
     | 
    
         
             
                  describe "with valid params" do
         
     | 
| 
       338 
338 
     | 
    
         
             
                    it "assigns a newly created question as @question" do
         
     | 
| 
       339 
339 
     | 
    
         
             
                      post :create, :question => @attrs
         
     | 
| 
       340 
     | 
    
         
            -
                      assigns(:question). 
     | 
| 
      
 340 
     | 
    
         
            +
                      assigns(:question).should_not be_valid
         
     | 
| 
       341 
341 
     | 
    
         
             
                    end
         
     | 
| 
       342 
342 
     | 
    
         | 
| 
       343 
343 
     | 
    
         
             
                    it "should be forbidden" do
         
     | 
| 
         @@ -2,7 +2,7 @@ Dummy::Application.configure do 
     | 
|
| 
       2 
2 
     | 
    
         
             
              # Settings specified here will take precedence over those in config/application.rb
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
       4 
4 
     | 
    
         
             
              # In the development environment your application's code is reloaded on
         
     | 
| 
       5 
     | 
    
         
            -
              # every request. 
     | 
| 
      
 5 
     | 
    
         
            +
              # every request. This slows down response time but is perfect for development
         
     | 
| 
       6 
6 
     | 
    
         
             
              # since you don't have to restart the web server when you make code changes.
         
     | 
| 
       7 
7 
     | 
    
         
             
              config.cache_classes = false
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
         @@ -22,6 +22,13 @@ Dummy::Application.configure do 
     | 
|
| 
       22 
22 
     | 
    
         
             
              # Only use best-standards-support built into browsers
         
     | 
| 
       23 
23 
     | 
    
         
             
              config.action_dispatch.best_standards_support = :builtin
         
     | 
| 
       24 
24 
     | 
    
         | 
| 
      
 25 
     | 
    
         
            +
              # Raise exception on mass assignment protection for Active Record models
         
     | 
| 
      
 26 
     | 
    
         
            +
              config.active_record.mass_assignment_sanitizer = :strict
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
              # Log the query plan for queries taking more than this (works
         
     | 
| 
      
 29 
     | 
    
         
            +
              # with SQLite, MySQL, and PostgreSQL)
         
     | 
| 
      
 30 
     | 
    
         
            +
              config.active_record.auto_explain_threshold_in_seconds = 0.5
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
       25 
32 
     | 
    
         
             
              # Do not compress assets
         
     | 
| 
       26 
33 
     | 
    
         
             
              config.assets.compress = false
         
     | 
| 
       27 
34 
     | 
    
         | 
| 
         @@ -33,8 +33,11 @@ Dummy::Application.configure do 
     | 
|
| 
       33 
33 
     | 
    
         
             
              # See everything in the log (default is :info)
         
     | 
| 
       34 
34 
     | 
    
         
             
              # config.log_level = :debug
         
     | 
| 
       35 
35 
     | 
    
         | 
| 
      
 36 
     | 
    
         
            +
              # Prepend all log lines with the following tags
         
     | 
| 
      
 37 
     | 
    
         
            +
              # config.log_tags = [ :subdomain, :uuid ]
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
       36 
39 
     | 
    
         
             
              # Use a different logger for distributed setups
         
     | 
| 
       37 
     | 
    
         
            -
              # config.logger = SyslogLogger.new
         
     | 
| 
      
 40 
     | 
    
         
            +
              # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
         
     | 
| 
       38 
41 
     | 
    
         | 
| 
       39 
42 
     | 
    
         
             
              # Use a different cache store in production
         
     | 
| 
       40 
43 
     | 
    
         
             
              # config.cache_store = :mem_cache_store
         
     | 
| 
         @@ -57,4 +60,8 @@ Dummy::Application.configure do 
     | 
|
| 
       57 
60 
     | 
    
         | 
| 
       58 
61 
     | 
    
         
             
              # Send deprecation notices to registered listeners
         
     | 
| 
       59 
62 
     | 
    
         
             
              config.active_support.deprecation = :notify
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
              # Log the query plan for queries taking more than this (works
         
     | 
| 
      
 65 
     | 
    
         
            +
              # with SQLite, MySQL, and PostgreSQL)
         
     | 
| 
      
 66 
     | 
    
         
            +
              # config.active_record.auto_explain_threshold_in_seconds = 0.5
         
     | 
| 
       60 
67 
     | 
    
         
             
            end
         
     | 
| 
         @@ -2,9 +2,9 @@ Dummy::Application.configure do 
     | 
|
| 
       2 
2 
     | 
    
         
             
              # Settings specified here will take precedence over those in config/application.rb
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
       4 
4 
     | 
    
         
             
              # The test environment is used exclusively to run your application's
         
     | 
| 
       5 
     | 
    
         
            -
              # test suite. 
     | 
| 
      
 5 
     | 
    
         
            +
              # test suite. You never need to work with it otherwise. Remember that
         
     | 
| 
       6 
6 
     | 
    
         
             
              # your test database is "scratch space" for the test suite and is wiped
         
     | 
| 
       7 
     | 
    
         
            -
              # and recreated between test runs. 
     | 
| 
      
 7 
     | 
    
         
            +
              # and recreated between test runs. Don't rely on the data there!
         
     | 
| 
       8 
8 
     | 
    
         
             
              config.cache_classes = true
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
              # Configure static asset server for tests with Cache-Control for performance
         
     | 
| 
         @@ -29,10 +29,8 @@ Dummy::Application.configure do 
     | 
|
| 
       29 
29 
     | 
    
         
             
              # ActionMailer::Base.deliveries array.
         
     | 
| 
       30 
30 
     | 
    
         
             
              config.action_mailer.delivery_method = :test
         
     | 
| 
       31 
31 
     | 
    
         | 
| 
       32 
     | 
    
         
            -
              #  
     | 
| 
       33 
     | 
    
         
            -
              #  
     | 
| 
       34 
     | 
    
         
            -
              # like if you have constraints or database-specific column types
         
     | 
| 
       35 
     | 
    
         
            -
              # config.active_record.schema_format = :sql
         
     | 
| 
      
 32 
     | 
    
         
            +
              # Raise exception on mass assignment protection for Active Record models
         
     | 
| 
      
 33 
     | 
    
         
            +
              #config.active_record.mass_assignment_sanitizer = :strict
         
     | 
| 
       36 
34 
     | 
    
         | 
| 
       37 
35 
     | 
    
         
             
              # Print deprecation notices to the stderr
         
     | 
| 
       38 
36 
     | 
    
         
             
              config.active_support.deprecation = :stderr
         
     | 
| 
         Binary file 
     | 
    
        data/spec/dummy/db/test.sqlite3
    CHANGED
    
    | 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            				
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            NRM�||||||||����
         
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            				
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            NRM�||||||||����
         
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         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. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.16
         
     | 
| 
       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- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2012-05-26 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: rails
         
     | 
| 
         @@ -387,6 +387,7 @@ 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
         
     | 
| 
       390 
391 
     | 
    
         
             
            - spec/dummy/db/migrate/006_create_items.rb
         
     | 
| 
       391 
392 
     | 
    
         
             
            - spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb
         
     | 
| 
       392 
393 
     | 
    
         
             
            - spec/dummy/db/migrate/20111201121636_create_languages.rb
         
     | 
| 
         @@ -398,8 +399,6 @@ files: 
     | 
|
| 
       398 
399 
     | 
    
         
             
            - spec/dummy/db/schema.rb
         
     | 
| 
       399 
400 
     | 
    
         
             
            - spec/dummy/db/test.sqlite3
         
     | 
| 
       400 
401 
     | 
    
         
             
            - spec/dummy/lib/expire_editable_fragment.rb
         
     | 
| 
       401 
     | 
    
         
            -
            - spec/dummy/log/sunspot-solr-test.log
         
     | 
| 
       402 
     | 
    
         
            -
            - spec/dummy/log/test.log
         
     | 
| 
       403 
402 
     | 
    
         
             
            - spec/dummy/public/404.html
         
     | 
| 
       404 
403 
     | 
    
         
             
            - spec/dummy/public/422.html
         
     | 
| 
       405 
404 
     | 
    
         
             
            - spec/dummy/public/500.html
         
     | 
| 
         @@ -416,8 +415,25 @@ files: 
     | 
|
| 
       416 
415 
     | 
    
         
             
            - spec/dummy/solr/conf/spellings.txt
         
     | 
| 
       417 
416 
     | 
    
         
             
            - spec/dummy/solr/conf/stopwords.txt
         
     | 
| 
       418 
417 
     | 
    
         
             
            - 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
         
     | 
| 
       419 
435 
     | 
    
         
             
            - spec/dummy/solr/data/test/index/segments.gen
         
     | 
| 
       420 
     | 
    
         
            -
            - spec/dummy/solr/data/test/index/ 
     | 
| 
      
 436 
     | 
    
         
            +
            - spec/dummy/solr/data/test/index/segments_3
         
     | 
| 
       421 
437 
     | 
    
         
             
            - spec/dummy/solr/data/test/spellchecker/segments.gen
         
     | 
| 
       422 
438 
     | 
    
         
             
            - spec/dummy/solr/data/test/spellchecker/segments_1
         
     | 
| 
       423 
439 
     | 
    
         
             
            - spec/factories/answer.rb
         
     | 
| 
         @@ -499,6 +515,7 @@ test_files: 
     | 
|
| 
       499 
515 
     | 
    
         
             
            - spec/dummy/config/locales/en.yml
         
     | 
| 
       500 
516 
     | 
    
         
             
            - spec/dummy/config/routes.rb
         
     | 
| 
       501 
517 
     | 
    
         
             
            - spec/dummy/config.ru
         
     | 
| 
      
 518 
     | 
    
         
            +
            - spec/dummy/db/development.sqlite3
         
     | 
| 
       502 
519 
     | 
    
         
             
            - spec/dummy/db/migrate/006_create_items.rb
         
     | 
| 
       503 
520 
     | 
    
         
             
            - spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb
         
     | 
| 
       504 
521 
     | 
    
         
             
            - spec/dummy/db/migrate/20111201121636_create_languages.rb
         
     | 
| 
         @@ -510,8 +527,6 @@ test_files: 
     | 
|
| 
       510 
527 
     | 
    
         
             
            - spec/dummy/db/schema.rb
         
     | 
| 
       511 
528 
     | 
    
         
             
            - spec/dummy/db/test.sqlite3
         
     | 
| 
       512 
529 
     | 
    
         
             
            - spec/dummy/lib/expire_editable_fragment.rb
         
     | 
| 
       513 
     | 
    
         
            -
            - spec/dummy/log/sunspot-solr-test.log
         
     | 
| 
       514 
     | 
    
         
            -
            - spec/dummy/log/test.log
         
     | 
| 
       515 
530 
     | 
    
         
             
            - spec/dummy/public/404.html
         
     | 
| 
       516 
531 
     | 
    
         
             
            - spec/dummy/public/422.html
         
     | 
| 
       517 
532 
     | 
    
         
             
            - spec/dummy/public/500.html
         
     | 
| 
         @@ -528,8 +543,25 @@ test_files: 
     | 
|
| 
       528 
543 
     | 
    
         
             
            - spec/dummy/solr/conf/spellings.txt
         
     | 
| 
       529 
544 
     | 
    
         
             
            - spec/dummy/solr/conf/stopwords.txt
         
     | 
| 
       530 
545 
     | 
    
         
             
            - 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
         
     | 
| 
       531 
563 
     | 
    
         
             
            - spec/dummy/solr/data/test/index/segments.gen
         
     | 
| 
       532 
     | 
    
         
            -
            - spec/dummy/solr/data/test/index/ 
     | 
| 
      
 564 
     | 
    
         
            +
            - spec/dummy/solr/data/test/index/segments_3
         
     | 
| 
       533 
565 
     | 
    
         
             
            - spec/dummy/solr/data/test/spellchecker/segments.gen
         
     | 
| 
       534 
566 
     | 
    
         
             
            - spec/dummy/solr/data/test/spellchecker/segments_1
         
     | 
| 
       535 
567 
     | 
    
         
             
            - spec/factories/answer.rb
         
     |