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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a56cb0b4e1f2e7a75a8608bdad059b3e5dcf770f
4
- data.tar.gz: de0e82be4fc5d221fb560f97f2a3f43e4779b326
3
+ metadata.gz: 4ae1661bf396027cce8b94f19cc7f1587afd530f
4
+ data.tar.gz: 8ff59632648903b6c38f005bacf6316360447649
5
5
  SHA512:
6
- metadata.gz: cdab80fc720283417451c2a701c2fbd9bcc5e19a26e8de1b5f99820b46a2ce1bc6905efda946576868d68b449448f92dded66ea4b6aba4a7aee14fdb17c86f55
7
- data.tar.gz: d8fc6267e2e80fb7f36b77b9eeb5f89c1b96bc237811d87ad8f6c1cb755af73c8ce10f8049c241ff27980300fbd09d6e92367f55509a671936bad16ebb963e51
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.
@@ -1,3 +1,3 @@
1
1
  module Partline
2
- VERSION = "0.1.0"
2
+ VERSION = "1.0.0"
3
3
  end
data/lib/partline.rb CHANGED
@@ -4,11 +4,15 @@ require 'tempfile'
4
4
  module Partline
5
5
  class Partline
6
6
  def initialize
7
- @temp_file = Tempfile.new('tmp')
8
- @input = IO.read(ARGV[0])
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
- self.input_to_tempfile
11
- self.remove_line
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: partline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Wren