dm-persevere-adapter 0.39.0 → 0.40.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.39.0
1
+ 0.40.0
@@ -360,7 +360,7 @@ module DataMapper
360
360
 
361
361
  tblname = query.model.storage_name
362
362
  path = "/#{tblname}/#{json_query}"
363
-
363
+ puts path
364
364
  response = @persevere.retrieve(path, headers)
365
365
 
366
366
  if response.code.match(/20?/)
@@ -638,8 +638,9 @@ module DataMapper
638
638
  when DataMapper::Query::Conditions::InclusionComparison then process_in(condition.subject.name, condition.value)
639
639
  when DataMapper::Query::Conditions::EqualToComparison then
640
640
  cond = condition.loaded_value
641
- cond = 'undefined' if condition.loaded_value.nil?
642
- cond = "\"#{condition.loaded_value}\"" if condition.loaded_value.is_a?(String)
641
+ cond = 'undefined' if cond.nil?
642
+ cond = "\"#{cond}\"" if cond.is_a?(String)
643
+ cond = "date(%10.f)" % (Time.parse(cond.to_s).to_f * 1000) if cond.is_a?(DateTime)
643
644
  "#{condition.subject.name.to_s}=#{cond}"
644
645
  when DataMapper::Query::Conditions::NullOperation then []
645
646
  when Array then
@@ -240,10 +240,10 @@ describe DataMapper::Adapters::PersevereAdapter do
240
240
  end
241
241
 
242
242
  it "should find by DateTime" do
243
- b = Bozon.create(:title => "To Search with Date Time", :author => 'Bloo Reguard')
244
- created_at_time = b.created_at
245
- debugger
246
- Bozon.all(:created_at => created_at_time).length.should eql(1)
243
+ time = Time.now
244
+ b = Bozon.create(:title => "To Search with Date Time", :author => 'Bloo Reguard', :created_at => time)
245
+ # debugger
246
+ Bozon.all(:created_at => time).length.should eql(1)
247
247
  end
248
248
 
249
249
  after(:all) do
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 39
7
+ - 40
8
8
  - 0
9
- version: 0.39.0
9
+ version: 0.40.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ivan R. Judson