epc 1.0.4 → 1.0.6

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 (194) hide show
  1. data/lib/epc.rb +3 -0
  2. data/lib/epc/client/base_client.rb +2 -1
  3. data/lib/epc/client/json_client.rb +22 -0
  4. data/lib/epc/command/archive_command.rb +1 -1
  5. data/lib/epc/command/attachto_command.rb +1 -1
  6. data/lib/epc/command/base_command.rb +35 -25
  7. data/lib/epc/command/build_command.rb +2 -2
  8. data/lib/epc/command/config/create_config_command.rb +1 -1
  9. data/lib/epc/command/config/delete_config_command.rb +4 -4
  10. data/lib/epc/command/config/list_configs_command.rb +1 -1
  11. data/lib/epc/command/config/update_config_command.rb +3 -3
  12. data/lib/epc/command/copy_command.rb +1 -1
  13. data/lib/epc/command/create_command.rb +1 -1
  14. data/lib/epc/command/delete_command.rb +2 -2
  15. data/lib/epc/command/deploy_command.rb +4 -3
  16. data/lib/epc/command/deployment/copy_deployment_command.rb +1 -1
  17. data/lib/epc/command/deployment/create_deployment_command.rb +3 -3
  18. data/lib/epc/command/deployment/list_deployments_command.rb +1 -1
  19. data/lib/epc/command/deployment/show_deployment_command.rb +1 -1
  20. data/lib/epc/command/deployment/submit_deployment_command.rb +1 -1
  21. data/lib/epc/command/deployment/update_deployment_command.rb +1 -1
  22. data/lib/epc/command/deployment/vote_deployment_command.rb +1 -1
  23. data/lib/epc/command/deploymentstage/list_deploymentstages_command.rb +1 -1
  24. data/lib/epc/command/detachfrom_command.rb +1 -1
  25. data/lib/epc/command/group/create_group_command.rb +1 -1
  26. data/lib/epc/command/group/delete_group_command.rb +1 -1
  27. data/lib/epc/command/group/list_groups_command.rb +1 -1
  28. data/lib/epc/command/group/show_group_command.rb +2 -1
  29. data/lib/epc/command/group/update_group_command.rb +1 -1
  30. data/lib/epc/command/library/create_library_command.rb +2 -2
  31. data/lib/epc/command/library/delete_library_command.rb +1 -1
  32. data/lib/epc/command/library/list_libraries_command.rb +1 -1
  33. data/lib/epc/command/librarylanguage/create_librarylanguage_command.rb +1 -1
  34. data/lib/epc/command/librarylanguage/delete_librarylanguage_command.rb +1 -1
  35. data/lib/epc/command/librarylanguage/list_librarylanguages_command.rb +1 -1
  36. data/lib/epc/command/librarylanguage/update_librarylanguage_command.rb +1 -1
  37. data/lib/epc/command/libraryset/create_libraryset_command.rb +2 -2
  38. data/lib/epc/command/libraryset/delete_libraryset_command.rb +1 -1
  39. data/lib/epc/command/libraryset/list_librarysets_command.rb +1 -1
  40. data/lib/epc/command/libraryset/show_libraryset_command.rb +1 -1
  41. data/lib/epc/command/libraryset/update_libraryset_command.rb +3 -3
  42. data/lib/epc/command/list_command.rb +1 -1
  43. data/lib/epc/command/objectrole/create_objectrole_command.rb +2 -1
  44. data/lib/epc/command/objectrole/list_objectroles_command.rb +1 -1
  45. data/lib/epc/command/objectrole/update_objectrole_command.rb +5 -1
  46. data/lib/epc/command/permission/list_permissions_command.rb +1 -1
  47. data/lib/epc/command/permissiongroup/list_permissiongroups_command.rb +1 -1
  48. data/lib/epc/command/plugin/create_plugin_command.rb +1 -1
  49. data/lib/epc/command/plugin/delete_plugin_command.rb +1 -1
  50. data/lib/epc/command/plugin/list_plugins_command.rb +1 -1
  51. data/lib/epc/command/plugin/show_plugin_command.rb +1 -1
  52. data/lib/epc/command/plugin/update_plugin_command.rb +2 -2
  53. data/lib/epc/command/project/archive_project_command.rb +1 -1
  54. data/lib/epc/command/project/attachto_project_command.rb +3 -3
  55. data/lib/epc/command/project/create_project_command.rb +2 -2
  56. data/lib/epc/command/project/delete_project_command.rb +1 -1
  57. data/lib/epc/command/project/detachfrom_project_command.rb +4 -4
  58. data/lib/epc/command/project/list_projects_command.rb +1 -1
  59. data/lib/epc/command/project/show_project_command.rb +2 -1
  60. data/lib/epc/command/project/unarchive_project_command.rb +1 -2
  61. data/lib/epc/command/project/update_project_command.rb +2 -2
  62. data/lib/epc/command/projecttype/create_projecttype_command.rb +3 -3
  63. data/lib/epc/command/projecttype/delete_projecttype_command.rb +2 -1
  64. data/lib/epc/command/projecttype/list_projecttypes_command.rb +1 -1
  65. data/lib/epc/command/projecttype/show_projecttype_command.rb +2 -1
  66. data/lib/epc/command/projecttype/update_projecttype_command.rb +4 -3
  67. data/lib/epc/command/pull_command.rb +12 -10
  68. data/lib/epc/command/push_command.rb +45 -29
  69. data/lib/epc/command/role/create_role_command.rb +1 -1
  70. data/lib/epc/command/role/delete_role_command.rb +2 -1
  71. data/lib/epc/command/role/list_roles_command.rb +2 -5
  72. data/lib/epc/command/role/show_role_command.rb +2 -2
  73. data/lib/epc/command/role/update_role_command.rb +1 -1
  74. data/lib/epc/command/runtime/create_runtime_command.rb +1 -1
  75. data/lib/epc/command/runtime/delete_runtime_command.rb +2 -1
  76. data/lib/epc/command/runtime/list_runtimes_command.rb +1 -1
  77. data/lib/epc/command/runtime/update_runtime_command.rb +4 -3
  78. data/lib/epc/command/runtimetype/list_runtimetypes_command.rb +1 -1
  79. data/lib/epc/command/servicedefinition/create_servicedefinition_command.rb +2 -2
  80. data/lib/epc/command/servicedefinition/delete_servicedefinition_command.rb +1 -1
  81. data/lib/epc/command/servicedefinition/list_servicedefinitions_command.rb +1 -1
  82. data/lib/epc/command/servicetype/list_servicetypes_command.rb +1 -1
  83. data/lib/epc/command/serviceversion/create_serviceversion_command.rb +2 -2
  84. data/lib/epc/command/serviceversion/delete_serviceversion_command.rb +3 -1
  85. data/lib/epc/command/serviceversion/list_serviceversions_command.rb +1 -1
  86. data/lib/epc/command/show_command.rb +1 -1
  87. data/lib/epc/command/solution/archive_solution_command.rb +1 -1
  88. data/lib/epc/command/solution/create_solution_command.rb +2 -2
  89. data/lib/epc/command/solution/delete_solution_command.rb +1 -1
  90. data/lib/epc/command/solution/list_solutions_command.rb +1 -1
  91. data/lib/epc/command/solution/show_solution_command.rb +1 -1
  92. data/lib/epc/command/solution/unarchive_solution_command.rb +1 -1
  93. data/lib/epc/command/solution/update_solution_command.rb +1 -1
  94. data/lib/epc/command/submit_command.rb +1 -1
  95. data/lib/epc/command/unarchive_command.rb +1 -1
  96. data/lib/epc/command/update_command.rb +1 -1
  97. data/lib/epc/command/user/create_user_command.rb +1 -1
  98. data/lib/epc/command/user/delete_user_command.rb +1 -1
  99. data/lib/epc/command/user/list_users_command.rb +1 -1
  100. data/lib/epc/command/user/show_user_command.rb +2 -1
  101. data/lib/epc/command/user/update_user_command.rb +3 -3
  102. data/lib/epc/command/userproperty/delete_user_property_command.rb +48 -0
  103. data/lib/epc/command/userproperty/get_user_property_command.rb +61 -0
  104. data/lib/epc/command/userproperty/list_user_properties_command.rb +1 -1
  105. data/lib/epc/command/userproperty/set_user_property_command.rb +52 -0
  106. data/lib/epc/command/vote_command.rb +1 -1
  107. data/lib/epc/config.rb +12 -0
  108. data/lib/epc/help.rb +20 -8
  109. data/lib/epc/runner.rb +22 -11
  110. data/lib/epc/version.rb +1 -1
  111. data/test/command/archive_project_command_test.rb +1 -1
  112. data/test/command/archive_solution_command_test.rb +1 -1
  113. data/test/command/build_command_test.rb +1 -1
  114. data/test/command/copy_deployment_command_test.rb +1 -1
  115. data/test/command/create_config_command_test.rb +1 -1
  116. data/test/command/create_deployment_command_test.rb +3 -3
  117. data/test/command/create_group_command_test.rb +1 -1
  118. data/test/command/create_library_command_test.rb +1 -1
  119. data/test/command/create_librarylanguage_command_test.rb +2 -2
  120. data/test/command/create_libraryset_command_test.rb +2 -2
  121. data/test/command/create_objectrole_command_test.rb +1 -1
  122. data/test/command/create_project_command_test.rb +2 -2
  123. data/test/command/create_projecttypes_command_test.rb +33 -0
  124. data/test/command/create_role_command_test.rb +10 -1
  125. data/test/command/create_runtime_command_test.rb +1 -1
  126. data/test/command/create_servicedefinition_command_test.rb +1 -1
  127. data/test/command/create_serviceversion_command_test.rb +1 -1
  128. data/test/command/create_solution_command_test.rb +2 -2
  129. data/test/command/create_user_command_test.rb +1 -1
  130. data/test/command/delete_config_command_test.rb +3 -3
  131. data/test/command/delete_library_command_test.rb +1 -1
  132. data/test/command/delete_librarylanguage_command_test.rb +1 -1
  133. data/test/command/delete_libraryset_command_test.rb +1 -1
  134. data/test/command/delete_plugin_command_test.rb +1 -1
  135. data/test/command/delete_project_command_test.rb +1 -1
  136. data/test/command/delete_projecttype_command_test.rb +1 -1
  137. data/test/command/delete_role_command_test.rb +1 -1
  138. data/test/command/delete_runtime_command_test.rb +1 -1
  139. data/test/command/delete_servicedefinition_command_test.rb +1 -1
  140. data/test/command/delete_serviceversion_command_test.rb +1 -1
  141. data/test/command/delete_solution_command_test.rb +1 -1
  142. data/test/command/delete_user_command_test.rb +1 -1
  143. data/test/command/delete_user_property_command_test.rb +60 -0
  144. data/test/command/deploy_command_test.rb +14 -6
  145. data/test/command/get_user_property_command_test.rb +58 -0
  146. data/test/command/list_command_test.rb +28 -0
  147. data/test/command/list_config_command_test.rb +1 -1
  148. data/test/command/list_deployments_command_test.rb +1 -1
  149. data/test/command/list_deploymentstages_command_test.rb +1 -1
  150. data/test/command/list_libraries_command_test.rb +1 -1
  151. data/test/command/list_librarylanguages_command_test.rb +1 -1
  152. data/test/command/list_librarysets_command_test.rb +1 -1
  153. data/test/command/list_objectroles_command_test.rb +1 -1
  154. data/test/command/list_permissiongroups_command_test.rb +1 -1
  155. data/test/command/list_permissions_command_test.rb +1 -1
  156. data/test/command/list_plugins_command_test.rb +1 -1
  157. data/test/command/list_projects_command_test.rb +1 -1
  158. data/test/command/list_projecttypes_command_test.rb +1 -1
  159. data/test/command/list_roles_command_test.rb +9 -1
  160. data/test/command/list_runtimes_command_test.rb +1 -1
  161. data/test/command/list_runtimetypes_command_test.rb +1 -1
  162. data/test/command/list_service_types_command_test.rb +1 -1
  163. data/test/command/list_servicedefinitions_command_test.rb +1 -1
  164. data/test/command/list_serviceversions_command_test.rb +1 -1
  165. data/test/command/list_solutions_command_test.rb +1 -1
  166. data/test/command/list_userproperties_command_test.rb +3 -3
  167. data/test/command/list_users_command_test.rb +1 -1
  168. data/test/command/pull_command_test.rb +8 -8
  169. data/test/command/push_command_test.rb +38 -8
  170. data/test/command/set_user_property_command_test.rb +50 -0
  171. data/test/command/show_command_test.rb +28 -0
  172. data/test/command/show_deployment_command_test.rb +1 -1
  173. data/test/command/show_group_command_test.rb +1 -1
  174. data/test/command/show_libraryset_command_test.rb +1 -1
  175. data/test/command/show_plugin_command_test.rb +1 -1
  176. data/test/command/show_project_command_test.rb +1 -1
  177. data/test/command/show_projecttype_command_test.rb +1 -1
  178. data/test/command/show_role_command_test.rb +1 -1
  179. data/test/command/show_solution_command_test.rb +1 -1
  180. data/test/command/show_user_command_test.rb +1 -1
  181. data/test/command/submit_deployment_command_test.rb +1 -1
  182. data/test/command/unarchive_project_command_test.rb +1 -1
  183. data/test/command/unarchive_solution_command_test.rb +1 -1
  184. data/test/command/update_config_command_test.rb +2 -2
  185. data/test/command/update_deployment_command_test.rb +1 -1
  186. data/test/command/update_group_command_test.rb +1 -1
  187. data/test/command/update_librarylanguage_command_test.rb +1 -1
  188. data/test/command/update_libraryset_command_test.rb +3 -3
  189. data/test/command/update_plugin_command_test.rb +2 -2
  190. data/test/command/update_project_command_test.rb +2 -2
  191. data/test/command/update_solution_command_test.rb +1 -1
  192. data/test/command/update_user_command_test.rb +2 -2
  193. data/test/command/vote_deployment_command_test.rb +1 -1
  194. metadata +38 -23
