lorem 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,3 @@
1
+ 0.1.2 - updated to allow auto paste to clipboard on osx using pbcopy
1
2
  0.1.0 - 4/17/2007
2
3
  * initial release
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2007 John Nunemaker
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
@@ -1,11 +1,14 @@
1
- bin/lorem
2
1
  CHANGELOG.txt
3
- lib/lorem/base.rb
4
- lib/lorem/version.rb
5
- lib/lorem.rb
2
+ MIT-LICENSE
6
3
  Manifest.txt
7
- Rakefile
8
4
  README.txt
5
+ Rakefile
6
+ bin/lorem
7
+ lib/lorem.rb
8
+ lib/lorem/base.rb
9
+ lib/lorem/version.rb
9
10
  setup.rb
10
11
  test/test_helper.rb
11
- test/unit/base_test.rb
12
+ test/unit/base_test.rb
13
+ website/css/common.css
14
+ website/index.html
data/bin/lorem CHANGED
@@ -2,19 +2,27 @@
2
2
  require 'rubygems'
3
3
  require 'lorem'
4
4
 
5
- number = ARGV.shift || 1
6
- type = ARGV.shift || :paragraphs
5
+ PASTE_MODIFIER = '-p'
7
6
 
8
- puts
9
- puts Lorem::Base.new(type, number).output
10
- puts
7
+ args = ARGV.any? { |a| a == PASTE_MODIFIER } ? ARGV.reject { |a| a == PASTE_MODIFIER } : ARGV.dup
8
+ number = args.shift || 1
9
+ type = args.shift || :paragraphs
10
+ output = Lorem::Base.new(type, number).output
11
11
 
12
- if number == 1 && type == :paragraphs
13
- puts
14
- puts "Usage: lorem [number] [type] (ie: lorem 5 paragraphs)"
15
- puts " - Number defaults to 1 if no parameters given"
16
- puts " - Type defaults to paragraphs"
17
- puts " - Available Types:"
18
- Lorem::Base::TYPES.each { |t| puts " - #{t}" }
19
- puts
12
+ if ARGV[-1] == PASTE_MODIFIER
13
+ system("lorem #{number} #{type} | pbcopy")
14
+ puts "Just pasted your request to the clipboard. (only works on osx)"
15
+ else
16
+ puts output
17
+
18
+ if number == 1 && type == :paragraphs
19
+ puts
20
+ puts "Usage: lorem [number] [type] (ie: lorem 5 paragraphs)"
21
+ puts " - Number defaults to 1 if no parameters given"
22
+ puts " - Type defaults to paragraphs"
23
+ puts " - If you are on mac osx you can add -p as an argument and it will auto paste to your clipboard."
24
+ puts " - Available Types:"
25
+ Lorem::Base::TYPES.each { |t| puts " - #{t}" }
26
+ puts
27
+ end
20
28
  end
