netzke-basepack 0.10.0 → 0.10.1

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: 65f02f29084160b91fc8a810c748bba7a6f65595
4
- data.tar.gz: 8cb001038dd3d5e6af08b09c0b05af1f8e203578
3
+ metadata.gz: 9555745375e3416e1ed7245c19954efc2452e419
4
+ data.tar.gz: 100ad99cc0d671888337566bfd283c5931cb50de
5
5
  SHA512:
6
- metadata.gz: 5f86ab4e65bf34230049cbc629b000a4eb5f270380222376cddda280f09284a8103cde7e61376f14924f77b43988a0a90c3fe283b283cd91b596edaa3b0019cc
7
- data.tar.gz: dd3e00b0397c1fb9fbc78b663c36527c0098b60c93fc1c6543d019acd4dc5ae3febeb15329285f6513ca60c8224b7ccbdd7fae9a5c5f6a6ebc0f0e14ca128bd6
6
+ metadata.gz: fa8f2ab4a856ec66cb085ff3cbb75d5c213fed89b7d730c78665813a3dede88558b84b6a1a32617cea5f9564d4abb6b015fda81c7e98fb0ddd367f682158bf11
7
+ data.tar.gz: 47f4e98169cc321950b879bad349403c87d0a68e26ad63c26277f64c202085a216efb66900524bee10bd58c47dc532cdb69772a1a015c0c2b9f84bac78d746c0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.10.0 - 2014-06-04
2
+ * Fix Core dependency version
3
+
1
4
  # 0.10.0 - 2014-04-02
2
5
  * Rails 4
3
6
 
@@ -4,18 +4,16 @@ module Netzke
4
4
  module RelationExtensions
5
5
  def extend_with(*params)
6
6
  scope = params.shift
7
- case scope.class.name
8
- when "Symbol" # model's scope
7
+ case scope
8
+ when Symbol # model's scope
9
9
  self.send(scope, *params)
10
- when "String" # SQL query or SQL query with params (e.g. ["created_at < ?", 1.day.ago])
10
+ when String # SQL query or SQL query with params (e.g. ["created_at < ?", 1.day.ago])
11
11
  params.empty? ? self.where(scope) : self.where([scope, *params])
12
- when "Array"
12
+ when Array
13
13
  self.extend_with(*scope)
14
- when "Hash" # conditions hash
14
+ when Hash # conditions hash
15
15
  self.where(scope)
16
- when "ActiveSupport::HashWithIndifferentAccess" # conditions hash
17
- self.where(scope)
18
- when "Proc" # receives a relation, must return a relation
16
+ when Proc # receives a relation, must return a relation
19
17
  scope.call(self)
20
18
  else
21
19
  raise ArgumentError, "Wrong parameter type for ActiveRecord::Relation#extend_with"
@@ -69,7 +69,7 @@ module Netzke::Basepack::DataAdapters
69
69
  if params[:limit]
70
70
  relation.offset(params[:start]).limit(params[:limit])
71
71
  else
72
- relation.all
72
+ relation
73
73
  end
74
74
  end
75
75
 
@@ -1,5 +1,5 @@
1
1
  module Netzke
2
2
  module Basepack
3
- VERSION = "0.10.0"
3
+ VERSION = "0.10.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netzke-basepack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Gorin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-02 00:00:00.000000000 Z
11
+ date: 2014-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: netzke-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.10.0
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.10.0
27
27
  - !ruby/object:Gem::Dependency