refinerycms-acts-as-indexed 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bd35f2c68f0578bdd36fae144dd9b8b345b93b56
4
+ data.tar.gz: c5cb79c37c85d3c3752444359e5cf9f1382179e0
5
+ SHA512:
6
+ metadata.gz: 144588d53ed40546143c86e10f64adc583545854f21e0a1d96a6fb1a904d6aed322ff2feaf69f7bbf3fcfd86c8b22d10ab79b9120aea8822fa5041cd7c7713d2
7
+ data.tar.gz: a6ec57f329ab42e690543d3cee4af5f9af0ffa9295c9021e86c846aee585050464ffe13a4d80c329b357d890fc8064929156a25b69936beaa98d7c21e9074468
@@ -0,0 +1,9 @@
1
+ require 'acts_as_indexed'
2
+
3
+ begin
4
+ Refinery::Image.class_eval do
5
+ # Docs for acts_as_indexed http://github.com/dougal/acts_as_indexed
6
+ acts_as_indexed :fields => [:title]
7
+ end
8
+ rescue NameError
9
+ end
@@ -0,0 +1,8 @@
1
+ require 'acts_as_indexed'
2
+
3
+ begin
4
+ Refinery::Inquiries::Inquiry.class_eval do
5
+ acts_as_indexed :fields => [:name, :email, :message, :phone]
6
+ end
7
+ rescue NameError
8
+ end
@@ -0,0 +1,15 @@
1
+ require 'acts_as_indexed'
2
+
3
+ begin
4
+ Refinery::Page.class_eval do
5
+ # Docs for acts_as_indexed https://github.com/dougal/acts_as_indexed
6
+ acts_as_indexed :fields => [:title, :meta_description,
7
+ :menu_title, :browser_title, :all_page_part_content]
8
+
9
+ # Used to index all the content on this page so it can be easily searched.
10
+ def all_page_part_content
11
+ parts.map(&:body).join " "
12
+ end
13
+ end
14
+ rescue NameError
15
+ end
@@ -0,0 +1,9 @@
1
+ require 'acts_as_indexed'
2
+
3
+ begin
4
+ Refinery::Resource.class_eval do
5
+ # Docs for acts_as_indexed http://github.com/dougal/acts_as_indexed
6
+ acts_as_indexed :fields => [:file_name, :title, :type_of_content]
7
+ end
8
+ rescue NameError
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'acts_as_indexed'
2
+
3
+ begin
4
+ Refinery::Setting.class_eval do
5
+ # Docs for acts_as_indexed http://github.com/dougal/acts_as_indexed
6
+ acts_as_indexed :fields => [:name]
7
+ end
8
+ rescue NameError
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'acts_as_indexed'
2
+
3
+ begin
4
+ Refinery::User.class_eval do
5
+ # Docs for acts_as_indexed http://github.com/dougal/acts_as_indexed
6
+ acts_as_indexed :fields => [:username, :email]
7
+ end
8
+ rescue NameError
9
+ end
@@ -0,0 +1,7 @@
1
+ <form method='GET' action='<%= url %>' class='search_form'>
2
+ <%= text_field :search, nil, :id => 'search', :type => 'search', :name => 'search', :value => params[:search], :title => t('search_input_notice', :scope => 'refinery.admin.search') %>
3
+ <%= hidden_field :wymeditor, nil, :name => 'wymeditor', :id => nil, :value => true if params[:wymeditor].presence %>
4
+ <%= hidden_field :dialog, nil, :name => 'dialog', :id => nil, :value => true if from_dialog? %>
5
+ <%= hidden_field :callback, nil, :name => 'callback', :id => nil, :value => @callback if @callback.presence %>
6
+ <%= submit_tag t('button_text', :scope => 'refinery.admin.search'), :name => nil %>
7
+ </form>
@@ -0,0 +1,4 @@
1
+ <% if searching? %>
2
+ <%= link_to t('cancel_search', :scope => 'refinery.admin.search'), url, :class => "cancel-search" %>
3
+ <h2><%= t('results_for_html', :scope => 'refinery.admin.search', :query => h(params[:search])).html_safe %></h2>
4
+ <% end %>
@@ -0,0 +1,11 @@
1
+ module Refinery
2
+ module ActsAsIndexed
3
+ class << self
4
+ def root
5
+ @root ||= Pathname.new(File.expand_path('../../../', __FILE__))
6
+ end
7
+ end
8
+ end
9
+ end
10
+
11
+ require 'refinery/acts_as_indexed/engine'
@@ -0,0 +1,24 @@
1
+ module Refinery
2
+ module ActsAsIndexed
3
+ class Engine < Rails::Engine
4
+
5
+ include Refinery::Engine
6
+
7
+ initializer "refinery.acts_as_indexed" do
8
+ ActiveSupport.on_load(:active_record) do
9
+ require 'acts_as_indexed'
10
+ ::ActsAsIndexed.configure do |config|
11
+ config.index_file = Rails.root.join('tmp', 'index')
12
+ config.index_file_depth = 3
13
+ config.min_word_size = 3
14
+ end
15
+ end
16
+ end
17
+
18
+ config.to_prepare do
19
+ Decorators.register! ::Refinery::ActsAsIndexed.root
20
+ end
21
+
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,3 @@
1
+ require 'acts_as_indexed'
2
+ require 'refinerycms-core'
3
+ require 'refinery/acts_as_indexed'
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: refinerycms-acts-as-indexed
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Philip Arndt
8
+ - Uģis Ozols
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-07-15 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: refinerycms-core
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ~>
19
+ - !ruby/object:Gem::Version
20
+ version: 2.1.0
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: 2.1.0
28
+ - !ruby/object:Gem::Dependency
29
+ name: acts_as_indexed
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: 0.8.0
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ~>
40
+ - !ruby/object:Gem::Version
41
+ version: 0.8.0
42
+ description: An extension to handle the integration of Refinery CMS and ActsAsIndexed
43
+ email: info@refinerycms.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - app/decorators/models/refinery/image_decorator.rb
49
+ - app/decorators/models/refinery/inquiries/inquiry_decorator.rb
50
+ - app/decorators/models/refinery/page_decorator.rb
51
+ - app/decorators/models/refinery/resource_decorator.rb
52
+ - app/decorators/models/refinery/setting_decorator.rb
53
+ - app/decorators/models/refinery/user_decorator.rb
54
+ - app/views/refinery/acts_as_indexed/admin/_search.html.erb
55
+ - app/views/refinery/acts_as_indexed/admin/_search_header.html.erb
56
+ - lib/refinery/acts_as_indexed.rb
57
+ - lib/refinery/acts_as_indexed/engine.rb
58
+ - lib/refinerycms-acts-as-indexed.rb
59
+ homepage: http://refinerycms.com
60
+ licenses:
61
+ - MIT
62
+ metadata: {}
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubyforge_project:
79
+ rubygems_version: 2.0.3
80
+ signing_key:
81
+ specification_version: 4
82
+ summary: Refinery CMS ActsAsIndexed integration plugin
83
+ test_files: []
84
+ has_rdoc: