elasticsearch-model 7.0.0 → 7.2.1
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.
- checksums.yaml +4 -4
 - data/Gemfile +2 -2
 - data/README.md +15 -27
 - data/Rakefile +13 -14
 - data/elasticsearch-model.gemspec +37 -40
 - data/examples/activerecord_article.rb +1 -1
 - data/examples/activerecord_associations.rb +2 -2
 - data/examples/activerecord_custom_analyzer.rb +3 -3
 - data/examples/activerecord_mapping_completion.rb +1 -1
 - data/examples/activerecord_mapping_edge_ngram.rb +1 -1
 - data/examples/couchbase_article.rb +1 -1
 - data/examples/datamapper_article.rb +1 -1
 - data/examples/mongoid_article.rb +1 -1
 - data/examples/ohm_article.rb +1 -1
 - data/examples/riak_article.rb +1 -1
 - data/gemfiles/4.0.gemfile +4 -3
 - data/lib/elasticsearch/model/adapter.rb +1 -1
 - data/lib/elasticsearch/model/adapters/active_record.rb +2 -2
 - data/lib/elasticsearch/model/adapters/default.rb +1 -1
 - data/lib/elasticsearch/model/adapters/mongoid.rb +1 -1
 - data/lib/elasticsearch/model/adapters/multiple.rb +1 -1
 - data/lib/elasticsearch/model/callbacks.rb +1 -1
 - data/lib/elasticsearch/model/client.rb +1 -6
 - data/lib/elasticsearch/model/ext/active_record.rb +1 -1
 - data/lib/elasticsearch/model/hash_wrapper.rb +1 -1
 - data/lib/elasticsearch/model/importing.rb +11 -5
 - data/lib/elasticsearch/model/indexing.rb +4 -4
 - data/lib/elasticsearch/model/multimodel.rb +2 -2
 - data/lib/elasticsearch/model/naming.rb +1 -1
 - data/lib/elasticsearch/model/proxy.rb +7 -4
 - data/lib/elasticsearch/model/response/aggregations.rb +1 -1
 - data/lib/elasticsearch/model/response/base.rb +1 -1
 - data/lib/elasticsearch/model/response/pagination/kaminari.rb +1 -1
 - data/lib/elasticsearch/model/response/pagination/will_paginate.rb +1 -1
 - data/lib/elasticsearch/model/response/pagination.rb +1 -1
 - data/lib/elasticsearch/model/response/records.rb +1 -1
 - data/lib/elasticsearch/model/response/result.rb +1 -1
 - data/lib/elasticsearch/model/response/results.rb +2 -1
 - data/lib/elasticsearch/model/response/suggestions.rb +1 -1
 - data/lib/elasticsearch/model/response.rb +1 -1
 - data/lib/elasticsearch/model/searching.rb +1 -1
 - data/lib/elasticsearch/model/serializing.rb +1 -1
 - data/lib/elasticsearch/model/version.rb +2 -2
 - data/lib/elasticsearch/model.rb +4 -4
 - data/spec/elasticsearch/model/adapter_spec.rb +1 -1
 - data/spec/elasticsearch/model/adapters/active_record/associations_spec.rb +1 -1
 - data/spec/elasticsearch/model/adapters/active_record/basic_spec.rb +1 -1
 - data/spec/elasticsearch/model/adapters/active_record/dynamic_index_name_spec.rb +1 -1
 - data/spec/elasticsearch/model/adapters/active_record/import_spec.rb +2 -13
 - data/spec/elasticsearch/model/adapters/active_record/multi_model_spec.rb +1 -1
 - data/spec/elasticsearch/model/adapters/active_record/namespaced_model_spec.rb +1 -1
 - data/spec/elasticsearch/model/adapters/active_record/pagination_spec.rb +1 -1
 - data/spec/elasticsearch/model/adapters/active_record/parent_child_spec.rb +1 -1
 - data/spec/elasticsearch/model/adapters/active_record/serialization_spec.rb +1 -1
 - data/spec/elasticsearch/model/adapters/active_record_spec.rb +1 -1
 - data/spec/elasticsearch/model/adapters/default_spec.rb +1 -1
 - data/spec/elasticsearch/model/adapters/mongoid/basic_spec.rb +1 -1
 - data/spec/elasticsearch/model/adapters/mongoid/multi_model_spec.rb +12 -12
 - data/spec/elasticsearch/model/adapters/mongoid_spec.rb +1 -1
 - data/spec/elasticsearch/model/adapters/multiple_spec.rb +1 -1
 - data/spec/elasticsearch/model/callbacks_spec.rb +1 -1
 - data/spec/elasticsearch/model/client_spec.rb +4 -4
 - data/spec/elasticsearch/model/hash_wrapper_spec.rb +1 -1
 - data/spec/elasticsearch/model/importing_spec.rb +13 -1
 - data/spec/elasticsearch/model/indexing_spec.rb +17 -42
 - data/spec/elasticsearch/model/module_spec.rb +3 -2
 - data/spec/elasticsearch/model/multimodel_spec.rb +1 -1
 - data/spec/elasticsearch/model/naming_spec.rb +1 -1
 - data/spec/elasticsearch/model/proxy_spec.rb +10 -2
 - data/spec/elasticsearch/model/response/aggregations_spec.rb +1 -1
 - data/spec/elasticsearch/model/response/base_spec.rb +1 -1
 - data/spec/elasticsearch/model/response/pagination/kaminari_spec.rb +1 -1
 - data/spec/elasticsearch/model/response/pagination/will_paginate_spec.rb +1 -1
 - data/spec/elasticsearch/model/response/records_spec.rb +1 -1
 - data/spec/elasticsearch/model/response/response_spec.rb +1 -1
 - data/spec/elasticsearch/model/response/result_spec.rb +1 -1
 - data/spec/elasticsearch/model/response/results_spec.rb +13 -1
 - data/spec/elasticsearch/model/searching_search_request_spec.rb +1 -1
 - data/spec/elasticsearch/model/searching_spec.rb +1 -1
 - data/spec/elasticsearch/model/serializing_spec.rb +1 -1
 - data/spec/spec_helper.rb +11 -3
 - data/spec/support/app/answer.rb +2 -2
 - data/spec/support/app/article.rb +1 -1
 - data/spec/support/app/article_for_pagination.rb +1 -1
 - data/spec/support/app/article_no_type.rb +1 -1
 - data/spec/support/app/article_with_custom_serialization.rb +1 -1
 - data/spec/support/app/article_with_dynamic_index_name.rb +1 -1
 - data/spec/support/app/author.rb +1 -1
 - data/spec/support/app/authorship.rb +1 -1
 - data/spec/support/app/category.rb +1 -1
 - data/spec/support/app/comment.rb +1 -1
 - data/spec/support/app/episode.rb +1 -1
 - data/spec/support/app/image.rb +1 -1
 - data/spec/support/app/import_article.rb +1 -1
 - data/spec/support/app/mongoid_article.rb +1 -1
 - data/spec/support/app/namespaced_book.rb +1 -1
 - data/spec/support/app/parent_and_child_searchable.rb +1 -1
 - data/spec/support/app/post.rb +1 -1
 - data/spec/support/app/question.rb +1 -1
 - data/spec/support/app/searchable.rb +1 -1
 - data/spec/support/app/series.rb +1 -1
 - data/spec/support/app.rb +2 -2
 - metadata +40 -54
 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -659,36 +659,6 @@ describe Elasticsearch::Model::Indexing do 
     | 
