tumugi-plugin-command 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -2
- data/README.md +17 -22
- data/examples/run_command.rb +1 -1
- data/examples/run_external_script.rb +2 -2
- data/examples/save_result_to_file.rb +2 -2
- data/examples/tumugi_config.rb +4 -0
- data/lib/tumugi/plugin/command/version.rb +1 -1
- data/tumugi-plugin-command.gemspec +1 -2
- metadata +5 -20
- data/bin/console +0 -14
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 715dc434587bddae47ae45437db154efd5a11bc5
|
4
|
+
data.tar.gz: aaa98553417e286a6113c538c27674f8543a4088
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ae2187037b6970c7674405e1c99ec49603ee70a7d0475dc75496824ff4839cfc31e08f794072e71ad7e81c3c8692080b2c612b77e9277594e60951e1fca9116
|
7
|
+
data.tar.gz: 0084581a2365230bd1e94d4f335cdd5b22350f2dd502569a8f7d602b49ad7ac9ec17eb679cba6a0685346cd1edf0311ddb797b8e4a22025a4e61af68342a7280
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,18 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [0.
|
4
|
-
[Full Changelog](https://github.com/tumugi/tumugi-plugin-command/compare/v0.2.
|
3
|
+
## [0.3.0](https://github.com/tumugi/tumugi-plugin-command/tree/0.3.0) (2016-07-11)
|
4
|
+
[Full Changelog](https://github.com/tumugi/tumugi-plugin-command/compare/v0.2.1...0.3.0)
|
5
|
+
|
6
|
+
**Implemented enhancements:**
|
7
|
+
|
8
|
+
- Update dependent tumugi version to \>= 0.6.0 and update examples [\#10](https://github.com/tumugi/tumugi-plugin-command/pull/10) ([hakobera](https://github.com/hakobera))
|
9
|
+
|
10
|
+
## [v0.2.1](https://github.com/tumugi/tumugi-plugin-command/tree/v0.2.1) (2016-06-06)
|
11
|
+
[Full Changelog](https://github.com/tumugi/tumugi-plugin-command/compare/v0.2.0...v0.2.1)
|
5
12
|
|
6
13
|
**Merged pull requests:**
|
7
14
|
|
15
|
+
- Prepare release for 0.2.1 [\#9](https://github.com/tumugi/tumugi-plugin-command/pull/9) ([hakobera](https://github.com/hakobera))
|
8
16
|
- Cache output [\#8](https://github.com/tumugi/tumugi-plugin-command/pull/8) ([hakobera](https://github.com/hakobera))
|
9
17
|
|
10
18
|
## [v0.2.0](https://github.com/tumugi/tumugi-plugin-command/tree/v0.2.0) (2016-06-04)
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
[![Build Status](https://travis-ci.org/tumugi/tumugi-plugin-command.svg?branch=master)](https://travis-ci.org/tumugi/tumugi-plugin-command) [![Code Climate](https://codeclimate.com/github/tumugi/tumugi-plugin-command/badges/gpa.svg)](https://codeclimate.com/github/tumugi/tumugi-plugin-command) [![Coverage Status](https://coveralls.io/repos/github/tumugi/tumugi-plugin-command/badge.svg?branch=master)](https://coveralls.io/github/tumugi/tumugi-plugin-command) [![Gem Version](https://badge.fury.io/rb/tumugi-plugin-command.svg)](https://badge.fury.io/rb/tumugi-plugin-command)
|
2
2
|
|
3
|
-
# tumugi
|
3
|
+
# Command plugin for [tumugi](https://github.com/tumugi/tumugi)
|
4
4
|
|
5
|
-
tumugi-plugin-command is a plugin to execute a command.
|
5
|
+
tumugi-plugin-command is a tumugi plugin to execute a command.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -12,40 +12,35 @@ Add this line to your application's Gemfile:
|
|
12
12
|
gem 'tumugi-plugin-command'
|
13
13
|
```
|
14
14
|
|
15
|
-
And then execute
|
16
|
-
|
17
|
-
```sh
|
18
|
-
$ bundle
|
19
|
-
```
|
20
|
-
|
21
|
-
Or install it yourself as:
|
22
|
-
|
23
|
-
```sh
|
24
|
-
$ gem install tumugi-plugin-command
|
25
|
-
```
|
15
|
+
And then execute `bundle install`.
|
26
16
|
|
27
17
|
## Task
|
28
18
|
|
29
19
|
### Tumugi::Plugin::CommandTask
|
30
20
|
|
31
|
-
`Tumugi::Plugin::
|
21
|
+
`Tumugi::Plugin::CommandTask` is task to execute a specified command.
|
22
|
+
|
23
|
+
#### Parameters
|
24
|
+
|
25
|
+
- **command** command which you want to execute (string, required)
|
26
|
+
- **output_file** output file path. If you specified this parameter, all outputs to STDOUT are saved in this file. (string)
|
32
27
|
|
33
|
-
####
|
28
|
+
#### Examples
|
34
29
|
|
35
30
|
- Run command
|
36
31
|
|
37
32
|
```rb
|
38
33
|
task :task1, type: :command do
|
39
|
-
|
34
|
+
command "ls -la"
|
40
35
|
end
|
41
36
|
```
|
42
37
|
|
43
|
-
- Run command and save STDOUT into file
|
38
|
+
- Run command and save all outputs to STDOUT into file
|
44
39
|
|
45
40
|
```rb
|
46
41
|
task :task1, type: :command do
|
47
|
-
|
48
|
-
|
42
|
+
command "echo 'success'"
|
43
|
+
output_file "result.txt"
|
49
44
|
end
|
50
45
|
```
|
51
46
|
|
@@ -59,18 +54,18 @@ echo 'success' > tmp/external_script_result.txt
|
|
59
54
|
```rb
|
60
55
|
task :task1, type: :command do
|
61
56
|
requires :task2
|
62
|
-
|
57
|
+
command { "cat #{input.path}" }
|
63
58
|
end
|
64
59
|
|
65
60
|
task :task2, type: :command do
|
66
|
-
|
61
|
+
command "./examples/external_script.sh"
|
67
62
|
output target(:local_file, "tmp/external_script_result.txt")
|
68
63
|
end
|
69
64
|
```
|
70
65
|
|
71
66
|
## Development
|
72
67
|
|
73
|
-
After checking out the repo, run `
|
68
|
+
After checking out the repo, run `bundle install` to install dependencies. Then, run `bundle exec rake test` to run the tests.
|
74
69
|
|
75
70
|
## Contributing
|
76
71
|
|
data/examples/run_command.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
task :task1, type: :command do
|
2
2
|
requires :task2
|
3
|
-
|
3
|
+
command { "cat #{input.path}" }
|
4
4
|
end
|
5
5
|
|
6
6
|
task :task2, type: :command do
|
7
|
-
|
7
|
+
command "./examples/external_script.sh"
|
8
8
|
output target(:local_file, "tmp/external_script_result.txt")
|
9
9
|
end
|
@@ -20,12 +20,11 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_runtime_dependency "tumugi", ">= 0.
|
23
|
+
spec.add_runtime_dependency "tumugi", ">= 0.6.0"
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.11"
|
26
26
|
spec.add_development_dependency "rake", "~> 10.0"
|
27
27
|
spec.add_development_dependency "test-unit", "~> 3.1"
|
28
28
|
spec.add_development_dependency "test-unit-rr"
|
29
29
|
spec.add_development_dependency 'coveralls'
|
30
|
-
spec.add_development_dependency 'github_changelog_generator'
|
31
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tumugi-plugin-command
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuyuki Honda
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tumugi
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.6.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.6.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: github_changelog_generator
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
97
|
description:
|
112
98
|
email:
|
113
99
|
- hakobera@gmail.com
|
@@ -121,12 +107,11 @@ files:
|
|
121
107
|
- Gemfile
|
122
108
|
- README.md
|
123
109
|
- Rakefile
|
124
|
-
- bin/console
|
125
|
-
- bin/setup
|
126
110
|
- examples/external_script.sh
|
127
111
|
- examples/run_command.rb
|
128
112
|
- examples/run_external_script.rb
|
129
113
|
- examples/save_result_to_file.rb
|
114
|
+
- examples/tumugi_config.rb
|
130
115
|
- lib/tumugi/plugin/command/version.rb
|
131
116
|
- lib/tumugi/plugin/task/command.rb
|
132
117
|
- tumugi-plugin-command.gemspec
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "tumugi/plugin/shell"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|