@@ -16,7 +16,7 @@ class ShowLibrarysetCommandTest < Test::Unit::TestCase
16
16
  @mock_client.expects(:get).with(EPC::Config::LIBRARY_SETS_PATH+"/1").
17
17
  returns([404, {:message => "Not Found"}, {}])
18
18
 
19
- @command.expects(:say).with("Request failed: [Not Found]")
19
+ @command.expects(:say_err).with("Request failed: [Not Found]")
20
20
  assert_equal(@command.execute, 404)
21
21
  end
22
22
 
@@ -19,7 +19,7 @@ class ShowPluginCommandTest < Test::Unit::TestCase
19
19
 
20
20
  should "report reason for request failure" do
21
21
  @mock_client.expects(:get).with(EPC::Config::PLUGINS_PATH + "/1").returns([500, {:message => "System Exception"}, {}])
22
- @command.expects(:say).with("Request failed: [System Exception]")
22
+ @command.expects(:say_err).with("Request failed: [System Exception]")
23
23
  @command.execute
24
24
  end
25
25
  end
@@ -13,7 +13,7 @@ class ShowProjectCommandTest < Test::Unit::TestCase
13
13
 
14
14
  should "notify if retrieval fails" do
15
15
  @mock_client.expects(:get).returns([404, {:message => "Not Found"}, {}])
