tluong_test_gem 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/bin/test_gem ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'test_gem'
4
+ puts "test_gem script executing"
5
+
6
+ command = ARGV[0]
7
+ file = ARGV[1]
8
+
9
+ case command
10
+ when "first"
11
+ puts TestGem::MyFile.first(file)
12
+ when "last"
13
+ puts TestGem::MyFile.last(file)
14
+ end
15
+
data/lib/test_gem.rb ADDED
@@ -0,0 +1,11 @@
1
+ $LOAD_PATH.unshift File.expand_path("../test_gem", __FILE__)
2
+
3
+ require 'version'
4
+ require 'hello'
5
+ require 'myfile'
6
+
7
+ module TestGem
8
+
9
+ puts "module TestGem defined"
10
+
11
+ end
@@ -0,0 +1,7 @@
1
+ module TestGem
2
+
3
+ class Hello
4
+ puts "class #{self} defined"
5
+ end
6
+
7
+ end
@@ -0,0 +1,18 @@
1
+ module TestGem
2
+
3
+ class MyFile
4
+ puts "class #{self} defined"
5
+
6
+ def self.first file
7
+ f = File.open(file, "r");
8
+ f.gets
9
+ end
10
+
11
+ def self.last file
12
+ f = File.open(file, "r");
13
+ lines = f.readlines
14
+ lines[-1]
15
+ end
16
+ end
17
+
18
+ end
@@ -0,0 +1,7 @@
1
+ module TestGem
2
+
3
+ puts "file version.rb required"
4
+
5
+ VERSION = "0.0.2"
6
+
7
+ end
metadata ADDED
@@ -0,0 +1,51 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tluong_test_gem
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Travis Luong
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-02-09 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: A gem to explain how to make gems
15
+ email: travis@travisluong.com
16
+ executables:
17
+ - test_gem
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - lib/test_gem.rb
22
+ - lib/test_gem/version.rb
23
+ - lib/test_gem/hello.rb
24
+ - lib/test_gem/myfile.rb
25
+ - bin/test_gem
26
+ homepage: http://rubygems.org/gems/test_gem
27
+ licenses: []
28
+ post_install_message:
29
+ rdoc_options: []
30
+ require_paths:
31
+ - lib
32
+ required_ruby_version: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ requirements: []
45
+ rubyforge_project:
46
+ rubygems_version: 1.8.24
47
+ signing_key:
48
+ specification_version: 3
49
+ summary: Making a Test Gem
50
+ test_files: []
51
+ has_rdoc: