bigrig 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/Gemfile.lock +3 -1
  4. data/bigrig.gemspec +1 -0
  5. data/lib/bigrig/dependency_graph.rb +3 -1
  6. data/lib/bigrig/version.rb +1 -1
  7. data/spec/bigrig/dependency_graph_spec.rb +10 -4
  8. data/spec/bigrig_spec.rb +44 -34
  9. data/spec/data/scan.json +2 -1
  10. data/spec/spec_helper.rb +1 -13
  11. data/spec/support/wait_for.rb +35 -0
  12. data/spec/vcr/Bigrig_DestroyAction/_perform/given_json_with_a_single_container/and_the_container_has_exited/should_remove_the_container.yml +46 -46
  13. data/spec/vcr/Bigrig_DestroyAction/_perform/given_json_with_a_single_container/and_the_container_is_running/kills_and_removes_the_container.yml +49 -49
  14. data/spec/vcr/Bigrig_DockerAdapter/_build/builds_the_given_directory.yml +8 -8
  15. data/spec/vcr/Bigrig_DockerAdapter/_build/passes_build_input_to_a_block.yml +4 -4
  16. data/spec/vcr/Bigrig_DockerAdapter/_container_exists_/when_the_container_does_not_exist/is_false.yml +8 -8
  17. data/spec/vcr/Bigrig_DockerAdapter/_container_exists_/when_the_container_exists/is_true.yml +9 -9
  18. data/spec/vcr/Bigrig_DockerAdapter/_image_id_by_tag/when_the_image_does_not_exist/raise_a_ImageNotFoundError.yml +12 -12
  19. data/spec/vcr/Bigrig_DockerAdapter/_image_id_by_tag/when_the_image_exists/returns_the_image_id.yml +12 -12
  20. data/spec/vcr/Bigrig_DockerAdapter/_kill/given_the_container_does_not_exist/should_raise_an_error.yml +8 -8
  21. data/spec/vcr/Bigrig_DockerAdapter/_kill/given_the_container_is_running/should_kill_the_container.yml +22 -22
  22. data/spec/vcr/Bigrig_DockerAdapter/_logs/streams_logs_to_a_block.yml +17 -17
  23. data/spec/vcr/Bigrig_DockerAdapter/_pull/given_a_block_to_capture_output/should_capture_output.yml +4 -4
  24. data/spec/vcr/Bigrig_DockerAdapter/_pull/given_the_repo_does_not_exist/raises_a_RepoNotFoundError.yml +2 -2
  25. data/spec/vcr/Bigrig_DockerAdapter/_pull/given_the_repo_exists/returns_the_image_id.yml +6 -6
  26. data/spec/vcr/Bigrig_DockerAdapter/_push/given_credentials/will_pass_login_and_password.yml +36 -36
  27. data/spec/vcr/Bigrig_DockerAdapter/_push/should_push_the_image.yml +453 -77
  28. data/spec/vcr/Bigrig_DockerAdapter/_remove_container/when_the_container_does_not_exist/raises_a_ContainerNotFoundError.yml +16 -16
  29. data/spec/vcr/Bigrig_DockerAdapter/_remove_container/when_the_container_exists/should_remove_the_container.yml +32 -32
  30. data/spec/vcr/Bigrig_DockerAdapter/_remove_container/when_the_container_is_running/raises_a_ContainerRunningError.yml +10 -10
  31. data/spec/vcr/Bigrig_DockerAdapter/_remove_image/when_the_image_doesnt_exist/raises_an_error.yml +8 -8
  32. data/spec/vcr/Bigrig_DockerAdapter/_remove_image/when_the_image_exists/removes_the_image.yml +28 -28
  33. data/spec/vcr/Bigrig_DockerAdapter/_run/given_an_image_id_that_exists/and_a_name/starts_the_container_with_the_right_name.yml +27 -27
  34. data/spec/vcr/Bigrig_DockerAdapter/_run/given_an_image_id_that_exists/and_a_name_and_env_variables/starts_the_container_with_env_set.yml +27 -27
  35. data/spec/vcr/Bigrig_DockerAdapter/_run/given_an_image_id_that_exists/and_a_name_and_ports/starts_the_container_with_ports_exposed.yml +32 -32
  36. data/spec/vcr/Bigrig_DockerAdapter/_running_/when_the_container_does_not_exist/returns_false.yml +8 -8
  37. data/spec/vcr/Bigrig_DockerAdapter/_running_/when_the_container_is_not_running/returns_false.yml +11 -11
  38. data/spec/vcr/Bigrig_DockerAdapter/_running_/when_the_container_is_running/returns_true.yml +13 -13
  39. data/spec/vcr/Bigrig_DockerAdapter/_tag/should_tag_the_image.yml +16 -16
  40. data/spec/vcr/Bigrig_LogAction/_perform/follows_the_log.yml +25 -25
  41. data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_a_path/builds_the_image_before_starting_it.yml +20 -20
  42. data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_hosts_by_ip/should_pass_hosts_to_container.yml +40 -40
  43. data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_hosts_by_name/should_lookup_ips_for_hosts_with_a_hostname.yml +41 -41
  44. data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_links/should_pass_links_to_the_right_container.yml +73 -73
  45. data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_multiple_containers/launches_both_containers_in_parallel.yml +52 -52
  46. data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_multiple_containers/spins_up_multiple_containers.yml +74 -74
  47. data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_one_container/should_spin_up_a_single_container.yml +36 -36
  48. data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_one_container/when_a_dead_container_exists/should_remove_existing_containers.yml +38 -38
  49. data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_volumes/should_pass_volumes_to_the_right_container.yml +40 -40
  50. data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_volumes_from/should_pass_volumes_from_to_the_right_container.yml +73 -73
  51. data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_volumes_from/starts_the_dependant_container_last.yml +52 -52
  52. data/spec/vcr/Bigrig_RunAction/_perform/when_activating_profiles_that_do_not_exist/ignores_the_missing_profile.yml +35 -35
  53. data/spec/vcr/Bigrig_RunAction/_perform/with_a_file_with_active_profiles/uses_the_overridden_image.yml +38 -38
  54. data/spec/vcr/bigrig/destroy/spec/data/single_json/kills_the_container.yml +14 -14
  55. data/spec/vcr/bigrig/dev/spec/data/dev_json/activates_the_dev_profile.yml +427 -37
  56. data/spec/vcr/bigrig/dev/spec/data/dev_json/destroys_containers_on_exit.yml +32 -32
  57. data/spec/vcr/bigrig/dev/spec/data/dev_json/starts_the_containers.yml +472 -76
  58. data/spec/vcr/bigrig/dev/spec/data/dev_json/tails_the_logs.yml +16 -16
  59. data/spec/vcr/bigrig/dev/spec/data/scan_json/leaves_unaffected_containers_alone_when_the_scanned_file_changes.yml +1544 -86
  60. data/spec/vcr/bigrig/dev/spec/data/scan_json/restarts_dependant_containers_when_the_scanned_file_changes.yml +1725 -69
  61. data/spec/vcr/bigrig/dev/spec/data/scan_json/restarts_the_container_when_the_scanned_file_changes.yml +1536 -96
  62. data/spec/vcr/bigrig/logs/spec/data/log_json/tails_the_logs.yml +17 -17
  63. data/spec/vcr/bigrig/run/spec/data/profiles_json_-p_qa/leaves_existing_env_values_alone.yml +11 -11
  64. data/spec/vcr/bigrig/run/spec/data/profiles_json_-p_qa/overrides_the_env.yml +11 -11
  65. data/spec/vcr/bigrig/run/spec/data/profiles_json_-p_qa/overrides_the_tag.yml +11 -11
  66. data/spec/vcr/bigrig/run/spec/data/single_json/sends_the_name_of_the_container_to_stdout.yml +9 -9
  67. data/spec/vcr/bigrig/run/spec/data/single_json/starts_the_container.yml +13 -13
  68. data/spec/vcr/bigrig/ship/spec/data/ship_json/with_a_version/-c/cleans_the_image_when_its_done.yml +20 -20
  69. data/spec/vcr/bigrig/ship/spec/data/ship_json/with_a_version/builds_and_pushes_the_image.yml +15 -15
  70. data/spec/vcr/bigrig_bin_bigrig_destroy_spec/data/single_json_kills_the_container.yml +21 -21
  71. data/spec/vcr/bigrig_bin_bigrig_dev_spec/data/dev_json_activates_the_dev_profile.yml +105 -305
  72. data/spec/vcr/bigrig_bin_bigrig_dev_spec/data/dev_json_starts_the_containers.yml +109 -307
  73. data/spec/vcr/bigrig_bin_bigrig_dev_spec/data/dev_json_tails_the_logs.yml +116 -116
  74. data/spec/vcr/bigrig_bin_bigrig_dev_spec/data/scan_json_leaves_unaffected_containers_alone_when_the_scanned_file_changes.yml +385 -382
  75. data/spec/vcr/bigrig_bin_bigrig_dev_spec/data/scan_json_restarts_dependant_containers_when_the_scanned_file_changes.yml +357 -354
  76. data/spec/vcr/bigrig_bin_bigrig_dev_spec/data/scan_json_restarts_the_container_when_the_scanned_file_changes.yml +358 -1091
  77. data/spec/vcr/bigrig_bin_bigrig_logs_spec/data/log_json_tails_the_logs.yml +21 -21
  78. data/spec/vcr/bigrig_bin_bigrig_run_spec/data/profiles_json_-p_qa_leaves_existing_env_values_alone.yml +24 -24
  79. data/spec/vcr/bigrig_bin_bigrig_run_spec/data/profiles_json_-p_qa_overrides_the_env.yml +24 -24
  80. data/spec/vcr/bigrig_bin_bigrig_run_spec/data/profiles_json_-p_qa_overrides_the_tag.yml +17 -17
  81. data/spec/vcr/bigrig_bin_bigrig_run_spec/data/single_json_sends_the_name_of_the_container_to_stdout.yml +24 -24
  82. data/spec/vcr/bigrig_bin_bigrig_run_spec/data/single_json_starts_the_container.yml +24 -24
  83. data/spec/vcr/bigrig_bin_bigrig_ship_spec/data/ship_json_with_a_version_-c_cleans_the_image_when_its_done.yml +439 -63
  84. data/spec/vcr/bigrig_bin_bigrig_ship_spec/data/ship_json_with_a_version_builds_and_pushes_the_image.yml +430 -54
  85. data/spec/waitfor_spec.rb +10 -0
  86. metadata +18 -2
