Fixed code styling

This commit is contained in:
Greg Karékinian
2017-04-28 15:42:18 +02:00
parent 4641e77438
commit 2f0ff1f559
16 changed files with 130 additions and 133 deletions

View File

@@ -17,5 +17,5 @@ node.default['ipfs']['config']['swarm']['addr_filter'] = [
"/ip4/198.18.0.0/ipcidr/15",
"/ip4/198.51.100.0/ipcidr/24",
"/ip4/203.0.113.0/ipcidr/24",
"/ip4/240.0.0.0/ipcidr/4"
"/ip4/240.0.0.0/ipcidr/4",
]

View File

@@ -6,6 +6,6 @@ description 'Installs/Configures ipfs'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.0'
supports ['ubuntu', 'debian']
supports %w(ubuntu debian)
depends 'ark'

View File

@@ -34,7 +34,7 @@ execute "ipfs init --empty-repo" do
end
if platform?('ubuntu') && node[:platform_version].to_f < 15.04 ||
platform?('debian') && node['platform_version'].to_f < 8
platform?('debian') && node['platform_version'].to_f < 8
template "ipfs.initd.service.erb" do
path "/etc/init.d/ipfs"
source 'ipfs.initd.service.erb'

View File

@@ -15,8 +15,9 @@ action :create do
not_if do
require 'json'
require 'mixlib/shellout'
cmd = Mixlib::ShellOut.new("ipfs", "config", key, user: 'ipfs',
env: {"IPFS_PATH" => "/home/ipfs/.ipfs"})
cmd = Mixlib::ShellOut.new("ipfs", "config", key,
user: 'ipfs',
env: { "IPFS_PATH" => "/home/ipfs/.ipfs" })
cmd.run_command
begin
JSON.parse(cmd.stdout) == value

View File

@@ -4,7 +4,6 @@ require 'serverspec'
set :backend, :exec
describe "IPFS" do
# It is in the PATH
describe command("which ipfs") do
its(:exit_status) { should eq 0 }
@@ -22,5 +21,4 @@ describe "IPFS" do
expect(service("ipfs")).to be_running
expect(service("ipfs")).to be_enabled
end
end