placegant 1.0.1 → 1.0.2
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/placegant/helpers.rb +1 -1
- data/lib/placegant/placegant.rb +2 -20
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3246c0537cf192bb1e851bbd2c24edbd09e1edb5
|
4
|
+
data.tar.gz: 680aea1b739186320782599cc8733b698f9db4c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2c99dac4bfeeddbdb502f4c1eecb2b84690816fbb8c802a1a60eccef0b457db8840412a1332b028bf72fffeb3015d1a536b672386949594c061a5ad91f4aa1d
|
7
|
+
data.tar.gz: 3a8929ca8e3f54f2000bfa6d364b0e09716ed617a8f6a82786307155b29c3ba0a9be5c93da11307b4c79fdf9d23f9b6c1807d6b54b32c19f53ceea75c7ba07df
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
data/lib/placegant/helpers.rb
CHANGED
data/lib/placegant/placegant.rb
CHANGED
@@ -1,23 +1,5 @@
|
|
1
1
|
class PlaceGant
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
# Returns the URL for a placeGant with
|
6
|
-
# the given width and height. If the width is given but the height
|
7
|
-
# is not, the image will be square.
|
8
|
-
#
|
9
|
-
# @param [Number] width the width of the placeGant
|
10
|
-
# @param [Number] height the height of the placeGant
|
11
|
-
def self.image(width = nil, height = nil)
|
12
|
-
if width.nil?
|
13
|
-
width = DEFAULT_WIDTH
|
14
|
-
height = DEFAULT_HEIGHT
|
15
|
-
elsif height.nil?
|
16
|
-
height = width
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
class << self
|
21
|
-
alias_method :gant, :image
|
2
|
+
def placegant(width, height)
|
3
|
+
"http://placegant.me/pg/#{width}/#{height}"
|
22
4
|
end
|
23
5
|
end
|