Permalink
Browse files

progress

  • Loading branch information...
1 parent 0a8785b commit 91c648d59d6fcee1cb2b2013f4913fdf74c44f58 @wbailey committed May 3, 2012
Showing with 22 additions and 75 deletions.
  1. +2 −2 .rvmrc
  2. +7 −6 Gemfile
  3. +8 −51 Gemfile.lock
  4. +2 −1 lib/claws.rb
  5. +0 −12 lib/claws/collection/base.rb
  6. +1 −1 lib/claws/collection/ec2.rb
  7. +1 −0 lib/claws/support.rb
  8. +1 −2 spec/collection/ec2_spec.rb
View
4 .rvmrc
@@ -1,2 +1,2 @@
-rvm --install ruby-1.9.2-p290
-rvm --create --install use ruby-1.9.2-p290@claws
+rvm --install ruby-1.9.3-p125
+rvm --create --install use ruby-1.9.3-p125@claws
View
13 Gemfile
@@ -1,14 +1,15 @@
source 'http://rubygems.org'
gem 'rspec', '>=2.4'
-gem 'ruby-debug19'
+# gem 'ruby-debug19'
+gem 'debugger'
gem 'autotest'
gem 'autotest-growl'
gem 'autotest-fsevent'
gem 'rake'
-gem 'kramdown'
-gem 'gollum'
-gem 'RedCloth'
-gem 'redcarpet', '1.17.2'
-gem 'colored'
+# gem 'kramdown'
+# gem 'gollum'
+# gem 'RedCloth'
+# gem 'redcarpet', '1.17.2'
+# gem 'colored'
gem 'aws-sdk'
View
@@ -1,11 +1,7 @@
GEM
remote: http://rubygems.org/
specs:
- RedCloth (4.2.9)
ZenTest (4.6.2)
- albino (1.3.3)
- posix-spawn (>= 0.3.6)
- archive-tar-minitar (0.5.2)
autotest (4.4.6)
ZenTest (>= 4.4.1)
autotest-fsevent (0.2.8)
@@ -16,41 +12,24 @@ GEM
json (~> 1.4)
nokogiri (>= 1.4.4)
uuidtools (~> 2.1)
- colored (1.2)
columnize (0.3.6)
+ debugger (1.1.2)
+ columnize (>= 0.3.1)
+ debugger-linecache (~> 1.1)
+ debugger-ruby_core_source (~> 1.1)
+ debugger-linecache (1.1.1)
+ debugger-ruby_core_source (>= 1.1.1)
+ debugger-ruby_core_source (1.1.2)
diff-lcs (1.1.3)
ffi (1.0.11)
- github-markup (0.7.0)
- gollum (1.3.1)
- albino (~> 1.3.2)
- github-markup (>= 0.4.0, < 1.0.0)
- grit (~> 2.4.1)
- mustache (>= 0.11.2, < 1.0.0)
- nokogiri (~> 1.4)
- redcarpet
- sanitize (~> 2.0.0)
- sinatra (~> 1.0)
- grit (2.4.1)
- diff-lcs (~> 1.1)
- mime-types (~> 1.15)
httparty (0.8.1)
multi_json
multi_xml
json (1.6.5)
- kramdown (0.13.4)
- linecache19 (0.5.12)
- ruby_core_source (>= 0.1.4)
- mime-types (1.17.2)
multi_json (1.0.4)
multi_xml (0.4.1)
- mustache (0.99.4)
nokogiri (1.5.0)
- posix-spawn (0.3.6)
- rack (1.4.1)
- rack-protection (1.2.0)
- rack
rake (0.9.2.2)
- redcarpet (1.17.2)
rspec (2.8.0)
rspec-core (~> 2.8.0)
rspec-expectations (~> 2.8.0)
@@ -59,40 +38,18 @@ GEM
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.8.0)
- ruby-debug-base19 (0.11.25)
- columnize (>= 0.3.1)
- linecache19 (>= 0.5.11)
- ruby_core_source (>= 0.1.4)
- ruby-debug19 (0.11.6)
- columnize (>= 0.3.1)
- linecache19 (>= 0.5.11)
- ruby-debug-base19 (>= 0.11.19)
- ruby_core_source (0.1.5)
- archive-tar-minitar (>= 0.5.2)
- sanitize (2.0.3)
- nokogiri (>= 1.4.4, < 1.6)
- sinatra (1.3.2)
- rack (~> 1.3, >= 1.3.6)
- rack-protection (~> 1.2)
- tilt (~> 1.3, >= 1.3.3)
sys-uname (0.9.0)
ffi (>= 1.0.0)
- tilt (1.3.3)
uuidtools (2.1.2)
PLATFORMS
ruby
DEPENDENCIES
- RedCloth
autotest
autotest-fsevent
autotest-growl
aws-sdk
- colored
- gollum
- kramdown
+ debugger
rake
- redcarpet (= 1.17.2)
rspec (>= 2.4)
- ruby-debug19
View
@@ -1,3 +1,4 @@
require 'claws/options'
+require 'claws/configuration'
require 'claws/support'
-# require 'claws/base'
+require 'claws/collection/base'
@@ -17,15 +17,3 @@ def self.build
end
end
end
-
-module Claws
- module Support
- def try(meth, *args, &block)
- self.respond_to?(meth) ? self.send(meth, *args, &block) : nil
- end
- end
-end
-
-class Array
- include Claws::Support
-end
@@ -6,7 +6,7 @@ module Collection
class EC2 < Claws::Collection::Base
def self.get(filters = {})
collection = []
- AWS::EC2.instances.each do |instance|
+ AWS::EC2.new.instances.each do |instance|
collection << instance
end
collection
View
@@ -1,3 +1,4 @@
+# Wish this was part of the ruby core
module Claws
module Support
def try(meth, *args, &block)
@@ -6,13 +6,12 @@
subject { Claws::Collection::EC2 }
it 'gets all instances' do
- AWS::EC2.should_receive(:instances).with(no_args).and_return(
+ subject.should_receive(:get).with(no_args).and_return(
[
double('AWS::EC2::Instance'),
double('AWS::EC2::Instance'),
]
)
- # Claws::EC2::Proxy
subject.get.size.should == 2
end

0 comments on commit 91c648d

Please sign in to comment.