activerecord-simpledb-adapter 0.4.7 → 0.4.8
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.
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{activerecord-simpledb-adapter}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ilia Ablamonov", "Alex Gorkunov", "Cloud Castle Inc."]
|
@@ -85,7 +85,6 @@ module Arel
|
|
85
85
|
|
86
86
|
def visit_Arel_Attributes_Attribute o
|
87
87
|
# Do not use table. prefix for attribute names
|
88
|
-
@last_column = o.column
|
89
88
|
quote_column_name o.column.db_column_name
|
90
89
|
end
|
91
90
|
alias :visit_Arel_Attributes_Integer :visit_Arel_Attributes_Attribute
|
@@ -96,8 +95,11 @@ module Arel
|
|
96
95
|
alias :visit_Arel_Attributes_Boolean :visit_Arel_Attributes_Attribute
|
97
96
|
|
98
97
|
def visit_Arel_Nodes_SqlLiteral o
|
98
|
+
puts o
|
99
99
|
# Strip table name from table.column -like literals
|
100
|
-
result = o.to_s.gsub(
|
100
|
+
result = o.to_s.gsub(/('[^']*')|(^\s*|\s+)\w+\./, '\1\2')
|
101
|
+
# quote column values
|
102
|
+
result = result.gsub(/('[^']*')|=\s*([^\s']+)/) { "#{$1}#{'= \'' + $2 + '\'' if $2.present?}" }
|
101
103
|
if result.match /`(\w+)`\s*=\s*'(.*?)'/
|
102
104
|
# transform 'a = b' to {'a' => 'b'}
|
103
105
|
{$1 => $2}.tap {|m| m.override_to_s result}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-simpledb-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 8
|
10
|
+
version: 0.4.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ilia Ablamonov
|