schemata-dea 0.0.1.beta14 → 0.0.1.beta15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/lib/schemata/common/componentbase.rb +42 -0
  2. data/lib/schemata/common/msgbase.rb +13 -11
  3. data/lib/schemata/common/msgtypebase.rb +20 -0
  4. data/lib/schemata/common/parsed_msg.rb +1 -1
  5. data/lib/schemata/dea/advertise_message/advertise_message_v1.rb +1 -1
  6. data/lib/schemata/dea/advertise_message.rb +1 -5
  7. data/lib/schemata/dea/dea_status_response/dea_status_response_v1.rb +1 -1
  8. data/lib/schemata/dea/dea_status_response.rb +1 -5
  9. data/lib/schemata/dea/discover_request/discover_request_v1.rb +1 -1
  10. data/lib/schemata/dea/discover_request.rb +1 -5
  11. data/lib/schemata/dea/droplet_status_response/droplet_status_response_v1.rb +1 -1
  12. data/lib/schemata/dea/droplet_status_response.rb +1 -5
  13. data/lib/schemata/dea/exit_message/exit_message_v1.rb +1 -1
  14. data/lib/schemata/dea/exit_message.rb +1 -5
  15. data/lib/schemata/dea/find_droplet_request/find_droplet_request_v1.rb +1 -1
  16. data/lib/schemata/dea/find_droplet_request.rb +1 -5
  17. data/lib/schemata/dea/find_droplet_response/find_droplet_response_v1.rb +1 -1
  18. data/lib/schemata/dea/find_droplet_response.rb +1 -5
  19. data/lib/schemata/dea/heartbeat_response/heartbeat_response_v1.rb +1 -1
  20. data/lib/schemata/dea/heartbeat_response.rb +1 -5
  21. data/lib/schemata/dea/hello_message/hello_message_v1.rb +1 -1
  22. data/lib/schemata/dea/hello_message.rb +1 -5
  23. data/lib/schemata/dea/start_request/start_request_v1.rb +5 -3
  24. data/lib/schemata/dea/start_request.rb +1 -5
  25. data/lib/schemata/dea/stop_request/stop_request_v1.rb +1 -1
  26. data/lib/schemata/dea/stop_request.rb +1 -5
  27. data/lib/schemata/dea/update_request/update_request_v1.rb +1 -1
  28. data/lib/schemata/dea/update_request.rb +1 -5
  29. data/lib/schemata/dea/version.rb +2 -2
  30. data/lib/schemata/dea.rb +3 -60
  31. data/lib/schemata/helpers/decamelize.rb +23 -0
  32. data/lib/schemata/helpers/hash_copy.rb +1 -1
  33. data/lib/schemata/helpers/stringify.rb +1 -1
  34. data/spec/{cloud_controller/cloud_controller_spec.rb → cloud_controller_spec.rb} +0 -0
  35. data/spec/common/helpers_spec.rb +16 -16
  36. data/spec/{dea/dea_spec.rb → dea_spec.rb} +1 -1
  37. data/spec/{health_manager/health_manager_spec.rb → health_manager_spec.rb} +0 -0
  38. data/spec/{router/router_spec.rb → router_spec.rb} +0 -0
  39. data/spec/{staging/staging_spec.rb → staging_spec.rb} +0 -0
  40. data/spec/support/component_helpers.rb +16 -2
  41. data/spec/support/helpers.rb +0 -20
  42. data/spec/support/message_helpers.rb +23 -19
  43. data/spec/support/message_type_helpers.rb +59 -55
  44. metadata +36 -80
  45. data/spec/cloud_controller/droplet_updated_message_spec.rb +0 -10
  46. data/spec/cloud_controller/hm_start_request_spec.rb +0 -11
  47. data/spec/cloud_controller/hm_stop_request_spec.rb +0 -12
  48. data/spec/dea/advertise_message_spec.rb +0 -10
  49. data/spec/dea/dea_status_response_spec.rb +0 -10
  50. data/spec/dea/discover_request_spec.rb +0 -10
  51. data/spec/dea/droplet_status_response_spec.rb +0 -10
  52. data/spec/dea/exit_message_spec.rb +0 -10
  53. data/spec/dea/find_droplet_request_spec.rb +0 -27
  54. data/spec/dea/find_droplet_response_spec.rb +0 -10
  55. data/spec/dea/heartbeat_response_spec.rb +0 -10
  56. data/spec/dea/hello_message_spec.rb +0 -10
  57. data/spec/dea/start_request_spec.rb +0 -10
  58. data/spec/dea/stop_request_spec.rb +0 -10
  59. data/spec/dea/update_request_spec.rb +0 -0
  60. data/spec/health_manager/health_request_spec.rb +0 -12
  61. data/spec/health_manager/health_response_spec.rb +0 -12
  62. data/spec/health_manager/status_crashed_response_spec.rb +0 -12
  63. data/spec/health_manager/status_flapping_response_spec.rb +0 -12
  64. data/spec/health_manager/status_request_spec.rb +0 -12
  65. data/spec/router/register_request_spec.rb +0 -10
  66. data/spec/router/start_message_spec.rb +0 -10
  67. data/spec/staging/staging_message_spec.rb +0 -14
