refinerycms-solr 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2a4c4ce0fd8bd9bc24ec3bf0d3c0e5c9d7719dcf
4
+ data.tar.gz: 2536382b956af3666a3f8a3542f9525570b4fb54
5
+ SHA512:
6
+ metadata.gz: 69361b7781a48470628390e21c71b362cbd8a90448976e70c44141e9e5286076ad5476386bf5a989ca586168a5b6e82d146d97b74dbe14ba1d4aa51b7329f725
7
+ data.tar.gz: 896e8d88397c9384f10666e4b9a8a65aad0e1df18783bcf3f47cea5660222b65a8e4aa34578497f7e8fa38814cea4ff0478eeab5778e6601dd9f3a8b79e8679a
data/.gitignore CHANGED
@@ -1,18 +1,18 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
18
- spec/dummy
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ spec/dummy
@@ -1,21 +1,21 @@
1
- language: ruby
2
- bundler_args: --without development
3
- before_script:
4
- - "bundle exec rake refinery:solr:dummy_app"
5
-
6
- rvm:
7
- - 1.9.3
8
- - 2.0.0
9
- env:
10
- global:
11
- - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
12
- - "RAILS_VERSION=4.0.0"
13
- matrix:
14
- - DB=sqlite3
15
- - DB=mysql
16
- - DB=postgresql
17
-
18
- notifications:
19
- email: true
20
-
1
+ language: ruby
2
+ bundler_args: --without development
3
+ before_script:
4
+ - "bundle exec rake refinery:solr:dummy_app"
5
+
6
+ rvm:
7
+ - 1.9.3
8
+ - 2.0.0
9
+ env:
10
+ global:
11
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
12
+ - "RAILS_VERSION=4.0.0"
13
+ matrix:
14
+ - DB=sqlite3
15
+ - DB=mysql
16
+ - DB=postgresql
17
+
18
+ notifications:
19
+ email: true
20
+
21
21
  script: "bundle exec rake spec"
