magellan-cli 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/magellan/cli/messaging/base.rb +6 -2
- data/lib/magellan/cli/messaging/mqtt.rb +4 -0
- data/lib/magellan/cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48fddb6b7104d258581e1abf2a1ca583359ea419
|
4
|
+
data.tar.gz: bd234a5b1aee93ee7a4d7ea48091c9c3e290134e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5df9b5e615d38bf2cd8620eb983b46d78fa9e77502b71b6d6dc79397dd4a47a5cfdd9963e440b3eaee37aaf6ad4779002df8eb96320112d4438623f5565e516
|
7
|
+
data.tar.gz: 53ae945253f86ffd27e8258945f1b7ac8bb6c832fc6b0db89df97bc95d7dd0dfe21d175828321f3c63f8853fb95f67daf8e22eeaf735e6079a546fee2803036e
|
data/Gemfile.lock
CHANGED
@@ -17,8 +17,12 @@ module Magellan
|
|
17
17
|
|
18
18
|
private
|
19
19
|
|
20
|
+
def load_selection!(name, &block)
|
21
|
+
return access_api{ load_selection(name, &block) }
|
22
|
+
end
|
23
|
+
|
20
24
|
def find(klass, id = nil)
|
21
|
-
id ||= load_selection(klass.parameter_name)["id"]
|
25
|
+
id ||= load_selection!(klass.parameter_name)["id"]
|
22
26
|
r = get_json("/admin/#{klass.resource_key}/#{id}.json")
|
23
27
|
end
|
24
28
|
|
@@ -28,7 +32,7 @@ module Magellan
|
|
28
32
|
|
29
33
|
def build_core
|
30
34
|
proj = find(Resources::Project)
|
31
|
-
client_version = load_selection(Resources::ClientVersion.parameter_name)["version"]
|
35
|
+
client_version = load_selection!(Resources::ClientVersion.parameter_name)["version"]
|
32
36
|
options = {
|
33
37
|
consumer_key: proj["consumer_key"],
|
34
38
|
consumer_secret: proj["consumer_secret"],
|
@@ -9,6 +9,8 @@ module Magellan
|
|
9
9
|
def pub(topic, payload)
|
10
10
|
core.publish(topic, try_reading_file(payload).dup)
|
11
11
|
log_success "\e[32mOK\e[0m"
|
12
|
+
rescue Magellan::Cli::Error
|
13
|
+
raise
|
12
14
|
rescue => e
|
13
15
|
show_error_and_exit1(e)
|
14
16
|
end
|
@@ -18,6 +20,8 @@ module Magellan
|
|
18
20
|
topic, payload = *core.get_message(topic)
|
19
21
|
$stderr.puts topic
|
20
22
|
$stdout.puts payload.ascii_only? ? payload : payload.inspect
|
23
|
+
rescue Magellan::Cli::Error
|
24
|
+
raise
|
21
25
|
rescue => e
|
22
26
|
show_error_and_exit1(e)
|
23
27
|
end
|
data/lib/magellan/cli/version.rb
CHANGED