16
- @command.expects(:say).with("Request failed: [Not Found]")
16
+ @command.expects(:say_err).with("Request failed: [Not Found]")
17
17
  assert_equal(@command.execute, 404)
18
18
  end
19
19
 
@@ -18,7 +18,7 @@ class ShowProjecttypeCommandTest < Test::Unit::TestCase
18
18
  @mock_client.expects(:get).with(EPC::Config::PROJECT_TYPES_PATH+"/1").
19
19
  returns([404, {:message => "Not Found"}, {}])
20
20
 
21
- @command.expects(:say).with("Request failed: [Not Found]")
21
+ @command.expects(:say_err).with("Request failed: [Not Found]")
22
22
  assert_equal(@command.execute, 404)
23
23
  end
24
24
 
@@ -14,7 +14,7 @@ class ShowRoleCommandTest < Test::Unit::TestCase
14
14
  should "fail if status is not 200" do
15
15
  @mock_client.expects(:get).with(EPC::Config::ROLES_PATH + "/1?include=users,user_groups,grants").
16
16
  returns([404, {:message => "Not Found"}, {}])
17
- @command.expects(:say).with("Request failed: [Not Found]")
17
+ @command.expects(:say_err).with("Request failed: [Not Found]")
18
18
  assert_equal(@command.execute, 1)