@@ -0,0 +1,10 @@
1
+ describe 'wait for' do
2
+ it 'should wait for stuff' do
3
+ value = 0
4
+ Thread.new do
5
+ sleep 1
6
+ value = 1
7
+ end
8
+ wait_for { value }.to_not eq 0
9
+ end
10
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigrig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Your Name Here
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-09 00:00:00.000000000 Z
11
+ date: 2015-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec-eventually
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: gli
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -255,6 +269,7 @@ files:
255
269
  - spec/spec_helper.rb
256
270
  - spec/support/bigrig_vcr
257
271
  - spec/support/vcr.rb
272
+ - spec/support/wait_for.rb
258
273
  - spec/vcr/Bigrig_DestroyAction/_perform/given_json_with_a_single_container/and_the_container_has_exited/should_remove_the_container.yml
259
274
  - spec/vcr/Bigrig_DestroyAction/_perform/given_json_with_a_single_container/and_the_container_is_running/kills_and_removes_the_container.yml
260
275
  - spec/vcr/Bigrig_DockerAdapter/_build/builds_the_given_directory.yml
@@ -328,6 +343,7 @@ files:
328
343
  - spec/vcr/bigrig_bin_bigrig_run_spec/data/single_json_starts_the_container.yml
329
344
  - spec/vcr/bigrig_bin_bigrig_ship_spec/data/ship_json_with_a_version_-c_cleans_the_image_when_its_done.yml
330
345
  - spec/vcr/bigrig_bin_bigrig_ship_spec/data/ship_json_with_a_version_builds_and_pushes_the_image.yml
346
+ - spec/waitfor_spec.rb
331
347
  - test/dev/shipper.json
332
348
  - test/logs/bigrig.json
333
349
  - test/logs/container1/Dockerfile