lorem_ipsum_amet 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (6) hide show
  1. data/CHANGELOG.md +7 -3
  2. data/README.md +32 -3
  3. data/Rakefile +2 -2
  4. data/VERSION +1 -1
  5. data/bin/lorem_ipsum.rb +45 -0
  6. metadata +8 -5
data/CHANGELOG.md CHANGED
@@ -1,12 +1,16 @@
1
1
  # Changelog
2
2
 
3
- ## 0.6.0 (Coming soon)
3
+ ## 0.7.0 (not scheduled yet)
4
4
 
5
- * Command line support
5
+ * Waiting for your ideas!
6
+
7
+ ## 0.6.0 (2012-12-19)
8
+
9
+ * Added Command line executable
6
10
 
7
11
  ## 0.5.0 (2012-12-18)
8
12
 
9
- * Added placeholder image support via placehold.it
13
+ * Added placeholder image support via placehold.it (thanks to [benzimmer](https://github.com/benzimmer) for the idea!)
10
14
 
11
15
  ## 0.4.0 (2012-12-10)
12
16
 
data/README.md CHANGED
@@ -1,18 +1,20 @@
1
- # Lorem Ipsum Amet - blind text generator
1
+ # Lorem Ipsum Amet - blind text && placeholder generator
2
2
  ===========
3
3
 
4
4
  [![Build Status](https://secure.travis-ci.org/yagooar/lorem_ipsum_amet.png)](http://travis-ci.org/yagooar/lorem_ipsum_amet)
5
5
 
6
6
 
7
- **Lorem Ipsum Amet** is a gem that provides a simple yet powerful DSL for generating blind texts and placeholder images in your **Ruby** or **Ruby on Rails** projects.
7
+ **Lorem Ipsum Amet** is a gem that provides a simple yet powerful DSL for generating blind texts and placeholder images. You can use it in your **Ruby** or **Ruby on Rails** projects or in as a command line tool with the provided executable.
8
8
 
9
9
  Lots of shortcuts have been incorporated in order to make the DSL concise yet expressive to avoid lots of typing.
10
10
 
11
11
  ## Installation
12
12
 
13
+ ### With Gemfile
14
+
13
15
  Add it to your Gemfile:
14
16
 
15
- gem 'lorem-ipsum-amet'
17
+ gem 'lorem_ipsum_amet'
16
18
 
17
19
  And run:
18
20
 
@@ -20,6 +22,20 @@ And run:
20
22
 
21
23
  to install it.
22
24
 
25
+ #### Without Gemfile
26
+
27
+ In the command line:
28
+
29
+ gem install lorem_ipsum_amet
30
+
31
+ And then require it in your project:
32
+
33
+ require 'lorem_ipsum_amet'
34
+
35
+ #### Command line tool
36
+
37
+ The command line tool is installed by default following the above steps.
38
+
23
39
  ## Usage
24
40
 
25
41
  The gem provides all of its features through the namespace LoremIpsum. If you are using it in a **Rails** project, refer to the next section.
@@ -46,6 +62,10 @@ or (alternatively)
46
62
 
47
63
  = image_tag placeholder_image(200)
48
64
 
65
+ #### Command line
66
+
67
+ lorem_ipsum --paragraphs 4
68
+
49
69
 
50
70
  ### More Examples
51
71
 
@@ -148,6 +168,15 @@ HAML:
148
168
  %p= lorem_ipsum(paragraphs: 5)
149
169
  %p= image_tag placeholder_image(200, 100)
150
170
 
171
+ #### Command line tool
172
+
173
+ The command line tool offers a thin wrapper over most of the text features.
174
+
175
+ lorem_ipsum --characters 100
176
+ lorem_ipsum -p 5 -j '<br />'
177
+ lorem_ipsum --words 10 --format upcase
178
+
179
+
151
180
  ## Bug reports and contributions
152
181
 
153
182
  If you discover any bugs or need a feature, feel free to create an issue on GitHub. I also encourage you to help even more by forking and sending a pull request.
data/Rakefile CHANGED
@@ -18,8 +18,8 @@ Jeweler::Tasks.new do |gem|
18
18
  gem.name = 'lorem_ipsum_amet'
19
19
  gem.homepage = 'http://yagooar.github.com/lorem_ipsum_amet/'
20
20
  gem.license = 'MIT'
21
- gem.summary = %Q{Lorem Ipsum generator for Ruby and Rails}
22
- gem.description = %Q{Generate blind texts with tons of options in Ruby and Ruby on Rails}
21
+ gem.summary = %Q{Blind text & placeholder generator for Ruby and Rails}
22
+ gem.description = %Q{Generate blind texts and placeholder images with tons of options in Ruby, Ruby on Rails or Sinatra}
23
23
  gem.email = 'yagooar@gmail.com'
24
24
  gem.authors = ['Mateusz Sojka']
25
25
  gem.require_paths = ['lib']
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.6.0
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
4
+ require 'lorem_ipsum_amet'
5
+ require 'optparse'
6
+
7
+ options = {}
8
+
9
+ optparse = OptionParser.new do |opts|
10
+
11
+ options[:characters] = 100
12
+ opts.on('-c', '--characters [NUMBER]', 'Amount of characters') do |characters|
13
+ options[:characters] = characters.to_i
14
+ end
15
+
16
+ opts.on('-p', '--paragraphs [NUMBER]', 'Amount of paragraphs') do |paragraphs|
17
+ options.delete(:characters)
18
+ options[:paragraphs] = paragraphs.to_i
19
+ end
20
+
21
+ opts.on('-w', '--words [NUMBER]', 'Amount of words') do |words|
22
+ options.delete(:characters)
23
+ options[:words] = words.to_i
24
+ end
25
+
26
+ opts.on('-j', '--join [ELEMENT]', 'Custom join element') do |element|
27
+ options[:join] = element
28
+ end
29
+
30
+ opts.on('-f', '--format [FORMAT]', 'Text format (titlecase, upcase, downcase)') do |format|
31
+ options[:format] = format.to_sym
32
+ end
33
+
34
+ opts.on('-h', '--help', 'Display this screen') do
35
+ puts opts
36
+ exit
37
+ end
38
+
39
+ end
40
+
41
+ optparse.parse!
42
+
43
+ puts LoremIpsum.lorem_ipsum(options)
44
+ exit
45
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lorem_ipsum_amet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -123,9 +123,11 @@ dependencies:
123
123
  - - ! '>='
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
- description: Generate blind texts with tons of options in Ruby and Ruby on Rails
126
+ description: Generate blind texts and placeholder images with tons of options in Ruby,
127
+ Ruby on Rails or Sinatra
127
128
  email: yagooar@gmail.com
128
- executables: []
129
+ executables:
130
+ - lorem_ipsum.rb
129
131
  extensions: []
130
132
  extra_rdoc_files:
131
133
  - LICENSE.txt
@@ -139,6 +141,7 @@ files:
139
141
  - README.md
140
142
  - Rakefile
141
143
  - VERSION
144
+ - bin/lorem_ipsum.rb
142
145
  - lib/lorem_ipsum_amet.rb
143
146
  - lib/lorem_ipsum_amet/base.rb
144
147
  - lib/lorem_ipsum_amet/character.rb
@@ -168,7 +171,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
168
171
  version: '0'
169
172
  segments:
170
173
  - 0
171
- hash: 3620222892511120082
174
+ hash: 2641788569450550930
172
175
  required_rubygems_version: !ruby/object:Gem::Requirement
173
176
  none: false
174
177
  requirements:
@@ -180,5 +183,5 @@ rubyforge_project:
180
183
  rubygems_version: 1.8.23
181
184
  signing_key:
182
185
  specification_version: 3
183
- summary: Lorem Ipsum generator for Ruby and Rails
186
+ summary: Blind text & placeholder generator for Ruby and Rails
184
187
  test_files: []