19
19
  end
20
20
 
@@ -16,7 +16,7 @@ class ShowSolutionCommandTest < Test::Unit::TestCase
16
16
 
17
17
  should "notify if retrieval fails" do
18
18
  @mock_client.expects(:get).returns([404, {:message => "Not Found"}, {}])
19
- @command.expects(:say).with("Request failed: [Not Found]")
19
+ @command.expects(:say_err).with("Request failed: [Not Found]")
20
20
  assert_equal(@command.execute, 404)
21
21
  end
22
22
 
@@ -15,7 +15,7 @@ class ShowUserCommandTest < Test::Unit::TestCase
15
15
  should "fail if status is not 200" do
16
16
  @mock_client.expects(:get).with(EPC::Config::USERS_PATH + "/1?include=user_groups").
17
17
  returns([404, {:message => "Not Found"}, {}])
18
- @command.expects(:say).with("Request failed: [Not Found]")
18
+ @command.expects(:say_err).with("Request failed: [Not Found]")
19
19
  assert_equal(@command.execute, 404)
20
20
  end
21
21
 
@@ -23,7 +23,7 @@ class SubmitDeploymentCommandTest < Test::Unit::TestCase
23
23
 
24
24
  @mock_client.expects(:put).with("/api/v1/deployments/1/submit").
