rbld-plugin-hello 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbld-plugin-hello/rbld_hello.rb +35 -0
- data/lib/rbld-plugin-hello.rb +10 -9
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5ca090bcce01de17c0459647299812b2cc988cb
|
4
|
+
data.tar.gz: deefe6e40fe7250eec44bf56f20b305ee23cd8dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46e8fc3824a6247a971fbc83b46cf32a10ee145ee5ec4e20cd882b4ee6a2941bc215796f2cd58cdc2b7d74add8f9a0ac49d7b89d1d068d3a8687079a970b4314
|
7
|
+
data.tar.gz: 46d03d64d6cb2f074bf2e1dd868c93b6b200885b6fcdd7445669f915ad0cbf30ee9a9a601f727b2331b2c2630e4631eb76b3d399695d5ff40bec131b3c8b4ff8
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'colorize'
|
2
|
+
|
3
|
+
module RebuildPlugins
|
4
|
+
class RbldHelloCommand < Rebuild::CLI::Command
|
5
|
+
def initialize
|
6
|
+
@errno = 0
|
7
|
+
end
|
8
|
+
|
9
|
+
def usage
|
10
|
+
banner( :usage )
|
11
|
+
end
|
12
|
+
|
13
|
+
def run(parameters)
|
14
|
+
banner( :run )
|
15
|
+
end
|
16
|
+
|
17
|
+
attr_reader :errno
|
18
|
+
|
19
|
+
class << self
|
20
|
+
attr_accessor :stream
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def self.banner(method)
|
26
|
+
@stream.puts
|
27
|
+
@stream.puts "Hello from rbld hello '#{method}' handler".yellow
|
28
|
+
@stream.puts
|
29
|
+
end
|
30
|
+
|
31
|
+
def banner(method)
|
32
|
+
self.class.banner( method )
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/rbld-plugin-hello.rb
CHANGED
@@ -7,20 +7,21 @@ module RebuildPlugins
|
|
7
7
|
@stream = stream
|
8
8
|
|
9
9
|
banner( 'Hello from Rebuild CLI plugin' )
|
10
|
+
|
11
|
+
# loading command handlers
|
12
|
+
require_relative 'rbld-plugin-hello/rbld_hello.rb'
|
13
|
+
|
14
|
+
RbldHelloCommand.stream = stream
|
15
|
+
|
10
16
|
# yiedling means that plugin errored during this notification processing
|
11
|
-
|
17
|
+
yield if ENV['RBLD_HELLO_FAIL_START'] == '1'
|
12
18
|
end
|
13
19
|
|
14
20
|
def command(cmd_name, *args)
|
15
|
-
banner( "Hello from Rebuild CLI plugin
|
16
|
-
# yiedling means that plugin errored during this notification processing
|
17
|
-
# yield
|
18
|
-
end
|
21
|
+
banner( "Hello from Rebuild CLI plugin command '#{cmd_to_s(cmd_name, args)}' handler" )
|
19
22
|
|
20
|
-
|
21
|
-
|
22
|
-
# yielding means that command was processed by this plugin
|
23
|
-
yield
|
23
|
+
# yiedling means that plugin errored during this notification processing
|
24
|
+
yield if ENV['RBLD_HELLO_FAIL_COMMAND'] == '1'
|
24
25
|
end
|
25
26
|
|
26
27
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbld-plugin-hello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Fleytman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -151,6 +151,7 @@ extensions: []
|
|
151
151
|
extra_rdoc_files: []
|
152
152
|
files:
|
153
153
|
- lib/rbld-plugin-hello.rb
|
154
|
+
- lib/rbld-plugin-hello/rbld_hello.rb
|
154
155
|
homepage: http://rbld.io/
|
155
156
|
licenses:
|
156
157
|
- Apache-2.0
|
@@ -174,5 +175,5 @@ rubyforge_project:
|
|
174
175
|
rubygems_version: 2.6.11
|
175
176
|
signing_key:
|
176
177
|
specification_version: 4
|
177
|
-
summary: rbld-plugin-hello-0.0.
|
178
|
+
summary: rbld-plugin-hello-0.0.4
|
178
179
|
test_files: []
|