assertion 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/.travis.yml +1 -0
- data/CHANGELOG.md +16 -0
- data/Gemfile +1 -1
- data/Rakefile +2 -6
- data/assertion.gemspec +1 -1
- data/lib/assertion/dsl/attributes.rb +2 -1
- data/lib/assertion/version.rb +1 -1
- data/spec/integration/guard_spec.rb +1 -1
- data/spec/unit/assertion/base_spec.rb +2 -2
- data/spec/unit/assertion/dsl/attribute_spec.rb +7 -6
- data/spec/unit/assertion/guard_spec.rb +1 -1
- data/spec/unit/assertion/translator_spec.rb +2 -2
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
Mzk3MGE0ZjJjODM1Y2YxNzAyOGQzZjY0Yzk2N2YwZTVjZDI2NWI2OA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NzUwZjQ2NDA5MzM5NDU5MmJiMWU3NGQ3ZThlM2Q3MjM2MDM2OTM5MQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NDRhZjI5ZmY3MWMwNzQ3NTRhOWVhOTczYjE0OTliNGI2NDZjYjg3MWI1Nzgx
|
10
|
+
ZjE5OWUyODAzMDFmMDYxOTcwMDc1M2MxZjMwOThiODhjYjI0ZDBiZmQ4ODcy
|
11
|
+
MjdkNmFkMmQxMDhiMjJjOTUyMmM0MTQ1ZTdkODg2ODFhZmE3ZGM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZDkyMjZkNDk3NzhhYjExYTBmNzlkY2U1YjkxMzg1ZTQwYjMwMTRjMzZkN2Rj
|
14
|
+
MDBlMTFjMzBjNGU5MmY3ZTI4OWMwOGQ1MTE1ZDM1MzY0MTg5ZDdjMzNmMjAx
|
15
|
+
NjM3YWRhNGVmYjE2NzZhNmRlMzFlZTU2YTQ1YzE5NzFiYmEwNmM=
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## v0.2.3 2015-07-12
|
2
|
+
|
3
|
+
The version is bumped to fix bugs that proved to be hidden because of bugs in hexx-rspec and hexx-suit gems.
|
4
|
+
|
5
|
+
### Bugs fixed
|
6
|
+
|
7
|
+
* Fixed incompatibility to ruby 1.9.3 (nepalez)
|
8
|
+
* Fixed Rakefile that tried to loade wrong version of Rake (nepalez)
|
9
|
+
|
10
|
+
### Internals
|
11
|
+
|
12
|
+
* Updated specs for compatibility to rubies 2.2-, jruby and rbx (nepalez)
|
13
|
+
* Switched to updated 'hexx-rspec' (nepalez)
|
14
|
+
|
15
|
+
[Compare v0.2.2...v0.2.3](https://github.com/nepalez/assertion/compare/v0.2.2...0.2.3)
|
16
|
+
|
1
17
|
## v0.2.2 2015-07-11
|
2
18
|
|
3
19
|
### Added
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
|
3
|
-
|
4
|
-
rescue LoadError
|
5
|
-
puts "You must `gem install bundler` and `bundle install` to run rake tasks"
|
6
|
-
exit
|
7
|
-
end
|
2
|
+
require "rubygems"
|
3
|
+
require "bundler/setup"
|
8
4
|
|
9
5
|
# Loads bundler tasks
|
10
6
|
Bundler::GemHelper.install_tasks
|
data/assertion.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
|
|
22
22
|
gem.add_runtime_dependency "ice_nine", "~> 0.11"
|
23
23
|
gem.add_runtime_dependency "inflecto", "~> 0.0"
|
24
24
|
|
25
|
-
gem.add_development_dependency "hexx-rspec", "~> 0.
|
25
|
+
gem.add_development_dependency "hexx-rspec", "~> 0.5"
|
26
26
|
gem.add_development_dependency "equalizer", "~> 0.0"
|
27
27
|
|
28
28
|
end # Gem::Specification
|
data/lib/assertion/version.rb
CHANGED
@@ -54,7 +54,7 @@ describe Assertion::Base do
|
|
54
54
|
let(:klass) { Class.new(described_class) { attribute :foo } }
|
55
55
|
let(:assertion) { klass.new(foo: :FOO) }
|
56
56
|
|
57
|
-
shared_examples "translating" do |
|
57
|
+
shared_examples "translating" do |options|
|
58
58
|
|
59
59
|
let(:translator) { Assertion::Translator.new(klass) }
|
60
60
|
let(:attributes) { assertion.attributes }
|
@@ -67,7 +67,7 @@ describe Assertion::Base do
|
|
67
67
|
end
|
68
68
|
|
69
69
|
it "returns a translation" do
|
70
|
-
expect(subject).to eql translator.call(as, attributes)
|
70
|
+
expect(subject).to eql translator.call(options[:as], attributes)
|
71
71
|
end
|
72
72
|
|
73
73
|
end # shared examples
|
@@ -21,24 +21,25 @@ describe Assertion::DSL::Attribute do
|
|
21
21
|
|
22
22
|
before { klass.send(:define_method, :object) { :object } }
|
23
23
|
|
24
|
-
shared_examples "aliasing #object" do |
|
24
|
+
shared_examples "aliasing #object" do |options|
|
25
25
|
|
26
|
-
before { klass.attribute with }
|
26
|
+
before { klass.attribute options[:with] }
|
27
27
|
let(:instance) { klass.new }
|
28
|
-
subject { instance.send with }
|
28
|
+
subject { instance.send options[:with] }
|
29
29
|
|
30
30
|
it { is_expected.to eql instance.object }
|
31
31
|
|
32
32
|
end # shared examples
|
33
33
|
|
34
|
-
shared_examples "complaining about wrong name" do |
|
34
|
+
shared_examples "complaining about wrong name" do |options|
|
35
35
|
|
36
|
-
subject { klass.attribute with }
|
36
|
+
subject { klass.attribute options[:with] }
|
37
37
|
|
38
38
|
it "fails" do
|
39
39
|
expect { subject }.to raise_error do |error|
|
40
40
|
expect(error).to be_kind_of NameError
|
41
|
-
expect(error.message)
|
41
|
+
expect(error.message)
|
42
|
+
.to eql "#{klass}##{options[:with]} is already defined"
|
42
43
|
end
|
43
44
|
end
|
44
45
|
|
@@ -29,12 +29,12 @@ describe Assertion::Translator do
|
|
29
29
|
|
30
30
|
describe "#call" do
|
31
31
|
|
32
|
-
shared_examples "translating" do |input,
|
32
|
+
shared_examples "translating" do |input, opts|
|
33
33
|
|
34
34
|
subject { translator.call(input) }
|
35
35
|
|
36
36
|
let(:attributes) { { foo: :FOO, bar: :BAR } }
|
37
|
-
let(:output) { "translation missing: en.assertion.is_foo.#{to}" }
|
37
|
+
let(:output) { "translation missing: en.assertion.is_foo.#{opts[:to]}" }
|
38
38
|
|
39
39
|
it "provides translation" do
|
40
40
|
expect(translator.call input).to eql output
|
metadata
CHANGED
@@ -1,83 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assertion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kozin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.7'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ice_nine
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.11'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.11'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: inflecto
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: hexx-rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.5'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.5'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: equalizer
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0.0'
|
83
83
|
description:
|
@@ -88,13 +88,13 @@ extra_rdoc_files:
|
|
88
88
|
- README.md
|
89
89
|
- LICENSE
|
90
90
|
files:
|
91
|
-
-
|
92
|
-
-
|
93
|
-
-
|
94
|
-
-
|
95
|
-
-
|
96
|
-
-
|
97
|
-
-
|
91
|
+
- .coveralls.yml
|
92
|
+
- .gitignore
|
93
|
+
- .metrics
|
94
|
+
- .rspec
|
95
|
+
- .rubocop.yml
|
96
|
+
- .travis.yml
|
97
|
+
- .yardopts
|
98
98
|
- CHANGELOG.md
|
99
99
|
- Gemfile
|
100
100
|
- Guardfile
|
@@ -158,12 +158,12 @@ require_paths:
|
|
158
158
|
- lib
|
159
159
|
required_ruby_version: !ruby/object:Gem::Requirement
|
160
160
|
requirements:
|
161
|
-
- -
|
161
|
+
- - ~>
|
162
162
|
- !ruby/object:Gem::Version
|
163
163
|
version: '1.9'
|
164
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
165
|
requirements:
|
166
|
-
- -
|
166
|
+
- - ! '>='
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|