|
| 
       659 
659 
     | 
    
         
             
                    expect(DummyIndexingModel.index_exists?).to be(false)
         
     | 
| 
       660 
660 
     | 
    
         
             
                  end
         
     | 
| 
       661 
661 
     | 
    
         
             
                end
         
     | 
| 
       662 
     | 
    
         
            -
             
     | 
| 
       663 
     | 
    
         
            -
                context 'when the index API raises an error' do
         
     | 
| 
       664 
     | 
    
         
            -
             
     | 
| 
       665 
     | 
    
         
            -
                  let(:client) do
         
     | 
| 
       666 
     | 
    
         
            -
                    double('client').tap do |cl|
         
     | 
| 
       667 
     | 
    
         
            -
                      expect(cl).to receive(:indices).and_raise(StandardError)
         
     | 
| 
       668 
     | 
    
         
            -
                    end
         
     | 
| 
       669 
     | 
    
         
            -
                  end
         
     | 
| 
       670 
     | 
    
         
            -
             
     | 
| 
       671 
     | 
    
         
            -
                  it 'returns false' do
         
     | 
| 
       672 
     | 
    
         
            -
                    expect(DummyIndexingModel.index_exists?).to be(false)
         
     | 
| 
       673 
     | 
    
         
            -
                  end
         
     | 
