nub 0.0.94 → 0.0.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/nub/fileutils.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97804c515b6dcb72c61daa1c637ae4f796a6ed8fd8509ee3951eb55511a8e175
|
4
|
+
data.tar.gz: e9898248566cf973a15e238873564116da42192825df20f43c3da06f7123d0b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d89eae0dca6cd667974612ab2dce382cb3954ccb94cc1f1df77ac5b78f4801fc884345a26e37847fc7f265fe2dfaa619c35032f372af4bd9e10c69e610feed4
|
7
|
+
data.tar.gz: 12c1d4f810840f13fb3ec3d28851233ea352a5830a63ad5451bc3203dd6a90f66714e86f38eb21ecd275abeadf6fd707e38d51de1e6c1f626ca41b2da9a4d1c4
|
data/lib/nub/fileutils.rb
CHANGED
@@ -124,6 +124,7 @@ module FileUtils
|
|
124
124
|
|
125
125
|
changed = self.update(file){|data|
|
126
126
|
lines = data.split("\n")
|
127
|
+
lastline = lines[-1].dup
|
127
128
|
|
128
129
|
# Match regex for insert location
|
129
130
|
regex = Regexp.new(regex) if regex.is_a?(String)
|
@@ -135,7 +136,7 @@ module FileUtils
|
|
135
136
|
|
136
137
|
# Change data inline
|
137
138
|
newdata = lines * "\n"
|
138
|
-
newdata += "\n" if
|
139
|
+
newdata += "\n" if lines[-1] != lastline
|
139
140
|
data.gsub!(data, newdata)
|
140
141
|
end
|
141
142
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.95
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Crummett
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|