ridley 0.9.1 → 0.10.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/.gitignore +1 -0
  2. data/.ruby-version +1 -0
  3. data/Guardfile +1 -1
  4. data/README.md +1 -1
  5. data/bootstrappers/{omnibus.erb → unix_omnibus.erb} +20 -5
  6. data/bootstrappers/windows_omnibus.erb +133 -0
  7. data/lib/ridley.rb +4 -1
  8. data/lib/ridley/bootstrap_bindings.rb +5 -0
  9. data/lib/ridley/bootstrap_bindings/unix_template_binding.rb +112 -0
  10. data/lib/ridley/bootstrap_bindings/windows_template_binding.rb +221 -0
  11. data/lib/ridley/bootstrapper.rb +14 -22
  12. data/lib/ridley/bootstrapper/context.rb +53 -162
  13. data/lib/ridley/chef.rb +0 -1
  14. data/lib/ridley/chef/cookbook.rb +0 -9
  15. data/lib/ridley/client.rb +12 -1
  16. data/lib/ridley/errors.rb +1 -0
  17. data/lib/ridley/host_connector.rb +76 -0
  18. data/lib/ridley/{ssh → host_connector}/response.rb +1 -1
  19. data/lib/ridley/{ssh → host_connector}/response_set.rb +11 -11
  20. data/lib/ridley/host_connector/ssh.rb +58 -0
  21. data/lib/ridley/host_connector/ssh/worker.rb +99 -0
  22. data/lib/ridley/host_connector/winrm.rb +55 -0
  23. data/lib/ridley/host_connector/winrm/worker.rb +126 -0
  24. data/lib/ridley/mixin/bootstrap_binding.rb +88 -0
  25. data/lib/ridley/resource.rb +1 -1
  26. data/lib/ridley/resources/client_resource.rb +7 -0
  27. data/lib/ridley/resources/node_resource.rb +9 -4
  28. data/lib/ridley/sandbox_uploader.rb +1 -7
  29. data/lib/ridley/version.rb +1 -1
  30. data/ridley.gemspec +1 -0
  31. data/spec/unit/ridley/bootstrap_bindings/unix_template_binding_spec.rb +102 -0
  32. data/spec/unit/ridley/bootstrap_bindings/windows_template_binding_spec.rb +118 -0
  33. data/spec/unit/ridley/bootstrapper/context_spec.rb +19 -106
  34. data/spec/unit/ridley/bootstrapper_spec.rb +2 -12
  35. data/spec/unit/ridley/client_spec.rb +20 -2
  36. data/spec/unit/ridley/{ssh → host_connector}/response_set_spec.rb +17 -17
  37. data/spec/unit/ridley/host_connector/ssh/worker_spec.rb +15 -0
  38. data/spec/unit/ridley/{ssh_spec.rb → host_connector/ssh_spec.rb} +5 -5
  39. data/spec/unit/ridley/host_connector/winrm/worker_spec.rb +41 -0
  40. data/spec/unit/ridley/host_connector/winrm_spec.rb +47 -0
  41. data/spec/unit/ridley/host_connector_spec.rb +102 -0
  42. data/spec/unit/ridley/mixin/bootstrap_binding_spec.rb +56 -0
  43. data/spec/unit/ridley/sandbox_uploader_spec.rb +1 -28
  44. metadata +53 -25
  45. data/.rbenv-version +0 -1
  46. data/lib/ridley/chef/chefignore.rb +0 -76
  47. data/lib/ridley/ssh.rb +0 -56
  48. data/lib/ridley/ssh/worker.rb +0 -87
  49. data/spec/fixtures/chefignore +0 -8
  50. data/spec/unit/ridley/chef/chefignore_spec.rb +0 -40
  51. data/spec/unit/ridley/ssh/worker_spec.rb +0 -13
@@ -1,8 +0,0 @@
1
- #
2
- # The ignore file allows you to skip files in cookbooks with the same name that appear
3
- # later in the search path.
4
- #
5
-
6
- recipes/ignoreme.rb
7
- # comments can be indented
8
- ignored
@@ -1,40 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Ridley::Chef::Chefignore do
4
- describe "ClassMethods" do
5
- subject { described_class }
6
-
7
- describe "::find_relative_to" do
8
- let(:path) { tmp_path.join('chefignore-test') }
9
- before(:each) { FileUtils.mkdir_p(path) }
10
-
11
- it "finds a chefignore file in a 'cookbooks' directory relative to the given path" do
12
- FileUtils.touch(path.join('chefignore'))
13
- subject.find_relative_to(path)
14
- end
15
-
16
- it "finds a chefignore file relative to the given path" do
17
- FileUtils.mkdir_p(path.join('cookbooks'))
18
- FileUtils.touch(path.join('cookbooks', 'chefignore'))
19
- subject.find_relative_to(path)
20
- end
21
- end
22
- end
23
-
24
- subject { described_class.new(File.join(fixtures_path)) }
25
-
26
- it "loads the globs in the chefignore file" do
27
- subject.ignores.should =~ %w[recipes/ignoreme.rb ignored]
28
- end
29
-
30
- it "removes items from an array that match the ignores" do
31
- file_list = %w[ recipes/ignoreme.rb recipes/dontignoreme.rb ]
32
- subject.remove_ignores_from(file_list).should == %w[recipes/dontignoreme.rb]
33
- end
34
-
35
- it "determines if a file is ignored" do
36
- subject.ignored?('ignored').should be_true
37
- subject.ignored?('recipes/ignoreme.rb').should be_true
38
- subject.ignored?('recipes/dontignoreme.rb').should be_false
39
- end
40
- end
@@ -1,13 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Ridley::SSH::Worker do
4
- describe "ClassMethods" do
5
- subject { described_class }
6
-
7
- describe "::new" do
8
- it { subject.new(sudo: true).sudo.should be_true }
9
- it { subject.new(sudo: false).sudo.should be_false }
10
- it { subject.new().sudo.should be_false }
11
- end
12
- end
13
- end