| 
       674 
     | 
    
         
            -
                end
         
     | 
| 
       675 
     | 
    
         
            -
             
     | 
| 
       676 
     | 
    
         
            -
                context 'when the indices.exists API raises an error' do
         
     | 
| 
       677 
     | 
    
         
            -
             
     | 
| 
       678 
     | 
    
         
            -
                  let(:client) do
         
     | 
| 
       679 
     | 
    
         
            -
                    double('client', indices: indices)
         
     | 
| 
       680 
     | 
    
         
            -
                  end
         
     | 
| 
       681 
     | 
    
         
            -
             
     | 
| 
       682 
     | 
    
         
            -
                  let(:indices) do
         
     | 
| 
       683 
     | 
    
         
            -
                    double('indices').tap do |ind|
         
     | 
| 
       684 
     | 
    
         
            -
                      expect(ind).to receive(:exists).and_raise(StandardError)
         
     | 
| 
       685 
     | 
    
         
            -
                    end
         
     | 
| 
       686 
     | 
    
         
            -
                  end
         
     | 
| 
       687 
     | 
    
         
            -
             
     | 
| 
       688 
     | 
    
         
            -
                  it 'returns false' do
         
     | 
| 
       689 
     | 
    
         
            -
                    expect(DummyIndexingModel.index_exists?).to be(false)
         
     | 
| 
       690 
     | 
    
         
            -
                  end
         
     | 
| 
       691 
     | 
    
         
            -
                end
         
     | 
| 
       692 
662 
     | 
    
         
             
              end
         
     | 
| 
       693 
663 
     | 
    
         | 
| 
       694 
664 
     | 
    
         
             
              describe '#delete_index!' do
         
     | 
| 
         @@ -706,9 +676,13 @@ describe Elasticsearch::Model::Indexing do 
     | 
|
| 
       706 
676 
     | 
    
         
             
                end
         
     | 
| 
       707 
677 
     | 
    
         | 
| 
       708 
678 
     | 
    
         
             
                context 'when the index is not found' do
         
     | 
| 
      
 679 
     | 
    
         
            +
                  let(:logger) { nil }
         
     | 
| 
      
 680 
     | 
    
         
            +
                  let(:transport) do
         
     | 
| 
      
 681 
     | 
    
         
            +
                    Elasticsearch::Transport::Client.new(logger: logger)
         
     | 
| 
      
 682 
     | 
    
         
            +
                  end
         
     | 
| 
       709 
683 
     | 
    
         | 
| 
       710 
684 
     | 
    
         
             
                  let(:client) do
         
     | 
