rbld-plugin-hello 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rbld-plugin-hello.rb +29 -3
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71c71b309884be6c0c765dbaf083a71b1ef9e3f5
4
- data.tar.gz: 4d2f4384ccebef5514d5bfaaa3b462f811e92d99
3
+ metadata.gz: a44e060f8590416e1c85d8535e1c9142b784ac54
4
+ data.tar.gz: 07c25cbde7eac6c2949b83d312063be6717301c4
5
5
  SHA512:
6
- metadata.gz: 6cc5225ea14c5ddcd88d95737e37bf1952b5125859bfff9c960c0b5dbf9e529ab466a649772cbd30abb1ab260b48f6294dae558d30f7e7d5634fe3486476ff88
7
- data.tar.gz: 59a7e5334b5d765b6154a780d62c78227b1f24c351123a95f939d87718a816891351d0813e65845e12e65ac71acc210d6148a1ecaee21daed65deb3687a7b49f
6
+ metadata.gz: ab10e43373b8f6cbeeb63b94a1cbac2bb780f32b4eac1007ab21ed5ccd25121ee6c16c4d3a0c217d648b0be78f162ea6475faf96c4f762e6d76b16d903efc5eb
7
+ data.tar.gz: c319be1d74ff6938494b72f226939d43a982f8fd8d298c6a2c8eb4e73334e148f782caa5c33bc8131125dafbcf0151a0f74a5b3ac866db38a5148faa35159a52
@@ -4,9 +4,35 @@ require 'plugman/plugin_base'
4
4
  module RebuildPlugins
5
5
  class HelloPlugin < Plugman::PluginBase
6
6
  def start(stream = STDOUT)
7
- stream.puts
8
- stream.puts 'Hello from Rebuild CLI plugin'.green
9
- stream.puts
7
+ @stream = stream
8
+
9
+ banner( 'Hello from Rebuild CLI plugin' )
10
+ # yiedling means that plugin errored during this notification processing
11
+ # yield
12
+ end
13
+
14
+ def command(cmd_name, *args)
15
+ banner( "Hello from Rebuild CLI plugin known command #{cmd_to_s(cmd_name, args)} handler" )
16
+ # yiedling means that plugin errored during this notification processing
17
+ # yield
18
+ end
19
+
20
+ def unknown_command(cmd_name, *args)
21
+ banner( "Hello from Rebuild CLI plugin unknown command #{cmd_to_s(cmd_name, args)} handler" )
22
+ # yielding means that command was processed by this plugin
23
+ yield
24
+ end
25
+
26
+ private
27
+
28
+ def banner(msg)
29
+ @stream.puts
30
+ @stream.puts msg.green
31
+ @stream.puts
32
+ end
33
+
34
+ def cmd_to_s(name, args)
35
+ "#{name}(#{args.join( ', ' )})"
10
36
  end
11
37
  end
12
38
  end
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.2
4
+ version: 0.0.3
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-03-13 00:00:00.000000000 Z
11
+ date: 2017-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -171,8 +171,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  version: '0'
172
172
  requirements: []
173
173
  rubyforge_project:
174
- rubygems_version: 2.4.8
174
+ rubygems_version: 2.6.11
175
175
  signing_key:
176
176
  specification_version: 4
177
- summary: rbld-plugin-hello-0.0.2
177
+ summary: rbld-plugin-hello-0.0.3
178
178
  test_files: []