artirix_data_models 0.6.4 → 0.6.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b49694f1cdf491f8169ec491261998cda2e13f5
|
4
|
+
data.tar.gz: 74d9d581a35c98166d774e2d05aa0e16687489e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14715e975223356558dc06dc956c00b349582b521380b699b7be9ca5d708b274b50984299e92b3ff3de03c00fecb7ab993c6ae3ef69af9f4ff3b2a01ce6bd74a
|
7
|
+
data.tar.gz: aa64633ea02080d754b1289548ab89accf551b8e48947c0906902801c73acffcaf928fc82e8a28142c62c414239c4cafbe9959e113d9bef114a5a180781bb096
|
data/README.md
CHANGED
@@ -250,6 +250,12 @@ end
|
|
250
250
|
|
251
251
|
## Changes
|
252
252
|
|
253
|
+
### 0.6.5
|
254
|
+
|
255
|
+
- Specify `activemodel` as a dependency and require it in the lib
|
256
|
+
- `EsCollection` delegates `[]`, `first`, `last`, `take` and `drop` to the results.
|
257
|
+
|
258
|
+
|
253
259
|
### 0.6.4
|
254
260
|
|
255
261
|
- Add ability to create connection to data source using HTTP Basic Authentication.
|
data/artirix_data_models.gemspec
CHANGED
@@ -118,7 +118,7 @@ module ArtirixDataModels
|
|
118
118
|
@results ||= load_results
|
119
119
|
end
|
120
120
|
|
121
|
-
delegate :each, :present?, :blank?, to: :results
|
121
|
+
delegate :first, :drop, :take, :last, :[], :each, :present?, :blank?, to: :results
|
122
122
|
|
123
123
|
def data_hash(&block)
|
124
124
|
block ||= :data_hash
|
data/lib/artirix_data_models.rb
CHANGED
@@ -40,6 +40,15 @@ RSpec.describe ArtirixDataModels::EsCollection, type: :model do
|
|
40
40
|
Then { es_collection.total == 3 }
|
41
41
|
Then { es_collection.results == results_array }
|
42
42
|
Then { es_collection.aggregations == [] }
|
43
|
+
|
44
|
+
# :first, :drop, :take, :last, :[], :each, :present?, :blank?, to: :results
|
45
|
+
Then { !es_collection.blank? }
|
46
|
+
Then { es_collection.present? }
|
47
|
+
Then { es_collection[1] == results_array[1] }
|
48
|
+
Then { es_collection.first == results_array.first }
|
49
|
+
Then { es_collection.last == results_array.last }
|
50
|
+
Then { es_collection.take(2) == results_array.take(2) }
|
51
|
+
Then { es_collection.drop(2) == results_array.drop(2) }
|
43
52
|
end
|
44
53
|
|
45
54
|
describe 'aggregations' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: artirix_data_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo Turiño
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activemodel
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: simpleconfig
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -289,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
289
303
|
version: '0'
|
290
304
|
requirements: []
|
291
305
|
rubyforge_project:
|
292
|
-
rubygems_version: 2.
|
306
|
+
rubygems_version: 2.2.2
|
293
307
|
signing_key:
|
294
308
|
specification_version: 4
|
295
309
|
summary: Data Models (read only model) and Data Layer connection lib
|