condition 0.0.29 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc140f7ce336d58df81295af5edbab22002dccd6
4
- data.tar.gz: fcbf594d790d3912d2b7f197ef88c9460a068ff4
3
+ metadata.gz: b5410ab767d8d2e0e9c14630ed646499c4fbbf4e
4
+ data.tar.gz: fe717b2359aaf06e799c950de566b29ad1b12bd0
5
5
  SHA512:
6
- metadata.gz: c206bdb9382adc94c87a1eb7244673ef554df14a905920b8601968f06847ecfe93f2b04cc732a4da6004932144f20a4f18a9c4bad2534fd3fa44045bdde62395
7
- data.tar.gz: 6febe78e3c5cd4669a296e7c67f03cd27f3eb84a9ec468ce15f73778d2339450cc79dcd0047d2a109968caba8df8d37501bc679dfd5b6730bca0bc76b3652355
6
+ metadata.gz: 33c4c9e9f16f35dd3be746bc5698bc2d26bad4374eda95fc0e8f1b75502db6a7e2fd39420da6c46c3d0a87f846ba1102c4b4f8402fbfca8bf6c1a44840f7ba80
7
+ data.tar.gz: 5f81fcaff8b4415fde5774ad0c1d47685dd56643ac78948093ccc19d6dd117ade99d35360e647600a8f0cae4a150a9d659f76eb3fc79723fd01894de9caa364d
data/.gitignore CHANGED
@@ -17,3 +17,4 @@ test/version_tmp
17
17
  tmp
18
18
  vendor
19
19
  .~lock.*
20
+ .DS_Store
data/README.md CHANGED
@@ -30,6 +30,9 @@ TODO: Write usage instructions here
30
30
 
31
31
  ## Changes
32
32
 
33
+ 2015-10-19 0.0.30
34
+ modify activerocerd storage
35
+
33
36
  2014-08-19 0.0.29
34
37
  add activerecord storage
35
38
 
@@ -14,7 +14,8 @@ module Condition
14
14
  def all(param_item)
15
15
  sql = "SELECT * FROM #{param_item.name}"
16
16
  res = exec(sql)
17
- res.to_hash
17
+ #res.to_hash
18
+ convert_keys(res)
18
19
  end
19
20
 
20
21
  def delete(param_item)
@@ -52,6 +53,7 @@ module Condition
52
53
 
53
54
  private
54
55
  def quote_value(val)
56
+ return 'NULL' if val.nil?
55
57
  v = val.gsub(/'/, "''")
56
58
  "'#{v}'"
57
59
  end
@@ -59,6 +61,14 @@ module Condition
59
61
  def exec(sql)
60
62
  @conn.exec_query(sql, LOG_NAME, [])
61
63
  end
64
+
65
+ def convert_keys(ary)
66
+ res = []
67
+ ary.each do |row|
68
+ res.push(row.deep_symbolize_keys)
69
+ end
70
+ res
71
+ end
62
72
  end
63
73
  end
64
74
  end
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
2
 
3
3
  module Condition
4
- VERSION = "0.0.29"
4
+ VERSION = "0.0.30"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: condition
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.29
4
+ version: 0.0.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - aoyagikouhei
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-19 00:00:00.000000000 Z
11
+ date: 2015-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  version: '0'
200
200
  requirements: []
201
201
  rubyforge_project:
202
- rubygems_version: 2.4.1
202
+ rubygems_version: 2.4.8
203
203
  signing_key:
204
204
  specification_version: 4
205
205
  summary: Condition Test