middleman-dato 0.5.10 → 0.5.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dato/record.rb +4 -0
- data/lib/dato/version.rb +4 -0
- data/middleman-dato.gemspec +2 -1
- data/spec/dato/record_spec.rb +22 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 519b5e7c70abb154e4337b7e96ea0ff4d1adc8e5
|
4
|
+
data.tar.gz: 871ed43fb056f16e148f18fc749069e293696fa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c2befa059eb8612172d413ba703040ab8e2cf269b7852ab9ee049fde47d555de46d081cb694db41f32362bf36ca8af1f0757a0992605072abe86dc72a8f158f
|
7
|
+
data.tar.gz: 08946b373c814a4590b258ac70f906da03eb547f4c282399402aae626b55c6efa7cc498147282dfd219c8adb8666cc6e9a672fb72fb8c4c0df8eaf981f6b8f5c
|
data/lib/dato/record.rb
CHANGED
data/lib/dato/version.rb
ADDED
data/middleman-dato.gemspec
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
|
3
|
+
require 'dato/version'
|
3
4
|
|
4
5
|
Gem::Specification.new do |s|
|
5
6
|
s.name = 'middleman-dato'
|
6
|
-
s.version =
|
7
|
+
s.version = Dato::VERSION
|
7
8
|
s.platform = Gem::Platform::RUBY
|
8
9
|
s.authors = ['Stefano Verna']
|
9
10
|
s.email = ['s.verna@cantierecreativo.net']
|
data/spec/dato/record_spec.rb
CHANGED
@@ -162,5 +162,27 @@ module Dato
|
|
162
162
|
end
|
163
163
|
end
|
164
164
|
end
|
165
|
+
|
166
|
+
context 'equality' do
|
167
|
+
subject(:same_record) { described_class.new(entity, repo) }
|
168
|
+
|
169
|
+
subject(:another_record) { described_class.new(another_entity, repo) }
|
170
|
+
let(:another_entity) do
|
171
|
+
double(
|
172
|
+
'Dato::JsonApiEntity(Record)',
|
173
|
+
id: '15'
|
174
|
+
)
|
175
|
+
end
|
176
|
+
|
177
|
+
|
178
|
+
it 'two records are equal if their id is the same' do
|
179
|
+
expect(record).to eq same_record
|
180
|
+
end
|
181
|
+
|
182
|
+
it 'else they\'re not' do
|
183
|
+
expect(record).not_to eq another_record
|
184
|
+
expect(record).not_to eq "foobar"
|
185
|
+
end
|
186
|
+
end
|
165
187
|
end
|
166
188
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-dato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Verna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|
@@ -145,6 +145,7 @@ files:
|
|
145
145
|
- lib/dato/record.rb
|
146
146
|
- lib/dato/records_repo.rb
|
147
147
|
- lib/dato/space.rb
|
148
|
+
- lib/dato/version.rb
|
148
149
|
- lib/middleman-dato.rb
|
149
150
|
- middleman-dato.gemspec
|
150
151
|
- spec/dato/entities_repo_spec.rb
|