irfsdash 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +0 -4
- data/bin/irfsdash +54 -0
- data/irfsdash.gemspec +1 -0
- data/lib/irfsdash/version.rb +1 -1
- metadata +20 -2
data/README.md
CHANGED
data/bin/irfsdash
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'rubygems'
|
3
|
+
require 'trollop'
|
4
|
+
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
5
|
+
require 'irfsdash'
|
6
|
+
|
7
|
+
SUB_COMMANDS = %w(activity project ticker widget)
|
8
|
+
global_opts = Trollop::options do
|
9
|
+
version "irfsdash #{IRFSDash::VERSION} (c) James Harrison"
|
10
|
+
banner <<-EOS
|
11
|
+
|
12
|
+
irfsdash lets you push messages to IRFS's dashboard.
|
13
|
+
|
14
|
+
Valid subcommands: activity, project, ticker, widget
|
15
|
+
|
16
|
+
Global options:
|
17
|
+
EOS
|
18
|
+
stop_on SUB_COMMANDS
|
19
|
+
end
|
20
|
+
|
21
|
+
cmd = ARGV.shift # get the subcommand
|
22
|
+
cmd_opts = case cmd
|
23
|
+
when "activity"
|
24
|
+
Trollop::options do
|
25
|
+
opt :source, "Your source name", default: 'IRFSdash CLI', type: String
|
26
|
+
opt :content, "Your message", type: String
|
27
|
+
opt :type, "What content type are you sending", type: String, default: 'string'
|
28
|
+
end
|
29
|
+
when "project"
|
30
|
+
Trollop::options do
|
31
|
+
opt :source, "Your source name", default: 'IRFSdash CLI', type: String
|
32
|
+
opt :project, "The project name", type: String
|
33
|
+
opt :happy, "Project state", type: Boolean
|
34
|
+
end
|
35
|
+
when "ticker"
|
36
|
+
Trollop::options do
|
37
|
+
opt :source, "Your source name", default: 'IRFSdash CLI', type: String
|
38
|
+
opt :content, "Your message", type: String
|
39
|
+
opt :ticker_type, "Send to this ticker type", type: String, default: 'main'
|
40
|
+
end
|
41
|
+
when "widget"
|
42
|
+
Trollop::options do
|
43
|
+
opt :source, "Your source name", default: 'IRFSdash CLI', type: String
|
44
|
+
opt :url, "URL to display", type: String
|
45
|
+
opt :title, "Widget title", type: String, default: 'string'
|
46
|
+
end
|
47
|
+
|
48
|
+
else
|
49
|
+
Trollop::die "unknown subcommand #{cmd.inspect}"
|
50
|
+
end
|
51
|
+
#puts "Subcommand options: #{cmd_opts.inspect}"
|
52
|
+
cmd_opts = {} if !cmd_opts
|
53
|
+
IRFSDash.setup(source: 'IRFSdash CLI')
|
54
|
+
IRFSDash.send(cmd.to_sym, cmd_opts)
|
data/irfsdash.gemspec
CHANGED
data/lib/irfsdash/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: irfsdash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -43,10 +43,27 @@ dependencies:
|
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: 1.7.5
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: trollop
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 2.0.0
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.0.0
|
46
62
|
description: Interface gem for the BBC Research and Development IRFS Dashboard
|
47
63
|
email:
|
48
64
|
- james.harrison2@bbc.co.uk
|
49
|
-
executables:
|
65
|
+
executables:
|
66
|
+
- irfsdash
|
50
67
|
extensions: []
|
51
68
|
extra_rdoc_files: []
|
52
69
|
files:
|
@@ -55,6 +72,7 @@ files:
|
|
55
72
|
- LICENSE.txt
|
56
73
|
- README.md
|
57
74
|
- Rakefile
|
75
|
+
- bin/irfsdash
|
58
76
|
- irfsdash.gemspec
|
59
77
|
- lib/irfsdash.rb
|
60
78
|
- lib/irfsdash/version.rb
|