partline 0.1.0 → 1.0.0
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/README.md +0 -4
- data/lib/partline/version.rb +1 -1
- data/lib/partline.rb +9 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ae1661bf396027cce8b94f19cc7f1587afd530f
|
4
|
+
data.tar.gz: 8ff59632648903b6c38f005bacf6316360447649
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 938bbc2c32925bf02f763492959b8b655c2ab24d8689fa06ad22d91160abffd50949ea4fb363bd682c03a42377eaab6cde512f3ee9476cfe1905fc5db12ada0c
|
7
|
+
data.tar.gz: a612a7742c5608df4d1a9f6cb936853e2eddd07b738a494ee687b9c37349bcd9b18069089f374513ed65003299c066f1dd4bafd29f5fb613aa751c3f0a1cf44c
|
data/README.md
CHANGED
@@ -15,10 +15,6 @@ gem install 'partline'
|
|
15
15
|
|
16
16
|
$ partline path/to/file "character(s) to part lines on"
|
17
17
|
|
18
|
-
## Development
|
19
|
-
|
20
|
-
I plan on adding some form of error checking.
|
21
|
-
|
22
18
|
## Contributing
|
23
19
|
|
24
20
|
Bug reports and pull requests are welcome on GitHub at https://github.com/jameslwren/partline.
|
data/lib/partline/version.rb
CHANGED
data/lib/partline.rb
CHANGED
@@ -4,11 +4,15 @@ require 'tempfile'
|
|
4
4
|
module Partline
|
5
5
|
class Partline
|
6
6
|
def initialize
|
7
|
-
|
8
|
-
|
7
|
+
if ARGV.length < 2
|
8
|
+
puts "Please enter both a file name and character(s) to part on"
|
9
|
+
else
|
10
|
+
@temp_file = Tempfile.new('tmp')
|
11
|
+
@input = IO.read(ARGV[0])
|
9
12
|
|
10
|
-
|
11
|
-
|
13
|
+
self.input_to_tempfile
|
14
|
+
self.remove_line
|
15
|
+
end
|
12
16
|
end
|
13
17
|
|
14
18
|
def input_to_tempfile
|
@@ -29,6 +33,7 @@ module Partline
|
|
29
33
|
end
|
30
34
|
end
|
31
35
|
end
|
36
|
+
puts "partline has finished"
|
32
37
|
end
|
33
38
|
end
|
34
39
|
end
|