25
25
  returns([404, { :message => "Not Found"}, {}])
26
- @command.expects(:say).with("Request failed: [Not Found]")
26
+ @command.expects(:say_err).with("Request failed: [Not Found]")
27
27
  assert_equal(@command.execute, 404)
28
28
  end
29
29
  end
@@ -17,7 +17,7 @@ class UnarchiveProjectCommandTest < Test::Unit::TestCase
17
17
  @mock_client.expects(:put).with(EPC::Config::PROJECTS_PATH + "/1", {:archived => false}).
18
18
  returns([404, {:message => "Not Found"}, {}])
19
19
 
20
- @command.expects(:say).with("Project could not be unarchived. Request failed with: [Not Found]")
20
+ @command.expects(:say_err).with("Project could not be unarchived. Request failed with: [Not Found]")
21
21
  assert_equal(@command.execute, 404)
22
22
  end
23
23
 
@@ -17,7 +17,7 @@ class UnarchiveSolutionCommandTest < Test::Unit::TestCase
17
17
  @mock_client.expects(:put).with(EPC::Config::SOLUTIONS_PATH + "/1", {:archived => false}).
18
18
  returns([400, {:message => "Not Found"}, {}])
19
19
 
20
- @command.expects(:say).with("Solution could not be unarchived. Request failed with: [Not Found]")
20
+ @command.expects(:say_err).with("Solution could not be unarchived. Request failed with: [Not Found]")
21
21
  assert_equal(@command.execute, 400)
22
22
  end
23
23
 
@@ -26,7 +26,7 @@ class UpdateConfigCommandTest < Test::Unit::TestCase
26
26
  {:name => "key1", :value => "value1", :required => false}
27
27
  ).returns([400, {:message => "Not Found"}, {}])
28
28
 
29
- @command.expects("say").with("Request failed with message [Not Found]")
29
+ @command.expects(:say_err).with("Request failed with message [Not Found]")
30
30
  assert_equal(@command.execute(["value1"]), 400)
31
31
 
32
32
  end
@@ -39,7 +39,7 @@ class UpdateConfigCommandTest < Test::Unit::TestCase
39
39
  [{:name => "key2", :value => "value2"}],
40
40
  {}])
41
41
 
42
- @command.expects(:say).with("Key does not exist.")
42
+ @command.expects(:say_err).with("Key does not exist.")
43
43
  assert_equal(@command.execute(["value1"]), 1)
44
44
 
45
45
  end
@@ -19,7 +19,7 @@ class UpdateDeploymentCommandTest < Test::Unit::TestCase
19
19
  should "fail on bad status" do
20
20
  @command.expects(:get_deployed_project_id).with(1, 1).returns(1)
21
21
  @mock_client.expects(:put).with(EPC::Config::DEPLOYMENTS_PATH + "/1/deployed_projects/1", {:instances => 3, :uris => ['new-uri.instance-host.com']}).returns([404, {:message => "Not Found"}, {}])
22
- @command.expects(:say).with("Request failed with: [Not Found]").at_least_once
22
+ @command.expects(:say_err).with("Request failed with: [Not Found]").at_least_once
23
23
  assert_equal(@command.execute([]), 404)
24
24
  end
25
25
 
@@ -34,7 +34,7 @@ class UpdateGroupCommandTest < Test::Unit::TestCase
34
34
 
35
35
  @mock_client.expects(:put).with(EPC::Config::GROUPS_PATH + "/1/add_user", {:user_id => 1}).
36
36
  returns([404, {:message => "Not Found"}, {}])
37
- @command.expects(:say).with("Request failed: [Not Found]")
37
+ @command.expects(:say_err).with("Request failed: [Not Found]")
38
38
  assert_equal(@command.execute("grp"), 404)
39
39
  end
40
40
  end
@@ -15,7 +15,7 @@ class UpdateLibrarylanguageCommandTest < Test::Unit::TestCase
15
15
  should "fail if status is not 200" do
16
16
  @mock_client.expects(:put).with(EPC::Config::LIBRARY_LANGUAGES_PATH + "/1", {:name => "ruby192"}).
17
17
  returns([404, {:message => "Not Found"}, {}])
18
- @command.expects(:say).with("Request failed: [Not Found]")
18
+ @command.expects(:say_err).with("Request failed: [Not Found]")
19
19
  assert_equal(@command.execute(["ruby192"]), 404)
20
20
  end
21
21
 
@@ -26,7 +26,7 @@ class UpdateLibrarysetCommandTest < Test::Unit::TestCase
26
26
  should "show reason for failure" do
