Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Hashie 2.0 fixes #19

Merged
merged 3 commits into from

5 participants

@ohrite
Collaborator

Fix tests for hashie 2.0 hash indexing changes
Remove Gemfile.lock
Add /tmp to .gitignore
Require hashie ~> 2.0

ohrite added some commits
@ohrite ohrite Hashie 2.0 fixes
Fix tests for hashie 2.0 hash indexing changes
Remove Gemfile.lock
Add /tmp to .gitignore
Require hashie ~> 2.0
f371682
@ohrite ohrite Update requirements for packages e8eb58e
@ohrite ohrite expand path to key for remote ac5229b
@JeanMertz

Any reason why this wasn't merged yet? :cry:

@amaltson

:+1: to get this merged, can't use soloist with Ruby 2.0 because Chef 11.8 is needed but there's a dependency on Hashie 2.0, so the earliest version that's resolvable is Chef 11.4.0 which has some incompatibilities with RubyGems 2.0.

@mkocher mkocher merged commit ac5229b into from
@amaltson

Thanks @mkocher, I tried it on a branch and it worked great with Chef 11.8.0, thanks! Will you be releasing a new Gem?

@mkocher mkocher deleted the branch
@mkocher
Owner

Just pushed 1.0.2, let me know if you encounter any issues with it.

@amaltson

Works perfectly, thanks!

@ohrite
Collaborator

@mkocher Hooray!

@amaltson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 27, 2013
  1. @ohrite

    Hashie 2.0 fixes

    ohrite authored
    Fix tests for hashie 2.0 hash indexing changes
    Remove Gemfile.lock
    Add /tmp to .gitignore
    Require hashie ~> 2.0
Commits on Feb 28, 2013
  1. @ohrite
  2. @ohrite

    expand path to key for remote

    ohrite authored
