merb-search 0.2.1 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'merb-core/tasks/merb'
6
6
  spec = Gem::Specification.new do |s|
7
7
  s.add_dependency('merb-slices', '~> 1.0.0')
8
8
  s.add_dependency('merb-ui', '>= 0.4')
9
- s.add_dependency('boss', '>= 0.3')
9
+ s.add_dependency('boss', '>= 0.4')
10
10
  s.author = 'UiPoet'
11
11
  s.email = 'dont.tase@me.com'
12
12
  s.files = FileList['app/**/*', 'lib/**/*', '[A-Z]*'].to_a
@@ -15,7 +15,7 @@ spec = Gem::Specification.new do |s|
15
15
  s.name = 'merb-search'
16
16
  s.rubyforge_project = 'uipoet'
17
17
  s.summary = 'Search for Merb'
18
- s.version = '0.2.1'
18
+ s.version = '0.3'
19
19
  end
20
20
 
21
21
  Rake::GemPackageTask.new(spec) do |pkg|
@@ -17,6 +17,9 @@ class MerbSearch::Search < MerbSearch::Application
17
17
  web = boss.web.new(@query, :count => web_count)
18
18
  @web = web.resultset unless web.count == 0
19
19
 
20
+ keyterms = boss.web.new(@query, :count => 1, :view => 'keyterms')
21
+ @keyterms = keyterms.resultset[0].keyterms unless keyterms.count == 0
22
+
20
23
  end
21
24
 
22
25
  render
@@ -0,0 +1,9 @@
1
+ <% if @keyterms %>
2
+ <%= mui_tray(:inline => true, :title => 'Key Terms', :width => '20em') do %>
3
+ <% @keyterms.each do |term| %>
4
+ <%= mui_block do %>
5
+ <%= mui_link(:title => term, :url => "/?q=#{term}") %>
6
+ <% end =%>
7
+ <% end %>
8
+ <% end =%>
9
+ <% end %>
@@ -1,5 +1,6 @@
1
1
  <%= mui_grid(:cell_valign => 'top', :columns => 2, :width => '100%') do %>
2
2
  <%= mui_cell do %>
3
+ <%= partial :keyterms %>
3
4
  <%= partial :spelling %>
4
5
  <% end =%>
5
6
  <%= mui_cell do %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb-search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: "0.3"
5
5
  platform: ruby
6
6
  authors:
7
7
  - UiPoet
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: "0.3"
43
+ version: "0.4"
44
44
  version:
45
45
  description:
46
46
  email: dont.tase@me.com
@@ -60,6 +60,7 @@ files:
60
60
  - app/views/search
61
61
  - app/views/search/_article.html.erb
62
62
  - app/views/search/_image.html.erb
63
+ - app/views/search/_keyterms.html.erb
63
64
  - app/views/search/_page.html.erb
64
65
  - app/views/search/_resultset.html.erb
65
66
  - app/views/search/_spelling.html.erb