stackfu 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -32,11 +32,18 @@ spec/fixtures/deployments/logs.json
32
32
  spec/fixtures/deployments/logs_end.json
33
33
  spec/fixtures/deployments/logs_failed.json
34
34
  spec/fixtures/deployments/logs_middle.json
35
+ spec/fixtures/fcoury.json
35
36
  spec/fixtures/scripts/all.json
36
37
  spec/fixtures/scripts/create.json
37
38
  spec/fixtures/scripts/delete.json
38
39
  spec/fixtures/scripts/firewall.json
39
40
  spec/fixtures/scripts/firewall/deploy.json
41
+ spec/fixtures/scripts/invalid/script.yml
42
+ spec/fixtures/scripts/missing/config/01-controls.yml
43
+ spec/fixtures/scripts/missing/config/02-requirements.yml
44
+ spec/fixtures/scripts/missing/config/03-executions.yml
45
+ spec/fixtures/scripts/missing/config/04-validations.yml
46
+ spec/fixtures/scripts/missing/script.yml
40
47
  spec/fixtures/scripts/mongo.json
41
48
  spec/fixtures/scripts/mongo/deploy.json
42
49
  spec/fixtures/scripts/none.json
@@ -45,9 +52,12 @@ spec/fixtures/scripts/password.json
45
52
  spec/fixtures/scripts/script_not_found.json
46
53
  spec/fixtures/servers/all.json
47
54
  spec/fixtures/servers/cannot_deploy.json
55
+ spec/fixtures/servers/no_ip.json
48
56
  spec/fixtures/servers/none.json
49
57
  spec/fixtures/servers/not_found.json
50
58
  spec/fixtures/servers/webbynode.json
59
+ spec/fixtures/users/fcoury.json
60
+ spec/fixtures/users/fcoury/mongodb.json
51
61
  spec/spec_helper.rb
52
62
  spec/stackfu/api_hooks_spec.rb
53
63
  spec/stackfu/commands/deploy_command_spec.rb
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rake/testtask'
4
4
 
5
5
  require 'echoe'
6
6
 
7
- Echoe.new('stackfu', '0.1.6') do |p|
7
+ Echoe.new('stackfu', '0.1.7') do |p|
8
8
  p.description = "StackFu Backend"
9
9
  p.url = "http://stackfu.com/cli"
10
10
  p.author = "Felipe Coury"
@@ -19,6 +19,7 @@ module StackFu::Commands
19
19
  puts " #{"config".foreground(:cyan)} configure StackFu CLI options"
20
20
  puts " #{"list".foreground(:cyan)} [servers|script] lists all the scripts and/or server under your account"
21
21
  puts " #{"generate".foreground(:cyan)} creates a new script in current_dir/name"
22
+ puts " #{"dump".foreground(:cyan)} dumps an existing script in current_dir/name"
22
23
  puts " #{"publish".foreground(:cyan)} publishes the item on the current folder to StackFu.com"
23
24
  puts ""
24
25
  puts " For a complete guide on using StackFu from command line:"
@@ -26,8 +26,9 @@ module StackFu::Commands
26
26
  validated = ""
27
27
  end
28
28
 
29
+ ip = item.respond_to?(:ip) ? item.ip : ""
29
30
 
30
- [item.slug, item._id, item.ip, validated, last_seen]
31
+ [item.slug, item._id, ip, validated, last_seen]
31
32
  end,
32
33
  "You have no servers yet. You can add new servers to your account in http://stackfu.com."
33
34
  ],
data/lib/stackfu.rb CHANGED
@@ -50,8 +50,8 @@ require "#{dir}/commands/deploy_command"
50
50
  require "#{dir}/commands/dump_command"
51
51
 
52
52
  module StackFu
53
- VERSION = '0.1.6'
54
- API = "http://beta.stackfu.com"
53
+ VERSION = '0.1.7'
54
+ API = "https://beta.stackfu.com"
55
55
  # API = "http://localhost:3000"
56
56
  CONFIG_FILE = "#{ENV['HOME']}/.stackfu"
57
57
 