@@ -1,10 +0,0 @@
1
- require 'schemata/dea'
2
- require 'spec_helper'
3
-
4
- describe Schemata::DEA::DiscoverRequest do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- describe Schemata::DEA::DiscoverRequest::V1 do
9
- it_behaves_like "a message"
10
- end
@@ -1,10 +0,0 @@
1
- require 'schemata/dea'
2
- require 'spec_helper'
3
-
4
- describe Schemata::DEA::DropletStatusResponse do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- describe Schemata::DEA::DropletStatusResponse::V1 do
9
- it_behaves_like "a message"
10
- end
@@ -1,10 +0,0 @@
1
- require 'schemata/dea'
2
- require 'spec_helper'
3
-
4
- describe Schemata::DEA::ExitMessage do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- describe Schemata::DEA::ExitMessage::V1 do
9
- it_behaves_like "a message"
10
- end
@@ -1,27 +0,0 @@
1
- require 'schemata/dea'
2
- require 'spec_helper'
3
-
4
- describe Schemata::DEA::FindDropletRequest do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- describe Schemata::DEA::FindDropletRequest::V1 do
9
- it_behaves_like "a message"
10
-
11
- it "should stringify the 'states' field when it is given to the constructor as a symbol" do
12
- hash = {
13
- "droplet" => "deadbeef",
14
- "states" => [:RUNNING],
15
- "version" => "0.1.0",
16
- }
17
-
18
- msg_obj = Schemata::DEA::FindDropletRequest::V1.new(hash)
19
- msg_obj.states.should =~ ["RUNNING"]
20
- end
21
-
22
- it "should stringify the 'states' field when a symbold is passed ot the attr writer" do
23
- msg_obj = Schemata::DEA.mock_find_droplet_request
24
- msg_obj.states = [:RUNNING]
25
- msg_obj.states.should =~ ["RUNNING"]
26
- end
27
- end
@@ -1,10 +0,0 @@
1
- require 'schemata/dea'
2
- require 'spec_helper'
3
-
4
- describe Schemata::DEA::FindDropletResponse do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- describe Schemata::DEA::FindDropletResponse::V1 do
9
- it_behaves_like "a message"
10
- end
@@ -1,10 +0,0 @@
1
- require 'schemata/dea'
2
- require 'spec_helper'
3
-
4
- describe Schemata::DEA::HeartbeatResponse do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- describe Schemata::DEA::HeartbeatResponse::V1 do
9
- it_behaves_like "a message"
10
- end
@@ -1,10 +0,0 @@
1
- require 'schemata/dea'
2
- require 'spec_helper'
3
-
4
- describe Schemata::DEA::HelloMessage do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- describe Schemata::DEA::HelloMessage::V1 do
9
- it_behaves_like "a message"
10
- end
@@ -1,10 +0,0 @@
1
- require 'schemata/dea'
2
- require 'spec_helper'
3
-
4
- describe Schemata::DEA::StartRequest do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- describe Schemata::DEA::StartRequest::V1 do
9
- it_behaves_like "a message"
10
- end
@@ -1,10 +0,0 @@
1
- require 'schemata/dea'
2
- require 'spec_helper'
3
-
4
- describe Schemata::DEA::StopRequest do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- describe Schemata::DEA::StopRequest::V1 do
9
- it_behaves_like "a message"
10
- end
File without changes
@@ -1,12 +0,0 @@
1
- require 'schemata/health_manager'
2
- require 'spec_helper'
3
-
4
- describe Schemata::HealthManager::HealthRequest do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- Schemata::HealthManager::HealthRequest.versions.each do |v|
9
- describe Schemata::HealthManager::HealthRequest::const_get("V#{v}") do
10
- it_behaves_like "a message"
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- require 'schemata/health_manager'
2
- require 'spec_helper'
3
-
4
- describe Schemata::HealthManager::HealthResponse do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- Schemata::HealthManager::HealthResponse.versions.each do |v|
9
- describe Schemata::HealthManager::HealthResponse::const_get("V#{v}") do
10
- it_behaves_like "a message"
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- require 'schemata/health_manager'
2
- require 'spec_helper'
3
-
4
- describe Schemata::HealthManager::StatusCrashedResponse do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- Schemata::HealthManager::StatusCrashedResponse.versions.each do |v|
9
- describe Schemata::HealthManager::StatusCrashedResponse::const_get("V#{v}") do
10
- it_behaves_like "a message"
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- require 'schemata/health_manager'
2
- require 'spec_helper'
3
-
4
- describe Schemata::HealthManager::StatusFlappingResponse do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- Schemata::HealthManager::StatusFlappingResponse.versions.each do |v|
9
- describe Schemata::HealthManager::StatusFlappingResponse::const_get("V#{v}") do
10
- it_behaves_like "a message"
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- require 'schemata/health_manager'
2
- require 'spec_helper'
3
-
4
- describe Schemata::HealthManager::StatusRequest do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- Schemata::HealthManager::StatusRequest.versions.each do |v|
9
- describe Schemata::HealthManager::StatusRequest::const_get("V#{v}") do
10
- it_behaves_like "a message"
11
- end
12
- end
@@ -1,10 +0,0 @@
1
- require 'schemata/router'
2
- require 'spec_helper'
3
-
4
- describe Schemata::Router::RegisterRequest do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- describe Schemata::Router::RegisterRequest::V1 do
9
- it_behaves_like "a message"
10
- end
@@ -1,10 +0,0 @@
1
- require 'schemata/router'
2
- require 'spec_helper'
3
-
4
- describe Schemata::Router::StartMessage do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- describe Schemata::Router::StartMessage::V1 do
9
- it_behaves_like "a message"
10
- end
@@ -1,14 +0,0 @@
1
- require 'schemata/staging'
2
- require 'spec_helper'
3
-
4
- describe Schemata::Staging::Message do
5
- it_behaves_like "a message type"
6
- end
7
-
8
- describe Schemata::Staging::Message::V1 do
9
- it_behaves_like "a message"
10
- end
11
-
12
- describe Schemata::Staging::Message::V2 do
13
- it_behaves_like "a message"
14
- end