odata 0.5.6 → 0.5.7

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: aa4d834f3960bec296cd529858811a0ae77483ad
4
- data.tar.gz: 95870d1562b87cd913148cb5c62d9f894579c92a
3
+ metadata.gz: 132bf64833bd5c6888ca24a33d5526cb8c689607
4
+ data.tar.gz: 323694626b51ea8db8736a85af8a20b77069c73a
5
5
  SHA512:
6
- metadata.gz: 22e48b9956b60803f12a0eb70fb18f9c602d844387368f8fb7e1f8cae5c68a11e6fc2c3b31fd43eb2fa9b3d9539793b679df04baca0eeca7bd233e389e993ecd
7
- data.tar.gz: e6bbcf71180124d2f689c0be23bfab9abc9babc4af83cdcd47913d4dbd2c8c7e71c51b3e267e546f40b4376fe475373f4290a9348b88f7aeb3fd47299d4e200c
6
+ metadata.gz: 458ff34118c913fa55776d7b6fc514a60e9f130955b36138ad4aa68373213443c503b8e87915ff5e4151d5268d1fbe79910b120c42cd24feb8f6cca3f95dfe96
7
+ data.tar.gz: 4ec2cb74a93adf716c139c3c4af606509282cdfd83ab01737c3b9e426cbb18e95f177b55a05d50eea9a411accfe88e51259b24083a4de0683ac4c05f1b7db8d4
data/lib/odata/query.rb CHANGED
@@ -96,6 +96,12 @@ module OData
96
96
  OData::Query::Result.new(self, response)
97
97
  end
98
98
 
99
+ # Executes the query to get a count of entities.
100
+ # @return [Integer]
101
+ def count
102
+ entity_set.service.execute("#{self.to_s}/$count").body.to_i
103
+ end
104
+
99
105
  # The EntitySet for this query.
100
106
  # @return [OData::EntitySet]
101
107
  # @api private
data/lib/odata/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module OData
2
- VERSION = '0.5.6'
2
+ VERSION = '0.5.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Thompson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-25 00:00:00.000000000 Z
11
+ date: 2014-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler