specinfra 2.0.0.beta39 → 2.0.0.beta40

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4869bddc0b58d1d96be8b134f86a1db95da7e7a
4
- data.tar.gz: 01335a334effed793e6405079f36d992a89751e0
3
+ metadata.gz: 415fa68c9465d8581bed706262749f345b44ffca
4
+ data.tar.gz: 8c972ee50cbd48223f08516e318e6433fc0d2620
5
5
  SHA512:
6
- metadata.gz: 605dd5bf906f89e8bef9b420c769c63641f344a92ae5f024469d40d9f3222d88faaa7b35daec700a1abbc9783a7eaf971f68c62222ad7c42219456945831ddff
7
- data.tar.gz: d5ff331fc2a40a67925591a472d9bc6e97a13a24c5ac348d4dfa2ce1f1dbcdb9d9125b22d58b3bae341bd157a04fd738cbb330d33e181ca54e936dcfeabaa6bb
6
+ metadata.gz: c359f55bf22ff89d027966259e9437f6889364046497fa3333a5af2caa5cccf01aa49aab7f49ef8b1b73940f1a9413fdaf055a124074181a8e470b4f0d36dfa6
7
+ data.tar.gz: f95f1216c907051bff437c917c8099a6e762272e1820ba459e11f8b9de496b21dab087ebd3b5e875f6493f9da144cfa49ff92be8c924872a09d735696de62ff1
@@ -35,10 +35,10 @@ class Specinfra::Command::Base::File < Specinfra::Command::Base
35
35
  from ||= '1'
36
36
  to ||= '$'
37
37
  sed = "sed -n #{escape(from)},#{escape(to)}p #{escape(file)}"
38
- sed_end = "sed -n 1,#{escape(to)}p"
38
+ sed += " | sed -n 1,#{escape(to)}p" if from != '1' and to != '$'
39
39
  checker_with_regexp = check_contains_with_regexp("-", expected_pattern)
40
40
  checker_with_fixed = check_contains_with_fixed_strings("-", expected_pattern)
41
- "#{sed} | #{sed_end} | #{checker_with_regexp} || #{sed} | #{sed_end} | #{checker_with_fixed}"
41
+ "#{sed} | #{checker_with_regexp} || #{sed} | #{checker_with_fixed}"
42
42
  end
43
43
 
44
44
  def check_contains_lines(file, expected_lines, from=nil, to=nil)
@@ -73,7 +73,7 @@ class Specinfra::Command::Base::File < Specinfra::Command::Base
73
73
  end
74
74
 
75
75
  def check_is_mounted(path)
76
- regexp = "on #{path}"
76
+ regexp = "on #{path} "
77
77
  "mount | grep -w -- #{escape(regexp)}"
78
78
  end
79
79
 
@@ -1,11 +1,11 @@
1
1
  class Specinfra::Command::Ubuntu::Base::Ppa < Specinfra::Command::Debian::Base::Ppa
2
2
  class << self
3
3
  def check_exists(package)
4
- %Q{find /etc/apt/ -name \*.list | xargs grep -o "deb http://ppa.launchpad.net/#{to_apt_line_uri(package)}"}
4
+ %Q{find /etc/apt/ -name \*.list | xargs grep -o "deb +http://ppa.launchpad.net/#{to_apt_line_uri(package)}"}
5
5
  end
6
6
 
7
7
  def check_is_enabled(package)
8
- %Q{find /etc/apt/ -name \*.list | xargs grep -o "^deb http://ppa.launchpad.net/#{to_apt_line_uri(package)}"}
8
+ %Q{find /etc/apt/ -name \*.list | xargs grep -o "^deb +http://ppa.launchpad.net/#{to_apt_line_uri(package)}"}
9
9
  end
10
10
 
11
11
  private
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.0.0.beta39"
2
+ VERSION = "2.0.0.beta40"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta39
4
+ version: 2.0.0.beta40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-22 00:00:00.000000000 Z
11
+ date: 2014-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh