ipsum 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.rdoc +24 -0
- data/ipsum.gemspec +3 -0
- data/lib/ipsum.rb +9 -1
- data/lib/ipsum/version.rb +1 -1
- metadata +35 -5
data/README.rdoc
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
Ipsum is a _filler-text_ generator much like the well known _Lorem Ipsum_. Ipsum can be used in any applications that require text from console applications to websites. For more information {visit Ipsum's website}[http://www.darkarts.co.za/ipsum].
|
2
|
+
|
3
|
+
== Installation
|
4
|
+
|
5
|
+
gem install ipsum
|
6
|
+
|
7
|
+
== Usage
|
8
|
+
|
9
|
+
require 'ipsum'
|
10
|
+
puts 15.sentences
|
11
|
+
|
12
|
+
== Examples
|
13
|
+
|
14
|
+
=== Plain text
|
15
|
+
|
16
|
+
puts 50.sentences
|
17
|
+
puts 3.sentences
|
18
|
+
|
19
|
+
=== Web templates
|
20
|
+
|
21
|
+
This can be used within web templates like Erb, Erubis etc
|
22
|
+
|
23
|
+
<p><%= 7.sentences %></p>
|
24
|
+
|
data/ipsum.gemspec
CHANGED
@@ -14,6 +14,9 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.rubyforge_project = "ipsum"
|
16
16
|
|
17
|
+
s.add_development_dependency "bundler", ">= 1.0.0"
|
18
|
+
s.add_development_dependency "rake", ">= 0.8.7"
|
19
|
+
|
17
20
|
s.files = `git ls-files`.split("\n")
|
18
21
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
22
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
data/lib/ipsum.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
+
# :main: README.rdoc
|
2
|
+
# :title: Ipsum Documentation
|
3
|
+
|
1
4
|
require 'ipsum/version'
|
2
5
|
|
3
|
-
class Ipsum
|
6
|
+
class Ipsum # :nodoc: all
|
4
7
|
|
5
8
|
MAX_CHUNKS = 10
|
6
9
|
|
@@ -36,7 +39,12 @@ class Ipsum
|
|
36
39
|
end
|
37
40
|
|
38
41
|
class Fixnum
|
42
|
+
|
43
|
+
# Generate filler text for this amount of sentences. For example:
|
44
|
+
# 12.sentences
|
45
|
+
# 5.sentences
|
39
46
|
def sentences
|
40
47
|
Ipsum.sentences( self )
|
41
48
|
end
|
49
|
+
|
42
50
|
end
|
data/lib/ipsum/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
8
|
+
- 2
|
9
|
+
version: 1.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Clive Crous
|
@@ -14,10 +14,39 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-01-
|
17
|
+
date: 2011-01-20 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
|
-
dependencies:
|
20
|
-
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: bundler
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 1
|
30
|
+
- 0
|
31
|
+
- 0
|
32
|
+
version: 1.0.0
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rake
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
- 8
|
46
|
+
- 7
|
47
|
+
version: 0.8.7
|
48
|
+
type: :development
|
49
|
+
version_requirements: *id002
|
21
50
|
description: "Generate words or sentences for filler text while developing anything which requires text. Most people know this as \"Lorem Ipsum\". eg: require 'ipsum'; puts 10.sentences"
|
22
51
|
email:
|
23
52
|
- clive@crous.co.za
|
@@ -30,6 +59,7 @@ extra_rdoc_files: []
|
|
30
59
|
files:
|
31
60
|
- .gitignore
|
32
61
|
- Gemfile
|
62
|
+
- README.rdoc
|
33
63
|
- Rakefile
|
34
64
|
- ipsum.gemspec
|
35
65
|
- lib/ipsum.rb
|