guard-sunspot 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in guard-sunspot.gemspec
4
+ gemspec
@@ -0,0 +1,32 @@
1
+ # Guard::Sunspot
2
+
3
+ Guard::Sunspot allows you to automatically start and stop your solr
4
+ server.
5
+
6
+ ## Install
7
+ The simplest way to install Guard is to use [Bundler](http://gembundler.com/).
8
+ Please make sure to have [Guard](https://github.com/guard/guard) installed before continue.
9
+
10
+ Add Guard::Cucumber to your `Gemfile`:
11
+
12
+ ```ruby
13
+ group :development do
14
+ gem 'guard-sunspot'
15
+ end
16
+ ```
17
+
18
+ Add the default Guard::Cucumber template to your `Guardfile` by running:
19
+
20
+ ```bash
21
+ $ guard init sunspot
22
+ ```
23
+
24
+ ## Options
25
+ You can set RAILS\_ENV by setting the `:environment` option.
26
+
27
+ ```ruby
28
+ guard 'sunspot', :environment => 'development' do
29
+ watch('Gemfile.lock')
30
+ watch('config/sunspot.yml')
31
+ end
32
+ ```
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "guard/sunspot/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "guard-sunspot"
7
+ s.version = Guard::SunspotVersion::VERSION
8
+ s.authors = ["John Hampton", "Anthony Smith"]
9
+ s.email = ["john@topagentnetwork.com", "anthony@sticksnleaves.com"]
10
+ s.homepage = "http://github.com/anthonator/guard-sunspot"
11
+ s.summary = 'Guard gem for sunspot solr'
12
+ s.description = 'Guard::Sunspot automatically starts and stops your solr server.'
13
+
14
+ s.rubyforge_project = "guard-sunspot"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ # specify any dependencies here; for example:
22
+ # s.add_development_dependency "rspec"
23
+ # s.add_runtime_dependency "rest-client"
24
+ s.add_runtime_dependency "guard"
25
+ s.add_runtime_dependency "sunspot_solr"
26
+ end
@@ -0,0 +1,32 @@
1
+ require "guard"
2
+ require "guard/guard"
3
+ require "guard/sunspot/version"
4
+
5
+ module Guard
6
+ class Sunspot < Guard
7
+ def initialize(watchers=[], options={})
8
+ super
9
+
10
+ @environment = options[:environment] || 'development'
11
+ end
12
+
13
+ def start
14
+ system("rake sunspot:solr:start RAILS_ENV=#{@environment}")
15
+ UI.info "Sunspot started"
16
+ end
17
+
18
+ def stop
19
+ system("rake sunspot:solr:stop RAILS_ENV=#{@environment}")
20
+ UI.info "Sunspot stopped"
21
+ end
22
+
23
+ def reload
24
+ stop
25
+ start
26
+ end
27
+
28
+ def run_on_changes(path)
29
+ reload
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,4 @@
1
+ guard 'sunspot' do
2
+ watch('Gemfile.lock')
3
+ watch('config/sunspot.yml')
4
+ end
@@ -0,0 +1,5 @@
1
+ module Guard
2
+ module SunspotVersion
3
+ VERSION = "0.0.2"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: guard-sunspot
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - John Hampton
9
+ - Anthony Smith
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2012-07-01 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: guard
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
31
+ - !ruby/object:Gem::Dependency
32
+ name: sunspot_solr
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ type: :runtime
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ description: Guard::Sunspot automatically starts and stops your solr server.
48
+ email:
49
+ - john@topagentnetwork.com
50
+ - anthony@sticksnleaves.com
51
+ executables: []
52
+ extensions: []
53
+ extra_rdoc_files: []
54
+ files:
55
+ - .gitignore
56
+ - Gemfile
57
+ - README.md
58
+ - Rakefile
59
+ - guard-sunspot.gemspec
60
+ - lib/guard/sunspot.rb
61
+ - lib/guard/sunspot/templates/Guardfile
62
+ - lib/guard/sunspot/version.rb
63
+ homepage: http://github.com/anthonator/guard-sunspot
64
+ licenses: []
65
+ post_install_message:
66
+ rdoc_options: []
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ! '>='
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ! '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ requirements: []
82
+ rubyforge_project: guard-sunspot
83
+ rubygems_version: 1.8.24
84
+ signing_key:
85
+ specification_version: 3
86
+ summary: Guard gem for sunspot solr
87
+ test_files: []
88
+ has_rdoc: