rappa 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/bin/rappa +12 -0
  2. metadata +1 -1
data/bin/rappa CHANGED
@@ -17,27 +17,35 @@ Settings.resolve!
17
17
  if Settings.rest.include?('package')
18
18
  if Settings[:input_directory].nil?
19
19
  puts '[ERROR] You must supply an input directory for package with -i e.g. rappa package -i /path/to/project'
20
+ exit 1
20
21
  elsif Settings[:output_directory].nil?
21
22
  puts '[ERROR] You must supply an output directory for package with -o e.g. rappa package -o /path/to/output/location'
23
+ exit 1
22
24
  else
23
25
  begin
24
26
  Rappa.new(Settings).package
25
27
  puts '[SUCCESS] packaged rap successfully'
28
+ rap = Settings[:input_directory] + '/rap.yml'
29
+ puts File.read(rap)
26
30
  rescue RappaError => e
27
31
  puts "[ERROR] Could not continue package because: #{e}"
32
+ exit 1
28
33
  end
29
34
  end
30
35
  elsif Settings.rest.include?('expand')
31
36
  if Settings[:input_archive].nil?
32
37
  puts '[ERROR] You must supply an input .rap archive for expand with -a e.g. rappa expand -a /path/to/.rap'
38
+ exit 1
33
39
  elsif Settings[:output_archive].nil?
34
40
  puts '[ERROR] You must supply an output archive directory for expand with -d e.g. rappa expand -d /path/to/output/location'
41
+ exit 1
35
42
  else
36
43
  begin
37
44
  Rappa.new(Settings).expand
38
45
  puts '[SUCCESS] expanded rap successfully'
39
46
  rescue RappaError => e
40
47
  puts "[ERROR] Could not continue expand because: #{e}"
48
+ exit 1
41
49
  end
42
50
  end
43
51
  elsif Settings.rest.include?('generate')
@@ -45,16 +53,20 @@ elsif Settings.rest.include?('generate')
45
53
  elsif Settings.rest.include?('deploy')
46
54
  if Settings[:input_rap].nil?
47
55
  puts '[ERROR] You must supply an input .rap archive for deploy with -r e.g. rappa deploy -r /path/to/.rap -u http://host/api/deploy -k api_key'
56
+ exit 1
48
57
  elsif Settings[:api_key].nil?
49
58
  puts '[ERROR] You must supply an api key for deploy with -k e.g. rappa deploy -r /path/to/.rap -u http://host/api/deploy -k api_key'
59
+ exit 1
50
60
  elsif Settings[:url].nil?
51
61
  puts '[ERROR] You must supply a url for deploy with -u e.g. rappa deploy -r /path/to/.rap -u http://host/api/deploy -k api_key'
62
+ exit 1
52
63
  else
53
64
  begin
54
65
  Rappa.new(Settings).deploy
55
66
  puts "[SUCCESS] deployed rap: #{Settings[:input_rap]} successfully to: #{Settings[:url]}"
56
67
  rescue RappaError => e
57
68
  puts "[ERROR] Could not continue deploy because: #{e}"
69
+ exit 1
58
70
  end
59
71
  end
60
72
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rappa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: