insert_from_file 0.0.3 → 0.0.4

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: 37d5710541f1f3d0e382d0956150a312c40490f4
4
- data.tar.gz: e9045dc7b6601cfd30b1d96677982448c83478d4
3
+ metadata.gz: 4162ccc4f31905bc2174adad0abcd9a3e4883020
4
+ data.tar.gz: 46be56f2287346a623d51847a7b098d4f9268dde
5
5
  SHA512:
6
- metadata.gz: 64f19c042cacb3c59f541d35186b1395e2b39864519c83f56850a3d87460efd8c4acb9c4d3b5dedf8378fe7d2d7551df526235a8c70171a770c078b431e27f86
7
- data.tar.gz: b41ad115d96c3922a0b0c7270f34d2cbcd32e93e99c005e4504295d7e64adf69c1983111a3b48202f0fdf2d434868f4014d80663feb8299f29e1e4080d0f9591
6
+ metadata.gz: aa90f5bdcc29c383f05d1c6b7ca79386556a60689353b5b530ba6f3eaa2b88151d6b0678f7e651651df12e6122a7cfa754f99b803075529cddab4d06e02020c5
7
+ data.tar.gz: 1959edc0d6ae282c526d783b5579cf15404defc58b118b6ae35a5b645b04e91ee84a5926c0e40802b28c642601c406d3c0e91f5658610e7519896b169b69ecee
data/README.md CHANGED
@@ -70,17 +70,18 @@ InsertFromFile.replace('tmp/file6.txt', 'tmp/file5.txt', 'sixteen')
70
70
  ```
71
71
  one two three
72
72
  four five six
73
- sixteen seventeen eighteen
73
+ nineteen twenty twenty-one
74
74
  thirteen fourteen fifteen
75
+ sixteen seventeen eighteen
75
76
  ```
76
77
  * tmp/file12.txt:
77
78
  ```
78
79
  seven eight nine
79
80
  ten eleven twelve
80
81
  ```
81
- * Adding the contents of tmp/file12.txt into tmp/file11.txt and replacing everything after the line containing "five" and before the line containing "eleven":
82
+ * Adding the contents of tmp/file12.txt into tmp/file11.txt and replacing everything after the line containing "five" and before the line containing "fourteen":
82
83
  ```
83
- InsertFromFile.replace_between('tmp/file12.txt', 'tmp/file11.txt', 'five', 'eleven')
84
+ InsertFromFile.replace_between('tmp/file12.txt', 'tmp/file11.txt', 'five', 'fourteen')
84
85
  ```
85
86
 
86
87
  ### add_beginning
@@ -60,6 +60,7 @@ module InsertFromFile
60
60
  end
61
61
 
62
62
  def self.replace_between(file_source, file_dest, str1, str2)
63
+ LineContaining.delete_between(str1, str2, file_dest)
63
64
  path_old = file_dest
64
65
  path_new = "#{path_old}.new"
65
66
  file_w = open(path_new, 'w')
@@ -1,4 +1,4 @@
1
1
  #
2
2
  module InsertFromFile
3
- VERSION = '0.0.3'.freeze
3
+ VERSION = '0.0.4'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: insert_from_file
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Hsu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-01 00:00:00.000000000 Z
11
+ date: 2017-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
230
  version: '0'
231
231
  requirements: []
232
232
  rubyforge_project:
233
- rubygems_version: 2.6.11
233
+ rubygems_version: 2.6.12
234
234
  signing_key:
235
235
  specification_version: 4
236
236
  summary: Insert the contents of one file into another file.