powerpack 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50f7e492da95de510a5b6fc4e65473ac3ddc1fb7
4
- data.tar.gz: 427c3e18cd193ca1692e4c4f73e0cdaf9f4b5a73
3
+ metadata.gz: 7a3a66b83a0099f21936fdf18fdd2465ee803a0b
4
+ data.tar.gz: 850e52d270c66647b71ff8a98a44bcfca39c9e14
5
5
  SHA512:
6
- metadata.gz: 97715c9d3bac5ddeb10c1f9be5a392a4a6ce93ac56e579eb8cdbc363ab736c1df0828dc65d8a1678633e159c45919d4e19d108f15de0933ebd95b96d533eee23
7
- data.tar.gz: 1f96319f56cefb7c3a6d73d5465544fe74f07c73e7dec95c0dfb48a9ccc58959a5826998f87f83aabba9161b13222266e887ad6026fa1b9539da991a8b5a555e
6
+ metadata.gz: 076f54612a3f4c83715654f2c5ecd82792b492b4a52308b52f43f6a4d718334eed4f24f4f578c7ca4f9d04cfa11c1e141075bbafd2fe465b5a63123ae9287dac
7
+ data.tar.gz: 06746d79155d9a90500fbf93843e2b69aec72aca92b55389267b3f474dcc6127fd659a0bf108d0870d554c824948fb4785fe77f7074ad2a2ee8735d52b7e3606
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.1.1 (04/05/2015)
6
+
7
+ No user-visible changes.
8
+
5
9
  ## 0.1.0 (25/01/2015)
6
10
 
7
11
  * Added `String#remove_prefix`
@@ -1,6 +1,6 @@
1
1
  unless Enumerable.method_defined? :frequencies
2
2
  module Enumerable
3
- # Counts the number of ocurrence of items in the enumberable.
3
+ # Counts the number of occurrence of items in the enumerable.
4
4
  #
5
5
  # @return [Hash] in the format value => count
6
6
  #
@@ -1,3 +1,3 @@
1
1
  module Powerpack
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -19,6 +19,6 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.add_development_dependency 'bundler', '~> 1.3'
21
21
  spec.add_development_dependency 'rake'
22
- spec.add_development_dependency('rspec', '~> 2.13')
22
+ spec.add_development_dependency('rspec')
23
23
  spec.add_development_dependency('yard', '~> 0.8')
24
24
  end
@@ -3,37 +3,37 @@ require 'spec_helper'
3
3
  describe 'Enumerable#exactly' do
4
4
  context 'with block' do
5
5
  it 'returns true for exact number of matches' do
6
- expect([1, 2, 3, 4].exactly?(2, &:even?)).to be_true
6
+ expect([1, 2, 3, 4].exactly?(2, &:even?)).to be_truthy
7
7
  end
8
8
 
9
9
  it 'returns false for less matches' do
10
- expect([1, 3, 4].exactly?(2, &:even?)).to be_false
10
+ expect([1, 3, 4].exactly?(2, &:even?)).to be_falsey
11
11
  end
12
12
 
13
13
  it 'returns false for more matches' do
14
- expect([1, 3, 4, 6, 8].exactly?(2, &:even?)).to be_false
14
+ expect([1, 3, 4, 6, 8].exactly?(2, &:even?)).to be_falsey
15
15
  end
16
16
  end
17
17
 
18
18
  context 'without block' do
19
19
  it 'returns true for exact number of non nil/false elements in absence of nil/false elements' do
20
- expect([1, 2, 3, 4].exactly?(4)).to be_true
20
+ expect([1, 2, 3, 4].exactly?(4)).to be_truthy
21
21
  end
22
22
 
23
23
  it 'returns true for exact number of non nil/false elements in presence of nil/false elements' do
24
- expect([1, 2, nil, false].exactly?(2)).to be_true
24
+ expect([1, 2, nil, false].exactly?(2)).to be_truthy
25
25
  end
26
26
 
27
27
  it 'returns true for exact number of nil/false elements' do
28
- expect([nil, false].exactly?(0)).to be_true
28
+ expect([nil, false].exactly?(0)).to be_truthy
29
29
  end
30
30
 
31
31
  it 'returns false if there are less non nil/false elements in absence of nil/false elements' do
32
- expect([1, 2, 3].exactly?(4)).to be_false
32
+ expect([1, 2, 3].exactly?(4)).to be_falsey
33
33
  end
34
34
 
35
35
  it 'returns false if there are less non nil/false elements in presence of nil/false elements' do
36
- expect([1, nil, false].exactly?(4)).to be_false
36
+ expect([1, nil, false].exactly?(4)).to be_falsey
37
37
  end
38
38
  end
39
39
  end
@@ -3,25 +3,25 @@ require 'spec_helper'
3
3
  describe 'Enumerable#several' do
