linode 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ 0.7.1 / 2011-07-16
2
+ ==================
3
+ * Properly nest stackscript namespace under the Linode namespace (Aditya Sanghi)
4
+
1
5
 
2
6
  0.7.0 / 2011-07-07
3
7
  ==================
data/README CHANGED
@@ -140,5 +140,6 @@ Here is an annoyingly exhaustive IRB session where I play around with the API:
140
140
  irb> ^D@ Wed Aug 05 01:50:52 rick@Yer-Moms-Computer
141
141
 
142
142
  CREDITS:
143
+ - Thanks to Aditya Sanghi (github: asanghi) for a patch to properly namespace stackscripts functionality.
143
144
  - Thanks to Dan Hodos (github: danhodos) for diagnosing and fixing an issue with sending GET requests instead of POST request.
144
145
  - Thanks to Aaron Hamid for updates for RSpec 2 and work on user.getapikey + username/password initialization.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.7.1
data/lib/linode.rb CHANGED
@@ -27,7 +27,7 @@ class Linode
27
27
  end
28
28
  end
29
29
 
30
- has_namespace :test, :avail, :user, :domain, :linode, :nodebalancer
30
+ has_namespace :test, :avail, :user, :domain, :linode, :nodebalancer, :stackscript
31
31
 
32
32
  @@documentation_category = {}
33
33
 
@@ -121,4 +121,4 @@ end
121
121
 
122
122
  # include all Linode API namespace classes
123
123
  Dir[File.expand_path(File.dirname(__FILE__) + '/linode/*.rb')].each {|f| require f }
124
- Dir[File.expand_path(File.dirname(__FILE__) + '/linode/**/*.rb')].each {|f| require f }
124
+ Dir[File.expand_path(File.dirname(__FILE__) + '/linode/**/*.rb')].each {|f| require f }
data/linode.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{linode}
8
- s.version = "0.7.0"
8
+ s.version = "0.7.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rick Bradley"]
12
- s.date = %q{2011-07-07}
12
+ s.date = %q{2011-07-17}
13
13
  s.description = %q{This is a wrapper around Linode's automation facilities.}
14
14
  s.email = %q{rick@rickbradley.com}
15
15
  s.extra_rdoc_files = [
data/spec/linode_spec.rb CHANGED
@@ -449,5 +449,37 @@ describe 'Linode' do
449
449
  linode.nodebalancer.should == result
450
450
  end
451
451
  end
452
+
453
+ it 'should be able to provide access to the Linode Stackscript API' do
454
+ @linode.should respond_to(:stackscript)
455
+ end
456
+
457
+ describe 'when providing access to the Linode Stackscript API' do
458
+ it 'should allow no arguments' do
459
+ lambda { @linode.stackscript }.should_not raise_error(ArgumentError)
460
+ end
461
+
462
+ it 'should require no arguments' do
463
+ lambda { @linode.stackscript(:foo) }.should raise_error(ArgumentError)
464
+ end
465
+
466
+ it 'should return a Linode::Stackscript instance' do
467
+ @linode.stackscript.class.should == Linode::Stackscript
468
+ end
469
+
470
+ it 'should set the API key on the Linode::Stackscript instance to be our API key' do
471
+ @linode.stackscript.api_key.should == @api_key
472
+ end
473
+
474
+ it 'should set the API url on the Linode::Stackscript instance to be our API url' do
475
+ @linode.stackscript.api_url.should == @api_url
476
+ end
477
+
478
+ it 'should return the same Linode::Stackscript instance when called again' do
479
+ linode = Linode.new(:api_key => @api_key)
480
+ result = linode.stackscript
481
+ linode.stackscript.should == result
482
+ end
483
+ end
452
484
  end
453
485
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linode
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 0
10
- version: 0.7.0
9
+ - 1
10
+ version: 0.7.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rick Bradley
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-07 00:00:00 -04:00
18
+ date: 2011-07-17 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency