profitbricks 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ === 0.9.5 / 2013-02-16
2
+
3
+ * 1 bug fix:
4
+ * Cast the passed options to Server#create before checking for validity
5
+
1
6
  === 0.9.1 / 2012-05-16
2
7
 
3
8
  * 1 bug fix:
data/lib/profitbricks.rb CHANGED
@@ -13,7 +13,7 @@ require 'profitbricks/firewall'
13
13
  require 'profitbricks/rule'
14
14
 
15
15
  module Profitbricks
16
- VERSION = '0.9.4'
16
+ VERSION = '0.9.5'
17
17
  end
18
18
 
19
19
  PB = Profitbricks
@@ -69,7 +69,7 @@ module Profitbricks
69
69
  # @return [Server] The created virtual server
70
70
  def create(options = {})
71
71
  raise ArgumentError.new("You must provide :cores and :ram") if options[:ram].nil? and options[:cores].nil?
72
- raise ArgumentError.new(":ram has to be at least 256MiB and a multiple of it") if options[:ram] < 256 or (options[:ram] % 256) > 0
72
+ raise ArgumentError.new(":ram has to be at least 256MiB and a multiple of it") if options[:ram].to_i < 256 or (options[:ram].to_i % 256) > 0
73
73
  raise ArgumentError.new(":os_type has to be either 'WINDOWS' or 'OTHER'") if options[:os_type] and !['WINDOWS', 'OTHER'].include? options[:os_type]
74
74
  xml = "<arg0>"
75
75
  xml += get_xml_and_update_attributes options,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: profitbricks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-21 00:00:00.000000000 Z
12
+ date: 2013-02-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement
@@ -227,7 +227,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
227
227
  requirements:
228
228
  - - ! '>='
229
229
  - !ruby/object:Gem::Version
230
- hash: 1445834941064886589
230
+ hash: -2379174197309944654
231
231
  version: '0'
232
232
  segments:
233
233
  - 0