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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a85b45c54142d4ed19a73a597d29c7d392413a37
4
- data.tar.gz: bd330dd94132951900c5ab46efc06ec99862428c
3
+ metadata.gz: 48fddb6b7104d258581e1abf2a1ca583359ea419
4
+ data.tar.gz: bd234a5b1aee93ee7a4d7ea48091c9c3e290134e
5
5
  SHA512:
6
- metadata.gz: ae46f5ab93f863e6b19aafeea88b8215e92728a256e7ba205ab2aa8df6ebd2e0898e1e83849394e88b65fd9ea775a7b5c8e612b41a62e921dba9b3987de82a93
7
- data.tar.gz: 703e241185b1488b80cd05c5ae89316b44d7132affb1a7454ff05839323871bfd9272be3a2ed11ac69426964186d18a69bd9de0c2ce1922357c2a33611c9c848
6
+ metadata.gz: e5df9b5e615d38bf2cd8620eb983b46d78fa9e77502b71b6d6dc79397dd4a47a5cfdd9963e440b3eaee37aaf6ad4779002df8eb96320112d4438623f5565e516
7
+ data.tar.gz: 53ae945253f86ffd27e8258945f1b7ac8bb6c832fc6b0db89df97bc95d7dd0dfe21d175828321f3c63f8853fb95f67daf8e22eeaf735e6079a546fee2803036e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- magellan-cli (0.5.7)
4
+ magellan-cli (0.5.8)
5
5
  activesupport (~> 4.1.4)
6
6
  groovenauts-thor
7
7
  httpclient (~> 2.5)
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Magellan
2
2
  module Cli
3
- VERSION = "0.5.7"
3
+ VERSION = "0.5.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magellan-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - akm2000