@@ -2,7 +2,7 @@ module Lorem #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -0,0 +1,47 @@
1
+ @media screen, projection {
2
+ /*
3
+ Copyright (c) 2007, Yahoo! Inc. All rights reserved.
4
+ Code licensed under the BSD License:
5
+ http://developer.yahoo.net/yui/license.txt
6
+ version: 2.2.0
7
+ */
8
+ body {font:13px arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}pre, code {font:115% monospace;*font-size:100%;}body * {line-height:1.22em;}
9
+ body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}/*ol,ul {list-style:none;}*/caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;}
10
+ /* end of yahoo reset and fonts */
11
+
12
+ body {color:#333; background:#4b1a1a; line-height:1.3;}
13
+ p {margin:0 0 20px;}
14
+ a {color:#4b1a1a;}
15
+ a:hover {text-decoration:none;}
16
+ strong {font-weight:bold;}
17
+ em {font-style:italics;}
18
+ h1,h2,h3,h4,h5,h6 {font-weight:bold;}
19
+ h1 {font-size:197%; margin:30px 0; color:#4b1a1a;}
20
+ h2 {font-size:174%; margin:20px 0; color:#b8111a;}
21
+ h3 {font-size:152%; margin:10px 0;}
22
+ h4 {font-size:129%; margin:10px 0;}
23
+ pre {background:#eee; padding:20px; border:1px solid #ccc; font-size:100%; overflow:auto;}
24
+ code {font-size:100%; margin:0; padding:0;}
25
+ ul, ol {margin:10px 0 10px 25px;}
26
+ ol li {margin:0 0 10px;}
27
+
28
+
29
+
30
+
31
+
32
+ div#wrapper {background:#fff; width:560px; margin:0 auto; padding:20px; border:10px solid #bc8c46; border-width:0 10px;}
33
+ div#header {position:relative; border-bottom:1px dotted; margin:0 0 10px; padding:0 0 10px;}
34
+ div#header p {margin:0; padding:0;}
35
+ div#header h1 {margin:0; padding:0;}
36
+ ul#nav {position:absolute; top:0; right:0; list-style:none; margin:0; padding:0;}
37
+ ul#nav li {display:inline; padding:0 0 0 5px;}
38
+ ul#nav li a {}
39
+ div#content {}
40
+ div#footer {margin:40px 0 0; border-top:1px dotted; padding:10px 0 0;}
41
+
42
+
43
+
44
+
45
+
46
+
47
+ }
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5
+ <title>Lorem by John Nunemaker</title>
6
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
7
+ </head>
8
+ <body>
9
+
10
+ <div id="wrapper">
11
+ <div id="header">
12
+ <h1>Lorem</h1>
13
+ <p>Filler text from the terminal.</p>
14
+
15
+ <ul id="nav">
16
+ <li><a href="lorem/">Docs</a></li>
17
+ <li><a href="http://rubyforge.org/projects/lorem/">Rubyforge Page</a></li>
18
+ </ul>
19
+ </div>
20
+
21
+ <div id="content">
22
+ <p>Ever get tired of opening up lipsum.com, filling out a form and waiting for it to give you your filler text? Yeah, me too. I threw this together in an hour to generate lipsum text from the command line.</p>
23
+
24
+ <h2>Installation</h2>
25
+ <pre><code>$ sudo gem install lorem</code></pre>
26
+
27
+ <h2>Usage</h2>
28
+
29
+ <pre><code>Usage: lorem [number] [type] (ie: lorem 5 paragraphs)
30
+ - Number defaults to 1 if no parameters given
31
+ - Type defaults to paragraphs
32
+ - Available Types:
33
+ - paragraphs
34
+ - words
35
+ - chars
36
+ - characters
37
+ </code></pre>
38
+
39
+ <h2>Examples</h2>
40
+ <pre><code>$ lorem 5 # => will do 5 paragraphs
41
+
42
+ # you can do words
43
+ $ lorem 5 words
44
+
45
+ # and characters
46
+ $ lorem 5 characters</code></pre>
47
+ </div>
48
+
49
+ <div id="footer">
50
+ <p>Created by <a href="http://addictedtonew.com/about/">John Nunemaker</a></p>
51
+ </div>
52
+
53
+ </div>
54
+
55
+
56
+ <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
57
+ <script type="text/javascript">
58
+ _uacct = "UA-85301-10";
59
+ urchinTracker();
60
+ </script>
61
+
62
+ <!-- 103bees.com 'bee' code v1.11 - please do not make any changes! -->
63
+ <script type="text/javascript" src="http://103bees.com/bees/?bee=3672&amp;fid=6056"></script>
64
+ <!-- 103bees.com 'bee' code -->
65
+
66
+ </body>
67
+ </html>
metadata CHANGED
@@ -1,59 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: lorem
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.1.1
7
- date: 2007-10-23 00:00:00 -04:00
8
- summary: Simple gem for generating lorem ipsum from the command line
9
- require_paths:
10
- - lib
11
- email: nunemaker@gmail.com
12
- homepage: http://lorem.rubyforge.org
13
- rubyforge_project: lorem
14
- description: Simple gem for generating lorem ipsum from the command line
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
25
- platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
4
+ version: 0.1.2
5
+ platform: ""
29
6
  authors:
30
7
  - John Nunemaker
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-01-17 00:00:00 -05:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Simple gem for generating lorem ipsum from the command line
17
+ email: nunemaker@gmail.com
18
+ executables:
19
+ - lorem
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - CHANGELOG.txt
24
+ - Manifest.txt
25
+ - README.txt
31
26
  files:
32
- - bin/lorem
33
27
  - CHANGELOG.txt
34
- - lib/lorem/base.rb
35
- - lib/lorem/version.rb
36
- - lib/lorem.rb
28
+ - MIT-LICENSE
37
29
  - Manifest.txt
38
- - Rakefile
39
30
  - README.txt
31
+ - Rakefile
32
+ - bin/lorem
33
+ - lib/lorem.rb
34
+ - lib/lorem/base.rb
35
+ - lib/lorem/version.rb
40
36
  - setup.rb
41
37
  - test/test_helper.rb
42
38
  - test/unit/base_test.rb
43
- test_files:
44
- - test/unit/base_test.rb
39
+ - website/css/common.css
40
+ - website/index.html
41
+ has_rdoc: true
42
+ homepage: http://lorem.rubyforge.org
43
+ post_install_message:
45
44
  rdoc_options:
46
45
  - --main
47
46
  - README.txt
48
- extra_rdoc_files:
49
- - CHANGELOG.txt
50
- - Manifest.txt
51
- - README.txt
52
- executables:
53
- - lorem
54
- extensions: []
55
-
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: "0"
54
+ version:
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: "0"
60
+ version:
56
61
  requirements: []
57
62
 
58
- dependencies: []
59
-
63
+ rubyforge_project: lorem
64
+ rubygems_version: 0.9.5
65
+ signing_key:
66
+ specification_version: 2
67
+ summary: Simple gem for generating lorem ipsum from the command line
68
+ test_files:
69
+ - test/unit/base_test.rb