dev_commands 0.0.55 → 0.0.56

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/text.rb +2 -1
  3. data/spec/text_spec.rb +3 -0
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fc34a8eec50eb7c362bdf92aaecec5cadb551980
4
- data.tar.gz: 8d9e71410c9b1cfaccfbe2fa866385a222395ade
3
+ metadata.gz: 6255c8427cb8be657efeba220fe9eecad031971f
4
+ data.tar.gz: a3ee4e0ef8ef1943453b56ac321206b3b725b633
5
5
  SHA512:
6
- metadata.gz: 591448377487e2e3deaa2aa8ea37251fc0f7386aff8ab0aacaef8cd61374af3e6b07730d69b661add3c1704d05be48d1c1553e2ddb980801669e706ca6e84aaf
7
- data.tar.gz: 3dbb378b987ba3b175c16b6b697d275ed1e6e7fcf1426185c47470ea2e12bbd6c29253a356bc45c5572246c6b1093055bff6bcf7a23859980dcf62de7125632d
6
+ metadata.gz: 87cd1f477f28e1e4f542b19a4a81ec2e0709e4828623edee857a570a98bcd7932c71d3689352adc8ef3f1488c58b87c0182cfc8da6cdfedbc954744e93b12f56
7
+ data.tar.gz: 12de83f02a04caa26d0bbb9d9adedde7f69fa0ab841a2bf6d6bb7b06ce14720ee32abdf73675946f45a9d8ae493a43aa6859140b5fae6dc051c5a3508bd4cc7f
@@ -4,7 +4,8 @@ class Text
4
4
  end
5
5
 
6
6
  def self.replace_in_file(filename,search,replace)
7
- text1 = IO.read(filename).force_encoding("ISO-8859-1").encode("utf-8", replace: nil)
7
+ #text1 = IO.read(filename).force_encoding("ISO-8859-1").encode("utf-8", replace: nil)
8
+ text1 = IO.read(filename)#.encode("utf-8", replace: nil)
8
9
  #File.read(f,:encoding=>'UTF-8')
9
10
  text2 = text1.gsub(search) { |str| str=replace }
10
11
  unless text1==text2
@@ -8,5 +8,8 @@ describe Text do
8
8
  }
9
9
  Text.replace_in_file('tmp/test.txt','thing','string')
10
10
  expect(IO.read('tmp/test.txt').include?('test string')).to eq(true)
11
+
12
+ FileUtils.cp('spec/sln-vs12-example/csharp-library/csharp-library.cs','tmp/csharp-library.cs')
13
+ Text.replace_in_file('tmp/csharp-library.cs','Test','Test2')
11
14
  end
12
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev_commands
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.55
4
+ version: 0.0.56
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-24 00:00:00.000000000 Z
11
+ date: 2015-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake