ruboty-evaluate 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -5
- data/LICENSE.txt +17 -18
- data/README.md +15 -1
- data/bin/console +7 -0
- data/bin/setup +5 -0
- data/lib/ruboty/evaluate/version.rb +1 -1
- data/lib/ruboty/handlers/evaluate.rb +2 -2
- data/ruboty-evaluate.gemspec +9 -8
- metadata +16 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f237ccd0ff8fcd2543b1a3120edb193ce08c150
|
4
|
+
data.tar.gz: 316e7b8eb1b77db1f7c16c7637f403bb7953659f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3a7cc311796e29611295b1711e2e6fa307ab5fbd5343759bbc36941fda44b252f1eda424047d596c9316c2f2ca1a8d09ced475d325f0b4dfd8f3bf89dfc79d5
|
7
|
+
data.tar.gz: c2f0c924ac64e9593e3d2d2533f1e6429d75770f1fa057a40356c076648c36f4327e7aa565a2172b4c48f37eaa3e5b42081d853e9325b33aadd7d04b4a4c412e
|
data/.gitignore
CHANGED
data/LICENSE.txt
CHANGED
@@ -1,22 +1,21 @@
|
|
1
|
-
|
1
|
+
The MIT License (MIT)
|
2
2
|
|
3
|
-
|
3
|
+
Copyright (c) 2015 kaihar4
|
4
4
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
the following conditions:
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
12
11
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
15
14
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
OF
|
22
|
-
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ Ruboty handler to evaluate a command.
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
Add this line to your
|
7
|
+
Add this line to your ruboty's Gemfile:
|
8
8
|
|
9
9
|
```ruby
|
10
10
|
gem 'ruboty-evaluate'
|
@@ -24,3 +24,17 @@ foo
|
|
24
24
|
> @ruboty eval ruby -e 'puts "bar"'
|
25
25
|
bar
|
26
26
|
```
|
27
|
+
|
28
|
+
## Development
|
29
|
+
|
30
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
31
|
+
|
32
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
33
|
+
|
34
|
+
## Contributing
|
35
|
+
|
36
|
+
1. Fork it ( https://github.com/kaihar4/ruboty-evaluate/fork )
|
37
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
38
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
39
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
40
|
+
5. Create a new Pull Request
|
data/bin/console
ADDED
data/bin/setup
ADDED
@@ -8,8 +8,8 @@ module Ruboty
|
|
8
8
|
def evaluate(message)
|
9
9
|
thread = Thread.start do
|
10
10
|
stdout, stderr, _status = Open3.capture3(message[:command])
|
11
|
-
message.reply(
|
12
|
-
message.reply(
|
11
|
+
stdout.chomp!.split("\n").each {|line| message.reply(line) } if stdout
|
12
|
+
stderr.chomp!.split("\n").each {|line| message.reply(line) } if stderr
|
13
13
|
end
|
14
14
|
Thread.start do
|
15
15
|
sleep 10
|
data/ruboty-evaluate.gemspec
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
2
3
|
require 'ruboty/evaluate/version'
|
3
4
|
|
4
5
|
Gem::Specification.new do |spec|
|
@@ -6,18 +7,18 @@ Gem::Specification.new do |spec|
|
|
6
7
|
spec.version = Ruboty::Evaluate::VERSION
|
7
8
|
spec.authors = ['kaihar4']
|
8
9
|
spec.email = ['kaihar4@gmail.com']
|
9
|
-
spec.summary = 'Ruboty handler to evaluate a command
|
10
|
+
spec.summary = 'Ruboty handler to evaluate a command'
|
10
11
|
spec.description = spec.summary
|
11
12
|
spec.homepage = 'https://github.com/kaihar4/ruboty-evaluate'
|
12
13
|
spec.license = 'MIT'
|
13
14
|
|
14
|
-
spec.files = `git ls-files -z`.split("\x0")
|
15
|
-
spec.
|
16
|
-
spec.
|
15
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
16
|
+
spec.bindir = 'exe'
|
17
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
17
18
|
spec.require_paths = ['lib']
|
18
19
|
|
19
|
-
spec.
|
20
|
+
spec.add_runtime_dependency 'ruboty'
|
20
21
|
|
21
|
-
spec.add_development_dependency 'bundler'
|
22
|
-
spec.add_development_dependency 'rake'
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.9'
|
23
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
23
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-evaluate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaihar4
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruboty
|
@@ -28,31 +28,31 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1.9'
|
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
|
-
version: '
|
40
|
+
version: '1.9'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '10.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
|
-
version: '0'
|
55
|
-
description: Ruboty handler to evaluate a command
|
54
|
+
version: '10.0'
|
55
|
+
description: Ruboty handler to evaluate a command
|
56
56
|
email:
|
57
57
|
- kaihar4@gmail.com
|
58
58
|
executables: []
|
@@ -64,6 +64,8 @@ files:
|
|
64
64
|
- LICENSE.txt
|
65
65
|
- README.md
|
66
66
|
- Rakefile
|
67
|
+
- bin/console
|
68
|
+
- bin/setup
|
67
69
|
- lib/ruboty/evaluate.rb
|
68
70
|
- lib/ruboty/evaluate/version.rb
|
69
71
|
- lib/ruboty/handlers/evaluate.rb
|
@@ -88,8 +90,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
90
|
version: '0'
|
89
91
|
requirements: []
|
90
92
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.
|
93
|
+
rubygems_version: 2.4.5
|
92
94
|
signing_key:
|
93
95
|
specification_version: 4
|
94
|
-
summary: Ruboty handler to evaluate a command
|
96
|
+
summary: Ruboty handler to evaluate a command
|
95
97
|
test_files: []
|