clinode 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.txt CHANGED
@@ -21,3 +21,5 @@ linode stackscript download [--dir=<dir>]
21
21
  linode stackscript upload [-dir=<dir>]
22
22
  - Uploads all files in the format <stackscript_id>.stack.sh in the current directory or a directory of your choosing onto linode.
23
23
 
24
+ Note: I'm still trying to find the best and cleanest way to implement it. All a spike so far.
25
+ If you use it, best to read the code to figure this out and fork and pull.
data/clinode.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_dependency "linode"
22
+ s.add_dependency "linode", "~> 0.7.1"
23
23
  s.add_dependency "text-hyphen", "1.0.0"
24
24
  s.add_dependency "text-format", "1.0.0"
25
25
  s.add_dependency "highline", "~> 1.5.1"
@@ -1,3 +1,3 @@
1
1
  module Clinode
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -1,7 +1,5 @@
1
1
  command :avail do |args|
2
- helper.linode_config
3
- ls = helper.linode
4
- return if !ls
2
+ ls = helper.get_linode
5
3
 
6
4
  params = {}
7
5
 
data/lib/commands/dns.rb CHANGED
@@ -1,7 +1,5 @@
1
1
  command :dns do |args|
2
- helper.linode_config
3
- ls = helper.stackscript_linode
4
- return if !ls
2
+ ls = helper.get_linode
5
3
 
6
4
  params = {}
7
5
 
@@ -16,9 +14,7 @@ command :dns do |args|
16
14
  end
17
15
 
18
16
  command :dns_resource do |args|
19
- helper.linode_config
20
- ls = helper.stackscript_linode
21
- return if !ls
17
+ ls = helper.get_linode
22
18
 
23
19
  return if !options.has_key?(:domainid)
24
20
 
data/lib/commands/echo.rb CHANGED
@@ -1,7 +1,5 @@
1
1
  command :echo do
2
- helper.linode_config
3
- ls = helper.stackscript_linode
4
- return if !ls
2
+ ls = helper.get_linode
5
3
 
6
4
  puts ls.test.echo(options)
7
5
  end
@@ -17,12 +17,6 @@ end
17
17
 
18
18
  helper :get_linode do
19
19
 
20
- linode_config
21
- ls = stackscript_linode
22
- if ls
23
- return ls
24
- else
25
- die "wtf"
26
- end
20
+ linode or die "wtf"
27
21
 
28
22
  end
@@ -1,7 +1,5 @@
1
1
  command :nodebalancer do |args|
2
- helper.linode_config
3
- ls = helper.stackscript_linode
4
- return if !ls
2
+ ls = helper.get_linode
5
3
 
6
4
  case args
7
5
  when "list"
@@ -1,8 +1,3 @@
1
- # This shouldnt be required if we get the patch into rick's linode api gem
2
- helper :stackscript_linode do
3
- Linode::Stackscript.new(:api_key => Clinode.options[:api_token])
4
- end
5
-
6
1
  helper :print_stackscript do |script|
7
2
  if Clinode.options[:output]
8
3
  puts script.script
@@ -80,9 +75,7 @@ flags :update => "Update the content of the stackscript"
80
75
  flags :meta_update => "Update the meta data of the stackscript"
81
76
  flags :delete => "Delete the given stack script"
82
77
  command :stackscript do |arg|
83
- helper.linode_config
84
- ls = helper.stackscript_linode
85
- return if !ls
78
+ ls = helper.get_linode
86
79
 
87
80
  options[:dir] ||= "."
88
81
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clinode
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 2
10
- version: 1.0.2
9
+ - 3
10
+ version: 1.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Aditya Sanghi
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-16 00:00:00 Z
18
+ date: 2011-07-17 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: linode
@@ -23,12 +23,14 @@ dependencies:
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
26
- - - ">="
26
+ - - ~>
27
27
  - !ruby/object:Gem::Version
28
- hash: 3
28
+ hash: 1
29
29
  segments:
30
30
  - 0
31
- version: "0"
31
+ - 7
32
+ - 1
33
+ version: 0.7.1
32
34
  type: :runtime
33
35
  version_requirements: *id001
34
36
  - !ruby/object:Gem::Dependency