indexes 0.0.1 → 4.0.0.0

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.
@@ -1,13 +1,13 @@
1
1
  require 'test_helper'
2
2
  require 'rails/generators'
3
- require 'generators/indexes/install_generator'
4
- require 'generators/indexes/index_generator'
3
+ require 'generators/indexes/install/install_generator'
4
+ require 'generators/index/index_generator'
5
5
 
6
- class GeneratorsTest < Rails::Generators::TestCase
7
- destination File.expand_path('../tmp', File.dirname(__FILE__))
6
+ class GeneratorTest < Rails::Generators::TestCase
7
+ destination Rails.root.join('tmp')
8
8
 
9
9
  teardown do
10
- FileUtils.rm_rf self.destination_root
10
+ FileUtils.rm_rf destination_root
11
11
  end
12
12
 
13
13
  test 'install' do
@@ -1,6 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
- class IndexesTest < ActiveSupport::TestCase
3
+ class IndexTest < ActiveSupport::TestCase
4
4
 
5
5
  setup do
6
6
  Indexes.build
@@ -15,7 +15,7 @@ class IndexesTest < ActiveSupport::TestCase
15
15
  end
16
16
 
17
17
  test 'find' do
18
- assert Indexes.find(:products)
18
+ assert Indexes.definitions.find(:products)
19
19
  end
20
20
 
21
21
  test 'exist' do
@@ -47,8 +47,8 @@ class SearchTest < ActiveSupport::TestCase
47
47
  Shop.create id: 4
48
48
  sleep 2
49
49
 
50
- assert_equal [4, 3], Shop.search(with: 4).page(1, length: 2).map(&:id)
51
- assert_equal [2, 1], Shop.search(without: 3).map(&:id)
50
+ assert_equal [4, 3], Shop.search.with(4).page(1, length: 2).map(&:id)
51
+ assert_equal [2, 1], Shop.search.without(3).map(&:id)
52
52
  end
53
53
 
54
54
  test 'includes' do
@@ -57,7 +57,7 @@ class SearchTest < ActiveSupport::TestCase
57
57
  product.run_callbacks :commit
58
58
  sleep 2
59
59
 
60
- product = Product.search(includes: :shop).first
60
+ product = Product.search.includes(:shop).first
61
61
  Shop.expects(:connection).never
62
62
  assert_equal shop, product.shop
63
63
  end
@@ -1,6 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
- class TasksTest < ActiveSupport::TestCase
3
+ class TaskTest < ActiveSupport::TestCase
4
4
 
5
5
  setup do
6
6
  Dummy::Application.load_tasks
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indexes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 4.0.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mmontossi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-29 00:00:00.000000000 Z
11
+ date: 2016-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -82,18 +82,19 @@ files:
82
82
  - MIT-LICENSE
83
83
  - README.md
84
84
  - Rakefile
85
- - lib/generators/indexes/index_generator.rb
86
- - lib/generators/indexes/install_generator.rb
87
- - lib/generators/indexes/templates/index.rb
88
- - lib/generators/indexes/templates/initializer.rb
85
+ - lib/generators/index/index_generator.rb
86
+ - lib/generators/index/templates/index.rb
87
+ - lib/generators/indexes/install/install_generator.rb
88
+ - lib/generators/indexes/install/templates/initializer.rb
89
89
  - lib/indexes.rb
90
90
  - lib/indexes/collection.rb
91
91
  - lib/indexes/concern.rb
92
92
  - lib/indexes/configuration.rb
93
+ - lib/indexes/definitions.rb
93
94
  - lib/indexes/dsl/api.rb
94
95
  - lib/indexes/dsl/mappings.rb
95
96
  - lib/indexes/dsl/search.rb
96
- - lib/indexes/dsl/serializer.rb
97
+ - lib/indexes/dsl/serialization.rb
97
98
  - lib/indexes/index.rb
98
99
  - lib/indexes/pagination.rb
99
100
  - lib/indexes/proxy.rb
@@ -145,11 +146,11 @@ files:
145
146
  - test/dummy/public/422.html
146
147
  - test/dummy/public/500.html
147
148
  - test/dummy/public/favicon.ico
148
- - test/generators_test.rb
149
- - test/indexes_test.rb
149
+ - test/generator_test.rb
150
+ - test/index_test.rb
150
151
  - test/record_test.rb
151
152
  - test/search_test.rb
152
- - test/tasks_test.rb
153
+ - test/task_test.rb
153
154
  - test/test_helper.rb
154
155
  homepage: https://github.com/mmontossi/indexes
155
156
  licenses:
@@ -222,9 +223,9 @@ test_files:
222
223
  - test/dummy/public/500.html
223
224
  - test/dummy/public/favicon.ico
224
225
  - test/dummy/Rakefile
225
- - test/generators_test.rb
226
- - test/indexes_test.rb
226
+ - test/generator_test.rb
227
+ - test/index_test.rb
227
228
  - test/record_test.rb
228
229
  - test/search_test.rb
229
- - test/tasks_test.rb
230
+ - test/task_test.rb
230
231
  - test/test_helper.rb