4
4
  context 'with block' do
5
5
  it 'returns true if more than 1 element matches the predicate' do
6
- expect([1, 2, 3, 4].several?(&:even?)).to be_true
6
+ expect([1, 2, 3, 4].several?(&:even?)).to be_truthy
7
7
  end
8
8
 
9
9
  it 'returns false if just 1 element matches the predicate' do
10
- expect([1, 3, 4].several?(&:even?)).to be_false
10
+ expect([1, 3, 4].several?(&:even?)).to be_falsey
11
11
  end
12
12
 
13
13
  it 'returns false if no elements match the predicate' do
14
- expect([1, 3, 4].several?(&:even?)).to be_false
14
+ expect([1, 3, 4].several?(&:even?)).to be_falsey
15
15
  end
16
16
  end
17
17
 
18
18
  context 'without block' do
19
19
  it 'returns true if there are 2 or more non nil/false elements' do
20
- expect([1, 2, 3, 4].several?).to be_true
20
+ expect([1, 2, 3, 4].several?).to be_truthy
21
21
  end
22
22
 
23
23
  it 'returns false if there are less than 2 non nil/false elements' do
24
- expect([1, nil, false].several?).to be_false
24
+ expect([1, nil, false].several?).to be_falsey
25
25
  end
26
26
  end
27
27
  end
@@ -2,23 +2,23 @@ require 'spec_helper'
2
2
 
3
3
  describe 'Numeric#neg?' do
4
4
  it 'returns false for positive integer' do
5
- expect(1.neg?).to be_false
5
+ expect(1.neg?).to be_falsey
6
6
  end
7
7
 
8
8
  it 'returns false for positive float' do
9
- expect(0.1.neg?).to be_false
9
+ expect(0.1.neg?).to be_falsey
10
10
  end
11
11
 
12
12
  it 'returns true for negative integer' do
13
- expect(-1.neg?).to be_true
13
+ expect(-1.neg?).to be_truthy
14
14
  end
15
15
 
16
16
  it 'returns true for negative float' do
17
- expect(-0.01.neg?).to be_true
17
+ expect(-0.01.neg?).to be_truthy
18
18
  end
19
19
 
20
20
  it 'returns false for 0' do
21
- expect(0.neg?).to be_false
22
- expect(0.0.neg?).to be_false
21
+ expect(0.neg?).to be_falsey
22
+ expect(0.0.neg?).to be_falsey
23
23
  end
24
24
  end
@@ -2,23 +2,23 @@ require 'spec_helper'
2
2
 
3
3
  describe 'Numeric#pos?' do
4
4
  it 'returns true for positive integer' do
5
- expect(1.pos?).to be_true
5
+ expect(1.pos?).to be_truthy
6
6
  end
7
7
 
8
8
  it 'returns true for positive float' do
9
- expect(0.1.pos?).to be_true
9
+ expect(0.1.pos?).to be_truthy
10
10
  end
11
11
 
12
12
  it 'returns false for negative integer' do
13
- expect(-1.pos?).to be_false
13
+ expect(-1.pos?).to be_falsey
14
14
  end
15
15
 
16
16
  it 'returns false for negative float' do
17
- expect(-0.01.pos?).to be_false
17
+ expect(-0.01.pos?).to be_falsey
18
18
  end
19
19
 
20
20
  it 'returns false for 0' do
21
- expect(0.pos?).to be_false
22
- expect(0.0.pos?).to be_false
21
+ expect(0.pos?).to be_falsey
22
+ expect(0.0.pos?).to be_falsey
23
23
  end
24
24
  end
@@ -2,14 +2,14 @@ require 'spec_helper'
2
2
 
3
3
  describe 'String#blank?' do
4
4
  it 'returns true for an empty string' do
5
- expect(''.blank?).to be_true
5
+ expect(''.blank?).to be_truthy
6
6
  end
7
7
 
8
8
  it 'returns true for a string with only whitespace in it' do
9
- expect(' '.blank?).to be_true
9
+ expect(' '.blank?).to be_truthy
10
10
  end
11
11
 
12
12
  it 'returns false for a string with non-whitespace chars in it' do
13
- expect(' test'.blank?).to be_false
13
+ expect(' test'.blank?).to be_falsey
14
14
  end
15
15
  end
@@ -5,8 +5,6 @@ require 'rspec'
5
5
  require 'powerpack'
6
6
 
7
7
  RSpec.configure do |config|
8
- config.treat_symbols_as_metadata_keys_with_true_values = true
9
-
10
8
  config.expect_with :rspec do |c|
11
9
  c.syntax = :expect # disables `should`
12
10
  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.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-25 00:00:00.000000000 Z
11
+ date: 2015-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '2.13'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '2.13'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: yard
57
57
  requirement: !ruby/object:Gem::Requirement