@@ -0,0 +1,13 @@
1
+ HTTP/1.1 200 OK
2
+ Content-Type: application/json; charset=utf-8
3
+ Transfer-Encoding: chunked
4
+ Connection: keep-alive
5
+ Status: 200
6
+ X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 2.2.15
7
+ ETag: "b3cf4272f7ca0a6ae42a7857a0d2f320"
8
+ X-UA-Compatible: IE=Edge,chrome=1
9
+ X-Runtime: 0.009943
10
+ Cache-Control: max-age=0, private, must-revalidate
11
+ Server: nginx/0.7.67 + Phusion Passenger 2.2.15 (mod_rails/mod_rack)
12
+
13
+ {"slug":"fcoury","name":"Felipe Coury","encrypted_password":"$2a$10$oLUOcTB7KLW9.QtgvDSxJuLi7GsWlLoNu6mN1S8XZ.R1prGYjMfye","company":"Webbynode","location":"Campinas, SP, Brazil","created_at":"2010-09-06T20:19:34-04:00","updated_at":"2010-09-16T16:03:24-04:00","last_sign_in_ip":"69.172.231.32","last_sign_in_at":"2010-09-16T16:03:14-04:00","_id":"4c8585167d7c425923000003","sign_in_count":30540,"password_salt":"$2a$10$oLUOcTB7KLW9.QtgvDSxJu","website":"http://felipecoury.com","remember_token":"RaKFlotbuKfseiMRKWoa","following_user_ids":["4c8abb277d7c4212aa00033b"],"current_sign_in_ip":"208.88.124.171","authentication_token":"znwcz2xEJVDnUu2xJRFb","remember_created_at":"2010-09-16T10:47:33-04:00","current_sign_in_at":"2010-09-16T16:03:24-04:00","watched_stack_ids":[],"login":"fcoury","confirmation_password":"r4nd0mp4ssf0rth3w1n","watched_script_ids":["4c8585167d7c425923000008","4c85b7e77d7c425a8a00000a","4c8666a97d7c4261a3000006","4c8672bd7d7c4261a3000198","4c88ea567d7c420655000004","4c88eda37d7c420662000135","4c8585167d7c425923000014","4c8a84ad7d7c4212aa000011","4c8a85b07d7c4212aa00001c","4c8a85c17d7c4212aa000025","4c8a86937d7c4212aa0000a5","4c8a87817d7c4212aa000112","4c8b87d77d7c4217a6000006","4c8b88b77d7c4217a600004d","4c8b92e77d7c4217b30000b8","4c8bab3d7d7c421ca8000066","4c8bb2bb7d7c421cc7000090","4c8bb3737d7c421ec400001a","4c8bb4767d7c421cc70000a5","4c8bc9087d7c422038000007","4c8bd1df7d7c422045000018","4c8bd45e7d7c422045000046","4c8bd5427d7c42204500005e","4c8bd8557d7c422290000034","4c8bded67d7c422559000003","4c8bdfc77d7c42256700001e","4c8be3107d7c4226c3000008","4c8c0f037d7c4226c300002c","4c8be47a7d7c4226c3000022","4c885b3f7d7c420354000009","4c9031a97d7c424684000003","4c9040cb7d7c42496800001c","4c9134767d7c424eed000015","4c921b587d7c4252cb000003","4c921c697d7c4252cb000007","4c922df97d7c425401000003","4c9255d97d7c42542b000008"],"member_since":"2010-09-06","form_type":"settings","followed_user_ids":["4c8585167d7c425923000004","4c8abb277d7c4212aa00033b"],"email":"felipe.coury@gmail.com"}
@@ -0,0 +1 @@
1
+ <xml>This is not JSON!</xml>
@@ -0,0 +1,6 @@
1
+ #
2
+ # Missing name: required attribute
3
+ #
4
+ ---
5
+ field1: this
6
+ field2: other
@@ -0,0 +1,12 @@
1
+ HTTP/1.1 200 OK
2
+ Etag: "b68cbf1eec558ebda6d5489e18e4c5c7"
3
+ Connection: Keep-Alive
4
+ Content-Type: application/json; charset=utf-8
5
+ Date: Mon, 06 Sep 2010 18:44:12 GMT
6
+ Server: WEBrick/1.3.1 (Ruby/1.8.7/2009-12-24)
7
+ X-Runtime: 0.587104
8
+ Content-Length: 1034
9
+ Cache-Control: max-age=0, private, must-revalidate
10
+ Set-Cookie: _stackfu_session=BAh7ByIPc2Vzc2lvbl9pZCIlZDE4NTAwMmE4ZGQ3OWZiNDE4Nzg4NDU3ZmUzMGUwYWMiGXdhcmRlbi51c2VyLnVzZXIua2V5WwciCVVzZXJvOhNCU09OOjpPYmplY3RJRAY6CkBkYXRhWxFpUWkBg2kB%2FmkkaQHUaQGJaQHoaQGTaQGPaQBpAGkI--770ce6221b6798c4f1bd8903b1e8b1f2b767ba48; path=/; HttpOnly
11
+
12
+ [{"slug":"webbynode","name":"Webbynode","created_at":"2010-09-05T17:31:27-03:00","updated_at":"2010-09-06T15:43:43-03:00","_id":"4c83fe1fd489e8938f000017","provider_name":"Linnode","user_id":"4c83fe1fd489e8938f000003","last_checked_in":"2010-09-06T15:43:43-03:00","description":"Nunc hendrerit blandit ultrices. Cras pellentesque turpis et dolo\n molestie vitae lacinia nisi iaculis. Pellentesque vitae quam enim. Vivamus dui quam,\n aliquet in condimentum vel, placerat sit amet quam. Aliquam ac sollicitudin dui."},{"slug":"mydog","name":"MyDog","created_at":"2010-09-05T17:31:27-03:00","updated_at":"2010-09-06T15:43:43-03:00","_id":"4c83fe1fd489e8938f000018","provider_name":"Rackspace","user_id":"4c83fe1fd489e8938f000003","ip":"123.45.678.91","last_checked_in":"2010-09-06T15:43:43-03:00","description":"Nulla gravida lacus nec sapien ornare ullamcorper varius ipsum venenatis.\n Duis sit amet turpis risus, id venenatis neque. Vestibulum ultrices condimentum mi ac elementum.\n Sed vitae velit dui. Integer ac urna erat."}]
@@ -0,0 +1,12 @@
1
+ HTTP/1.1 200 OK
2
+ X-Ua-Compatible: IE=Edge,chrome=1
3
+ Etag: "d2b971e4380435ff92bffc46c8f13642"
4
+ Connection: Keep-Alive
5
+ Content-Type: application/json; charset=utf-8
6
+ Date: Thu, 16 Sep 2010 20:11:36 GMT
7
+ Server: WEBrick/1.3.1 (Ruby/1.8.7/2009-12-24)
8
+ X-Runtime: 0.561455
9
+ Content-Length: 1570
10
+ Cache-Control: max-age=0, private, must-revalidate
11
+
12
+ {"name":"mongodb","controls":[{"label":"Ports","name":"ports","_id":"4c9250ccd489e8625d00000a","_type":"Textbox","type":"Textbox","hint":"separate by comma's"}],"slug":"mongodb","created_at":"2010-09-16T17:15:56Z","updated_at":"2010-09-16T17:15:56Z","_id":"4c9250ccd489e8625d00000d","validations":[{"body":"test -x ufw","_id":"4c9250cbd489e8625d000002","_type":"ExecutableExists","params":{"data":"ufw"},"description":"File ufw exists and is executable"}],"user_id":"4c9250cbd489e8625d000003","requirements":[{"body":"test -x apt-get","_id":"4c9250cbd489e8625d000001","_type":"ExecutableExists","params":{"data":"apt-get"},"description":"File apt-get exists and is executable"}],"executions":[{"body":" # \n # configure_ufw.sh\n # Tue Dec 01 15:06:48 -0200 2009\n #\n\n apt-get update\n apt-get install -y ufw\n","_id":"4c9250ccd489e8625d00000b","_type":"Executable","description":"Install Ufw"},{"body":" # \n # install_ufw.sh\n # Tue Dec 01 15:06:48 -0200 2009\n #\n\n ufw default deny\n <% ports.split(\",\").each do |port| %>\n ufw allow <%= port %> \n <% end %>\n","_id":"4c9250ccd489e8625d00000c","_type":"Executable","description":"Configure Ufw"}],"description":"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n In et erat sem, at pellentesque augue. Aliquam tincidunt viverra mauris,\n non auctor nibh pretium ac. Phasellus dapibus interdum rutrum. Nunc eget\n felis sed nulla porta elementum. Proin nec tortor sit amet turpis scelerisque ullamcorper.","watching_user_ids":[]}
@@ -0,0 +1,13 @@
1
+ HTTP/1.1 200 OK
2
+ Content-Type: application/json; charset=utf-8
3
+ Transfer-Encoding: chunked
4
+ Connection: keep-alive
5
+ Status: 200
6
+ X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 2.2.15
7
+ ETag: "ba683de741937a8ad5f1ddf681d7ba3a"
8
+ X-UA-Compatible: IE=Edge,chrome=1
9
+ X-Runtime: 0.010493
10
+ Cache-Control: max-age=0, private, must-revalidate
11
+ Server: nginx/0.7.67 + Phusion Passenger 2.2.15 (mod_rails/mod_rack)
12
+
13
+ {"slug":"fcoury","name":"Felipe Coury","encrypted_password":"$2a$10$oLUOcTB7KLW9.QtgvDSxJuLi7GsWlLoNu6mN1S8XZ.R1prGYjMfye","company":"Webbynode","location":"Campinas, SP, Brazil","created_at":"2010-09-06T20:19:34-04:00","updated_at":"2010-09-16T16:04:24-04:00","last_sign_in_ip":"69.172.231.32","last_sign_in_at":"2010-09-16T16:04:15-04:00","_id":"4c8585167d7c425923000003","sign_in_count":30544,"password_salt":"$2a$10$oLUOcTB7KLW9.QtgvDSxJu","website":"http://felipecoury.com","remember_token":"RaKFlotbuKfseiMRKWoa","following_user_ids":["4c8abb277d7c4212aa00033b"],"current_sign_in_ip":"208.88.124.171","authentication_token":"znwcz2xEJVDnUu2xJRFb","remember_created_at":"2010-09-16T10:47:33-04:00","current_sign_in_at":"2010-09-16T16:04:24-04:00","watched_stack_ids":[],"login":"fcoury","confirmation_password":"r4nd0mp4ssf0rth3w1n","watched_script_ids":["4c8585167d7c425923000008","4c85b7e77d7c425a8a00000a","4c8666a97d7c4261a3000006","4c8672bd7d7c4261a3000198","4c88ea567d7c420655000004","4c88eda37d7c420662000135","4c8585167d7c425923000014","4c8a84ad7d7c4212aa000011","4c8a85b07d7c4212aa00001c","4c8a85c17d7c4212aa000025","4c8a86937d7c4212aa0000a5","4c8a87817d7c4212aa000112","4c8b87d77d7c4217a6000006","4c8b88b77d7c4217a600004d","4c8b92e77d7c4217b30000b8","4c8bab3d7d7c421ca8000066","4c8bb2bb7d7c421cc7000090","4c8bb3737d7c421ec400001a","4c8bb4767d7c421cc70000a5","4c8bc9087d7c422038000007","4c8bd1df7d7c422045000018","4c8bd45e7d7c422045000046","4c8bd5427d7c42204500005e","4c8bd8557d7c422290000034","4c8bded67d7c422559000003","4c8bdfc77d7c42256700001e","4c8be3107d7c4226c3000008","4c8c0f037d7c4226c300002c","4c8be47a7d7c4226c3000022","4c885b3f7d7c420354000009","4c9031a97d7c424684000003","4c9040cb7d7c42496800001c","4c9134767d7c424eed000015","4c921b587d7c4252cb000003","4c921c697d7c4252cb000007","4c922df97d7c425401000003","4c9255d97d7c42542b000008"],"member_since":"2010-09-06","form_type":"settings","followed_user_ids":["4c8585167d7c425923000004","4c8abb277d7c4212aa00033b"],"email":"felipe.coury@gmail.com"}
data/spec/spec_helper.rb CHANGED
@@ -23,34 +23,30 @@ module StackFuHelpers
23
23
  File.read(File.join(File.dirname(__FILE__), "fixtures", file))
