tram-policy 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/tram/policy/errors.rb +2 -2
- data/spec/tram/policy/errors_spec.rb +12 -0
- data/tram-policy.gemspec +1 -1
- 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: 2ccc42d16b7d4766a4563edd74c431d7fa4da43e
|
4
|
+
data.tar.gz: 0673bfe221190c2b2f4a007b85c9277eb46476ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd205531e5f8c84f2f9de7db3d3cb7249d92804e221e93a2d57f33d4c41b0c39dcdcb731011d03d826ce6a30a9e2a09c8d1fcb2ea6a2cb0bc0566bab24c7476a
|
7
|
+
data.tar.gz: 49b6ea096c3faba94755595266f6664e863a9b7895f22861efb4d4a962d0733d95d2627fa8fcc9fbf3bbbfd708fc6a6082340e02db4cd1696220b55f88d1824c
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
-
## [
|
7
|
+
## [0.0.3] - [2017-05-24]
|
8
|
+
|
9
|
+
### Fixed
|
10
|
+
- bug in `errors.empty?` with a block (@nepalez with thanks to @gzigzigzeo)
|
8
11
|
|
9
12
|
## [0.0.2] - [2017-04-25]
|
10
13
|
The gem is battle-tested for production (in a real commertial project).
|
@@ -31,3 +34,4 @@ This is a first public release (@nepalez, @charlie-wasp, @JewelSam, @sergey-chec
|
|
31
34
|
[Unreleased]: https://github.com/tram-rb/tram-policy
|
32
35
|
[0.0.1]: https://github.com/tram-rb/tram-policy/releases/tag/v0.0.1
|
33
36
|
[0.0.2]: https://github.com/tram-rb/tram-policy/compare/v0.0.1...v0.0.2
|
37
|
+
[0.0.3]: https://github.com/tram-rb/tram-policy/compare/v0.0.2...v0.0.3
|
data/lib/tram/policy/errors.rb
CHANGED
@@ -23,6 +23,18 @@ RSpec.describe Tram::Policy::Errors do
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
+
describe "#empty?" do
|
27
|
+
subject { errors.add :omg, level: "info", field: "name" }
|
28
|
+
|
29
|
+
it "checks whether error present" do
|
30
|
+
expect(subject).not_to be_empty
|
31
|
+
end
|
32
|
+
|
33
|
+
it "accepts a block" do
|
34
|
+
expect(subject.empty? { |error| error.level != "info" }).to eq true
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
26
38
|
describe "#merge" do
|
27
39
|
let(:other) { described_class.new(policy) }
|
28
40
|
|
data/tram-policy.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = "tram-policy"
|
3
|
-
gem.version = "0.0.
|
3
|
+
gem.version = "0.0.3"
|
4
4
|
gem.author = ["Viktor Sokolov (gzigzigzeo)", "Andrew Kozin (nepalez)"]
|
5
5
|
gem.email = ["andrew.kozin@gmail.com"]
|
6
6
|
gem.homepage = "https://github.com/tram/tram-policy"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tram-policy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Viktor Sokolov (gzigzigzeo)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-05-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dry-initializer
|