petes_test_gem 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/bin/test.text ADDED
@@ -0,0 +1,4 @@
1
+ this is a test thing
2
+ it is a test file
3
+ it tests if there is a file
4
+ and reads the first and last file
data/bin/test_gem.rb ADDED
@@ -0,0 +1,19 @@
1
+ #! /usr/bin/ruby -w
2
+ lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
3
+ $LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
4
+
5
+ require 'test_gem'
6
+
7
+ print "enter a filename here: "
8
+ this = gets.chomp
9
+
10
+ begin
11
+ thing = TestGem::MyFile.new(this)
12
+
13
+ puts thing.first
14
+ puts thing.last
15
+
16
+ rescue => err
17
+ puts "Exception: #{err}"
18
+ err
19
+ end
@@ -5,7 +5,7 @@ module TestGem
5
5
 
6
6
  def initialize(file_name)
7
7
  @file = file_name
8
- @lines = File.readlines(File.open @file)
8
+ @lines = File.readlines(@file)
9
9
  end
10
10
 
11
11
 
@@ -1,3 +1,3 @@
1
1
  module TestGem
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: petes_test_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -46,7 +46,9 @@ dependencies:
46
46
  description: Test gem Week5 Homework
47
47
  email:
48
48
  - pbomars@gmail.com
49
- executables: []
49
+ executables:
50
+ - test.text
51
+ - test_gem.rb
50
52
  extensions: []
51
53
  extra_rdoc_files: []
52
54
  files:
@@ -57,6 +59,8 @@ files:
57
59
  - LICENSE.txt
58
60
  - README.md
59
61
  - Rakefile
62
+ - bin/test.text
63
+ - bin/test_gem.rb
60
64
  - lib/test.text
61
65
  - lib/test_gem.rb
62
66
  - lib/test_gem/my_file.rb