appfog-vmc-plugin 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGNmZWI2YzAzNzU2N2NhMzc4MTVmYmZmMzQzM2JlMjQyN2EzZmRmNg==
4
+ ODE4YTFhZjgwNDk1Y2EwNmQ2YzUxYWQ1MmQ1MGExMmJkZDVkMGNhMQ==
5
5
  data.tar.gz: !binary |-
6
- MzAyNjdhYmRiMzU2NjE3OWI3ZGFhM2RmOWExODg1M2QzNzhiODE5Yg==
6
+ MDUyYTAxYzMyNzhlYTkxMzYxMWQ2ZWU3NzNmYTRiOWMyYWE3MGUwZA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MTA4MzdkM2FhNjNlN2Q3M2Q0YThkYzc0NTEzOGQ3M2ZmZTQ2OGMwZTVjYzkz
10
- MzNkN2ZkNjc3NDBmNDM2MzIyYWVkZTdhZGM0Yzk3YjY2OWU5MWI2N2E5ZmZl
11
- NjVjMjNjNDdjN2RmNWY0YjM0NTQxNTY1NmUyYzU2MjI2MjljOTE=
9
+ YTBlYWVhYjg4NTEyYTBiYzZhMmMwNGU2ZTM1NjU4MGE3MTc1MjEzOTRmYTdj
10
+ Y2ZjNGYxZWE3YmVkYmI2Y2IyMGRiZjdhNTRlZTkzYzVjN2I3NDkxZTQyNzdm
11
+ MTNmMjdjM2VjMWJhYTJlMTBkNzQ0OGJjYWUzYTk3ZmU2OTUxMGU=
12
12
  data.tar.gz: !binary |-
13
- ZDVkMjlhMTE1NzM3NTc4N2EyY2M5MzMxZmVkNThhMjM3Yjk0ODYyYzU0ZTg3
14
- ZDEzODRmYzBkOWViNGE5N2QwMmVhMGMwZGIxNzM3NjJkZTE1YzJhZjNmODg0
15
- OGNiNjA3NjNlNGIwMjg5ZjhkOGUyMTA1NTA3YjM3NTkxNWI4NTg=
13
+ ODk4YzM4MDk4ZDFhYzBiODlhMWQ0ZDkxZjkxYTQyZjgzMGU2NTAyNjMzMGM4
14
+ ZDhhNzY1MGJlZWQyM2VhYjM2MGQyZjFhYjBiYTgyZjM3MzcyODAwNTg0OTk2
15
+ Mjc1Y2ZkYTM1OGYwNjhjYzdmZDY3NzAwYTI2OTEwODc1M2IyYmU=
@@ -5,12 +5,8 @@ module CFoundry
5
5
 
6
6
  base = super(target)
7
7
 
8
- # case base.info[:version]
9
- # when 2
10
- # CFoundry::V2::Client.new(*args)
11
- # else
12
- CFoundry::V1::Client.new(*args)
13
- # end
8
+ # Version 1 only
9
+ CFoundry::V1::Client.new(*args)
14
10
  end
15
11
  end
16
12
  end
@@ -48,5 +48,25 @@ module CFoundry
48
48
  end
49
49
  end
50
50
  end
51
+
52
+ def prune_empty_directories(path)
53
+ all_files = Dir["#{path}/**/{*,.*}"]
54
+ all_files.reject! { |fn| fn =~ /\/\.+$/ }
55
+
56
+ directories = all_files.select { |x| File.directory?(x) }
57
+ directories.sort! { |a, b| b.size <=> a.size }
58
+
59
+ directories.each do |directory|
60
+ entries = Dir.entries(directory) - %w{. ..}
61
+ if entries.empty?
62
+ # Better handling of symlinks
63
+ if !File.symlink?(directory)
64
+ FileUtils.rmdir(directory)
65
+ else
66
+ File.unlink(directory)
67
+ end
68
+ end
69
+ end
70
+ end
51
71
  end
52
72
  end
@@ -25,7 +25,10 @@ module CFoundry::V1
25
25
  end
26
26
 
27
27
  def infra_by_name(name)
28
- infras.find { |i| i.name == name }
28
+ if name == "none"
29
+ return Infra.new("none", "none", "No infra selected", "no-infra.af.cm", "none", "none")
30
+ end
31
+ infras.find { |i| i.name == name } unless name.nil?
29
32
  end
30
33
 
31
34
  # Added to support downloads
@@ -51,7 +54,13 @@ module CFoundry::V1
51
54
  def services(options = {})
52
55
  services = []
53
56
 
54
- @base.system_services.each do |infra, infra_services|
57
+ service_instances = @base.system_services
58
+
59
+ if options[:infras] != true
60
+ service_instances = { none: service_instances }
61
+ end
62
+
63
+ service_instances.each do |infra, infra_services|
55
64
  infra_services.each do |type, vendors|
56
65
  vendors.each do |vendor, providers|
57
66
  providers.each do |provider, properties|
@@ -1,3 +1,3 @@
1
1
  module VMCAppfog
2
- VERSION = "0.1.10".freeze
2
+ VERSION = "0.1.11".freeze
3
3
  end
@@ -1,12 +1,6 @@
1
1
  module VMC
2
2
  module User
3
3
  class Base < CLI
4
- def precondition
5
- check_logged_in
6
- end
7
-
8
- private
9
-
10
4
  def validate_password!(password)
11
5
  validate_password_verified!(password)
12
6
  # validate_password_strength!(password)
@@ -0,0 +1,8 @@
1
+ module VMC::User
2
+ class Create < Base
3
+
4
+ # Allows creation of users without logging in
5
+ def precondition; end
6
+
7
+ end
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appfog-vmc-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Santeford
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-18 00:00:00.000000000 Z
12
+ date: 2013-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cfoundry
@@ -65,6 +65,7 @@ files:
65
65
  - lib/appfog-vmc-plugin/vmc/app/instances.rb
66
66
  - lib/appfog-vmc-plugin/vmc/start/login.rb
67
67
  - lib/appfog-vmc-plugin/vmc/user/base.rb
68
+ - lib/appfog-vmc-plugin/vmc/user/create.rb
68
69
  - lib/appfog-vmc-plugin/vmc.rb
69
70
  - lib/manifests-vmc-plugin/errors.rb
70
71
  - lib/manifests-vmc-plugin/loader/builder.rb