foreman_opensearch 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/app/controllers/foreman_opensearch/opensearch_controller.rb +5 -0
- data/app/overrides/layouts/base/custom_link.html.erb.deface +8 -3
- data/app/views/foreman_opensearch/opensearch/description.xml.erb +7 -2
- data/config/routes.rb +4 -3
- data/lib/foreman_opensearch/engine.rb +3 -2
- data/lib/foreman_opensearch/version.rb +1 -1
- metadata +11 -12
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
YjFkM2FhZjk2MmViZWEyODNiNjNhMjA5OTBkYmY3NTUxMjU1OTVjYg==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: da534ff54f4f3590fc5e53264c36c5b6317a1429
|
4
|
+
data.tar.gz: f9a85cc8dd70bd4184969eb6ba359361a7fdb737
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
NGY4ODkzMTE1MmRlYzEwM2ZlOTdiYWYwNTg0NjU1NzQxYjY1YzliNWVhZGRm
|
11
|
-
Y2Q2NDcyZWM3ZWQ2YjdkMDI4ODBkZTUxMTlhYTEzZTY0N2EzY2U=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MjgwN2UyNTJlZmZhN2EyMDFhYzA4MDFjNWE0YWViOWVhNzJmZmRjY2VhZWNm
|
14
|
-
ZDk1MjUxOTQ2OTBiZGFhYTU3ZDNkYmVjNGFjMzc1NGEyMzUyODg2YWVkYmJj
|
15
|
-
OGExYzJiZWVmYTRjMDY3ODJkZDBhM2Q3ODBmNjA5N2M0MzdkNjg=
|
6
|
+
metadata.gz: b86a2d2195981fb9470eb23c3a0e546165ef5e6f4de14599c625f0c4ec2f11174e551c771dc023902fbccdca91b0d2749b9170bb7439c1652b0cea3b6c651fc4
|
7
|
+
data.tar.gz: 21b6ca6a2f8e1cf2f65c8196aa8f4de45bd643011aae28bf27da805768caad28807441c43c73f219a31363eff2cba69c2cf1aeb43b84a64c8e7c5f0d638c54c3
|
@@ -1,4 +1,9 @@
|
|
1
1
|
<!-- insert_bottom 'head' -->
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
<%= tag('link',
|
3
|
+
{
|
4
|
+
rel: 'search',
|
5
|
+
type: 'application/opensearchdescription+xml',
|
6
|
+
title: 'foreman',
|
7
|
+
href: foreman_opensearch_description_url(format: 'xml')
|
8
|
+
})
|
9
|
+
%>
|
@@ -5,5 +5,10 @@
|
|
5
5
|
<Description>Search for foreman objects. Use "controller!search_term" form.</Description>
|
6
6
|
<Tags>foreman</Tags>
|
7
7
|
<Url type="text/html"
|
8
|
-
template="<%=
|
9
|
-
|
8
|
+
template="<%= foreman_opensearch_search_url %>?q={searchTerms}"/>
|
9
|
+
<Url type="application/x-suggestions+json"
|
10
|
+
method="GET"
|
11
|
+
template="<%= foreman_opensearch_autocomplete_url %>">
|
12
|
+
<Param name="q" value="{searchTerms}"/>
|
13
|
+
</Url>
|
14
|
+
</OpenSearchDescription>
|
data/config/routes.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
|
-
|
3
|
-
get 'search',
|
4
|
-
get '
|
2
|
+
namespace :foreman_opensearch do
|
3
|
+
get 'search', controller: 'opensearch', action: :search
|
4
|
+
get 'description', to: 'opensearch#description'
|
5
|
+
get 'autocomplete', to: 'opensearch#autocomplete'
|
5
6
|
end
|
6
7
|
end
|
@@ -11,10 +11,11 @@ module ForemanOpensearch
|
|
11
11
|
|
12
12
|
# Add any db migrations
|
13
13
|
initializer 'foreman_opensearch.load_app_instance_data' do |app|
|
14
|
-
|
14
|
+
# No migrations needed
|
15
|
+
# app.config.paths['db/migrate'] += ForemanOpensearch::Engine.paths['db/migrate'].existent
|
15
16
|
end
|
16
17
|
|
17
|
-
initializer 'foreman_opensearch.register_plugin',
|
18
|
+
initializer 'foreman_opensearch.register_plugin', before: :finisher_hook do |_app|
|
18
19
|
Foreman::Plugin.register :foreman_opensearch do
|
19
20
|
requires_foreman '>= 1.4'
|
20
21
|
end
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_opensearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shim Shtein
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubocop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rdoc
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description: Small plugin that publishes opensearch XML file declaration.
|
@@ -89,17 +89,17 @@ require_paths:
|
|
89
89
|
- lib
|
90
90
|
required_ruby_version: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
|
-
- -
|
92
|
+
- - ">="
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- -
|
97
|
+
- - ">="
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '0'
|
100
100
|
requirements: []
|
101
101
|
rubyforge_project:
|
102
|
-
rubygems_version: 2.4.
|
102
|
+
rubygems_version: 2.4.8
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: Foreman plugin to enable omnibox/search box integration.
|
@@ -107,4 +107,3 @@ test_files:
|
|
107
107
|
- test/test_plugin_helper.rb
|
108
108
|
- test/unit/foreman_opensearch_test.rb
|
109
109
|
- test/factories/foreman_opensearch_factories.rb
|
110
|
-
has_rdoc:
|