finishing_moves 0.11 → 0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -22
- data/Vagrantfile +2 -2
- data/lib/finishing_moves/object.rb +12 -0
- data/lib/finishing_moves/string.rb +1 -1
- data/lib/finishing_moves/version.rb +1 -1
- data/spec/string_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9348af415342a03d683aade50c3e3121fae98c6
|
4
|
+
data.tar.gz: 902a8a29ba2517248098f40696ce50429ab11afd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7b0813906c9c82d9d5f2989ecff98c55aa56c619bd829039891abc39a053ec59c1f056660e8e27196cac31f94e59b52859cbd20f3be8607e28d339d70e69a2a
|
7
|
+
data.tar.gz: 74888d990597d97f8ef92259b98445afebe33cca738e717c6351a2e7c8d87a0f459d7b008ebc71e5d08cea85c532e220051454eef1af09b443f4219468b7b17a
|
data/README.md
CHANGED
@@ -2,11 +2,10 @@
|
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/finishing_moves.svg)](https://rubygems.org/gems/finishing_moves)
|
3
3
|
[![Build Status](https://travis-ci.org/forgecrafted/finishing_moves.svg?branch=master)](https://travis-ci.org/forgecrafted/finishing_moves)
|
4
4
|
[![Coverage Status](https://coveralls.io/repos/forgecrafted/finishing_moves/badge.svg?branch=master)](https://coveralls.io/r/forgecrafted/finishing_moves?branch=master)
|
5
|
-
[![Hire Us!](https://img.shields.io/badge/pros-for%20hire-F7931E.svg)](http://www.forgecrafted.com)
|
6
5
|
|
7
|
-
Ruby includes a huge amount of default awesomeness that tackles most common development challenges. But every now and then, you find yourself
|
6
|
+
Ruby includes a huge amount of default awesomeness that tackles most common development challenges. But every now and then, you find yourself performing contortions to achieve results that, honestly, **should feel more natural** given the language's design elegance. Finishing Moves is a collection of methods designed to assist in those "why is this awkward?" scenarios.
|
8
7
|
|
9
|
-
In
|
8
|
+
In the right situation, they kick serious [cyclomatic butt](https://en.wikipedia.org/wiki/Cyclomatic_complexity).
|
10
9
|
|
11
10
|
## Installation
|
12
11
|
|
@@ -19,14 +18,8 @@ Command line
|
|
19
18
|
```
|
20
19
|
gem install 'finishing_moves'
|
21
20
|
```
|
22
|
-
[Here's the gem link](https://rubygems.org/gems/finishing_moves), if you like looking at that stuff.
|
23
21
|
|
24
|
-
|
25
|
-
|
26
|
-
Tested against **`2.0.0` and above**. Probably works in `1.9.3`.
|
27
|
-
|
28
|
-
## List of Methods
|
29
|
-
###### Complete documentation in the [GitHub wiki](https://github.com/forgecrafted/finishing_moves/wiki)
|
22
|
+
## Functionality
|
30
23
|
|
31
24
|
**Not sure if this gem is for you?** Check out the methods marked with a :boom: first.
|
32
25
|
|
@@ -65,6 +58,10 @@ Tested against **`2.0.0` and above**. Probably works in `1.9.3`.
|
|
65
58
|
- [Fiscal Calendar Calculations](https://github.com/forgecrafted/finishing_moves/wiki/Fiscal-Calendar-Calculations) :boom:
|
66
59
|
- [Boolean Typecasting](https://github.com/forgecrafted/finishing_moves/wiki/Boolean-Typecasting)
|
67
60
|
|
61
|
+
### Ruby Version
|
62
|
+
|
63
|
+
Tested against **`2.0.0` and above**. Probably works in `1.9.3`.
|
64
|
+
|
68
65
|
## Development approach
|
69
66
|
|
70
67
|
- **Never** override default Ruby behavior, only add functionality.
|
@@ -87,15 +84,3 @@ Tested against **`2.0.0` and above**. Probably works in `1.9.3`.
|
|
87
84
|
3. Add your finisher
|
88
85
|
4. Repeat steps 2 and 3 until you see a brilliant luster
|
89
86
|
5. Submit a pull request
|
90
|
-
|
91
|
-
## Credits
|
92
|
-
|
93
|
-
[![forge software](http://www.forgecrafted.com/logo.png)](http://www.forgecrafted.com)
|
94
|
-
|
95
|
-
Finishing Moves is maintained and funded by [Forge Software (forgecrafted.com)](http://www.forgecrafted.com)
|
96
|
-
|
97
|
-
If you like our code, please give us a hollar if your company needs outside pro's who can write good code AND run servers at the same time!
|
98
|
-
|
99
|
-
## License
|
100
|
-
|
101
|
-
Finishing Moves is Copyright Forge Software, LLC. It is free software, and may be redistributed under the terms specified in the LICENSE file.
|
data/Vagrantfile
CHANGED
@@ -6,8 +6,8 @@ FQDN = "#{NAME}.example.com"
|
|
6
6
|
|
7
7
|
Vagrant.configure("2") do |config|
|
8
8
|
# "trusty" is 14.04
|
9
|
-
config.vm.box = "
|
10
|
-
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-
|
9
|
+
config.vm.box = "trusty64"
|
10
|
+
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
|
11
11
|
|
12
12
|
# Use the normal insecure key
|
13
13
|
# https://github.com/mitchellh/vagrant/issues/2608
|
data/spec/string_spec.rb
CHANGED
@@ -144,6 +144,9 @@ describe String do
|
|
144
144
|
str = 'FooBarBaz'
|
145
145
|
expect(str.keyify).to eq :foo_bar_baz
|
146
146
|
expect(str).to eq 'FooBarBaz'
|
147
|
+
|
148
|
+
# should work on frozen values
|
149
|
+
expect('FooBarBaz'.freeze.keyify).to eq :foo_bar_baz
|
147
150
|
end
|
148
151
|
|
149
152
|
it '#keyify!' do
|
@@ -177,6 +180,9 @@ describe String do
|
|
177
180
|
expect('!1234FooBAR'.slugify).to eq '1234-foo-bar'
|
178
181
|
expect('1234FooBAR'.slugify).to eq '1234-foo-bar'
|
179
182
|
expect('12345678'.slugify).to eq '12345678'
|
183
|
+
|
184
|
+
# should work on frozen values
|
185
|
+
expect('FooBarBaz'.freeze.slugify).to eq 'foo-bar-baz'
|
180
186
|
end
|
181
187
|
|
182
188
|
it '#slugify!' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: finishing_moves
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.12'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Koehl
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-08-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rb-readline
|