27
27
  @command.expects(:extract_library_id).returns(1)
28
28
  @mock_client.expects(:post).with(EPC::Config::LIBRARY_SETS_PATH + "/1/attach_library/1").returns([404, {:message => "Not Found"}, {}])
29
- @command.expects(:say).with("Request failed: [Not Found]")
29
+ @command.expects(:say_err).with("Request failed: [Not Found]")
30
30
  assert_equal(@command.execute(1), 404)
31
31
  end
32
32
  end
@@ -46,7 +46,7 @@ class UpdateLibrarysetCommandTest < Test::Unit::TestCase
46
46
  should "show reason for failure" do
47
47
  @command.expects(:extract_library_id).returns(1)
48
48
  @mock_client.expects(:delete).with(EPC::Config::LIBRARY_SETS_PATH + "/1/detach_library/1").returns([404, {:message => "Not Found"}, {}])
49
- @command.expects(:say).with("Request failed: [Not Found]")
49
+ @command.expects(:say_err).with("Request failed: [Not Found]")
50
50
  assert_equal(@command.execute(1), 404)
51
51
  end
52
52
  end
@@ -69,7 +69,7 @@ class UpdateLibrarysetCommandTest < Test::Unit::TestCase
69
69
  EPC::Config.expects(:read_content_as_json).with("/path/to/file").returns([{"name" => "lib1", "library_version" => "1", "group" => "grp"}])
70
70
  @command.expects(:retrieve_libraries).with([{:name => "lib1", :version => "1", :group => "grp"}]).returns([1])
71
71
  @mock_client.expects(:post).with(EPC::Config::LIBRARY_SETS_PATH + "/1/attach_library/1").returns([404, {:message => "Not Found"}, {}])
72
- @command.expects(:say).with("Failed to add [1]: [Not Found]")
72
+ @command.expects(:say_err).with("Failed to add [1]: [Not Found]")
73
73
 
74
74
  assert_equal(@command.execute(1), 1)
75
75
  end
@@ -17,7 +17,7 @@ class UpdatePluginCommandTest < Test::Unit::TestCase
17
17
 
18
18
  should "only update the allowed attributes" do
19
19
  assert_raise EPC::Error::InputError do
20
- @command.expects(:say).with("Cannot update unallowed_attribute. Updatable attributes are: [name, plugin_version, group, inherited, extensions, executions, configuration]")
20
+ @command.expects(:say_err).with("Cannot update unallowed_attribute. Updatable attributes are: [name, plugin_version, group, inherited, extensions, executions, configuration]")
21
21
  @command.execute(["unallowed_attribute=value"])
22
22
  end
23
23
  end
@@ -25,7 +25,7 @@ class UpdatePluginCommandTest < Test::Unit::TestCase
25
25
  should "show a message if request is unsuccesful" do
26
26
  @mock_client.expects(:put).with(EPC::Config::PLUGINS_PATH+"/1", {'name' => "new_name"}).
27
27
  returns([400, {:message => "Not Found"}, {}])
28
- @command.expects(:say).with("Request failed: [Not Found]")
28
+ @command.expects(:say_err).with("Request failed: [Not Found]")
29
29
 
30
30
  assert_equal(@command.execute(["name=new_name"]), 400)
31
31
  end
@@ -16,7 +16,7 @@ class UpdateProjectCommandTest < Test::Unit::TestCase
16
16
  end
17
17
 
18
18
  should "only update the allowed attributes" do
19
- @command.expects(:say).with("Cannot update unallowed_attribute. Updatable attributes are: [project_name, project_type]")
19
+ @command.expects(:say_err).with("Cannot update unallowed_attribute. Updatable attributes are: [project_name, project_type]")
20
20
  @command.expects(:say).with("You must specify an attribute to be updated: [project_name,project_type]")
21
21
  @command.expects(:say).with(EPC::Help::COMMAND_USAGES[:update_project])
22
22
  assert_equal(@command.execute(["unallowed_attribute=value"]), 1)
@@ -25,7 +25,7 @@ class UpdateProjectCommandTest < Test::Unit::TestCase
25
25
  should "show a message if request is unsuccesful" do
26
26
  @mock_client.expects(:put).with(EPC::Config::PROJECTS_PATH+"/1", {'project_name' => "new_name"}).
27
27
  returns([400, {:message => "Not Found"}, {}])
28
- @command.expects(:say).with("Update failed with: [Not Found]")
28
+ @command.expects(:say_err).with("Update failed with: [Not Found]")
29
29
 
30
30
  assert_equal(@command.execute(["project_name=new_name"]), 400)
