filler 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -6,6 +6,10 @@ What can you see here?
6
6
  ----------------------
7
7
  Fills you with random text.
8
8
 
9
+ Install
10
+ -------
11
+ $ gem install filler
12
+
9
13
  ##Gem does not actually work!
10
14
 
11
15
  ##Code
data/gem.gemspec CHANGED
@@ -1,11 +1,11 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "filler"
3
- s.version = "0.0.2"
3
+ s.version = "0.0.3"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.authors = ["Tomas Karlsen"]
6
6
  s.email = ["tkarlsn@gmail.com"]
7
7
  s.homepage = "https://github.com/karlsn/filler"
8
- s.description = "Filler gem, does not actually work!"
8
+ s.description = "Filler gem, does not actually work...yet."
9
9
  s.summary = "Filler gem for later/test purposes"
10
10
  s.rubyforge_project = s.name
11
11
 
@@ -15,4 +15,3 @@ Gem::Specification.new do |s|
15
15
 
16
16
  s.require_path = 'lib'
17
17
  end
18
-
@@ -0,0 +1,12 @@
1
+ require 'rubygems'
2
+
3
+ module Filler
4
+ module Words
5
+ def words
6
+ File.open("lipsum.txt").each do |file|
7
+ file.each_line { |line| @w << line }
8
+ end
9
+ return @w
10
+ end
11
+ end
12
+ end
data/lib/filler.rb CHANGED
@@ -1,15 +1,19 @@
1
1
  require 'rubygems'
2
- require 'dummy/dummy_helper.rb'
2
+ require 'filler/filler_helper.rb'
3
3
 
4
- class Dummy
5
- def initialize(count)
6
- @dh = DummyHelper.new(count)
7
- @words = dh.getWords
8
- end
4
+ module Filler
5
+ class << self
6
+
7
+ def write_out
8
+ @words = get_text
9
+ @words.each do |word|
10
+ puts word + "\n"
11
+ end
12
+ end
9
13
 
10
- def write
11
- @words.each do |word|
12
- puts word + "\n"
14
+ private
15
+ def get_text
16
+ @w = Filler::Words.words
13
17
  end
14
18
  end
15
19
  end
data/test/test_helper.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  $:.unshift File.expand_path('../../lib', __FILE__)
2
2
  require "rubygems"
3
- require "dummy"
3
+ require "filler"
4
4
  require "test/unit"
5
5
  require "fileutils"
6
6
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tomas Karlsen
@@ -18,7 +18,7 @@ date: 2010-12-15 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies: []
20
20
 
21
- description: Filler gem, does not actually work!
21
+ description: Filler gem, does not actually work...yet.
22
22
  email:
23
23
  - tkarlsn@gmail.com
24
24
  executables: []
@@ -28,13 +28,12 @@ extensions: []
28
28
  extra_rdoc_files: []
29
29
 
30
30
  files:
31
- - .LICENSE.swp
32
31
  - LICENSE
33
32
  - README.md
34
33
  - Rakefile
35
34
  - gem.gemspec
36
35
  - lib/filler.rb
37
- - lib/filler/dummy_helper.rb
36
+ - lib/filler/filler_helper.rb
38
37
  - lib/filler/lipsum.txt
39
38
  - test/filler_test.rb
40
39
  - test/test_helper.rb
data/.LICENSE.swp DELETED
Binary file
@@ -1,21 +0,0 @@
1
- require 'rubygems'
2
-
3
- class DummyHelper
4
- def initialize(count)
5
- @count = count
6
- @words = getWords
7
- @words.each do |word|
8
- puts word
9
- end
10
- end
11
-
12
- def getWords
13
- @words = []
14
- File.open("lipsum.txt") do |file|
15
- file.each_line do |word|
16
- @words << word
17
- end
18
- end
19
- return @words
20
- end
21
- end