data/Gemfile CHANGED
@@ -1,42 +1,48 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- git 'git://github.com/refinery/refinerycms.git', :branch => 'master' do
6
- gem 'refinerycms'
7
-
8
- group :development, :test do
9
- gem 'refinerycms-testing'
10
- end
11
- end
12
-
13
- git 'git://github.com/refinery/refinerycms-i18n.git', :branch => 'master' do
14
- gem 'refinerycms-i18n'
15
- end
16
-
17
- git 'git://github.com/sunspot/sunspot.git', :branch => 'master' do
18
- gem 'sunspot'
19
- gem 'sunspot_rails'
20
- gem 'sunspot_solr'
21
- end
22
-
23
- gem 'globalize3', github: 'svenfuchs/globalize3', branch: 'rails4'
24
- gem 'seo_meta', github: 'parndt/seo_meta', branch: 'master'
25
-
26
- group :development, :test do
27
- require 'rbconfig'
28
-
29
- gem 'sqlite3', :platform => :ruby
30
- gem 'mysql2', :platform => :ruby
31
- gem 'pg', :platform => :ruby
32
- end
33
-
34
- # Refinery/rails should pull in the proper versions of these
35
- group :assets do
36
- gem 'sass-rails'
37
- gem 'uglifier'
38
- end
39
-
40
- gem 'jquery-rails'
41
- gem 'protected_attributes'
42
- gem 'coveralls', require: false
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ git 'git://github.com/refinery/refinerycms.git', :branch => 'master' do
6
+ gem 'refinerycms'
7
+
8
+ group :development, :test do
9
+ gem 'refinerycms-testing'
10
+ end
11
+ end
12
+
13
+ git 'git://github.com/refinery/refinerycms-i18n.git', :branch => 'master' do
14
+ gem 'refinerycms-i18n'
15
+ end
16
+
17
+ git 'git://github.com/sunspot/sunspot.git', :branch => 'master' do
18
+ gem 'sunspot'
19
+ gem 'sunspot_rails'
20
+ end
21
+
22
+ gem 'sunspot_cell', :git => 'git://github.com/zheileman/sunspot_cell.git'
23
+
24
+ group :development, :test do
25
+ gem 'sunspot_cell_jars', :git => 'https://github.com/mrcsparker/sunspot_cell_jars.git'
26
+ gem 'sunspot_solr', :git => "https://github.com/mrcsparker/sunspot.git"
27
+ end
28
+
29
+ gem 'globalize3', github: 'svenfuchs/globalize3', branch: 'rails4'
30
+ gem 'seo_meta', github: 'parndt/seo_meta', branch: 'master'
31
+
32
+ group :development, :test do
33
+ require 'rbconfig'
34
+
35
+ gem 'sqlite3', :platform => :ruby
36
+ gem 'mysql2', :platform => :ruby
37
+ gem 'pg', :platform => :ruby
38
+ end
39
+
40
+ # Refinery/rails should pull in the proper versions of these
41
+ group :assets do
42
+ gem 'sass-rails'
43
+ gem 'uglifier'
44
+ end
45
+
46
+ gem 'jquery-rails'
47
+ gem 'protected_attributes'
48
+ gem 'coveralls', require: false
@@ -1,22 +1,22 @@
1
- Copyright (c) 2013 Jeff Chaput
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2013 Jeff Chaput
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,27 +1,27 @@
1
- # Refinery::Solr
2
-
3
- [![Gem Version](https://badge.fury.io/rb/refinerycms-solr.png)](http://badge.fury.io/rb/refinerycms-solr)
4
- [![Build Status](https://travis-ci.org/ixmedia/refinerycms-solr.png?branch=master)](https://travis-ci.org/ixmedia/refinerycms-solr)
5
- [![Dependency Status](https://gemnasium.com/ixmedia/refinerycms-solr.png)](https://gemnasium.com/ixmedia/refinerycms-solr)
6
- [![Code Climate](https://codeclimate.com/github/ixmedia/refinerycms-solr.png)](https://codeclimate.com/github/ixmedia/refinerycms-solr)
7
- [![Coverage Status](https://coveralls.io/repos/ixmedia/refinerycms-solr/badge.png)](https://coveralls.io/r/ixmedia/refinerycms-solr)
8
-
9
- Refinery CMS and Solr plugin. Based on [Refinery CMS ActsAsIndexed integration plugin](https://github.com/refinery/refinerycms-acts-as-indexed).
10
-
11
- ## Installation
12
-
13
- Add this line to your application's Gemfile:
14
-
15
- gem 'refinery-solr', '~> 1.0.0'
16
-
17
- And then execute:
18
-
19
- $ bundle
20
-
21
- Or install it yourself as:
22
-
23
- $ gem install refinery-solr
24
-
25
- ## Contributing
26
-
27
- See [contributing.md](contributing.md)
1
+ # Refinery::Solr
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/refinerycms-solr.png)](http://badge.fury.io/rb/refinerycms-solr)
4
+ [![Build Status](https://travis-ci.org/ixmedia/refinerycms-solr.png?branch=master)](https://travis-ci.org/ixmedia/refinerycms-solr)
5
+ [![Dependency Status](https://gemnasium.com/ixmedia/refinerycms-solr.png)](https://gemnasium.com/ixmedia/refinerycms-solr)
6
+ [![Code Climate](https://codeclimate.com/github/ixmedia/refinerycms-solr.png)](https://codeclimate.com/github/ixmedia/refinerycms-solr)
7
+ [![Coverage Status](https://coveralls.io/repos/ixmedia/refinerycms-solr/badge.png)](https://coveralls.io/r/ixmedia/refinerycms-solr)
8
+
9
+ Refinery CMS and Solr plugin. Based on [Refinery CMS ActsAsIndexed integration plugin](https://github.com/refinery/refinerycms-acts-as-indexed).
10
+
11
+ ## Installation
12
+
13
+ Add this line to your application's Gemfile:
14
+
15
+ gem 'refinery-solr', '~> 1.0.0'
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install refinery-solr
24
+
25
+ ## Contributing
26
+
27
+ See [contributing.md](contributing.md)
data/Rakefile CHANGED
@@ -1,21 +1,21 @@
1
- #!/usr/bin/env rake
2
- begin
3
- require 'bundler/setup'
4
- rescue LoadError
5
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
- end
7
-
8
- ENGINE_PATH = File.dirname(__FILE__)
9
- APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
10
-
11
- if File.exists?(APP_RAKEFILE)
12
- load 'rails/tasks/engine.rake'
13
- end
14
-
15
- require "refinerycms-testing"
16
- Refinery::Testing::Railtie.load_dummy_tasks(ENGINE_PATH)
17
-
18
- load File.expand_path('../tasks/rspec.rake', __FILE__)
19
- load File.expand_path('../tasks/solr.rake', __FILE__)
20
-
21
- task :default => :spec
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require 'bundler/setup'
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+
8
+ ENGINE_PATH = File.dirname(__FILE__)
9
+ APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
10
+
11
+ if File.exists?(APP_RAKEFILE)
12
+ load 'rails/tasks/engine.rake'
13
+ end
14
+
15
+ require "refinerycms-testing"
16
+ Refinery::Testing::Railtie.load_dummy_tasks(ENGINE_PATH)
17
+
18
+ load File.expand_path('../tasks/rspec.rake', __FILE__)
19
+ load File.expand_path('../tasks/solr.rake', __FILE__)
20
+
21
+ task :default => :spec
@@ -1,10 +1,10 @@
1
- require 'sunspot_rails'
2
-
3
- begin
4
- Refinery::Image.class_eval do
5
- searchable do
6
- text :title
7
- end
8
- end
9
- rescue NameError
10
- end
1
+ require 'sunspot_rails'
2
+
3
+ begin
4
+ Refinery::Image.class_eval do
5
+ searchable do
6
+ text :title
7
+ end
8
+ end
9
+ rescue NameError
10
+ end
@@ -1,14 +1,14 @@
1
- require 'sunspot_rails'
2
-
3
- begin
4
- Refinery::Page.class_eval do
5
- searchable do
6
- text :title, :meta_description, :menu_title, :browser_title
7
-
8
- text :all_page_part_content do
9
- parts.map { |part| part.body }
10
- end
11
- end
12
- end
13
- rescue NameError
14
- end
1
+ require 'sunspot_rails'
2
+
3
+ begin
4
+ Refinery::Page.class_eval do
5
+ searchable do
6
+ text :title, :meta_description, :menu_title, :browser_title
7
+
8
+ text :all_page_part_content do
9
+ parts.map { |part| part.body }
10
+ end
11
+ end
12
+ end
13
+ rescue NameError
14
+ end
@@ -1,10 +1,10 @@
1
- require 'sunspot_rails'
2
-
3
- begin
4
- Refinery::Resource.class_eval do
5
- searchable do
6
- text :file_name, :title, :type_of_content
7
- end
8
- end
9
- rescue NameError
10
- end
1
+ require 'sunspot_rails'
2
+
3
+ begin
4
+ Refinery::Resource.class_eval do
5
+ searchable do
6
+ text :file_name, :title, :type_of_content
7
+ end
8
+ end
9
+ rescue NameError
10
+ end
@@ -1,10 +1,10 @@
1
- require 'acts_as_indexed'
2
-
3
- begin
4
- Refinery::User.class_eval do
5
- searchable do
6
- text :username, :email
7
- end
8
- end
9
- rescue NameError
10
- end
1
+ require 'acts_as_indexed'
2
+
3
+ begin
4
+ Refinery::User.class_eval do
5
+ searchable do
6
+ text :username, :email
7
+ end
8
+ end
9
+ rescue NameError
10
+ end
@@ -1 +1 @@
1
- <%= render 'refinery/solr/admin/search', local_assigns if defined?(Refinery::Solr::Engine) %>
1
+ <%= render 'refinery/solr/admin/search', local_assigns if defined?(Refinery::Solr::Engine) %>
@@ -1 +1 @@
1
- <%= render 'refinery/solr/admin/search_header', local_assigns if defined?(Refinery::Solr::Engine) %>
1
+ <%= render 'refinery/solr/admin/search_header', local_assigns if defined?(Refinery::Solr::Engine) %>
@@ -1,7 +1,7 @@
1
- <form method='GET' action='<%= url %>' class='search_form'>
2
- <%= text_field :search, nil, :id => 'search', :type => 'text', :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>
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>
@@ -1,4 +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 %>
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 %>
@@ -1,22 +1,22 @@
1
- production:
2
- solr:
3
- hostname: localhost
4
- port: 8983
5
- log_level: WARNING
6
- path: /solr/production
7
- # read_timeout: 2
8
- # open_timeout: 0.5
9
-
10
- development:
11
- solr:
12
- hostname: localhost
13
- port: 8982
14
- log_level: INFO
15
- path: /solr/development
16
-
17
- test:
18
- solr:
19
- hostname: localhost
20
- port: 8981
21
- log_level: WARNING
22
- path: /solr/test
1
+ production:
2
+ solr:
3
+ hostname: localhost
4
+ port: 8983
5
+ log_level: WARNING
6
+ path: /solr/production
7
+ # read_timeout: 2
8
+ # open_timeout: 0.5
9
+
10
+ development:
11
+ solr:
12
+ hostname: localhost
13
+ port: 8982
14
+ log_level: INFO
15
+ path: /solr/development
16
+
17
+ test:
18
+ solr:
19
+ hostname: localhost
20
+ port: 8981
21
+ log_level: WARNING
22
+ path: /solr/test
@@ -1,17 +1,17 @@
1
- # Contribution Guidelines #
2
-
3
- ## Running tests ##
4
-
5
- Always run tests first. Quick start for tests (requires a dummy application) :
6
-
7
- bundle install
8
- bundle exec rake refinery:solr:dummy_app
9
- bundle exec rake spec
10
-
11
- ## Making a pull request ##
12
-
13
- If you'd like to submit a pull request please adhere to the following:
14
-
15
- 1. Your code *must* be tested. Please TDD your code!
16
- 2. Two-spaces instead of tabs
17
- 3. General Rails/Ruby naming conventions for files and classes
1
+ # Contribution Guidelines #
2
+
3
+ ## Running tests ##
4
+
5
+ Always run tests first. Quick start for tests (requires a dummy application) :
6
+
7
+ bundle install
8
+ bundle exec rake refinery:solr:dummy_app
9
+ bundle exec rake spec
10
+
11
+ ## Making a pull request ##
12
+
13
+ If you'd like to submit a pull request please adhere to the following:
14
+
15
+ 1. Your code *must* be tested. Please TDD your code!
16
+ 2. Two-spaces instead of tabs
17
+ 3. General Rails/Ruby naming conventions for files and classes
@@ -1,12 +1,12 @@
1
- module Refinery
2
- module Solr
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/solr/engine'
12
- require 'refinery/solr/active_record'
1
+ module Refinery
2
+ module Solr
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/solr/engine'
12
+ require 'refinery/solr/active_record'
@@ -1,13 +1,13 @@
1
- require "active_record"
2
-
3
- module ActiveRecord
4
- module Solr
5
- def with_query(query)
6
- results = self.name.constantize.search { fulltext query }.results
7
- ids = results.inject([]) {|ids, record| ids << record.id}
8
- self.where(id: ids)
9
- end
10
- end
11
- end
12
-
1
+ require "active_record"
2
+
3
+ module ActiveRecord
4
+ module Solr
5
+ def with_query(query)
6
+ results = self.name.constantize.search { fulltext query }.results
7
+ ids = results.inject([]) {|ids, record| ids << record.id}
8
+ self.where(id: ids)
9
+ end
10
+ end
11
+ end
12
+
13
13
  ActiveRecord::Base.extend ActiveRecord::Solr
@@ -1,13 +1,13 @@
1
- module Refinery
2
- module Solr
3
- class Engine < Rails::Engine
4
-
5
- include Refinery::Engine
6
-
7
- config.to_prepare do
8
- Decorators.register! ::Refinery::Solr.root
9
- end
10
-
11
- end
12
- end
13
- end
1
+ module Refinery
2
+ module Solr
3
+ class Engine < Rails::Engine
4
+
5
+ include Refinery::Engine
6
+
7
+ config.to_prepare do
8
+ Decorators.register! ::Refinery::Solr.root
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -1,18 +1,18 @@
1
- module Refinery
2
- module Solr
3
- class Version
4
- @major = 1
5
- @minor = 0
6
- @tiny = 5
7
- @build = nil
8
-
9
- class << self
10
- attr_reader :major, :minor, :tiny, :build
11
-
12
- def to_s
13
- [@major, @minor, @tiny, @build].compact.join('.')
14
- end
15
- end
16
- end
17
- end
18
- end
1
+ module Refinery
2
+ module Solr
3
+ class Version
4
+ @major = 1
5
+ @minor = 0
6
+ @tiny = 6
7
+ @build = nil
8
+
9
+ class << self
10
+ attr_reader :major, :minor, :tiny, :build
11
+
12
+ def to_s
13
+ [@major, @minor, @tiny, @build].compact.join('.')
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
- require 'sunspot_rails'
2
- require 'refinerycms-core'
3
- require 'refinery/solr'
1
+ require 'sunspot_rails'
2
+ require 'refinerycms-core'
3
+ require 'refinery/solr'
@@ -1,33 +1,33 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'refinery/solr/version'
5
-
6
- rails_version = ['>= 3.1.11', '< 4.1']
7
-
8
- Gem::Specification.new do |spec|
9
- spec.name = "refinerycms-solr"
10
- spec.version = Refinery::Solr::Version.to_s
11
- spec.authors = ["Jeff Chaput"]
12
- spec.email = ["jfc@artkeep.net"]
13
- spec.description = %q{An extension to handle the integration of Refinery CMS and Solr}
14
- spec.summary = %q{Refinery CMS Solr plugin}
15
- spec.homepage = "http://open.ixmedia.com"
16
- spec.license = "MIT"
17
-
18
- spec.files = `git ls-files`.split($/)
19
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
- spec.require_paths = ["lib"]
22
-
23
- spec.add_development_dependency "bundler", "~> 1.3"
24
- spec.add_development_dependency "rake"
25
-
26
- spec.add_dependency 'refinerycms-core', '~> 3.0.0.dev'
27
- spec.add_dependency 'sunspot_rails', '~> 2.1.0'
28
- spec.add_dependency 'sunspot_solr', '~> 2.1.0'
29
-
30
- spec.add_dependency 'seo_meta', '~> 1.4.0'
31
- spec.add_dependency 'friendly_id', '~> 5.0.0.rc1'
32
- spec.add_dependency 'globalize3', '~> 0.3.0'
33
- end
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'refinery/solr/version'
5
+
6
+ rails_version = ['>= 3.1.11', '< 4.1']
7
+
8
+ Gem::Specification.new do |spec|
9
+ spec.name = "refinerycms-solr"
10
+ spec.version = Refinery::Solr::Version.to_s
11
+ spec.authors = ["Jeff Chaput"]
12
+ spec.email = ["jfc@artkeep.net"]
13
+ spec.description = %q{An extension to handle the integration of Refinery CMS and Solr}
14
+ spec.summary = %q{Refinery CMS Solr plugin}
15
+ spec.homepage = "http://open.ixmedia.com"
16
+ spec.license = "MIT"
17
+
18
+ spec.files = `git ls-files`.split($/)
19
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.3"
24
+ spec.add_development_dependency "rake"
25
+
26
+ spec.add_dependency 'refinerycms-core', '~> 3.0.0.dev'
27
+ spec.add_dependency 'sunspot_rails', '~> 2.1.0'
28
+ spec.add_dependency 'sunspot_solr', '~> 2.1.0'
29
+
30
+ spec.add_dependency 'seo_meta', '~> 1.4.0'
31
+ spec.add_dependency 'friendly_id', '~> 5.0.0.rc1'
32
+ spec.add_dependency 'globalize3', '~> 0.3.0'
33
+ end
@@ -1,5 +1,5 @@
1
- #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails gems installed from the root of your application.
3
-
4
- ENGINE_PATH = File.expand_path('../..', __FILE__)
5
- load File.expand_path('../../spec/dummy/script/rails', __FILE__)
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails gems installed from the root of your application.
3
+
4
+ ENGINE_PATH = File.expand_path('../..', __FILE__)
5
+ load File.expand_path('../../spec/dummy/script/rails', __FILE__)
@@ -1,78 +1,78 @@
1
- require "spec_helper"
2
-
3
- module Refinery
4
- describe "search" do
5
- refinery_login_with :refinery_user
6
-
7
- shared_examples "no result search" do
8
- it "returns no results" do
9
- fill_in "search", :with => "yada yada"
10
- click_button "Search"
11
- page.should have_content("Sorry, no results found")
12
- end
13
- end
14
-
15
- describe "images extension" do
16
- let!(:image) { FactoryGirl.create(:image) }
17
- before do
18
- visit refinery.admin_images_path
19
- end
20
-
21
- it "returns found image" do
22
- fill_in "search", :with => "beach"
23
- click_button "Search"
24
-
25
- within ".actions" do
26
- page.should have_selector("a[href$='#{image.image_name}']")
27
- end
28
- end
29
-
30
- it_behaves_like "no result search"
31
- end
32
-
33
- describe "resources extension" do
34
- before do
35
- FactoryGirl.create(:resource)
36
- visit refinery.admin_resources_path
37
- end
38
-
39
- it "returns found resource" do
40
- fill_in "search", :with => "refinery"
41
- click_button "Search"
42
- page.should have_content("Refinery Is Awesome.txt")
43
- end
44
-
45
- it_behaves_like "no result search"
46
- end
47
-
48
- describe "pages extension" do
49
- before do
50
- FactoryGirl.create(:page, :title => "Ugis Ozols")
51
- visit refinery.admin_pages_path
52
- end
53
-
54
- it "returns found page" do
55
- fill_in "search", :with => "ugis"
56
- click_button "Search"
57
- page.should have_content("Ugis Ozols")
58
- end
59
-
60
- it_behaves_like "no result search"
61
- end
62
-
63
- describe "users extension" do
64
- before do
65
- FactoryGirl.create(:user, :username => "ugis")
66
- visit refinery.admin_users_path
67
- end
68
-
69
- it "returns found user" do
70
- fill_in "search", :with => "ugis"
71
- click_button "Search"
72
- page.should have_content("ugis")
73
- end
74
-
75
- it_behaves_like "no result search"
76
- end
77
- end
78
- end
1
+ require "spec_helper"
2
+
3
+ module Refinery
4
+ describe "search" do
5
+ refinery_login_with :refinery_user
6
+
7
+ shared_examples "no result search" do
8
+ it "returns no results" do
9
+ fill_in "search", :with => "yada yada"
10
+ click_button "Search"
11
+ page.should have_content("Sorry, no results found")
12
+ end
13
+ end
14
+
15
+ describe "images extension" do
16
+ let!(:image) { FactoryGirl.create(:image) }
17
+ before do
18
+ visit refinery.admin_images_path
19
+ end
20
+
21
+ it "returns found image" do
22
+ fill_in "search", :with => "beach"
23
+ click_button "Search"
24
+
25
+ within ".actions" do
26
+ page.should have_selector("a[href$='#{image.image_name}']")
27
+ end
28
+ end
29
+
30
+ it_behaves_like "no result search"
31
+ end
32
+
33
+ describe "resources extension" do
34
+ before do
35
+ FactoryGirl.create(:resource)
36
+ visit refinery.admin_resources_path
37
+ end
38
+
39
+ it "returns found resource" do
40
+ fill_in "search", :with => "refinery"
41
+ click_button "Search"
42
+ page.should have_content("Refinery Is Awesome.txt")
43
+ end
44
+
45
+ it_behaves_like "no result search"
46
+ end
47
+
48
+ describe "pages extension" do
49
+ before do
50
+ FactoryGirl.create(:page, :title => "Ugis Ozols")
51
+ visit refinery.admin_pages_path
52
+ end
53
+
54
+ it "returns found page" do
55
+ fill_in "search", :with => "ugis"
56
+ click_button "Search"
57
+ page.should have_content("Ugis Ozols")
58
+ end
59
+
60
+ it_behaves_like "no result search"
61
+ end
62
+
63
+ describe "users extension" do
64
+ before do
65
+ FactoryGirl.create(:user, :username => "ugis")
66
+ visit refinery.admin_users_path
67
+ end
68
+
69
+ it "returns found user" do
70
+ fill_in "search", :with => "ugis"
71
+ click_button "Search"
72
+ page.should have_content("ugis")
73
+ end
74
+
75
+ it_behaves_like "no result search"
76
+ end
77
+ end
78
+ end
@@ -1,63 +1,63 @@
1
- require 'rubygems'
2
-
3
- require 'coveralls'
4
- Coveralls.wear!
5
-
6
- # Configure Rails Environment
7
- ENV["RAILS_ENV"] ||= 'test'
8
-
9
- require File.expand_path("../dummy/config/environment", __FILE__)
10
-
11
- require 'rspec/rails'
12
- require 'capybara/rspec'
13
-
14
- require 'socket'
15
- require 'timeout'
16
-
17
- def is_port_open?(ip, port)
18
- begin
19
- Timeout::timeout(1) do
20
- begin
21
- s = TCPSocket.new(ip, port)
22
- s.close
23
- return true
24
- rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH
25
- return false
26
- end
27
- end
28
- rescue Timeout::Error
29
- end
30
-
31
- return false
32
- end
33
-
34
- Rails.backtrace_cleaner.remove_silencers!
35
-
36
- RSpec.configure do |config|
37
- config.mock_with :rspec
38
- config.treat_symbols_as_metadata_keys_with_true_values = true
39
- config.filter_run :focus => true
40
- config.run_all_when_everything_filtered = true
41
-
42
- config.before(:suite) do
43
- system "bundle exec rake -f #{File.expand_path("../dummy/Rakefile", __FILE__)} sunspot:solr:start"
44
- while (!is_port_open?("localhost", 8982))
45
- sleep(1)
46
- end
47
- end
48
-
49
- config.after(:suite) do
50
- system "bundle exec rake -f #{File.expand_path("../dummy/Rakefile", __FILE__)} sunspot:solr:stop"
51
- end
52
- end
53
-
54
- # set javascript driver for capybara
55
- Capybara.javascript_driver = :selenium
56
-
57
- # Requires supporting files with custom matchers and macros, etc,
58
- # in ./support/ and its subdirectories including factories.
59
- ([Rails.root.to_s] | ::Refinery::Plugins.registered.pathnames).map{|p|
60
- Dir[File.join(p, 'spec', 'support', '**', '*.rb').to_s]
61
- }.flatten.sort.each do |support_file|
62
- require support_file
63
- end
1
+ require 'rubygems'
2
+
3
+ require 'coveralls'
4
+ Coveralls.wear!
5
+
6
+ # Configure Rails Environment
7
+ ENV["RAILS_ENV"] ||= 'test'
8
+
9
+ require File.expand_path("../dummy/config/environment", __FILE__)
10
+
11
+ require 'rspec/rails'
12
+ require 'capybara/rspec'
13
+
14
+ require 'socket'
15
+ require 'timeout'
16
+
17
+ def is_port_open?(ip, port)
18
+ begin
19
+ Timeout::timeout(1) do
20
+ begin
21
+ s = TCPSocket.new(ip, port)
22
+ s.close
23
+ return true
24
+ rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH
25
+ return false
26
+ end
27
+ end
28
+ rescue Timeout::Error
29
+ end
30
+
31
+ return false
32
+ end
33
+
34
+ Rails.backtrace_cleaner.remove_silencers!
35
+
36
+ RSpec.configure do |config|
37
+ config.mock_with :rspec
38
+ config.treat_symbols_as_metadata_keys_with_true_values = true
39
+ config.filter_run :focus => true
40
+ config.run_all_when_everything_filtered = true
41
+
42
+ config.before(:suite) do
43
+ system "bundle exec rake -f #{File.expand_path("../dummy/Rakefile", __FILE__)} sunspot:solr:start"
44
+ while (!is_port_open?("localhost", 8982))
45
+ sleep(1)
46
+ end
47
+ end
48
+
49
+ config.after(:suite) do
50
+ system "bundle exec rake -f #{File.expand_path("../dummy/Rakefile", __FILE__)} sunspot:solr:stop"
51
+ end
52
+ end
53
+
54
+ # set javascript driver for capybara
55
+ Capybara.javascript_driver = :selenium
56
+
57
+ # Requires supporting files with custom matchers and macros, etc,
58
+ # in ./support/ and its subdirectories including factories.
59
+ ([Rails.root.to_s] | ::Refinery::Plugins.registered.pathnames).map{|p|
60
+ Dir[File.join(p, 'spec', 'support', '**', '*.rb').to_s]
61
+ }.flatten.sort.each do |support_file|
62
+ require support_file
63
+ end
@@ -1,4 +1,4 @@
1
- require 'rspec/core/rake_task'
2
-
3
- desc "Run specs"
4
- RSpec::Core::RakeTask.new
1
+ require 'rspec/core/rake_task'
2
+
3
+ desc "Run specs"
4
+ RSpec::Core::RakeTask.new
@@ -1,18 +1,18 @@
1
- namespace :refinery do
2
- namespace :solr do
3
- desc 'Generates a dummy app for testing'
4
- task :dummy_app do
5
- system 'bundle exec rake refinery:testing:dummy_app'
6
- system "cd #{dummy_app_path} && bundle exec rails generate sunspot_rails:install"
7
-
8
- File.open(File.join(dummy_app_path, 'config', 'sunspot.yml'), 'w') do |config|
9
- config.puts "development:\n solr:\n hostname: localhost\n port: 8982\n log_level: WARNING\n path: /solr/development\n\ntest:\n solr:\n hostname: localhost\n port: 8982\n log_level: WARNING\n path: /solr/test"
10
- end
11
-
12
- end
13
-
14
- def dummy_app_path
15
- Refinery::Testing::Railtie.target_extension_path.join('spec', 'dummy')
16
- end
17
- end
1
+ namespace :refinery do
2
+ namespace :solr do
3
+ desc 'Generates a dummy app for testing'
4
+ task :dummy_app do
5
+ system 'bundle exec rake refinery:testing:dummy_app'
6
+ system "cd #{dummy_app_path} && bundle exec rails generate sunspot_rails:install"
7
+
8
+ File.open(File.join(dummy_app_path, 'config', 'sunspot.yml'), 'w') do |config|
9
+ config.puts "development:\n solr:\n hostname: localhost\n port: 8982\n log_level: WARNING\n path: /solr/development\n\ntest:\n solr:\n hostname: localhost\n port: 8982\n log_level: WARNING\n path: /solr/test"
10
+ end
11
+
12
+ end
13
+
14
+ def dummy_app_path
15
+ Refinery::Testing::Railtie.target_extension_path.join('spec', 'dummy')
16
+ end
17
+ end
18
18
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-solr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
5
- prerelease:
4
+ version: 1.0.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jeff Chaput
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-10-04 00:00:00.000000000 Z
11
+ date: 2013-10-31 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,23 +27,20 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: refinerycms-core
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: sunspot_rails
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: sunspot_solr
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: seo_meta
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
@@ -110,7 +97,6 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: friendly_id
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ~>
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ~>
124
109
  - !ruby/object:Gem::Version
@@ -126,7 +111,6 @@ dependencies:
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: globalize3
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
115
  - - ~>
132
116
  - !ruby/object:Gem::Version
@@ -134,7 +118,6 @@ dependencies:
134
118
  type: :runtime
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
122
  - - ~>
140
123
  - !ruby/object:Gem::Version
@@ -176,27 +159,26 @@ files:
176
159
  homepage: http://open.ixmedia.com
177
160
  licenses:
178
161
  - MIT
162
+ metadata: {}
179
163
  post_install_message:
180
164
  rdoc_options: []
181
165
  require_paths:
182
166
  - lib
183
167
  required_ruby_version: !ruby/object:Gem::Requirement
184
- none: false
185
168
  requirements:
186
- - - ! '>='
169
+ - - '>='
187
170
  - !ruby/object:Gem::Version
188
171
  version: '0'
189
172
  required_rubygems_version: !ruby/object:Gem::Requirement
190
- none: false
191
173
  requirements:
192
- - - ! '>='
174
+ - - '>='
193
175
  - !ruby/object:Gem::Version
194
176
  version: '0'
195
177
  requirements: []
196
178
  rubyforge_project:
197
- rubygems_version: 1.8.24
179
+ rubygems_version: 2.1.9
198
180
  signing_key:
199
- specification_version: 3
181
+ specification_version: 4
200
182
  summary: Refinery CMS Solr plugin
201
183
  test_files:
202
184
  - spec/features/refinery/solr/admin/search_spec.rb