wordpresstrano 0.2.0 → 0.2.1
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/lib/capistrano/wordpress/helpers/fixnum.rb +12 -2
- data/lib/capistrano/wordpress/helpers/hash.rb +10 -1
- data/wordpresstrano.gemspec +1 -1
- 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: ff21b589711c6eadcedd99c492b88431dfaeb866
|
4
|
+
data.tar.gz: d3287b879217636c7286a859d03b06fce9c4a4b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 594a3dc0f5c6377e740a4ed4bd261b042a34b038d1f4e24a9f196d41440fd459815adf6aaeed351f0313c01e0ccafa3465312ab8ab236762f095939efed1b4cb
|
7
|
+
data.tar.gz: 75d8f9973019ae4a516b3276e23e349d85c59a5bdb48afe7e85f62d4f9cae8eeb9f5db9f6e28f3083d9ead6ac089707412ae1f8e078e67a9ec4dc7656537457b
|
@@ -1,5 +1,10 @@
|
|
1
|
+
# Extensions for the Fixnum class
|
1
2
|
class Fixnum
|
2
|
-
# Get the ordinal string of
|
3
|
+
# Get the ordinal string of this number
|
4
|
+
#
|
5
|
+
# Example:
|
6
|
+
# >> 1.ordinal
|
7
|
+
# => "st"
|
3
8
|
def ordinal
|
4
9
|
abs_number = self.to_i.abs
|
5
10
|
|
@@ -15,7 +20,12 @@ class Fixnum
|
|
15
20
|
end
|
16
21
|
end
|
17
22
|
|
18
|
-
# Get the ordinal string
|
23
|
+
# Get the ordinal string of this number and
|
24
|
+
# prefix it with this number
|
25
|
+
#
|
26
|
+
# Example:
|
27
|
+
# >> 1.ordinalize
|
28
|
+
# => "1st"
|
19
29
|
def ordinalize
|
20
30
|
"#{self}#{self.ordinal}"
|
21
31
|
end
|
@@ -1,5 +1,14 @@
|
|
1
|
+
# Extensions for the Hash class
|
1
2
|
class Hash
|
2
|
-
# Check to see if
|
3
|
+
# Check to see if this hash contains all
|
4
|
+
# the specified keys
|
5
|
+
#
|
6
|
+
# Example:
|
7
|
+
# >> { a: "alpha", b: "beta" }.has_keys? :a, :b
|
8
|
+
# => true
|
9
|
+
#
|
10
|
+
# Arguments:
|
11
|
+
# keys: (Splat)
|
3
12
|
def has_keys?(*keys)
|
4
13
|
keys.each do |key|
|
5
14
|
return false unless self.has_key? key
|
data/wordpresstrano.gemspec
CHANGED