handshake_service 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 403efdb1c7dec5d9d305363ee6b9f7c70b347dd0
4
- data.tar.gz: dd5b7435e88d47c59b66645eb08da4838686ac68
3
+ metadata.gz: 918ab85d77aad62143c188351e121cbbbbacebb3
4
+ data.tar.gz: 6c82ff0296a9c555620a73bad3c0a350875a9701
5
5
  SHA512:
6
- metadata.gz: a110499e4dccdce6dedb6e09abf96eb1ac47c2ae98277ab509464ad17561cb6f917cafb90a797e54bf2bc28bdbc1e1b67fda77d60b49949d8dbc99b0a0b263bc
7
- data.tar.gz: a9d5b773f1a75cfd03353b5803729fb3e685011e7e8e58a68aebb839f8307b75ccfced79fa9da5632fc0b0c2b0598d864b4e293af8ef6a3621f0dc49a934c35c
6
+ metadata.gz: f631c1e08997830414f422689052c38137c79b38be494ff17882ce709fab3e418f61f5230f3b66755c95217d197b6b57b16e14b19919adcff4f719890b1ef45f
7
+ data.tar.gz: e7111f1f12879369c4afe4f90467a8d1371ab7d3d452f81c67ceb9da0de2a64627d96aaae79318b0cba152b33a5fa954b07f2f51fa23ec016470d10266ad5c47
@@ -4,7 +4,6 @@ module HandshakeService
4
4
  # TODO: Iterate through the directory
5
5
  load 'tasks/auto_annotate_models.rake'
6
6
  load 'tasks/deploy.rake'
7
- load 'tasks/elasticsearch.rake'
8
7
  load 'tasks/heroku.rake'
9
8
  load 'tasks/invalids.rake'
10
9
  load 'tasks/rspec_generator.rake'
@@ -1,3 +1,3 @@
1
1
  module HandshakeService
2
- VERSION = "0.1.11"
2
+ VERSION = "0.1.12"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: handshake_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Ringwelski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-10 00:00:00.000000000 Z
11
+ date: 2016-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -74,7 +74,6 @@ files:
74
74
  - lib/handshake_service/version.rb
75
75
  - lib/tasks/auto_annotate_models.rake
76
76
  - lib/tasks/deploy.rake
77
- - lib/tasks/elasticsearch.rake
78
77
  - lib/tasks/heroku.rake
79
78
  - lib/tasks/invalids.rake
80
79
  - lib/tasks/rspec_generator.rake
@@ -1,86 +0,0 @@
1
- # Run with: rake environment elasticsearch:reindex
2
- # Begins by creating the index using tire:import:model command. This will create the "official" index name, e.g. "things" each time.
3
- # Then we rename it to, e.g. "things_20121001052916" and alias "things" to it.
4
- # Assumes usage of the elasticsearch-ruby libraries
5
- # TODO: Assumes you have a library called ElasticsearchAdminHelper defined with the right methods. Move that helper into this gem
6
-
7
- if defined?(Rails)
8
- namespace :elasticsearch do
9
- desc 'Reindexes all ActiveRecord model indices'
10
- task "reindex:all" => :environment do
11
- Rails.application.eager_load!
12
- include ElasticsearchAdminHelper
13
-
14
- ActiveRecord::Base.descendants.each do |model_class|
15
- next unless model_class.respond_to? :__elasticsearch__
16
- reindex_model(model_class)
17
- end
18
-
19
- puts 'All indices reindexed'
20
- end
21
-
22
- desc 'Deletes indices and then reindexes all ActiveRecord model indices assuming none exist yet'
23
- task "reindex:all:fresh" => :environment do
24
- return unless Rails.env.development? or Rails.env.test?
25
-
26
- Rails.application.eager_load!
27
- include ElasticsearchAdminHelper
28
-
29
- # If we don't create the temporary indices, then mass emails (for example) will try
30
- # to query users for recipient count and fail
31
- ActiveRecord::Base.descendants.each do |model_class|
32
- next unless model_class.respond_to? :__elasticsearch__
33
- delete_index(model_class.index_name)
34
- create_temporary_index(model_class)
35
- end
36
-
37
- ActiveRecord::Base.descendants.each do |model_class|
38
- next unless model_class.respond_to? :__elasticsearch__
39
- reindex_model(model_class, true)
40
- end
41
-
42
- puts 'All indices created, aliased and ready'
43
- end
44
-
45
- desc 'Deletes indices and then reindexes all ActiveRecord model indices assuming none exist yet. Is used for testing where aliases are not used'
46
- task "tests:prepare" => :environment do
47
- return unless Rails.env.development? or Rails.env.test?
48
-
49
- Rails.application.eager_load!
50
- include ElasticsearchAdminHelper
51
-
52
- # If we don't create the temporary indices, then mass emails (for example) will try
53
- # to query users for recipient count and fail
54
- ActiveRecord::Base.descendants.each do |model_class|
55
- next unless model_class.respond_to? :__elasticsearch__
56
- delete_index(model_class.index_name)
57
- create_temporary_index(model_class)
58
- end
59
-
60
- puts 'All indices created, aliased and ready'
61
- end
62
-
63
- Dir.foreach("#{Rails.root}/app/models") do |item|
64
- next if item == '.' or item == '..' or not item
65
- name = item.split(".")[0].pluralize
66
-
67
- desc "Reindexes #{name} using aliases"
68
- task "reindex:#{name}" => :environment do
69
- Rails.application.eager_load!
70
- include ElasticsearchAdminHelper
71
-
72
- klass = Kernel.const_get(name.classify)
73
- reindex_model(klass)
74
- end
75
-
76
- desc "Reindexes #{name} using aliases, and deletes the old one first" # because Tire tries to create an index for us sometimes
77
- task "reindex:#{name}:delete_old_first" => :environment do
78
- Rails.application.eager_load!
79
- include ElasticsearchAdminHelper
80
-
81
- klass = Kernel.const_get(name.classify)
82
- reindex_model(klass, true)
83
- end
84
- end
85
- end
86
- end