24
24
  end
25
25
 
26
+ def url(uri)
27
+ if StackFu::API =~ /(https*):\/\/(.*)/
28
+ return "#{$1}://abc123:X@#{$2}#{uri}"
29
+ end
30
+ end
31
+
26
32
  def prepare_raise(method, uri, error)
27
- request = stub_request(method,
28
- "#{StackFu::API.gsub("http://", "http://abc123:X@")}#{uri}")
33
+ request = stub_request(method, "#{url(uri)}")
29
34
  request.to_raise(error)
30
35
  end
31
36
 
32
37
  def prepare_multi(method, uri, *fixtures)
33
- d "#{StackFu::API.gsub("http://", "http://abc123:X@")}#{uri}"
34
- d fixtures.map { |f| read_fixture(f) }
35
-
36
- request = stub_request(method,
37
- "#{StackFu::API.gsub("http://", "http://abc123:X@")}#{uri}")
38
-
38
+ request = stub_request(method, "#{url(uri)}")
39
39
  request.to_return(fixtures.map { |f| read_fixture(f) })
40
40
  end
41
41
 
42
42
  def prepare(method, uri, fixture=uri, options=nil)
43
- request = stub_request(method,
44
- "#{StackFu::API.gsub("http://", "http://abc123:X@")}#{uri}")
45
-
43
+ request = stub_request(method, "#{url(uri)}")
46
44
  request = request.with(options) if options
47
-
48
45
  request.to_return(read_fixture(fixture))
49
46
  end
50
47
 
51
48
  def prepare_status(method, uri, status)
52
- request = stub_request(method,
53
- "#{StackFu::API.gsub("http://", "http://abc123:X@")}#{uri}")
49
+ request = stub_request(method, "#{url(uri)}")
54
50
  request.to_return(:status => status)
55
51
 
56
52
  end
@@ -50,4 +50,16 @@ describe StackFu::Commands::ListCommand do
50
50
  stdout.should =~ /123.45.678.90/
51
51
  stdout.should =~ /123.45.678.91/
52
52
  end
53
+
54
+ it "shows blank when ip isn't present" do
55
+ prepare(:get, '/servers.json', 'servers/no_ip.json')
56
+ prepare(:get, '/scripts.json', 'scripts/none.json')
57
+
58
+ command "list"
59
+
60
+ stdout.should =~ /Listing 2 servers/
61
+ stdout.should =~ /webbynode/
62
+ stdout.should =~ /mydog/
63
+ stdout.should =~ /123.45.678.91/
64
+ end
53
65
  end
data/stackfu.gemspec CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{stackfu}
5
- s.version = "0.1.6"
5
+ s.version = "0.1.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Felipe Coury"]
9
- s.date = %q{2010-09-16}
9
+ s.date = %q{2010-10-10}
10
10
  s.default_executable = %q{stackfu}
11
11
  s.description = %q{StackFu Backend}
12
12
  s.email = %q{felipe@stackfu.com}
13
13
  s.executables = ["stackfu"]
14
14
  s.extra_rdoc_files = ["CHANGELOG", "README", "README.md", "bin/stackfu", "lib/stackfu.rb", "lib/stackfu/api_hooks.rb", "lib/stackfu/app.rb", "lib/stackfu/commands/command.rb", "lib/stackfu/commands/config_command.rb", "lib/stackfu/commands/deploy_command.rb", "lib/stackfu/commands/dump_command.rb", "lib/stackfu/commands/generate_command.rb", "lib/stackfu/commands/help_command.rb", "lib/stackfu/commands/list_command.rb", "lib/stackfu/commands/publish_command.rb", "lib/stackfu/commands/server_command.rb", "lib/stackfu/date_helper.rb", "lib/stackfu/helpers/providers_credentials.rb", "lib/stackfu/helpers/rendering.rb", "lib/stackfu/operating_systems.rb"]
15
- s.files = ["CHANGELOG", "Manifest", "README", "README.md", "Rakefile", "autotest/discover.rb", "bin/stackfu", "firewall/config/01-controls.yml", "firewall/config/02-requirements.yml", "firewall/config/03-executions.yml", "firewall/config/04-validations.yml", "firewall/executables/configure_ufw.sh.erb", "firewall/executables/install_ufw.sh.erb", "firewall/script.yml", "lib/stackfu.rb", "lib/stackfu/api_hooks.rb", "lib/stackfu/app.rb", "lib/stackfu/commands/command.rb", "lib/stackfu/commands/config_command.rb", "lib/stackfu/commands/deploy_command.rb", "lib/stackfu/commands/dump_command.rb", "lib/stackfu/commands/generate_command.rb", "lib/stackfu/commands/help_command.rb", "lib/stackfu/commands/list_command.rb", "lib/stackfu/commands/publish_command.rb", "lib/stackfu/commands/server_command.rb", "lib/stackfu/date_helper.rb", "lib/stackfu/helpers/providers_credentials.rb", "lib/stackfu/helpers/rendering.rb", "lib/stackfu/operating_systems.rb", "spec/fixtures/deployments/logs.json", "spec/fixtures/deployments/logs_end.json", "spec/fixtures/deployments/logs_failed.json", "spec/fixtures/deployments/logs_middle.json", "spec/fixtures/scripts/all.json", "spec/fixtures/scripts/create.json", "spec/fixtures/scripts/delete.json", "spec/fixtures/scripts/firewall.json", "spec/fixtures/scripts/firewall/deploy.json", "spec/fixtures/scripts/mongo.json", "spec/fixtures/scripts/mongo/deploy.json", "spec/fixtures/scripts/none.json", "spec/fixtures/scripts/not_found.json", "spec/fixtures/scripts/password.json", "spec/fixtures/scripts/script_not_found.json", "spec/fixtures/servers/all.json", "spec/fixtures/servers/cannot_deploy.json", "spec/fixtures/servers/none.json", "spec/fixtures/servers/not_found.json", "spec/fixtures/servers/webbynode.json", "spec/spec_helper.rb", "spec/stackfu/api_hooks_spec.rb", "spec/stackfu/commands/deploy_command_spec.rb", "spec/stackfu/commands/dump_command_spec.rb", "spec/stackfu/commands/generate_command_spec.rb", "spec/stackfu/commands/list_command_spec.rb", "spec/stackfu/commands/publish_command_spec.rb", "spec/stackfu/rendering_spec.rb", "stackfu-installer/config/01-controls.yml", "stackfu-installer/config/02-requirements.yml", "stackfu-installer/config/03-executions.yml", "stackfu-installer/config/04-validations.yml", "stackfu-installer/script/dotfiles_installation.sh.erb", "stackfu-installer/script/github_credentials_setup.sh.erb", "stackfu-installer/script/nginx_and_passenger.sh.erb", "stackfu-installer/script/redis_installation.sh.erb", "stackfu-installer/script/resque_installation.sh.erb", "stackfu-installer/script/ruby_environment.sh.erb", "stackfu-installer/script/stackfu.sh.erb", "stackfu-installer/stack.yml", "templates/01-controls.yml.erb", "templates/02-requirements.yml.erb", "templates/03-executions.yml.erb", "templates/04-validations.yml.erb", "templates/script.sh.erb", "templates/stack.yml.erb", "test/fixtures/add_server_error", "test/fixtures/deployment_add", "test/fixtures/deployment_add_error", "test/fixtures/deployments", "test/fixtures/logs", "test/fixtures/logs_partial", "test/fixtures/plugin_add", "test/fixtures/plugin_add_error", "test/fixtures/plugin_deployment_add", "test/fixtures/plugin_not_found", "test/fixtures/plugin_unauthorized", "test/fixtures/plugins", "test/fixtures/plugins_by_name", "test/fixtures/plugins_by_name_other", "test/fixtures/plugins_empty", "test/fixtures/plugins_multiple", "test/fixtures/providers", "test/fixtures/providers_servers", "test/fixtures/server_add", "test/fixtures/server_add_dupe", "test/fixtures/server_add_error", "test/fixtures/server_delete", "test/fixtures/server_delete_error", "test/fixtures/servers", "test/fixtures/servers_by_name", "test/fixtures/servers_empty", "test/fixtures/servers_not_found", "test/fixtures/servers_unauthorized", "test/fixtures/servers_webbynode", "test/fixtures/stack/stackfu-installer/config/01-controls.yml", "test/fixtures/stack/stackfu-installer/config/02-requirements.yml", "test/fixtures/stack/stackfu-installer/config/03-scripts.yml", "test/fixtures/stack/stackfu-installer/config/04-validations.yml", "test/fixtures/stack/stackfu-installer/script/dotfiles_installation.sh.erb", "test/fixtures/stack/stackfu-installer/script/github_credentials_setup.sh.erb", "test/fixtures/stack/stackfu-installer/script/nginx_and_passenger.sh.erb", "test/fixtures/stack/stackfu-installer/script/redis_installation.sh.erb", "test/fixtures/stack/stackfu-installer/script/resque_installation.sh.erb", "test/fixtures/stack/stackfu-installer/script/ruby_environment.sh.erb", "test/fixtures/stack/stackfu-installer/script/stackfu.sh.erb", "test/fixtures/stack/stackfu-installer/stack.yml", "test/fixtures/stack_add", "test/fixtures/stack_add_error", "test/fixtures/stack_add_error_dupe", "test/fixtures/stack_adds_by_name", "test/fixtures/stack_delete_not_found", "test/fixtures/stacks", "test/fixtures/stacks_by_name", "test/fixtures/stacks_by_name_other", "test/fixtures/stacks_empty", "test/fixtures/stacks_multiple", "test/fixtures/stacks_not_found", "test/fixtures/stacks_realworld", "test/fixtures/stacks_stackfu-installer", "test/fixtures/stacks_unauthorized", "test/fixtures/stacks_with_controls", "test/fixtures/users", "test/fixtures/users_no_credentials", "test/fixtures/users_update", "test/support/custom_matchers.rb", "test/support/fixtures.rb", "test/support/io_stub.rb", "test/support/web_fixtures.rb", "test/test_helper.rb", "test/unit/commands/test_command.rb", "test/unit/commands/test_config_command.rb", "test/unit/commands/test_deploy_command.rb", "test/unit/commands/test_dump_command.rb", "test/unit/commands/test_generate_command.rb", "test/unit/commands/test_help_command.rb", "test/unit/commands/test_list_command.rb", "test/unit/commands/test_publish_command.rb", "test/unit/commands/test_server_command.rb", "test/unit/helpers/test_rendering.rb", "test/unit/test_array.rb", "test/unit/test_provider.rb", "test/unit/test_stackfu.rb", "stackfu.gemspec"]
15
+ s.files = ["CHANGELOG", "Manifest", "README", "README.md", "Rakefile", "autotest/discover.rb", "bin/stackfu", "firewall/config/01-controls.yml", "firewall/config/02-requirements.yml", "firewall/config/03-executions.yml", "firewall/config/04-validations.yml", "firewall/executables/configure_ufw.sh.erb", "firewall/executables/install_ufw.sh.erb", "firewall/script.yml", "lib/stackfu.rb", "lib/stackfu/api_hooks.rb", "lib/stackfu/app.rb", "lib/stackfu/commands/command.rb", "lib/stackfu/commands/config_command.rb", "lib/stackfu/commands/deploy_command.rb", "lib/stackfu/commands/dump_command.rb", "lib/stackfu/commands/generate_command.rb", "lib/stackfu/commands/help_command.rb", "lib/stackfu/commands/list_command.rb", "lib/stackfu/commands/publish_command.rb", "lib/stackfu/commands/server_command.rb", "lib/stackfu/date_helper.rb", "lib/stackfu/helpers/providers_credentials.rb", "lib/stackfu/helpers/rendering.rb", "lib/stackfu/operating_systems.rb", "spec/fixtures/deployments/logs.json", "spec/fixtures/deployments/logs_end.json", "spec/fixtures/deployments/logs_failed.json", "spec/fixtures/deployments/logs_middle.json", "spec/fixtures/fcoury.json", "spec/fixtures/scripts/all.json", "spec/fixtures/scripts/create.json", "spec/fixtures/scripts/delete.json", "spec/fixtures/scripts/firewall.json", "spec/fixtures/scripts/firewall/deploy.json", "spec/fixtures/scripts/invalid/script.yml", "spec/fixtures/scripts/missing/config/01-controls.yml", "spec/fixtures/scripts/missing/config/02-requirements.yml", "spec/fixtures/scripts/missing/config/03-executions.yml", "spec/fixtures/scripts/missing/config/04-validations.yml", "spec/fixtures/scripts/missing/script.yml", "spec/fixtures/scripts/mongo.json", "spec/fixtures/scripts/mongo/deploy.json", "spec/fixtures/scripts/none.json", "spec/fixtures/scripts/not_found.json", "spec/fixtures/scripts/password.json", "spec/fixtures/scripts/script_not_found.json", "spec/fixtures/servers/all.json", "spec/fixtures/servers/cannot_deploy.json", "spec/fixtures/servers/no_ip.json", "spec/fixtures/servers/none.json", "spec/fixtures/servers/not_found.json", "spec/fixtures/servers/webbynode.json", "spec/fixtures/users/fcoury.json", "spec/fixtures/users/fcoury/mongodb.json", "spec/spec_helper.rb", "spec/stackfu/api_hooks_spec.rb", "spec/stackfu/commands/deploy_command_spec.rb", "spec/stackfu/commands/dump_command_spec.rb", "spec/stackfu/commands/generate_command_spec.rb", "spec/stackfu/commands/list_command_spec.rb", "spec/stackfu/commands/publish_command_spec.rb", "spec/stackfu/rendering_spec.rb", "stackfu-installer/config/01-controls.yml", "stackfu-installer/config/02-requirements.yml", "stackfu-installer/config/03-executions.yml", "stackfu-installer/config/04-validations.yml", "stackfu-installer/script/dotfiles_installation.sh.erb", "stackfu-installer/script/github_credentials_setup.sh.erb", "stackfu-installer/script/nginx_and_passenger.sh.erb", "stackfu-installer/script/redis_installation.sh.erb", "stackfu-installer/script/resque_installation.sh.erb", "stackfu-installer/script/ruby_environment.sh.erb", "stackfu-installer/script/stackfu.sh.erb", "stackfu-installer/stack.yml", "templates/01-controls.yml.erb", "templates/02-requirements.yml.erb", "templates/03-executions.yml.erb", "templates/04-validations.yml.erb", "templates/script.sh.erb", "templates/stack.yml.erb", "test/fixtures/add_server_error", "test/fixtures/deployment_add", "test/fixtures/deployment_add_error", "test/fixtures/deployments", "test/fixtures/logs", "test/fixtures/logs_partial", "test/fixtures/plugin_add", "test/fixtures/plugin_add_error", "test/fixtures/plugin_deployment_add", "test/fixtures/plugin_not_found", "test/fixtures/plugin_unauthorized", "test/fixtures/plugins", "test/fixtures/plugins_by_name", "test/fixtures/plugins_by_name_other", "test/fixtures/plugins_empty", "test/fixtures/plugins_multiple", "test/fixtures/providers", "test/fixtures/providers_servers", "test/fixtures/server_add", "test/fixtures/server_add_dupe", "test/fixtures/server_add_error", "test/fixtures/server_delete", "test/fixtures/server_delete_error", "test/fixtures/servers", "test/fixtures/servers_by_name", "test/fixtures/servers_empty", "test/fixtures/servers_not_found", "test/fixtures/servers_unauthorized", "test/fixtures/servers_webbynode", "test/fixtures/stack/stackfu-installer/config/01-controls.yml", "test/fixtures/stack/stackfu-installer/config/02-requirements.yml", "test/fixtures/stack/stackfu-installer/config/03-scripts.yml", "test/fixtures/stack/stackfu-installer/config/04-validations.yml", "test/fixtures/stack/stackfu-installer/script/dotfiles_installation.sh.erb", "test/fixtures/stack/stackfu-installer/script/github_credentials_setup.sh.erb", "test/fixtures/stack/stackfu-installer/script/nginx_and_passenger.sh.erb", "test/fixtures/stack/stackfu-installer/script/redis_installation.sh.erb", "test/fixtures/stack/stackfu-installer/script/resque_installation.sh.erb", "test/fixtures/stack/stackfu-installer/script/ruby_environment.sh.erb", "test/fixtures/stack/stackfu-installer/script/stackfu.sh.erb", "test/fixtures/stack/stackfu-installer/stack.yml", "test/fixtures/stack_add", "test/fixtures/stack_add_error", "test/fixtures/stack_add_error_dupe", "test/fixtures/stack_adds_by_name", "test/fixtures/stack_delete_not_found", "test/fixtures/stacks", "test/fixtures/stacks_by_name", "test/fixtures/stacks_by_name_other", "test/fixtures/stacks_empty", "test/fixtures/stacks_multiple", "test/fixtures/stacks_not_found", "test/fixtures/stacks_realworld", "test/fixtures/stacks_stackfu-installer", "test/fixtures/stacks_unauthorized", "test/fixtures/stacks_with_controls", "test/fixtures/users", "test/fixtures/users_no_credentials", "test/fixtures/users_update", "test/support/custom_matchers.rb", "test/support/fixtures.rb", "test/support/io_stub.rb", "test/support/web_fixtures.rb", "test/test_helper.rb", "test/unit/commands/test_command.rb", "test/unit/commands/test_config_command.rb", "test/unit/commands/test_deploy_command.rb", "test/unit/commands/test_dump_command.rb", "test/unit/commands/test_generate_command.rb", "test/unit/commands/test_help_command.rb", "test/unit/commands/test_list_command.rb", "test/unit/commands/test_publish_command.rb", "test/unit/commands/test_server_command.rb", "test/unit/helpers/test_rendering.rb", "test/unit/test_array.rb", "test/unit/test_provider.rb", "test/unit/test_stackfu.rb", "stackfu.gemspec"]
16
16
  s.homepage = %q{http://stackfu.com/cli}
17
17
  s.post_install_message = %q{
18
18
  --==-- StackFu - Server Deployment Engine --==--
@@ -12,13 +12,14 @@
12
12
  # DirExists - a given directory exits
13
13
  # ProcessExists - a process is runnning
14
14
  # RubyCanLoad - if ruby can load a given lib
15
- # RubyGem - if a given ruby gem is installed
15
+ # RubyGem - if a given ruby gem is installed
16
16
  #
17
17
  # Example of expected contents for this file:
18
18
  #
19
19
  # requirements:
20
20
  # - type: DirExists
21
21
  # data: "/var"
22
- # - type: FireExists
22
+ # - type: FileExists
23
23
  # data: "/etc/init.d/mysql"
24
24
  #
25
+ requirements:
@@ -12,6 +12,7 @@
12
12
  #
13
13
  # Example of script section contents:
14
14
  #
15
+ # executions:
15
16
  # - description: Install Apache
16
17
  # file: install_apache
17
18
  #
@@ -25,8 +26,8 @@
25
26
  # install_apache.sh.erb, isntall_mysql.sh.erb and
26
27
  # install_php.sh.erb
27
28
  #
28
- <% if executions %>
29
29
  executions:
30
+ <% if executions %>
30
31
  <% executions.each do |s| %>
31
32
  - description: <%= s.first.titleize %>
32
33
  file: <%= s.first %>
@@ -14,3 +14,4 @@
14
14
  # - type: DirExists
15
15
  # data: "/etc/apache2"
16
16
  #
17
+ validations:
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stackfu
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 6
10
- version: 0.1.6
9
+ - 7
10
+ version: 0.1.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Felipe Coury
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-16 00:00:00 -03:00
18
+ date: 2010-10-10 00:00:00 -03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -160,11 +160,18 @@ files:
160
160
  - spec/fixtures/deployments/logs_end.json
161
161
  - spec/fixtures/deployments/logs_failed.json
162
162
  - spec/fixtures/deployments/logs_middle.json
163
+ - spec/fixtures/fcoury.json
163
164
  - spec/fixtures/scripts/all.json
164
165
  - spec/fixtures/scripts/create.json
165
166
  - spec/fixtures/scripts/delete.json
166
167
  - spec/fixtures/scripts/firewall.json
167
168
  - spec/fixtures/scripts/firewall/deploy.json
169
+ - spec/fixtures/scripts/invalid/script.yml
170
+ - spec/fixtures/scripts/missing/config/01-controls.yml
171
+ - spec/fixtures/scripts/missing/config/02-requirements.yml
172
+ - spec/fixtures/scripts/missing/config/03-executions.yml
173
+ - spec/fixtures/scripts/missing/config/04-validations.yml
174
+ - spec/fixtures/scripts/missing/script.yml
168
175
  - spec/fixtures/scripts/mongo.json
169
176
  - spec/fixtures/scripts/mongo/deploy.json
170
177
  - spec/fixtures/scripts/none.json
@@ -173,9 +180,12 @@ files:
173
180
  - spec/fixtures/scripts/script_not_found.json
174
181
  - spec/fixtures/servers/all.json
175
182
  - spec/fixtures/servers/cannot_deploy.json
183
+ - spec/fixtures/servers/no_ip.json
176
184
  - spec/fixtures/servers/none.json
177
185
  - spec/fixtures/servers/not_found.json
178
186
  - spec/fixtures/servers/webbynode.json
187
+ - spec/fixtures/users/fcoury.json
188
+ - spec/fixtures/users/fcoury/mongodb.json
179
189
  - spec/spec_helper.rb
180
190
  - spec/stackfu/api_hooks_spec.rb
181
191
  - spec/stackfu/commands/deploy_command_spec.rb