af-addon-tester 0.0.1 → 0.0.2

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.
data/README.md CHANGED
@@ -7,10 +7,17 @@ Allows developers to test App Fog add-ons
7
7
 
8
8
  ## Setup ##
9
9
 
10
- 1) Clone
10
+ 1) Clone or Gem Install
11
+
12
+ Clone:
11
13
 
12
14
  $ git clone git@github.com:tsantef/af-addon-tester.git
13
15
 
16
+ Gem:
17
+
18
+ $ gem install af-addon-tester
19
+
20
+
14
21
  2) Create a manifest.json that points to a test addon
15
22
 
16
23
  Example
@@ -35,7 +42,13 @@ Example
35
42
 
36
43
  ## Usage ##
37
44
 
38
- $ af-addon-tester <path to manifest>
45
+ If cloned:
46
+
47
+ $ bin/af-addon-tester <path to manifest>
48
+
49
+ If Gem
50
+
51
+ $ $ af-addon-tester <path to manifest>
39
52
 
40
53
 
41
54
  ## Meta ##
data/bin/af-addon-tester CHANGED
@@ -17,6 +17,7 @@ begin
17
17
 
18
18
  raise "Missing id" if manifest['id'].nil?
19
19
  raise "Missing api section" if manifest['api'].nil?
20
+ raise "Missing api password" if manifest['api']['username'].nil?
20
21
  raise "Missing api password" if manifest['api']['password'].nil?
21
22
  raise "Missing apt test url" if manifest['api']['test'].nil?
22
23
  raise "Manifest must have atleast one plan" if manifest['api']['plans'].nil? || manifest['api']['plans'][0].nil? || manifest['api']['plans'][0]['id'].nil?
@@ -33,7 +34,7 @@ config_prefix = manifest['id'].gsub('-','_').upcase + '_'
33
34
  bad_user = 'bad_user'
34
35
  bad_password = 'bad_pass'
35
36
 
36
- addon = Rest.new(manifest['api']['test'], manifest['id'], manifest['api']['password'])
37
+ addon = Rest.new(manifest['api']['test'], manifest['api']['username'], manifest['api']['password'])
37
38
  resp = nil
38
39
 
39
40
  validate "Provisioning" do
@@ -120,7 +121,7 @@ end
120
121
  _, json = out.split("\r\n\r\n")
121
122
  begin
122
123
  callback_info = JSON.parse(json)
123
- rescue Exception => e
124
+ rescue Exception => e
124
125
  failed e.message
125
126
  end
126
127
  isValidCallback = true
@@ -10,6 +10,7 @@
10
10
  "MYADDON_VAR2":"dogs"
11
11
  },
12
12
  "test":"http://localhost:4567/myaddon/resources",
13
+ "username":"myaddon",
13
14
  "password":"cavef6azebRewruvecuch",
14
15
  "sso_salt":"8ouy3ayLEyOA7HLAKO2Yo"
15
16
  }
@@ -1,5 +1,5 @@
1
1
  module AppFog
2
2
  module AddonTester
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tim Santeford