powerpack 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -1
- data/lib/powerpack/string.rb +1 -0
- data/lib/powerpack/string/blank.rb +9 -0
- data/lib/powerpack/version.rb +1 -1
- data/spec/powerpack/string/blank_spec.rb +15 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b1dee25575ff6e8b6dc5b84b6a6a2f000389e00
|
4
|
+
data.tar.gz: 4eed3f28b561507e70a1828a6fcc74cf6e8a4c22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41e393fc5b3b067fd7551533d13c128f5357387485417812eaa318c3f96feea99f5ee15318d7e74e633540adc07dbf944d3d4a9af78274c18250cf83cc4e4541
|
7
|
+
data.tar.gz: a68471ecde73ac4a51273971bf936c7621950d3e27d8ced65786153397d9f7104236e2f1840d63c93d429e71fd58e9041f8419826a57f6e61872ad3b59b4e7e6
|
data/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/powerpack.png)](http://badge.fury.io/rb/powerpack)
|
2
|
+
[![Build Status](https://travis-ci.org/bbatsov/powerpack.png?branch=master)](https://travis-ci.org/bbatsov/powerpack)
|
3
|
+
|
1
4
|
# Powerpack
|
2
5
|
|
3
|
-
Powerpack offers some useful extensions to the standard Ruby classes (kind of like `ActiveSupport
|
6
|
+
Powerpack offers some useful extensions to the standard Ruby classes (kind of like `ActiveSupport`, but less ambitious).
|
4
7
|
|
5
8
|
## Installation
|
6
9
|
|
@@ -16,6 +19,21 @@ Or install it yourself as:
|
|
16
19
|
|
17
20
|
$ gem install powerpack
|
18
21
|
|
22
|
+
## Extensions
|
23
|
+
|
24
|
+
* [Hash](http://rdoc.info/github/bbatsov/powerpack/Hash)
|
25
|
+
** [#symbolize_keys](http://rdoc.info/github/bbatsov/powerpack/Hash#symbolize_keys-instance_method)
|
26
|
+
* [String](http://rdoc.info/github/bbatsov/powerpack/String)
|
27
|
+
** [#blank?](http://rdoc.info/github/bbatsov/powerpack/String#blank?-instance_method)
|
28
|
+
** [#format](http://rdoc.info/github/bbatsov/powerpack/String#format-instance_method)
|
29
|
+
** [#strip_indent](http://rdoc.info/github/bbatsov/powerpack/String#strip_indent-instance_method)
|
30
|
+
** [#strip_margin](http://rdoc.info/github/bbatsov/powerpack/String#strip_margin-instance_method)
|
31
|
+
|
32
|
+
## Documentation
|
33
|
+
|
34
|
+
A listing of the extensions provided by Powerpack is available
|
35
|
+
[here](http://rdoc.info/github/bbatsov/powerpack).
|
36
|
+
|
19
37
|
## Usage
|
20
38
|
|
21
39
|
To load the entire `powerpack` do:
|
data/lib/powerpack/string.rb
CHANGED
data/lib/powerpack/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'String#blank?' do
|
4
|
+
it 'returns true for an empty string' do
|
5
|
+
expect(''.blank?).to be_true
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'returns true for a string with only whitespace in it' do
|
9
|
+
expect(' '.blank?).to be_true
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'returns false for a string with non-whitespace chars in it' do
|
13
|
+
expect(' test'.blank?).to be_false
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: powerpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,12 +84,14 @@ files:
|
|
84
84
|
- lib/powerpack/hash.rb
|
85
85
|
- lib/powerpack/hash/symbolize_keys.rb
|
86
86
|
- lib/powerpack/string.rb
|
87
|
+
- lib/powerpack/string/blank.rb
|
87
88
|
- lib/powerpack/string/format.rb
|
88
89
|
- lib/powerpack/string/strip_indent.rb
|
89
90
|
- lib/powerpack/string/strip_margin.rb
|
90
91
|
- lib/powerpack/version.rb
|
91
92
|
- powerpack.gemspec
|
92
93
|
- spec/powerpack/hash/symbolize_keys_spec.rb
|
94
|
+
- spec/powerpack/string/blank_spec.rb
|
93
95
|
- spec/powerpack/string/format_spec.rb
|
94
96
|
- spec/powerpack/string/strip_indent_spec.rb
|
95
97
|
- spec/powerpack/string/strip_margin_spec.rb
|
@@ -120,6 +122,7 @@ specification_version: 4
|
|
120
122
|
summary: A few useful extensions to core Ruby classes.
|
121
123
|
test_files:
|
122
124
|
- spec/powerpack/hash/symbolize_keys_spec.rb
|
125
|
+
- spec/powerpack/string/blank_spec.rb
|
123
126
|
- spec/powerpack/string/format_spec.rb
|
124
127
|
- spec/powerpack/string/strip_indent_spec.rb
|
125
128
|
- spec/powerpack/string/strip_margin_spec.rb
|