31
31
  end
@@ -28,7 +28,7 @@ class UpdateSolutionCommandTest < Test::Unit::TestCase
28
28
  should "show a message if request is unsuccesful" do
29
29
  @mock_client.expects(:put).with(EPC::Config::SOLUTIONS_PATH+"/1", {'name' => "new_name"}).
30
30
  returns([400, {'message' => "Not Found"}, {}])
31
- @command.expects(:say).with("Update failed with: [Not Found]")
31
+ @command.expects(:say_err).with("Update failed with: [Not Found]")
32
32
 
33
33
  assert_equal(@command.execute(["","","name=new_name"]), 400)
34
34
  end
@@ -15,7 +15,7 @@ class UpdateUserCommandTest < Test::Unit::TestCase
15
15
  @command.options[:token] = "1213445"
16
16
  @command.expects(:get_resource_attribute).returns("user@epaas.com")
17
17
  @mock_client.expects(:put).with(EPC::Config::USERS_PATH + "/user@epaas.com/change_password", {:token => '1213445', :password => "1234567890"}).returns([500, {:message => "system exception"}, {}])
18
- @command.expects(:say).with("Request failed: [system exception]")
18
+ @command.expects(:say_err).with("Request failed: [system exception]")
19
19
  @command.execute("user@epaas.com")
20
20
  end
21
21
 
@@ -40,7 +40,7 @@ class UpdateUserCommandTest < Test::Unit::TestCase
40
40
 
41
41
  should "show reason for failure when status is unsuccessful" do
42
42
  @mock_client.expects(:put).with(EPC::Config::USERS_PATH + "/1", {:name => 'user2', :email => "user2@epaas.com"}).returns([500, {:message => "system exception"}, {}])
43
- @command.expects(:say).with("Request failed: [system exception]")
43
+ @command.expects(:say_err).with("Request failed: [system exception]")
44
44
  @command.execute(1)
45
45
  end
46
46
 
@@ -14,7 +14,7 @@ class VoteDeploymentCommandTest < Test::Unit::TestCase
14
14
  should "show a message if status is not 200" do
15
15
  @mock_client.expects(:put).with(EPC::Config::DEPLOYMENTS_PATH + "/1/vote", {:approved => true}).
16
16
  returns([400, {:message => "Not Found"}, {}])
17
- @command.expects(:say).with("Request failed: [Not Found]")
17
+ @command.expects(:say_err).with("Request failed: [Not Found]")
18
18
  assert_equal(@command.execute(1), 400)
19
19
  end
20
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-18 00:00:00.000000000 Z
12
+ date: 2012-05-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &2158605680 !ruby/object:Gem::Requirement
16
+ requirement: &2166484240 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2158605680
24
+ version_requirements: *2166484240
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: echoe
27
- requirement: &2158595920 !ruby/object:Gem::Requirement
27
+ requirement: &2166483740 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 4.6.3
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *2158595920
35
+ version_requirements: *2166483740
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: ci_reporter
38
- requirement: &2158595500 !ruby/object:Gem::Requirement
38
+ requirement: &2166483320 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2158595500
46
+ version_requirements: *2166483320
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: test-unit
49
- requirement: &2158594940 !ruby/object:Gem::Requirement
49
+ requirement: &2166482720 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.4.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *2158594940
57
+ version_requirements: *2166482720
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: mocha
60
- requirement: &2158594400 !ruby/object:Gem::Requirement
60
+ requirement: &2166482120 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 0.10.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *2158594400
68
+ version_requirements: *2166482120
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: shoulda
71
- requirement: &2158593900 !ruby/object:Gem::Requirement
71
+ requirement: &2166481560 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 2.11.3
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *2158593900
79
+ version_requirements: *2166481560
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: cover_me
82
- requirement: &2158593320 !ruby/object:Gem::Requirement
82
+ requirement: &2166480880 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 1.2.0
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *2158593320
90
+ version_requirements: *2166480880
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: highline
93
- requirement: &2158592740 !ruby/object:Gem::Requirement
93
+ requirement: &2166480120 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 1.6.2
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *2158592740
101
+ version_requirements: *2166480120
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: rest-client
104
- requirement: &2158592180 !ruby/object:Gem::Requirement
104
+ requirement: &2166479660 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 1.6.7
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *2158592180
112
+ version_requirements: *2166479660
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: zip
115
- requirement: &2158591720 !ruby/object:Gem::Requirement
115
+ requirement: &2166479160 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,7 +120,7 @@ dependencies:
120
120
  version: 2.0.2
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *2158591720
123
+ version_requirements: *2166479160
124
124
  description: Manage, deploy and create Enterprise PaaS applications using the Agility
