guard-predictionio 0.0.1

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: 865b4032e733909703bd67a8d4d19d7575ed865b
4
+ data.tar.gz: 3924abbcb8329ef852c51788e56a4a4d5c34c0b3
5
+ SHA512:
6
+ metadata.gz: caa73e170036aece733a83d39ef68ad65b72ca8aaf576488a612e04c55e52345a2f9a4086fb30a5c7c6e64fd48e560235568f0451726227d6c6454509549df83
7
+ data.tar.gz: 96e423ddcb7cd379ed6ad004f1e6d1d153234806664a57765ab567dc5ee03702f950738e484f5504395fb8620688c1ffad50809fe8184f3960601bfd3659a4f1
@@ -0,0 +1,22 @@
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
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
@@ -0,0 +1,7 @@
1
+ rvm:
2
+ - 1.9.2
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.0
6
+ - 2.1.1
7
+ - 2.1.2
File without changes
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in guard-predictionio.gemspec
4
+ gemspec
@@ -0,0 +1,6 @@
1
+
2
+ guard :rspec do
3
+ watch(%r{^spec/.+_spec\.rb$})
4
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
5
+ watch('spec/spec_helper.rb') { "spec" }
6
+ end
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 RootsRated
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.
@@ -0,0 +1,50 @@
1
+ # Guard::PredictionIO
2
+ =====
3
+
4
+ [![Gem Version](https://badge.fury.io/rb/guard-predictionio.png)](http://badge.fury.io/rb/guard-predictionio)
5
+ [![Build Status](https://travis-ci.org/RootsRated/guard-predictionio.png?branch=master)](https://travis-ci.org/RootsRated/guard-predictionio)
6
+ [![Dependency Status](https://gemnasium.com/RootsRated/guard-predictionio.png)](https://gemnasium.com/RootsRated/guard-predictionio)
7
+ [![Code Climate](https://codeclimate.com/github/RootsRated/guard-predictionio.png)](https://codeclimate.com/github/RootsRated/guard-predictionio)
8
+ [![Coverage Status](https://coveralls.io/repos/RootsRated/guard-predictionio/badge.png?branch=master)](https://coveralls.io/r/RootsRated/guard-predictionio)
9
+ [![Inline docs](http://inch-ci.org/github/RootsRated/guard-predictionio.png)](http://inch-ci.org/github/RootsRated/guard-predictionio)
10
+
11
+ Guard::PredictionIO automatically manages a
12
+ [PredictionIO](http://prediction.io/) service.
13
+
14
+ **Note: You should really only need it in development and test
15
+ environments; this gem is not meant to manage production server
16
+ instances of PredictionIO.**
17
+
18
+ ## Installation
19
+
20
+ Add this line to your application's Gemfile:
21
+
22
+ gem 'guard-predictionio'
23
+
24
+ And then execute:
25
+
26
+ $ bundle
27
+
28
+ Or install it yourself as:
29
+
30
+ $ gem install guard-predictionio
31
+
32
+ Add the guard definition to your Guardfile by running:
33
+
34
+ $ guard init predictionio
35
+
36
+ Install PredictionIO using their instructions:
37
+
38
+ [http://docs.prediction.io/current/installation/index.html](http://docs.prediction.io/current/installation/index.html)
39
+
40
+ ## Usage
41
+
42
+ TODO: Write usage instructions here
43
+
44
+ ## Contributing
45
+
46
+ 1. Fork it ( https://github.com/RootsRated/guard-predictionio/fork )
47
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
48
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
49
+ 4. Push to the branch (`git push origin my-new-feature`)
50
+ 5. Create a new Pull Request
@@ -0,0 +1,7 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new
5
+
6
+ task :default => :spec
7
+ task :test => :spec
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'guard/predictionio/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "guard-predictionio"
8
+ spec.version = Guard::PredictionioVersion::VERSION
9
+ spec.author = "Scott BonAmi"
10
+ spec.email = "sbonami@rootsrated.com"
11
+ spec.summary = "Guard gem for PredictionIO"
12
+ spec.description = "Guard::PredictionIO automatically runs your PredictionIO server"
13
+ spec.homepage = "https://rubygems.org/RootsRated/guard-predictionio"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.test_files = spec.files.grep(%r{^spec/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_dependency 'guard', '~> 2.1'
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.6"
23
+ spec.add_development_dependency "rspec", "~> 3.0"
24
+ spec.add_development_dependency "guard-rspec", "~> 4.2"
25
+ spec.add_development_dependency "rake"
26
+ end
@@ -0,0 +1,98 @@
1
+ require 'guard'
2
+ require 'guard/plugin'
3
+
4
+ module Guard
5
+ class Predictionio < Plugin
6
+ # Initializes a Guard plugin.
7
+ # Don't do any work here, especially as Guard plugins get initialized even if they are not in an active group!
8
+ #
9
+ # @param [Hash] options the custom Guard plugin options
10
+ # @option options [Array<Guard::Watcher>] watchers the Guard plugin file watchers
11
+ # @option options [Symbol] group the group this Guard plugin belongs to
12
+ # @option options [Boolean] any_return allow any object to be returned from a watcher
13
+ #
14
+ def initialize(options = {})
15
+ super
16
+ end
17
+
18
+ # Called once when Guard starts. Please override initialize method to init stuff.
19
+ #
20
+ # @raise [:task_has_failed] when start has failed
21
+ # @return [Object] the task result
22
+ #
23
+ def start
24
+ log :info, "Starting..."
25
+ log :info, `predictionio-start-all.sh`
26
+ end
27
+
28
+ # Called when `stop|quit|exit|s|q|e + enter` is pressed (when Guard quits).
29
+ #
30
+ # @raise [:task_has_failed] when stop has failed
31
+ # @return [Object] the task result
32
+ #
33
+ def stop
34
+ log :info, "Stopping..."
35
+ log :info, `predictionio-stop-all.sh`
36
+ end
37
+
38
+ # Called when `reload|r|z + enter` is pressed.
39
+ # This method should be mainly used for "reload" (really!) actions like reloading passenger/spork/bundler/...
40
+ #
41
+ # @raise [:task_has_failed] when reload has failed
42
+ # @return [Object] the task result
43
+ #
44
+ def reload
45
+ stop && start
46
+ end
47
+
48
+ # Called when just `enter` is pressed
49
+ # This method should be principally used for long action like running all specs/tests/...
50
+ #
51
+ # @raise [:task_has_failed] when run_all has failed
52
+ # @return [Object] the task result
53
+ #
54
+ def run_all
55
+ end
56
+
57
+ # Default behaviour on file(s) changes that the Guard plugin watches.
58
+ # @param [Array<String>] paths the changes files or paths
59
+ # @raise [:task_has_failed] when run_on_change has failed
60
+ # @return [Object] the task result
61
+ #
62
+ def run_on_changes(paths)
63
+ end
64
+
65
+ # Called on file(s) additions that the Guard plugin watches.
66
+ #
67
+ # @param [Array<String>] paths the changes files or paths
68
+ # @raise [:task_has_failed] when run_on_additions has failed
69
+ # @return [Object] the task result
70
+ #
71
+ def run_on_additions(paths)
72
+ end
73
+
74
+ # Called on file(s) modifications that the Guard plugin watches.
75
+ #
76
+ # @param [Array<String>] paths the changes files or paths
77
+ # @raise [:task_has_failed] when run_on_modifications has failed
78
+ # @return [Object] the task result
79
+ #
80
+ def run_on_modifications(paths)
81
+ end
82
+
83
+ # Called on file(s) removals that the Guard plugin watches.
84
+ #
85
+ # @param [Array<String>] paths the changes files or paths
86
+ # @raise [:task_has_failed] when run_on_removals has failed
87
+ # @return [Object] the task result
88
+ #
89
+ def run_on_removals(paths)
90
+ end
91
+
92
+ private
93
+
94
+ def log(level, message)
95
+ UI.send(level, "[PredictionIO] - #{message}")
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,2 @@
1
+ guard :predictionio do
2
+ end
@@ -0,0 +1,6 @@
1
+ module Guard
2
+ module PredictionioVersion
3
+ # Guard::PredictionIO version that is used for the Gem specification
4
+ VERSION = "0.0.1"
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe Guard::Predictionio do
4
+
5
+ end
@@ -0,0 +1,8 @@
1
+ require 'rspec'
2
+ require 'guard/predictionio'
3
+ ENV["GUARD_ENV"] = 'test'
4
+
5
+ RSpec.configure do |config|
6
+ config.filter_run :focus => true
7
+ config.run_all_when_everything_filtered = true
8
+ end
metadata ADDED
@@ -0,0 +1,129 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: guard-predictionio
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Scott BonAmi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-07-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: guard
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: guard-rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '4.2'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '4.2'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Guard::PredictionIO automatically runs your PredictionIO server
84
+ email: sbonami@rootsrated.com
85
+ executables: []
86
+ extensions: []
87
+ extra_rdoc_files: []
88
+ files:
89
+ - ".gitignore"
90
+ - ".travis.yml"
91
+ - CHANGELOG.md
92
+ - Gemfile
93
+ - Guardfile
94
+ - LICENSE.txt
95
+ - README.md
96
+ - Rakefile
97
+ - guard-predictionio.gemspec
98
+ - lib/guard/predictionio.rb
99
+ - lib/guard/predictionio/templates/Guardfile
100
+ - lib/guard/predictionio/version.rb
101
+ - spec/guard/predictionio_spec.rb
102
+ - spec/spec_helper.rb
103
+ homepage: https://rubygems.org/RootsRated/guard-predictionio
104
+ licenses:
105
+ - MIT
106
+ metadata: {}
107
+ post_install_message:
108
+ rdoc_options: []
109
+ require_paths:
110
+ - lib
111
+ required_ruby_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ requirements: []
122
+ rubyforge_project:
123
+ rubygems_version: 2.2.2
124
+ signing_key:
125
+ specification_version: 4
126
+ summary: Guard gem for PredictionIO
127
+ test_files:
128
+ - spec/guard/predictionio_spec.rb
129
+ - spec/spec_helper.rb