boston_ipsum 1.0.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -2
- data/boston_ipsum-1.0.1.gem +0 -0
- data/lib/boston_ipsum/version.rb +1 -1
- data/lib/boston_ipsum.rb +10 -6
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2220635b312be6647623878039fe1075de610b8c
|
4
|
+
data.tar.gz: 290bf86ccdd832ef6217f499fa1a75ab1bae6a48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be18ead5b2a6a38aacf1a2e9892f55a1ebc2698c94b6ccdcca447371f20c2fee770397e182023c882cf6f9894b574941eae5ee6da4209e9d0ce62d53e31d31f3
|
7
|
+
data.tar.gz: 297cbb828bb8f2c34b0cddbfc7583f6f73a8686d9c2821c616ec3ab9e5c7223ab9225ee065d70d6a3663bde56289546171e638bf5d38dfeef969f2cef64c6843
|
data/README.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
# BostonIpsum
|
2
2
|
|
3
|
-
|
3
|
+
This gem uses Boston Words to provide Lorem Ipsum like filler text for pages, such as show.html.erb
|
4
|
+
You simple install the gem, bundle, and call <%= BostonIpsum.speak(integer) %> in any view. The integer number allows you to return a randomized yet specific number of words.
|
4
5
|
|
5
|
-
|
6
|
+
For example, <%= BostonIpsum.speak(2) %> could output "Patriots Somerville"
|
7
|
+
|
8
|
+
<%= BostonIpsum.speak(4) %> could output "Martha's Vineyard Eastie Southie MBTA"
|
6
9
|
|
7
10
|
## Installation
|
8
11
|
|
@@ -22,6 +25,10 @@ Or install it yourself as:
|
|
22
25
|
|
23
26
|
## Usage
|
24
27
|
|
28
|
+
```ruby
|
29
|
+
<%= BostonIpsum.speak(5) %>
|
30
|
+
```
|
31
|
+
|
25
32
|
TODO: Write usage instructions here
|
26
33
|
|
27
34
|
## Development
|
Binary file
|
data/lib/boston_ipsum/version.rb
CHANGED
data/lib/boston_ipsum.rb
CHANGED
@@ -3,13 +3,17 @@ require "boston_ipsum/version"
|
|
3
3
|
module BostonIpsum
|
4
4
|
|
5
5
|
def self.speak(integer)
|
6
|
-
|
7
|
-
"
|
8
|
-
|
9
|
-
array.
|
6
|
+
if integer.is_a? Integer && integer > 0
|
7
|
+
array = ["MGH", "Brady", "Cambridge", "Beantown", "Sox", "Patriots", "MIT", "Harvard", "Beacon Hill", "Dorchester", "Roxbury",
|
8
|
+
"Brahmin", "The Cape", "Martha's Vineyard", "Eastie", "Southie", "The North End", "Somerville", "MBTA", "JesseWaites.com"]
|
9
|
+
if integer > (array.count - 1)
|
10
|
+
array.join(" ")
|
11
|
+
else
|
12
|
+
string = array[0..(integer - 1)].shuffle.join(" ")
|
13
|
+
end
|
10
14
|
else
|
11
|
-
|
12
|
-
end
|
15
|
+
"Try entering an integer greater than zero."
|
16
|
+
end
|
13
17
|
end
|
14
18
|
|
15
19
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boston_ipsum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Waites
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- Rakefile
|
53
53
|
- bin/console
|
54
54
|
- bin/setup
|
55
|
+
- boston_ipsum-1.0.1.gem
|
55
56
|
- boston_ipsum.gemspec
|
56
57
|
- lib/boston_ipsum.rb
|
57
58
|
- lib/boston_ipsum/version.rb
|