125
125
  Release Manager system and the epc gem. run epc to see all the options and help
126
126
  email:
@@ -250,7 +250,10 @@ files:
250
250
  - lib/epc/command/user/list_users_command.rb
251
251
  - lib/epc/command/user/show_user_command.rb
252
252
  - lib/epc/command/user/update_user_command.rb
253
+ - lib/epc/command/userproperty/delete_user_property_command.rb
254
+ - lib/epc/command/userproperty/get_user_property_command.rb
253
255
  - lib/epc/command/userproperty/list_user_properties_command.rb
256
+ - lib/epc/command/userproperty/set_user_property_command.rb
254
257
  - lib/epc/command/vote_command.rb
255
258
  - lib/epc/config.rb
256
259
  - lib/epc/error/basic_error.rb
@@ -280,6 +283,7 @@ files:
280
283
  - test/command/create_libraryset_command_test.rb
281
284
  - test/command/create_objectrole_command_test.rb
282
285
  - test/command/create_project_command_test.rb
286
+ - test/command/create_projecttypes_command_test.rb
283
287
  - test/command/create_role_command_test.rb
284
288
  - test/command/create_runtime_command_test.rb
285
289
  - test/command/create_servicedefinition_command_test.rb
@@ -299,8 +303,11 @@ files:
299
303
  - test/command/delete_serviceversion_command_test.rb
300
304
  - test/command/delete_solution_command_test.rb
301
305
  - test/command/delete_user_command_test.rb
306
+ - test/command/delete_user_property_command_test.rb
302
307
  - test/command/deploy_command_test.rb
308
+ - test/command/get_user_property_command_test.rb
303
309
  - test/command/info_command_test.rb
310
+ - test/command/list_command_test.rb
304
311
  - test/command/list_config_command_test.rb
305
312
  - test/command/list_deployments_command_test.rb
306
313
  - test/command/list_deploymentstages_command_test.rb
@@ -331,6 +338,8 @@ files:
331
338
  - test/command/refresh_solution_command_test.rb
332
339
  - test/command/renew_command_test.rb
333
340
  - test/command/request_passwordchange_command_test.rb
341
+ - test/command/set_user_property_command_test.rb
342
+ - test/command/show_command_test.rb
334
343
  - test/command/show_deployment_command_test.rb
335
344
  - test/command/show_group_command_test.rb
336
345
  - test/command/show_instances_command_test.rb
@@ -385,7 +394,7 @@ rubyforge_project:
385
394
  rubygems_version: 1.8.8
386
395
  signing_key:
387
396
  specification_version: 3
388
- summary: ServiceMEsh command line tool to interface with the Release Manager
397
+ summary: ServiceMesh command line tool to interface with the Release Manager
389
398
  test_files:
390
399
  - test/command/archive_project_command_test.rb
391
400
  - test/command/archive_solution_command_test.rb
@@ -400,6 +409,7 @@ test_files:
400
409
  - test/command/create_libraryset_command_test.rb
401
410
  - test/command/create_objectrole_command_test.rb
402
411
  - test/command/create_project_command_test.rb
412
+ - test/command/create_projecttypes_command_test.rb
403
413
  - test/command/create_role_command_test.rb
404
414
  - test/command/create_runtime_command_test.rb
405
415
  - test/command/create_servicedefinition_command_test.rb
@@ -419,8 +429,11 @@ test_files:
419
429
  - test/command/delete_serviceversion_command_test.rb
420
430
  - test/command/delete_solution_command_test.rb
421
431
  - test/command/delete_user_command_test.rb
432
+ - test/command/delete_user_property_command_test.rb
422
433
  - test/command/deploy_command_test.rb
434
+ - test/command/get_user_property_command_test.rb
423
435
  - test/command/info_command_test.rb
436
+ - test/command/list_command_test.rb
424
437
  - test/command/list_config_command_test.rb
425
438
  - test/command/list_deployments_command_test.rb
426
439
  - test/command/list_deploymentstages_command_test.rb
@@ -451,6 +464,8 @@ test_files:
451
464
  - test/command/refresh_solution_command_test.rb
452
465
  - test/command/renew_command_test.rb
453
466
  - test/command/request_passwordchange_command_test.rb
467
+ - test/command/set_user_property_command_test.rb
468
+ - test/command/show_command_test.rb
454
469
  - test/command/show_deployment_command_test.rb
455
470
  - test/command/show_group_command_test.rb
456
471
  - test/command/show_instances_command_test.rb