diff --git a/README.md b/README.md index 5b2cb5a..586e7de 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/Rakefile b/Rakefile index 906cfaa..528fcf1 100644 --- a/Rakefile +++ b/Rakefile @@ -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 diff --git a/lib/nano_store.rb b/lib/nano_store.rb index 550b84e..f4cbf38 100644 --- a/lib/nano_store.rb +++ b/lib/nano_store.rb @@ -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 \ No newline at end of file diff --git a/lib/nano_store/nano_store.rb b/lib/nano_store/nano_store.rb index a868812..f87c93a 100644 --- a/lib/nano_store/nano_store.rb +++ b/lib/nano_store/nano_store.rb @@ -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 diff --git a/nano-store.gemspec b/nano-store.gemspec index c073e39..c404dcb 100644 --- a/nano-store.gemspec +++ b/nano-store.gemspec @@ -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 diff --git a/vendor/Podfile.lock b/vendor/Podfile.lock index 4657653..f25f846 100644 --- a/vendor/Podfile.lock +++ b/vendor/Podfile.lock @@ -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 diff --git a/vendor/Pods/NanoStore/Classes/Public/NSFNanoPredicate.m b/vendor/Pods/NanoStore/Classes/Public/NSFNanoPredicate.m index f37e882..43d1874 100644 --- a/vendor/Pods/NanoStore/Classes/Public/NSFNanoPredicate.m +++ b/vendor/Pods/NanoStore/Classes/Public/NSFNanoPredicate.m @@ -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]]; diff --git a/vendor/Pods/NanoStore/Classes/Public/NSFNanoSearch.m b/vendor/Pods/NanoStore/Classes/Public/NSFNanoSearch.m index 795cfb6..6d7d967 100644 --- a/vendor/Pods/NanoStore/Classes/Public/NSFNanoSearch.m +++ b/vendor/Pods/NanoStore/Classes/Public/NSFNanoSearch.m @@ -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]; diff --git a/vendor/Pods/Pods.bridgesupport b/vendor/Pods/Pods.bridgesupport index 5df47b4..54a042f 100644 --- a/vendor/Pods/Pods.bridgesupport +++ b/vendor/Pods/Pods.bridgesupport @@ -1,151 +1,151 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - - + + - + - - + + - - + + - + - - + + - - - + + + - - + + @@ -167,12 +167,12 @@ - - + + - + @@ -182,51 +182,51 @@ - + - + - + - + - + - + - + - + - + @@ -234,122 +234,122 @@ - - + + - - + + - + - - - - + + + + - + - - + + - - - + + + - - - + + + - - + + - + - + - - + + - - + + - + - - + + - - - + + + - - - - + + + + - - + + - + - - + + - - + + @@ -374,7 +374,7 @@ - + @@ -384,60 +384,60 @@ - - - + + + - - - + + + - - + + - + - - + + - + - + - - + + - + - + - + @@ -450,19 +450,19 @@ - + - + - + - - + + @@ -471,60 +471,60 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -539,19 +539,19 @@ - - + + - - + + - + @@ -563,11 +563,11 @@ - + - + @@ -580,35 +580,35 @@ - + - - + + - + - + - - + + - - - + + + - + @@ -618,16 +618,16 @@ - + - + - - + + @@ -639,18 +639,18 @@ - - - + + + - - - - + + + + @@ -662,26 +662,26 @@ - + - + - - + + - - + + - + @@ -700,101 +700,101 @@ - + - - + + - + - + - - - - + + + + - - - - - + + + + + - - + + - + - - - - + + + + - - + + - - - - + + + + - - - - + + + + - - - + + + - + - - - + + + - + - - + + - - + + @@ -804,17 +804,17 @@ - + - - - + + + - + @@ -827,7 +827,7 @@ - + @@ -843,59 +843,59 @@ - - - - + + + + - - + + - - + + - + - + - + - + - + - + - + - + - + - + @@ -916,191 +916,191 @@ - - + + - - - + + + - + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - + - + - + - + - + - - - - + + + + - - - + + + - + - + - - + + - + - - - - - + + + + + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - - - - + + + + - - - + + + @@ -1116,8 +1116,8 @@ - - + + @@ -1130,80 +1130,80 @@ - + - - + + - + - + - + - + - - + + - - + + - - + + - + - + - - - + + + - + - + - + - - - + + + @@ -1217,19 +1217,19 @@ - - - - + + + + - + - + - +