This page is out of date. Refresh to see the latest.
View
2  .gitignore
@@ -4,3 +4,5 @@ pkg/*
/.vagrant
/examples/cookbooks
/examples/tmp
+tmp/
+Gemfile.lock
View
131 Gemfile.lock
@@ -1,131 +0,0 @@
-PATH
- remote: .
- specs:
- soloist (1.0.0.pre)
- awesome_print
- chef
- hashie
- librarian
- net-ssh
- thor
-
-GEM
- remote: http://rubygems.org/
- specs:
- archive-tar-minitar (0.5.2)
- awesome_print (1.1.0)
- bunny (0.7.9)
- chef (10.16.2)
- bunny (>= 0.6.0, < 0.8.0)
- erubis
- highline (>= 1.6.9)
- json (>= 1.4.4, <= 1.6.1)
- mixlib-authentication (>= 1.3.0)
- mixlib-cli (>= 1.1.0)
- mixlib-config (>= 1.1.2)
- mixlib-log (>= 1.3.0)
- mixlib-shellout
- moneta
- net-ssh (~> 2.2.2)
- net-ssh-multi (~> 1.1.0)
- ohai (>= 0.6.0)
- rest-client (>= 1.0.4, < 1.7.0)
- treetop (~> 1.4.9)
- uuidtools
- yajl-ruby (~> 1.1)
- coderay (1.0.8)
- diff-lcs (1.1.3)
- erubis (2.7.0)
- gem-release (0.4.1)
- guard (1.5.4)
- listen (>= 0.4.2)
- lumberjack (>= 1.0.2)
- pry (>= 0.9.10)
- thor (>= 0.14.6)
- guard-bundler (1.0.0)
- bundler (~> 1.0)
- guard (~> 1.1)
- guard-rspec (2.2.0)
- guard (>= 1.1)
- rspec (~> 2.11)
- guard-shell (0.5.1)
- guard (>= 1.1.0)
- hashie (1.2.0)
- highline (1.6.15)
- ipaddress (0.8.0)
- json (1.6.1)
- json (1.6.1-java)
- librarian (0.0.25)
- archive-tar-minitar (>= 0.5.2)
- chef (>= 0.10)
- highline
- thor (~> 0.15)
- listen (0.6.0)
- lumberjack (1.0.2)
- method_source (0.8.1)
- mime-types (1.19)
- mixlib-authentication (1.3.0)
- mixlib-log
- mixlib-cli (1.2.2)
- mixlib-config (1.1.2)
- mixlib-log (1.4.1)
- mixlib-shellout (1.1.0)
- moneta (0.6.0)
- net-ssh (2.2.2)
- net-ssh-gateway (1.1.0)
- net-ssh (>= 1.99.1)
- net-ssh-multi (1.1)
- net-ssh (>= 2.1.4)
- net-ssh-gateway (>= 0.99.0)
- ohai (6.14.0)
- ipaddress
- mixlib-cli
- mixlib-config
- mixlib-log
- systemu
- yajl-ruby
- polyglot (0.3.3)
- pry (0.9.10)
- coderay (~> 1.0.5)
- method_source (~> 0.8)
- slop (~> 3.3.1)
- pry (0.9.10-java)
- coderay (~> 1.0.5)
- method_source (~> 0.8)
- slop (~> 3.3.1)
- spoon (~> 0.0)
- rb-fsevent (0.9.2)
- rest-client (1.6.7)
- mime-types (>= 1.16)
- rspec (2.12.0)
- rspec-core (~> 2.12.0)
- rspec-expectations (~> 2.12.0)
- rspec-mocks (~> 2.12.0)
- rspec-core (2.12.0)
- rspec-expectations (2.12.0)
- diff-lcs (~> 1.1.3)
- rspec-mocks (2.12.0)
- slop (3.3.3)
- spoon (0.0.1)
- systemu (2.5.2)
- terminal-notifier-guard (1.5.3)
- thor (0.16.0)
- treetop (1.4.12)
- polyglot
- polyglot (>= 0.3.1)
- uuidtools (2.1.3)
- yajl-ruby (1.1.0)
-
-PLATFORMS
- java
- ruby
-
-DEPENDENCIES
- gem-release
- guard-bundler
- guard-rspec
- guard-shell
- rb-fsevent
- rspec
- soloist!
- terminal-notifier-guard
View
2  lib/soloist/remote.rb
@@ -17,7 +17,7 @@ def self.from_uri(uri, key = "~/.ssh/id_rsa")
def initialize(user, host, key, options = {})
@user = user
@host = host
- @key = key
+ @key = File.expand_path(key)
@timeout = options[:timeout] || 10000
end
View
5 script/bootstrap.sh
@@ -31,8 +31,7 @@ RVMRC_CONTENTS
echo "Detecting RVM requirements"
-bash -lc 'rvm requirements' | tee /tmp/rvm-requirements > /dev/null
-packages=`grep " ruby: /usr/bin/apt-get install" /tmp/rvm-requirements | sed "s/ ruby: \/usr\/bin\/apt-get install //g"`
+packages="build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev"
echo "Detected RVM requirements: $packages"
@@ -50,5 +49,5 @@ then
echo "Satisfied RVM requirements"
else
echo "Installing missing RVM requirements: $to_install"
- sudo apt-get install -y $to_install
+ sudo apt-get --no-install-recommends install -y $to_install
fi
View
2  soloist.gemspec
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
s.add_dependency "chef"
s.add_dependency "librarian"
s.add_dependency "thor"
- s.add_dependency "hashie"
+ s.add_dependency "hashie", "~> 2.0"
s.add_dependency "net-ssh"
s.add_dependency "awesome_print"
View
4 spec/lib/soloist/config_spec.rb
@@ -158,13 +158,13 @@
it "merges another config into the current one" do
config.merge!(other_config)
config.royal_crown.recipes.should =~ ["guts", "chum"]
- config.royal_crown.node_attributes.keys.should =~ [:reliable, :tasty]
+ config.royal_crown.node_attributes.keys.should =~ ["reliable", "tasty"]
end
it "does not trample the other config" do
config.merge!(other_config)
other_config.royal_crown.recipes.should =~ ["chum"]
- other_config.royal_crown.node_attributes.should == {:tasty => "maybe"}
+ other_config.royal_crown.node_attributes.should == {"tasty" => "maybe"}
end
end
View
14 spec/lib/soloist/remote_spec.rb
@@ -104,9 +104,17 @@
end
end
+ describe "#key" do
+ let(:home_directory) { File.expand_path("~") }
+
+ subject { Soloist::Remote.new("user", "host", "~/some_key") }
+
+ its(:key) { should =~ %r|#{home_directory}/some_key| }
+ end
+
describe "#upload" do
it "runs rsync with the specified arguments" do
- Kernel.should_receive(:system).with("rsync -e 'ssh -i key' -avz --delete from user@host:to opts")
+ Kernel.should_receive(:system).with("rsync -e 'ssh -i #{subject.key}' -avz --delete from user@host:to opts")
subject.upload("from", "to", "opts")
end
end
@@ -127,9 +135,9 @@
end
context "when a key is provided" do
- subject { Soloist::Remote.from_uri("dude@whatever", "yo-some-key") }
+ subject { Soloist::Remote.from_uri("dude@whatever", "/yo-some-key") }
- its(:key) { should == "yo-some-key" }
+ its(:key) { should == "/yo-some-key" }
end
end
end
Something went wrong with that request. Please try again.