Permalink
Browse files

update NanoStore pod to 2.1.8

  • Loading branch information...
1 parent 159294a commit 08c0d33a86478844987fdbd2510f3f38258c15a6 @siuying committed Dec 17, 2012
View
@@ -27,9 +27,9 @@ require 'nano-store'
Motion::Project::App.setup do |app|
app.name = 'myapp'
- # Only needed if you have not already specifying a pods dependency
+ # Add the pod NanoStore to your project
app.pods do
- pod 'NanoStore', '~> 2.1.4'
+ pod 'NanoStore', '~> 2.1.8'
end
end
```
View
@@ -9,7 +9,7 @@ Motion::Project::App.setup do |app|
app.redgreen_style = :full
app.files += Dir.glob(File.join(app.project_dir, 'lib/nano_store/*.rb'))
app.pods do
- pod 'NanoStore', '~> 2.1.5'
+ pod 'NanoStore', '~> 2.1.8'
end
end
View
@@ -15,5 +15,5 @@
app.files.unshift(File.join(File.dirname(__FILE__), 'nano_store/finder.rb'))
app.pods ||= Motion::Project::CocoaPods.new(app)
- app.pods.pod 'NanoStore', '~> 2.1.5'
+ app.pods.pod 'NanoStore', '~> 2.1.8'
end
@@ -6,11 +6,11 @@ def self.store(type=:memory, path=nil)
case type
when :memory
- store = NSFNanoStore.createAndOpenStoreWithType(NSFMemoryStoreType, path:nil, error: error_ptr)
+ store = NSFNanoStore.createAndOpenStoreWithType(::NSFMemoryStoreType, path:nil, error: error_ptr)
when :temporary, :temp
- store = NSFNanoStore.createAndOpenStoreWithType(NSFTemporaryStoreType, path:nil, error: error_ptr)
+ store = NSFNanoStore.createAndOpenStoreWithType(::NSFTemporaryStoreType, path:nil, error: error_ptr)
when :persistent, :file
- store = NSFNanoStore.createAndOpenStoreWithType(NSFPersistentStoreType, path:path, error: error_ptr)
+ store = NSFNanoStore.createAndOpenStoreWithType(::NSFPersistentStoreType, path:path, error: error_ptr)
else
raise NanoStoreError.new("unexpected store type (#{type}), must be one of: :memory, :temporary or :persistent")
end
View
@@ -14,6 +14,6 @@ Gem::Specification.new do |gem|
gem.require_paths = ["lib"]
gem.version = NanoStore::VERSION
- gem.add_dependency 'motion-cocoapods', '>= 1.2.0'
+ gem.add_dependency 'motion-cocoapods', '>= 1.2.1'
gem.add_development_dependency 'motion-redgreen'
end
View
@@ -1,11 +1,11 @@
PODS:
-- NanoStore (2.1.5)
+- NanoStore (2.1.8)
DEPENDENCIES:
-- NanoStore (~> 2.1.5)
+- NanoStore (~> 2.1.8)
SPEC CHECKSUMS:
- NanoStore: 440272829dfe13db7f1c68de74fc3562475463fe
+ NanoStore: 648b6b984d4df8ad52a1c0d049ad91b8a12a27d0
COCOAPODS: 0.16.0
@@ -80,6 +80,9 @@ - (NSString *)description
break;
}
+ // Make sure we escape quotes if present and the value is a string
+ value = [value stringByReplacingOccurrencesOfString:@"'" withString:@"''"];
+
switch (match) {
case NSFEqualTo:
[description appendString:[NSString stringWithFormat:@"%@ = '%@'", columnValue, value]];
@@ -507,6 +507,11 @@ - (NSString *)_prepareSQLQueryStringWithKey:(NSString *)aKey attribute:(NSString
NSMutableString *theSQLStatement = nil;
NSString *attributes = nil;
+ // Make sure we escape quotes if present and the value is a string
+ if (YES == [aValue isKindOfClass:[NSString class]]) {
+ aValue = [aValue stringByReplacingOccurrencesOfString:@"'" withString:@"''"];
+ }
+
if (nil != attributesToBeReturned) {
// Prepare the list of attributes we need to gather. Include NSFKEY as well.
NSMutableSet *set = [[NSMutableSet alloc]initWithArray:attributesToBeReturned];
Oops, something went wrong.

0 comments on commit 08c0d33

Please sign in to comment.