crate_ruby 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 056090d63bf8c0b4811c9e67de0e66069f57867d
4
- data.tar.gz: 69cf78fb1ec3cfca491ff4a2a9dbd4de640ca426
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YjcwMDRlZDFjZmI1YzcxZDMyOGRkNTFjNWZkNWRiY2Q4OTA0ZGIxMA==
5
+ data.tar.gz: !binary |-
6
+ Zjg3ZjYzMTgwNWI2OTBmZjFkYzhkMzhmYzE4YTBhZDk2Yzk5ZTc1NQ==
5
7
  SHA512:
6
- metadata.gz: 79cbc4eac0dea687b3efc48f24fc755d1ff31c0d064cb71045ded13803766f7d59729cd04710a90a709e632c6c77df30d25f10160ac995fcd6b76c032382da5c
7
- data.tar.gz: 8b1904bad9928255436323c53d22e8c6127b083a8eb357de3ccf0c055cbf6929a591b15817dd334ea771cc18604e8f2738e969001be7077d09484684fc4ee014
8
+ metadata.gz: !binary |-
9
+ YzAwMjNlN2I2OGMxOGI2MTM4ZTUyYjE4NmRiYTc5MjQ4YTg3Y2YxY2QxZTY4
10
+ MTVjMjU5OTFlMDFmMWM2OGU3NzI0ZTE3MDg1MWYyNGRhOTMyOWNhYzc3YjVj
11
+ YmQyMjc4YmE2MTRjMjYwZTZiMDRhMjhmYzc3YTdhNmI4MmUxMTM=
12
+ data.tar.gz: !binary |-
13
+ MDNiMDQ2ZDdlODYzNDAzMDc1YzNiZWZlMzQ1MzI5M2NkMTdjYjNjMTYxMWI5
14
+ NmU5ODEwZWVlMjczYzE1ZTFmZDY1MThiMWE2OTAxNGI2ODlmMzUxZjJjYmQw
15
+ NjAyMTczYTM1Y2MwNzdlNDJkMTU1MWYzNzg4ZTdlZmU2ODI4NmQ=
@@ -1,7 +1,7 @@
1
1
  Contributing to Crate Ruby
2
2
  ==========================
3
3
 
4
- Thanks for considering contributing to crate active record adapter.
4
+ Thanks for considering contributing to the Crate Data Ruby library.
5
5
 
6
6
 
7
7
  Reporting an issue
@@ -23,8 +23,9 @@ Reporting an issue
23
23
  Pull requests
24
24
  -------------
25
25
 
26
- Before we can accept any pull requests to CRATE Active Record Adapter we need you to agree to
27
- our CLA_. Once that is done, we suggest to continue as follows:
26
+ Before we can accept any pull requests to the Crate Data Ruby library
27
+ we need you to agree to our CLA_. Once that is done, we suggest to
28
+ continue as follows:
28
29
 
29
30
  - Add an issue on Github and let us know that you're working on something.
30
31
 
@@ -35,9 +36,11 @@ our CLA_. Once that is done, we suggest to continue as follows:
35
36
  - Be descriptive in your PR and commit messages. What is it for, why is it
36
37
  needed, etc.
37
38
 
39
+ - Make sure the tests pass.
40
+
38
41
  - Squash related commits
39
42
 
40
- .. _CLA: https://crate.io/contribute/agreements/
43
+ .. _CLA: https://crate.io/community/contribute/
41
44
 
42
45
 
43
46
  Rebase
@@ -88,4 +91,3 @@ fixup commits and mark them to squash. But in order for that to work the
88
91
  ``autosquash`` setting has to be enabled in the ``.gitconfig``::
89
92
 
90
93
  git config --global rebase.autosquash true
91
-
@@ -0,0 +1,13 @@
1
+ # Release Process
2
+
3
+ Business as usual, but in case you forgot, here it is.
4
+
5
+ * update ``CrateRuby.version`` in ``lib/crate_ruby/version.rb``
6
+ * update history.txt to reflect the changes of this release
7
+ * Do the traditional trinity of:
8
+
9
+ ```ruby
10
+ gem update --system
11
+ gem build crate_ruby.gemspec
12
+ gem push crate_ruby-<version>.gem
13
+ ```
@@ -1,8 +1,11 @@
1
1
  # coding: UTF-8
2
2
 
3
- === unreleased
4
-
5
3
  === 0.0.7
4
+
5
+ * use prepared statements for insert
6
+
7
+ === 0.0.6
8
+
6
9
  * now officially supported by Crate Data and available under the
7
10
  Apache 2.0 License
8
11
 
@@ -181,9 +181,10 @@ module CrateRuby
181
181
 
182
182
 
183
183
  def insert(table_name, attributes)
184
- vals = attributes.values.map { |x| x.is_a?(String) ? "'#{x}'" : x }.join(', ')
185
- stmt = %Q{INSERT INTO "#{table_name}" (#{attributes.keys.join(', ')}) VALUES (#{vals})}
186
- execute(stmt)
184
+ vals = attributes.values
185
+ binds = vals.count.times.map {|i| "$#{i+1}"}.join(',')
186
+ stmt = %Q{INSERT INTO "#{table_name}" (#{attributes.keys.join(', ')}) VALUES(#{binds})}
187
+ execute(stmt, vals)
187
188
  end
188
189
 
189
190
  # Crate is eventually consistent, If you don't query by primary key,
@@ -20,5 +20,5 @@
20
20
  # software solely pursuant to the terms of the relevant commercial agreement.
21
21
 
22
22
  module CrateRuby
23
- VERSION = "0.0.6"
23
+ VERSION = "0.0.7"
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crate_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Klocker
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-29 00:00:00.000000000 Z
12
+ date: 2014-09-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -29,14 +29,14 @@ dependencies:
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ! '>='
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ! '>='
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
@@ -64,6 +64,7 @@ files:
64
64
  - .gitignore
65
65
  - .travis.yml
66
66
  - CONTRIBUTING.rst
67
+ - DEVELOP.md
67
68
  - Gemfile
68
69
  - LICENSE
69
70
  - NOTICE
@@ -95,17 +96,17 @@ require_paths:
95
96
  - lib
96
97
  required_ruby_version: !ruby/object:Gem::Requirement
97
98
  requirements:
98
- - - '>='
99
+ - - ! '>='
99
100
  - !ruby/object:Gem::Version
100
101
  version: '0'
101
102
  required_rubygems_version: !ruby/object:Gem::Requirement
102
103
  requirements:
103
- - - '>='
104
+ - - ! '>='
104
105
  - !ruby/object:Gem::Version
105
106
  version: '0'
106
107
  requirements: []
107
108
  rubyforge_project:
108
- rubygems_version: 2.0.3
109
+ rubygems_version: 2.4.1
109
110
  signing_key:
110
111
  specification_version: 4
111
112
  summary: A simple interface to Crate Data.