Permalink
Browse files

Silenced `ruby -w` warnings.

  • Loading branch information...
1 parent 3af3b52 commit 052cd2e1b214229b7d5e49bd5d407bb59d326d22 @benhoskings committed Sep 9, 2011
Showing with 7 additions and 7 deletions.
  1. +3 −3 mirroring.rb
  2. +1 −1 npm.rb
  3. +1 −1 ssl.rb
  4. +2 −2 system.rb
View
@@ -10,7 +10,7 @@ def scanned_urls
end
def asset_map
scanned_urls.group_by {|url|
- url[/^(http\:)?\/\//] ? url.scan(/^[http\:]*\/\/([^\/]+)/).flatten.first : var(:mirror_domain)
+ url[/^(http\:)?\/\//] ? url.scan(/^[htp\:]*\/\/([^\/]+)/).flatten.first : var(:mirror_domain)
}.map_values {|domain,urls|
urls.map {|url| url.sub(/^(http\:)?\/\/[^\/]+\//, '') }
}
@@ -23,7 +23,7 @@ def nonexistent_asset_map
}
}
end
- met? { nonexistent_asset_map.values.all? &:empty? }
+ met? { nonexistent_asset_map.values.all?(&:empty?) }
meet {
nonexistent_asset_map.each_pair {|domain,assets|
assets.each {|asset|
@@ -121,7 +121,7 @@ def urls
require 'hpricot'
require 'net/http'
Hpricot(Net::HTTP.get(URI.parse('http://code.google.com/apis/ajaxlibs/documentation/'))).search('.al-liblist').map {|lib|
- lib_name = search_libstate(lib, 'name')
+ # lib_name = search_libstate(lib, 'name')
versions = search_libstate(lib, 'versions').split(/[, ]+/)
[search_libstate(lib, 'path'), search_libstate(lib, 'path(u)')].squash.map {|path_template|
versions.map {|version|
View
@@ -6,7 +6,7 @@
JSON.parse(`curl #{registry} 2>/dev/null`).each_pair {|pkg,details|
details['versions'].each_pair {|version,url|
src = JSON.parse(`curl #{url} 2>/dev/null`)['dist']['tarball']
- destdir = File.dirname(src.sub(/^[a-z]+:\/\/[^\/]+\//, ''))
+ # destdir = File.dirname(src.sub(/^[a-z]+:\/\/[^\/]+\//, ''))
Babushka::Resource.download src
}
}
View
@@ -42,7 +42,7 @@ def group
end
dep 'public key' do
- met? { grep /^ssh-dss/, '~/.ssh/id_dsa.pub' }
+ met? { grep(/^ssh-dss/, '~/.ssh/id_dsa.pub') }
meet { log shell("ssh-keygen -t dsa -f ~/.ssh/id_dsa -N ''") }
end
View
@@ -41,7 +41,7 @@ def hostname
dep 'lax host key checking' do
requires 'sed.managed'
- met? { grep /^StrictHostKeyChecking[ \t]+no/, ssh_conf_path(:ssh) }
+ met? { grep(/^StrictHostKeyChecking[ \t]+no/, ssh_conf_path(:ssh)) }
meet { change_with_sed 'StrictHostKeyChecking', 'yes', 'no', ssh_conf_path(:ssh) }
end
@@ -52,7 +52,7 @@ def hostname
end
dep 'admin group' do
- met? { grep /^admin\:/, '/etc/group' }
+ met? { grep(/^admin\:/, '/etc/group') }
meet { sudo 'groupadd admin' }
end

0 comments on commit 052cd2e

Please sign in to comment.