| 
       711 
     | 
    
         
            -
                    double('client', indices: indices, transport:  
     | 
| 
      
 685 
     | 
    
         
            +
                    double('client', indices: indices, transport: transport)
         
     | 
| 
       712 
686 
     | 
    
         
             
                  end
         
     | 
| 
       713 
687 
     | 
    
         | 
| 
       714 
688 
     | 
    
         
             
                  let(:indices) do
         
     | 
| 
         @@ -722,19 +696,17 @@ describe Elasticsearch::Model::Indexing do 
     | 
|
| 
       722 
696 
     | 
    
         
             
                  end
         
     | 
| 
       723 
697 
     | 
    
         | 
| 
       724 
698 
     | 
    
         
             
                  context 'when the force option is true' do
         
     | 
| 
       725 
     | 
    
         
            -
             
     | 
| 
       726 
699 
     | 
    
         
             
                    it 'deletes the index without raising an exception' do
         
     | 
| 
       727 
700 
     | 
    
         
             
                      expect(DummyIndexingModelForRecreate.delete_index!(force: true)).to be_nil
         
     | 
| 
       728 
701 
     | 
    
         
             
                    end
         
     | 
| 
       729 
702 
     | 
    
         | 
| 
       730 
703 
     | 
    
         
             
                    context 'when the client has a logger' do
         
     | 
| 
       731 
     | 
    
         
            -
             
     | 
| 
       732 
704 
     | 
    
         
             
                      let(:logger) do
         
     | 
| 
       733 
705 
     | 
    
         
             
                        Logger.new(STDOUT).tap { |l| l.level = Logger::DEBUG }
         
     | 
| 
       734 
706 
     | 
    
         
             
                      end
         
     | 
| 
       735 
707 
     | 
    
         | 
| 
       736 
708 
     | 
    
         
             
                      let(:client) do
         
     | 
| 
       737 
     | 
    
         
            -
                        double('client', indices: indices, transport:  
     | 
| 
      
 709 
     | 
    
         
            +
                        double('client', indices: indices, transport: transport)
         
     | 
| 
       738 
710 
     | 
    
         
             
                      end
         
     | 
| 
       739 
711 
     | 
    
         | 
| 
       740 
712 
     | 
    
         
             
                      it 'deletes the index without raising an exception' do
         
     | 
| 
         @@ -942,7 +914,11 @@ describe Elasticsearch::Model::Indexing do 
     | 
|
| 
       942 
914 
     | 
    
         
             
                end
         
     | 
| 
       943 
915 
     | 
    
         | 
| 
       944 
916 
     | 
    
         
             
                let(:client) do
         
     | 
| 
       945 
     | 
    
         
            -
                  double('client', indices: indices, transport:  
     | 
| 
      
 917 
     | 
    
         
            +
                  double('client', indices: indices, transport: transport)
         
     | 
| 
      
 918 
     | 
    
         
            +
                end
         
     | 
| 
      
 919 
     | 
    
         
            +
             
     | 
| 
      
 920 
     | 
    
         
            +
                let(:transport) do
         
     | 
| 
      
 921 
     | 
    
         
            +
                  Elasticsearch::Transport::Client.new(logger: nil)
         
     | 
| 
       946 
922 
     | 
    
         
             
                end
         
     | 
| 
       947 
923 
     | 
    
         | 
| 
       948 
924 
     | 
    
         
             
                let(:indices) do
         
     | 
| 
         @@ -954,9 +930,7 @@ describe Elasticsearch::Model::Indexing do 
     | 
|
| 
       954 
930 
     | 
    
         
             
                end
         
     | 
| 
       955 
931 
     | 
    
         | 
| 
       956 
932 
     | 
    
         
             
                context 'when the force option is true' do
         
     | 
| 
       957 
     | 
    
         
            -
             
     | 
| 
       958 
933 
     | 
    
         
             
                  context 'when the operation raises a NotFound exception' do
         
     | 
| 
       959 
     | 
    
         
            -
             
     | 
| 
       960 
934 
     | 
    
         
             
                    before do
         
     | 
| 
       961 
935 
     | 
    
         
             
                      expect(indices).to receive(:refresh).and_raise(NotFound)
         
     | 
| 
       962 
936 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -966,13 +940,16 @@ describe Elasticsearch::Model::Indexing do 
     | 
|
| 
       966 
940 
     | 
    
         
             
                    end
         
     | 
| 
       967 
941 
     | 
    
         | 
| 
       968 
942 
     | 
    
         
             
                    context 'when the client has a logger' do
         
     | 
| 
       969 
     | 
    
         
            -
             
     | 
| 
       970 
943 
     | 
    
         
             
                      let(:logger) do
         
     | 
| 
       971 
944 
     | 
    
         
             
                        Logger.new(STDOUT).tap { |l| l.level = Logger::DEBUG }
         
     | 
| 
       972 
945 
     | 
    
         
             
                      end
         
     | 
| 
       973 
946 
     | 
    
         | 
| 
       974 
947 
     | 
    
         
             
                      let(:client) do
         
     | 
| 
       975 
     | 
    
         
            -
                        double('client', indices: indices, transport:  
     | 
| 
      
 948 
     | 
    
         
            +
                        double('client', indices: indices, transport: transport)
         
     | 
| 
      
 949 
     | 
    
         
            +
                      end
         
     | 
| 
      
 950 
     | 
    
         
            +
             
     | 
| 
      
 951 
     | 
    
         
            +
                      let(:transport) do
         
     | 
| 
      
 952 
     | 
    
         
            +
                        Elasticsearch::Transport::Client.new(logger: logger)
         
     | 
| 
       976 
953 
     | 
    
         
             
                      end
         
     | 
| 
       977 
954 
     | 
    
         | 
| 
       978 
955 
     | 
    
         
             
                      it 'does not raise an exception' do
         
     | 
| 
         @@ -987,7 +964,6 @@ describe Elasticsearch::Model::Indexing do 
     | 
|
| 
       987 
964 
     | 
    
         
             
                  end
         
     | 
| 
       988 
965 
     | 
    
         | 
| 
       989 
966 
     | 
    
         
             
                  context 'when the operation raises another type of exception' do
         
     | 
| 
       990 
     | 
    
         
            -
             
     | 
| 
       991 
967 
     | 
    
         
             
                    before do
         
     | 
| 
       992 
968 
     | 
    
         
             
                      expect(indices).to receive(:refresh).and_raise(Exception)
         
     | 
| 
       993 
969 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -1001,7 +977,6 @@ describe Elasticsearch::Model::Indexing do 
     | 
|
| 
       1001 
977 
     | 
    
         
             
                end
         
     | 
| 
       1002 
978 
     | 
    
         | 
| 
       1003 
979 
     | 
    
         
             
                context 'when an index name is provided in the options' do
         
     | 
| 
       1004 
     | 
    
         
            -
             
     | 
| 
       1005 
980 
     | 
    
         
             
                  before do
         
     | 
| 
       1006 
981 
     | 
    
         
             
                    expect(indices).to receive(:refresh).with(index: 'custom-foo')
         
     | 
| 
       1007 
982 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -22,7 +22,7 @@ describe Elasticsearch::Model do 
     | 
|
| 
       22 
22 
     | 
    
         
             
              describe '#client' do
         
     | 
| 
       23 
23 
     | 
    
         | 
| 
       24 
24 
     | 
    
         
             
                it 'should have a default' do
         
     | 
| 
       25 
     | 
    
         
            -
                  expect(Elasticsearch::Model.client).to be_a(Elasticsearch:: 
     | 
| 
      
 25 
     | 
    
         
            +
                  expect(Elasticsearch::Model.client).to be_a(Elasticsearch::Client)
         
     | 
| 
       26 
26 
     | 
    
         
             
                end
         
     | 
| 
       27 
27 
     | 
    
         
             
              end
         
     | 
| 
       28 
28 
     | 
    
         | 
| 
         @@ -48,6 +48,7 @@ describe Elasticsearch::Model do 
     | 
|
| 
       48 
48 
     | 
    
         
             
                  end
         
     | 
| 
       49 
49 
     | 
    
         | 
| 
       50 
50 
     | 
    
         
             
                  DummyIncludingModel.__send__ :include, Elasticsearch::Model
         
     | 
| 
      
 51 
     | 
    
         
            +
                  DummyIncludingModelWithSearchMethodDefined.__send__ :include, Elasticsearch::Model
         
     | 
| 
       51 
52 
     | 
    
         
             
                end
         
     | 
| 
       52 
53 
     | 
    
         | 
| 
       53 
54 
     | 
    
         
             
                after(:all) do
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -31,6 +31,10 @@ describe Elasticsearch::Model::Proxy do 
     | 
|
| 
       31 
31 
     | 
    
         
             
                    'insta barr'
         
     | 
| 
       32 
32 
     | 
    
         
             
                  end
         
     | 
| 
       33 
33 
     | 
    
         | 
| 
      
 34 
     | 
    
         
            +
                  def keyword_method(foo: 'default value')
         
     | 
| 
      
 35 
     | 
    
         
            +
                    foo
         
     | 
| 
      
 36 
     | 
    
         
            +
                  end
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
       34 
38 
     | 
    
         
             
                  def as_json(options)
         
     | 
| 
       35 
39 
     | 
    
         
             
                    {foo: 'bar'}
         
     | 
| 
       36 
40 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -98,7 +102,6 @@ describe Elasticsearch::Model::Proxy do 
     | 
|
| 
       98 
102 
     | 
    
         
             
              end
         
     | 
| 
       99 
103 
     | 
    
         | 
| 
       100 
104 
     | 
    
         
             
              context 'when instances are cloned' do
         
     | 
| 
       101 
     | 
    
         
            -
             
     | 
| 
       102 
105 
     | 
    
         
             
                let!(:model) do
         
     | 
| 
       103 
106 
     | 
    
         
             
                  DummyProxyModel.new
         
     | 
| 
       104 
107 
     | 
    
         
             
                end
         
     | 
| 
         @@ -121,4 +124,9 @@ describe Elasticsearch::Model::Proxy do 
     | 
|
| 
       121 
124 
     | 
    
         
             
                  expect(duplicate).to eq(duplicate_target)
         
     | 
| 
       122 
125 
     | 
    
         
             
                end
         
     | 
| 
       123 
126 
     | 
    
         
             
              end
         
     | 
| 
      
 127 
     | 
    
         
            +
             
     | 
| 
      
 128 
     | 
    
         
            +
              it 'forwards keyword arguments to target methods' do
         
     | 
| 
      
 129 
     | 
    
         
            +
                expect(DummyProxyModel.new.__elasticsearch__.keyword_method(foo: 'bar')).to eq('bar')
         
     | 
| 
      
 130 
     | 
    
         
            +
              end
         
     | 
| 
      
 131 
     | 
    
         
            +
             
     | 
| 
       124 
132 
     | 
    
         
             
            end
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -48,6 +48,10 @@ describe Elasticsearch::Model::Response::Results do 
     | 
|
| 
       48 
48 
     | 
    
         
             
                response.results
         
     | 
| 
       49 
49 
     | 
    
         
             
              end
         
     | 
| 
       50 
50 
     | 
    
         | 
| 
      
 51 
     | 
    
         
            +
              let(:records) do
         
     | 
| 
      
 52 
     | 
    
         
            +
                response.records
         
     | 
| 
      
 53 
     | 
    
         
            +
              end
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
       51 
55 
     | 
    
         
             
              describe '#results' do
         
     | 
| 
       52 
56 
     | 
    
         | 
| 
       53 
57 
     | 
    
         
             
                it 'provides access to the results' do
         
     | 
| 
         @@ -70,4 +74,12 @@ describe Elasticsearch::Model::Response::Results do 
     | 
|
| 
       70 
74 
     | 
    
         
             
                  expect(response.raw_response).to eq(response_document)
         
     | 
| 
       71 
75 
     | 
    
         
             
                end
         
     | 
| 
       72 
76 
     | 
    
         
             
              end
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
              describe '#records' do
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
                it 'provides access to the records' do
         
     | 
| 
      
 81 
     | 
    
         
            +
                  expect(results.records.size).to be(results.results.size)
         
     | 
| 
      
 82 
     | 
    
         
            +
                  expect(results.records.first.foo).to eq(results.results.first.foo)
         
     | 
| 
      
 83 
     | 
    
         
            +
                end
         
     | 
| 
      
 84 
     | 
    
         
            +
              end
         
     | 
| 
       73 
85 
     | 
    
         
             
            end
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    | 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -81,8 +81,16 @@ end 
     | 
|
| 
       81 
81 
     | 
    
         
             
            # @since 6.0.1
         
     | 
| 
       82 
82 
     | 
    
         
             
            def clear_indices(*models)
         
     | 
| 
       83 
83 
     | 
    
         
             
              models.each do |model|
         
     | 
| 
       84 
     | 
    
         
            -
                begin 
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
      
 84 
     | 
    
         
            +
                begin
         
     | 
| 
      
 85 
     | 
    
         
            +
                  Elasticsearch::Model.client.delete_by_query(
         
     | 
| 
      
 86 
     | 
    
         
            +
                    index: model.index_name,
         
     | 
| 
      
 87 
     | 
    
         
            +
                    q: '*',
         
     | 
| 
      
 88 
     | 
    
         
            +
                    body: {}
         
     | 
| 
      
 89 
     | 
    
         
            +
                  )
         
     | 
| 
      
 90 
     | 
    
         
            +
                rescue
         
     | 
| 
      
 91 
     | 
    
         
            +
                end
         
     | 
| 
      
 92 
     | 
    
         
            +
              end
         
     | 
| 
      
 93 
     | 
    
         
            +
              true
         
     | 
| 
       86 
94 
     | 
    
         
             
            end
         
     | 
| 
       87 
95 
     | 
    
         | 
| 
       88 
96 
     | 
    
         
             
            # Delete all documents from the tables of the provided list of models.
         
     | 
    
        data/spec/support/app/answer.rb
    CHANGED
    
    | 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -47,4 +47,4 @@ class Answer < ActiveRecord::Base 
     | 
|
| 
       47 
47 
     | 
    
         
             
              after_commit lambda { __elasticsearch__.index_document(routing: (question_id || 1))  },  on: :create
         
     | 
| 
       48 
48 
     | 
    
         
             
              after_commit lambda { __elasticsearch__.update_document(routing: (question_id || 1)) },  on: :update
         
     | 
| 
       49 
49 
     | 
    
         
             
              after_commit lambda {__elasticsearch__.delete_document(routing: (question_id || 1)) },  on: :destroy
         
     | 
| 
       50 
     | 
    
         
            -
            end
         
     | 
| 
      
 50 
     | 
    
         
            +
            end
         
     | 
    
        data/spec/support/app/article.rb
    CHANGED
    
    | 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
    
        data/spec/support/app/author.rb
    CHANGED
    
    | 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
    
        data/spec/support/app/comment.rb
    CHANGED
    
    | 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
    
        data/spec/support/app/episode.rb
    CHANGED
    
    | 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
    
        data/spec/support/app/image.rb
    CHANGED
    
    | 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
    
        data/spec/support/app/post.rb
    CHANGED
    
    | 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
    
        data/spec/support/app/series.rb
    CHANGED
    
    | 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
    
        data/spec/support/app.rb
    CHANGED
    
    | 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            # not use this file except in compliance with the License.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # You may obtain a copy of the License at
         
     | 
| 
       8 
8 
     | 
    
         
             
            #
         
     | 
| 
       9 
     | 
    
         
            -
            # 
     | 
| 
      
 9 
     | 
    
         
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # Unless required by applicable law or agreed to in writing,
         
     | 
| 
       12 
12 
     | 
    
         
             
            # software distributed under the License is distributed on an
         
     | 
| 
         @@ -43,4 +43,4 @@ begin 
     | 
|
| 
       43 
43 
     | 
    
         
             
              require 'support/app/mongoid_article'
         
     | 
| 
       44 
44 
     | 
    
         
             
            rescue
         
     | 
| 
       45 
45 
     | 
    
         
             
              $stderr.puts("'mongoid' gem is not installed, could not load Mongoid models")
         
     | 
| 
       46 
     | 
    
         
            -
            end
         
     | 
| 
      
 46 
     | 
    
         
            +
            end
         
     |