find_as_hashes 0.5.0 → 0.6.0

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: 80e69ce59791677832699286e87e673a6e51b11e
4
- data.tar.gz: c707a4fc1f7825d27e47df7cd09d70fb7455ef19
3
+ metadata.gz: 7878cce2c73a10e929ab7e41cb87f2e2a75a5cc8
4
+ data.tar.gz: 5450e62f8254997fc182684cd39439c357896c92
5
5
  SHA512:
6
- metadata.gz: c6f24e484e55bddcda944a9c6a4167eab36544f8d37a0681df573deff5ae56e26cfce61b042423c4cf943c8c9e2b2ecdb3be475b0f157914022cc552ce20f662
7
- data.tar.gz: 4c7863791ad209c7af7ca2b456ae3e391dd18a22af612b4d15fd9fee1cd71f283787d18140484ba0981056b5c963c2cddd514316e7adbe49475b5e7de987cd74
6
+ metadata.gz: 174b4fa10e6679abe33bc3d42e82f073cb4a8ba6e41ec2426d1a5014c96b97e39b69ae78721263cd57ea64c9e8cb6a34e6af45df8a785bfc3756489d72119a03
7
+ data.tar.gz: 22d53f129c3005aef6571e52ef6f42a6920dff2cf5f7b3bd586f8485c0e7c5c42290099b92de33e2521828c894fbb5543a3099f666b031b717df14d7741aff92
@@ -0,0 +1,4 @@
1
+ github_repo: sportngin/find_as_hashes
2
+ semantic_versioning: true
3
+ branches_to_keep:
4
+ - master
@@ -0,0 +1,13 @@
1
+ defaults:
2
+ deploy_cmd: gem push *.gem
3
+ before_deploy_cmds:
4
+ - op tag-release
5
+ - sed -i '' -e "s/\".*/\"$(git tag | tail -1 | sed s/v//)\"/" lib/find_as_hashes/version.rb
6
+ - git add lib/find_as_hashes/version.rb
7
+ - git commit -m "Version Bump" && git push
8
+ - gem build find_as_hashes.gemspec
9
+ after_deploy_cmds:
10
+ - rm *.gem
11
+ environments:
12
+ -
13
+ rubygems: {}
@@ -0,0 +1 @@
1
+ #### v0.6.0
@@ -6,13 +6,26 @@ module FindAsHashes
6
6
 
7
7
  module Relation
8
8
  def all_as_hashes
9
- connection.select_all(self.joins(self.includes_values).to_sql).to_a
9
+ fix_prepared_statement do
10
+ connection.select_all(self.joins(self.includes_values).to_sql).to_a
11
+ end
10
12
  end
11
13
 
12
14
  def first_as_hash
13
- relation_stack = limit(1)
14
- connection.select_one(relation_stack.joins(relation_stack.includes_values).to_sql)
15
+ fix_prepared_statement do
16
+ relation_stack = limit(1)
17
+ connection.select_one(relation_stack.joins(relation_stack.includes_values).to_sql)
18
+ end
15
19
  end
20
+
21
+ def fix_prepared_statement
22
+ if connection.respond_to?(:unprepared_statement)
23
+ connection.unprepared_statement{ yield }
24
+ else
25
+ yield
26
+ end
27
+ end
28
+ private :fix_prepared_statement
16
29
  end
17
30
 
18
31
  module Base
@@ -1,3 +1,3 @@
1
1
  module FindAsHashes
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: find_as_hashes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Byrne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-26 00:00:00.000000000 Z
11
+ date: 2015-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -160,8 +160,11 @@ extensions: []
160
160
  extra_rdoc_files: []
161
161
  files:
162
162
  - ".gitignore"
163
+ - ".octopolo.yml"
164
+ - ".soyuz.yml"
163
165
  - ".travis.yml"
164
166
  - Appraisals
167
+ - CHANGELOG.markdown
165
168
  - Gemfile
166
169
  - Gemfile.lock
167
170
  - MIT-LICENSE