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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00a9894ded9f73e1724a8771a89e667aaf758018
4
- data.tar.gz: a5239a48ad074f46d7c591a5f1da365e5677ac31
3
+ metadata.gz: 4f237ccd0ff8fcd2543b1a3120edb193ce08c150
4
+ data.tar.gz: 316e7b8eb1b77db1f7c16c7637f403bb7953659f
5
5
  SHA512:
6
- metadata.gz: 9302c007ece95504927b044408012ab1a19f60ee468832c6aecb2ac25e8437174746000c3e99c3d7a0377003dd56e8df4d0263d9dddce1ac76399083b126c624
7
- data.tar.gz: edddd2cd3a0f98673de15e746d35bb11d90b99fa2ef3f6beba2bbdd1264a7d2d3b3016bcbd43e972b3bbc7ae469781e1c77632682e81102eede95ced54d40fb3
6
+ metadata.gz: e3a7cc311796e29611295b1711e2e6fa307ab5fbd5343759bbc36941fda44b252f1eda424047d596c9316c2f2ca1a8d09ced475d325f0b4dfd8f3bf89dfc79d5
7
+ data.tar.gz: c2f0c924ac64e9593e3d2d2533f1e6429d75770f1fa057a40356c076648c36f4327e7aa565a2172b4c48f37eaa3e5b42081d853e9325b33aadd7d04b4a4c412e
data/.gitignore CHANGED
@@ -7,8 +7,3 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- *.bundle
11
- *.so
12
- *.o
13
- *.a
14
- mkmf.log
data/LICENSE.txt CHANGED
@@ -1,22 +1,21 @@
1
- Copyright (c) 2014 kaihar4
1
+ The MIT License (MIT)
2
2
 
3
- MIT License
3
+ Copyright (c) 2015 kaihar4
4
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:
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
- included in all copies or substantial portions of the Software.
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
- 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.
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 application's Gemfile:
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
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'ruboty/evaluate'
5
+
6
+ require 'irb'
7
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install --path vendor/bundle
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module Evaluate
3
- VERSION = '1.0.2'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
@@ -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(stdout.chomp) if stdout
12
- message.reply(stderr.chomp) if stderr
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
@@ -1,4 +1,5 @@
1
- $LOAD_PATH << File.expand_path('../lib', __FILE__)
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.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
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.add_dependency 'ruboty'
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.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaihar4
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2015-02-11 00:00:00.000000000 Z
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: '0'
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: '0'
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.2.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: []