zoho_reports 0.0.3 → 0.0.4

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODFiZDdmMmJhNjc3NTRhOTRiNDI5YTYyMWZlMWE5NWM2YjdmMGE4OQ==
4
+ OTgwM2QyY2U1NmQzMjYzMzg2NWIwOWE4MmU0ZjQwNjk1ZjZjYTJhZQ==
5
5
  data.tar.gz: !binary |-
6
- NGQ1MTk5NmYxNTUwOTNjYmJjMDQ1YjQ2NDU1Mjk0OTZmMjcwNGQzMg==
6
+ ZTBhNmE2ZWY4NzM3NzNmMmM0Njk5OGM5YWZiNWI4YTA2ZTc2NDM1NQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDA5OGZjYzQyNzM1YzA0NDI5MzczYTFjYjY5YTM1MWE2NmQ4YWNjNmI2YzBk
10
- YWMzNzVmNmFhNmZhYmVjZjgxOTNkMmNmOThiOTA0ZTZkY2E3NmFlNjg3MWM3
11
- NGNlMDEzMTMxNGE3YmNjYjIwNTg5NGEzYzg2Y2Q5Nzc5OWFkNDg=
9
+ NjEwMmY4OWRlM2I0OTQ1MmZhMWUzOTdkZTE1Nzg0NjU0ZWM0ZDFiOTdmNjZl
10
+ Y2EwZDRiOTI5MGViYzQzMzVlYzkwZTZlODdjZDBhYWU0Yzg5ZjBjZjVhYmZm
11
+ MzRjNDBlMTRiMmU2MGVlYWY1ZTA2NzVkYzFiMDc0NjA2ZGM1YjM=
12
12
  data.tar.gz: !binary |-
13
- Y2EwYTgzNGY0NTM2ZWUyNzk3ZmNiMzQ5NDk0MTQwMTA1ZjI4MjY3NGE1ZTU3
14
- NzRmNGU1ZjMyMGY0OWY2NzBlOTMyNDUyZDNlNThmMmVjMzUwODMwMTM4YWQ1
15
- NzRmMzlhNWFiNTA3NDg4MjljZTIyY2YyNTMwMzZiOGI5OGFlMDg=
13
+ YWQxZGFhZDVjYjAyM2E0YjQ5ODZiMjVjOWE0MjU1YjRjMTFmNmFhNzdiZDEy
14
+ MTE3YTQwYjgzZDZkN2M4Y2M3MmEyYTFlZWE2NjM0YzZmOWM0ODI0NDI1YTU3
15
+ OTg5MDk3MzFmZTc1YzAwMDIxMWYyOWJmMjdkM2YxODhhYjY3NDY=
data/README.md CHANGED
@@ -37,12 +37,16 @@ client = ZohoReports::Client.new
37
37
  This example shows how to import the "Widget" model records, including creating a table if it doesn't already exist.
38
38
 
39
39
  ```ruby
40
- # Notice the ZOHO_DATE_FORMAT here
40
+ # Clean up the dates prior to json-ing the attributes
41
+ Widget.all.each do |model|
42
+ zoho_all = ZohoReports::Client.zoho_attributes(model)
43
+ end
44
+
41
45
  client.import_data(
42
46
  "test_database",
43
47
  "widgets",
44
48
  'UPDATEADD',
45
- Widget.all.to_json,
49
+ zoho_all.to_json,
46
50
  'ZOHO_MATCHING_COLUMNS' => 'id',
47
51
  'ZOHO_CREATE_TABLE' => 'true',
48
52
  )
@@ -207,13 +207,15 @@ module ZohoReports
207
207
 
208
208
  body = {
209
209
  'ZOHO_AUTO_IDENTIFY' => 'true',
210
- 'ZOHO_ON_IMPORT_ERROR' => 'ABORT',
210
+ 'ZOHO_ON_IMPORT_ERROR' => 'SETCOLUMNEMPTY',
211
211
  'ZOHO_CREATE_TABLE' => 'false',
212
212
  'ZOHO_IMPORT_TYPE' => import_type,
213
213
  'ZOHO_IMPORT_DATA' => import_content,
214
214
  'ZOHO_IMPORT_FILETYPE' => 'JSON',
215
+ 'ZOHO_DATE_FORMAT' => "yyyy/MM/dd HH:mm:ss Z",
215
216
  'ZOHO_MATCHING_COLUMNS' => 'id',
216
217
  }
218
+ puts body['ZOHO_IMPORT_DATA']
217
219
  body = body.merge!(import_config) if import_config.any?
218
220
 
219
221
  options = {
@@ -227,6 +229,26 @@ module ZohoReports
227
229
  # TODO: Figure out to what to do with File objectsw response
228
230
  end
229
231
 
232
+ # Converts formats to appropriate JSON value that can be consumed by Zoho Reports
233
+ # Hint, hint...datetimes
234
+ def self.zoho_attributes(attributes)
235
+ zohoified_attributes = Hash.new
236
+
237
+ attributes.map do |k,v|
238
+ if v.instance_of?(ActiveSupport::TimeWithZone)
239
+ # Zoho doesn't currently deal well with JSON dates (particularly ones with milliseconds) so we'll convert to a string first
240
+ zohoified_attributes[k] = v.strftime('%Y/%m/%d %T %Z')
241
+ puts "#{k}: #{zohoified_attributes[k]}"
242
+ else
243
+ zohoified_attributes[k] = v
244
+ puts "NOT TIME: #{k} - #{attributes[k].class}"
245
+ end
246
+ end
247
+
248
+ return zohoified_attributes
249
+
250
+ end
251
+
230
252
  # Returns the URI for the specified database table (or report).
231
253
  def get_uri(table_or_report_name)
232
254
  "/#{URI.encode ZohoReports.configuration.login_email}/#{URI.encode ZohoReports.configuration.zoho_database_name}/#{URI.encode table_or_report_name}"
@@ -1,3 +1,3 @@
1
1
  module ZohoReports
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -3537,3 +3537,347 @@
3537
3537
  Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3538
3538
   (0.1ms) RELEASE SAVEPOINT active_record_1
3539
3539
   (0.5ms) rollback transaction
3540
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
3541
+  (0.1ms) begin transaction
3542
+  (0.1ms) rollback transaction
3543
+  (0.0ms) begin transaction
3544
+  (0.1ms) rollback transaction
3545
+  (0.1ms) begin transaction
3546
+  (0.1ms) rollback transaction
3547
+  (0.0ms) begin transaction
3548
+  (0.1ms) rollback transaction
3549
+  (0.1ms) begin transaction
3550
+  (0.1ms) rollback transaction
3551
+  (0.1ms) begin transaction
3552
+  (0.1ms) rollback transaction
3553
+  (0.1ms) begin transaction
3554
+  (0.1ms) rollback transaction
3555
+  (0.1ms) begin transaction
3556
+  (0.1ms) rollback transaction
3557
+  (0.1ms) begin transaction
3558
+  (0.1ms) SAVEPOINT active_record_1
3559
+ SQL (9.1ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Mon, 21 Apr 2014 20:36:34 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Mon, 21 Apr 2014 20:36:34 UTC +00:00]]
3560
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3561
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3562
+  (0.1ms) SAVEPOINT active_record_1
3563
+ SQL (1.1ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Mon, 21 Apr 2014 20:36:34 UTC +00:00], ["description", "Deflate every inflatable in the Tri-State Area"], ["name", "Deflate-inator Ray"], ["updated_at", Mon, 21 Apr 2014 20:36:34 UTC +00:00]]
3564
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 2
3565
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3566
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets"
3567
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets"
3568
+  (0.4ms) rollback transaction
3569
+  (0.1ms) begin transaction
3570
+  (0.0ms) SAVEPOINT active_record_1
3571
+ SQL (0.4ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Mon, 21 Apr 2014 20:36:35 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Mon, 21 Apr 2014 20:36:35 UTC +00:00]]
3572
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3573
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3574
+  (0.0ms) SAVEPOINT active_record_1
3575
+ SQL (0.5ms) UPDATE "widgets" SET "description" = ?, "updated_at" = ? WHERE "widgets"."id" = 1 [["description", "Turns people into whiny babies"], ["updated_at", Mon, 21 Apr 2014 20:36:35 UTC +00:00]]
3576
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3577
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3578
+  (0.4ms) rollback transaction
3579
+  (0.1ms) begin transaction
3580
+  (0.1ms) rollback transaction
3581
+  (0.1ms) begin transaction
3582
+  (0.1ms) rollback transaction
3583
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
3584
+  (0.1ms) begin transaction
3585
+  (0.1ms) rollback transaction
3586
+  (0.1ms) begin transaction
3587
+  (0.1ms) rollback transaction
3588
+  (0.1ms) begin transaction
3589
+  (0.1ms) rollback transaction
3590
+  (0.1ms) begin transaction
3591
+  (0.1ms) rollback transaction
3592
+  (0.1ms) begin transaction
3593
+  (0.1ms) rollback transaction
3594
+  (0.1ms) begin transaction
3595
+  (0.1ms) rollback transaction
3596
+  (0.1ms) begin transaction
3597
+  (0.1ms) rollback transaction
3598
+  (0.1ms) begin transaction
3599
+  (0.0ms) rollback transaction
3600
+  (0.0ms) begin transaction
3601
+  (0.0ms) rollback transaction
3602
+  (0.1ms) begin transaction
3603
+  (0.1ms) SAVEPOINT active_record_1
3604
+ SQL (6.6ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:02:41 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Thu, 24 Apr 2014 18:02:41 UTC +00:00]]
3605
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3606
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3607
+  (0.0ms) SAVEPOINT active_record_1
3608
+ SQL (0.9ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:02:41 UTC +00:00], ["description", "Deflate every inflatable in the Tri-State Area"], ["name", "Deflate-inator Ray"], ["updated_at", Thu, 24 Apr 2014 18:02:41 UTC +00:00]]
3609
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 2
3610
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3611
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets"
3612
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets"
3613
+  (0.4ms) rollback transaction
3614
+  (0.1ms) begin transaction
3615
+  (0.0ms) SAVEPOINT active_record_1
3616
+ SQL (0.3ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:02:41 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Thu, 24 Apr 2014 18:02:41 UTC +00:00]]
3617
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3618
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3619
+  (0.0ms) SAVEPOINT active_record_1
3620
+ SQL (0.4ms) UPDATE "widgets" SET "description" = ?, "updated_at" = ? WHERE "widgets"."id" = 1 [["description", "Turns people into whiny babies"], ["updated_at", Thu, 24 Apr 2014 18:02:41 UTC +00:00]]
3621
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3622
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3623
+  (0.3ms) rollback transaction
3624
+  (0.1ms) begin transaction
3625
+  (0.0ms) rollback transaction
3626
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
3627
+  (0.1ms) begin transaction
3628
+  (0.1ms) rollback transaction
3629
+  (0.0ms) begin transaction
3630
+  (0.1ms) rollback transaction
3631
+  (0.1ms) begin transaction
3632
+  (0.1ms) rollback transaction
3633
+  (0.1ms) begin transaction
3634
+  (0.1ms) rollback transaction
3635
+  (0.1ms) begin transaction
3636
+  (0.1ms) rollback transaction
3637
+  (0.0ms) begin transaction
3638
+  (0.1ms) rollback transaction
3639
+  (0.1ms) begin transaction
3640
+  (0.1ms) rollback transaction
3641
+  (0.1ms) begin transaction
3642
+  (0.1ms) rollback transaction
3643
+  (0.0ms) begin transaction
3644
+  (0.0ms) rollback transaction
3645
+  (0.0ms) begin transaction
3646
+  (0.1ms) SAVEPOINT active_record_1
3647
+ SQL (5.5ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:05:14 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Thu, 24 Apr 2014 18:05:14 UTC +00:00]]
3648
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3649
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3650
+  (0.0ms) SAVEPOINT active_record_1
3651
+ SQL (0.8ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:05:14 UTC +00:00], ["description", "Deflate every inflatable in the Tri-State Area"], ["name", "Deflate-inator Ray"], ["updated_at", Thu, 24 Apr 2014 18:05:14 UTC +00:00]]
3652
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 2
3653
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3654
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets"
3655
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets"
3656
+  (0.8ms) rollback transaction
3657
+  (0.1ms) begin transaction
3658
+  (0.0ms) SAVEPOINT active_record_1
3659
+ SQL (0.3ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:05:14 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Thu, 24 Apr 2014 18:05:14 UTC +00:00]]
3660
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3661
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3662
+  (0.0ms) SAVEPOINT active_record_1
3663
+ SQL (0.5ms) UPDATE "widgets" SET "description" = ?, "updated_at" = ? WHERE "widgets"."id" = 1 [["description", "Turns people into whiny babies"], ["updated_at", Thu, 24 Apr 2014 18:05:14 UTC +00:00]]
3664
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3665
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3666
+  (0.3ms) rollback transaction
3667
+  (0.1ms) begin transaction
3668
+  (0.0ms) rollback transaction
3669
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3670
+  (0.1ms) begin transaction
3671
+  (0.1ms) rollback transaction
3672
+  (0.0ms) begin transaction
3673
+  (0.1ms) SAVEPOINT active_record_1
3674
+ SQL (4.2ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:06:05 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Thu, 24 Apr 2014 18:06:05 UTC +00:00]]
3675
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3676
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3677
+  (0.1ms) SAVEPOINT active_record_1
3678
+ SQL (1.1ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:06:05 UTC +00:00], ["description", "Deflate every inflatable in the Tri-State Area"], ["name", "Deflate-inator Ray"], ["updated_at", Thu, 24 Apr 2014 18:06:05 UTC +00:00]]
3679
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 2
3680
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3681
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets"
3682
+ Widget Load (0.2ms) SELECT "widgets".* FROM "widgets"
3683
+  (0.5ms) rollback transaction
3684
+  (0.1ms) begin transaction
3685
+  (0.1ms) SAVEPOINT active_record_1
3686
+ SQL (0.4ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:06:05 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Thu, 24 Apr 2014 18:06:05 UTC +00:00]]
3687
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3688
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3689
+  (0.1ms) SAVEPOINT active_record_1
3690
+ SQL (0.4ms) UPDATE "widgets" SET "description" = ?, "updated_at" = ? WHERE "widgets"."id" = 1 [["description", "Turns people into whiny babies"], ["updated_at", Thu, 24 Apr 2014 18:06:05 UTC +00:00]]
3691
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3692
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3693
+  (0.4ms) rollback transaction
3694
+  (0.2ms) begin transaction
3695
+  (0.1ms) rollback transaction
3696
+  (0.0ms) begin transaction
3697
+  (0.1ms) rollback transaction
3698
+  (0.1ms) begin transaction
3699
+  (0.1ms) rollback transaction
3700
+  (0.1ms) begin transaction
3701
+  (0.1ms) rollback transaction
3702
+  (0.1ms) begin transaction
3703
+  (0.1ms) rollback transaction
3704
+  (0.0ms) begin transaction
3705
+  (0.1ms) rollback transaction
3706
+  (0.0ms) begin transaction
3707
+  (0.2ms) rollback transaction
3708
+  (0.1ms) begin transaction
3709
+  (0.1ms) rollback transaction
3710
+  (0.0ms) begin transaction
3711
+  (0.0ms) rollback transaction
3712
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3713
+  (0.1ms) begin transaction
3714
+  (0.1ms) rollback transaction
3715
+  (0.0ms) begin transaction
3716
+  (0.0ms) SAVEPOINT active_record_1
3717
+ SQL (4.7ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:09:53 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Thu, 24 Apr 2014 18:09:53 UTC +00:00]]
3718
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3719
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3720
+  (0.1ms) SAVEPOINT active_record_1
3721
+ SQL (1.1ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:09:53 UTC +00:00], ["description", "Deflate every inflatable in the Tri-State Area"], ["name", "Deflate-inator Ray"], ["updated_at", Thu, 24 Apr 2014 18:09:53 UTC +00:00]]
3722
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 2
3723
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3724
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets"
3725
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets"
3726
+  (0.8ms) rollback transaction
3727
+  (0.1ms) begin transaction
3728
+  (0.1ms) SAVEPOINT active_record_1
3729
+ SQL (0.5ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:09:53 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Thu, 24 Apr 2014 18:09:53 UTC +00:00]]
3730
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3731
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3732
+  (0.0ms) SAVEPOINT active_record_1
3733
+ SQL (0.4ms) UPDATE "widgets" SET "description" = ?, "updated_at" = ? WHERE "widgets"."id" = 1 [["description", "Turns people into whiny babies"], ["updated_at", Thu, 24 Apr 2014 18:09:53 UTC +00:00]]
3734
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3735
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3736
+  (0.6ms) rollback transaction
3737
+  (0.1ms) begin transaction
3738
+  (0.0ms) rollback transaction
3739
+  (0.0ms) begin transaction
3740
+  (0.0ms) rollback transaction
3741
+  (0.1ms) begin transaction
3742
+  (0.1ms) rollback transaction
3743
+  (0.0ms) begin transaction
3744
+  (0.1ms) rollback transaction
3745
+  (0.1ms) begin transaction
3746
+  (0.1ms) rollback transaction
3747
+  (0.1ms) begin transaction
3748
+  (0.1ms) rollback transaction
3749
+  (0.0ms) begin transaction
3750
+  (0.1ms) rollback transaction
3751
+  (0.1ms) begin transaction
3752
+  (0.1ms) rollback transaction
3753
+  (0.0ms) begin transaction
3754
+  (0.0ms) rollback transaction
3755
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3756
+  (0.1ms) begin transaction
3757
+  (0.0ms) SAVEPOINT active_record_1
3758
+ SQL (5.3ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:10:53 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Thu, 24 Apr 2014 18:10:53 UTC +00:00]]
3759
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3760
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3761
+  (0.0ms) SAVEPOINT active_record_1
3762
+ SQL (0.9ms) UPDATE "widgets" SET "description" = ?, "updated_at" = ? WHERE "widgets"."id" = 1 [["description", "Turns people into whiny babies"], ["updated_at", Thu, 24 Apr 2014 18:10:53 UTC +00:00]]
3763
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3764
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3765
+  (0.8ms) rollback transaction
3766
+  (0.1ms) begin transaction
3767
+  (0.1ms) SAVEPOINT active_record_1
3768
+ SQL (0.4ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:10:53 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Thu, 24 Apr 2014 18:10:53 UTC +00:00]]
3769
+ Widget Load (0.2ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3770
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3771
+  (0.0ms) SAVEPOINT active_record_1
3772
+ SQL (0.4ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:10:53 UTC +00:00], ["description", "Deflate every inflatable in the Tri-State Area"], ["name", "Deflate-inator Ray"], ["updated_at", Thu, 24 Apr 2014 18:10:53 UTC +00:00]]
3773
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 2
3774
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3775
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets"
3776
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets"
3777
+  (0.4ms) rollback transaction
3778
+  (0.1ms) begin transaction
3779
+  (0.1ms) rollback transaction
3780
+  (0.1ms) begin transaction
3781
+  (0.1ms) rollback transaction
3782
+  (0.1ms) begin transaction
3783
+  (0.1ms) rollback transaction
3784
+  (0.1ms) begin transaction
3785
+  (0.1ms) rollback transaction
3786
+  (0.0ms) begin transaction
3787
+  (0.0ms) rollback transaction
3788
+  (0.0ms) begin transaction
3789
+  (0.1ms) rollback transaction
3790
+  (0.0ms) begin transaction
3791
+  (0.1ms) rollback transaction
3792
+  (0.0ms) begin transaction
3793
+  (0.1ms) rollback transaction
3794
+  (0.1ms) begin transaction
3795
+  (0.1ms) rollback transaction
3796
+  (0.0ms) begin transaction
3797
+  (0.0ms) rollback transaction
3798
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3799
+  (0.1ms) begin transaction
3800
+  (0.0ms) rollback transaction
3801
+  (0.0ms) begin transaction
3802
+  (0.1ms) rollback transaction
3803
+  (0.1ms) begin transaction
3804
+  (0.1ms) rollback transaction
3805
+  (0.0ms) begin transaction
3806
+  (0.1ms) rollback transaction
3807
+  (0.1ms) begin transaction
3808
+  (0.1ms) rollback transaction
3809
+  (0.1ms) begin transaction
3810
+  (0.1ms) rollback transaction
3811
+  (0.1ms) begin transaction
3812
+  (0.1ms) rollback transaction
3813
+  (0.0ms) begin transaction
3814
+  (0.0ms) rollback transaction
3815
+  (0.0ms) begin transaction
3816
+  (0.0ms) rollback transaction
3817
+  (0.0ms) begin transaction
3818
+  (0.1ms) SAVEPOINT active_record_1
3819
+ SQL (7.1ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:11:40 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Thu, 24 Apr 2014 18:11:40 UTC +00:00]]
3820
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3821
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3822
+  (0.0ms) SAVEPOINT active_record_1
3823
+ SQL (1.1ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:11:41 UTC +00:00], ["description", "Deflate every inflatable in the Tri-State Area"], ["name", "Deflate-inator Ray"], ["updated_at", Thu, 24 Apr 2014 18:11:41 UTC +00:00]]
3824
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 2
3825
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3826
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets"
3827
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets"
3828
+  (0.3ms) rollback transaction
3829
+  (0.1ms) begin transaction
3830
+  (0.1ms) SAVEPOINT active_record_1
3831
+ SQL (0.3ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:11:41 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Thu, 24 Apr 2014 18:11:41 UTC +00:00]]
3832
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3833
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3834
+  (0.0ms) SAVEPOINT active_record_1
3835
+ SQL (0.4ms) UPDATE "widgets" SET "description" = ?, "updated_at" = ? WHERE "widgets"."id" = 1 [["description", "Turns people into whiny babies"], ["updated_at", Thu, 24 Apr 2014 18:11:41 UTC +00:00]]
3836
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3837
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3838
+  (0.4ms) rollback transaction
3839
+  (0.1ms) begin transaction
3840
+  (0.0ms) rollback transaction
3841
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3842
+  (0.1ms) begin transaction
3843
+  (0.1ms) rollback transaction
3844
+  (0.0ms) begin transaction
3845
+  (0.1ms) SAVEPOINT active_record_1
3846
+ SQL (4.2ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:12:08 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Thu, 24 Apr 2014 18:12:08 UTC +00:00]]
3847
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3848
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3849
+  (0.0ms) SAVEPOINT active_record_1
3850
+ SQL (1.6ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:12:08 UTC +00:00], ["description", "Deflate every inflatable in the Tri-State Area"], ["name", "Deflate-inator Ray"], ["updated_at", Thu, 24 Apr 2014 18:12:08 UTC +00:00]]
3851
+ Widget Load (0.2ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 2
3852
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3853
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets"
3854
+ Widget Load (0.2ms) SELECT "widgets".* FROM "widgets"
3855
+  (0.9ms) rollback transaction
3856
+  (0.1ms) begin transaction
3857
+  (0.0ms) SAVEPOINT active_record_1
3858
+ SQL (0.4ms) INSERT INTO "widgets" ("created_at", "description", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 24 Apr 2014 18:12:08 UTC +00:00], ["description", "Turns people into babies"], ["name", "Baby-inator"], ["updated_at", Thu, 24 Apr 2014 18:12:08 UTC +00:00]]
3859
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3860
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3861
+  (0.0ms) SAVEPOINT active_record_1
3862
+ SQL (0.4ms) UPDATE "widgets" SET "description" = ?, "updated_at" = ? WHERE "widgets"."id" = 1 [["description", "Turns people into whiny babies"], ["updated_at", Thu, 24 Apr 2014 18:12:08 UTC +00:00]]
3863
+ Widget Load (0.1ms) SELECT "widgets".* FROM "widgets" WHERE "widgets"."id" = 1
3864
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3865
+  (0.4ms) rollback transaction
3866
+  (0.1ms) begin transaction
3867
+  (0.1ms) rollback transaction
3868
+  (0.1ms) begin transaction
3869
+  (0.1ms) rollback transaction
3870
+  (0.1ms) begin transaction
3871
+  (0.1ms) rollback transaction
3872
+  (0.0ms) begin transaction
3873
+  (0.1ms) rollback transaction
3874
+  (0.0ms) begin transaction
3875
+  (0.1ms) rollback transaction
3876
+  (0.0ms) begin transaction
3877
+  (0.0ms) rollback transaction
3878
+  (0.1ms) begin transaction
3879
+  (0.1ms) rollback transaction
3880
+  (0.1ms) begin transaction
3881
+  (0.0ms) rollback transaction
3882
+  (0.0ms) begin transaction
3883
+  (0.0ms) rollback transaction
@@ -80,11 +80,12 @@ describe ZohoReports::Client do
80
80
  },
81
81
  :body => {
82
82
  'ZOHO_AUTO_IDENTIFY' => 'true',
83
- 'ZOHO_ON_IMPORT_ERROR' => 'ABORT',
83
+ 'ZOHO_ON_IMPORT_ERROR' => 'SETCOLUMNEMPTY',
84
84
  'ZOHO_CREATE_TABLE' => 'false',
85
85
  'ZOHO_IMPORT_TYPE' => 'APPEND',
86
86
  'ZOHO_IMPORT_DATA' => widget.to_json,
87
87
  'ZOHO_IMPORT_FILETYPE' => 'JSON',
88
+ 'ZOHO_DATE_FORMAT' => "yyyy/MM/dd HH:mm:ss Z",
88
89
  'ZOHO_MATCHING_COLUMNS' => 'id',
89
90
  })
90
91
  end
@@ -104,11 +105,12 @@ describe ZohoReports::Client do
104
105
  },
105
106
  :body => {
106
107
  'ZOHO_AUTO_IDENTIFY' => 'true',
107
- 'ZOHO_ON_IMPORT_ERROR' => 'ABORT',
108
+ 'ZOHO_ON_IMPORT_ERROR' => 'SETCOLUMNEMPTY',
108
109
  'ZOHO_CREATE_TABLE' => 'false',
109
110
  'ZOHO_IMPORT_TYPE' => 'UPDATEADD',
110
111
  'ZOHO_IMPORT_DATA' => widget.to_json,
111
112
  'ZOHO_IMPORT_FILETYPE' => 'JSON',
113
+ 'ZOHO_DATE_FORMAT' => "yyyy/MM/dd HH:mm:ss Z",
112
114
  'ZOHO_MATCHING_COLUMNS' => 'id',
113
115
  })
114
116
  end
@@ -131,11 +133,12 @@ describe ZohoReports::Client do
131
133
  },
132
134
  :body => {
133
135
  'ZOHO_AUTO_IDENTIFY' => 'true',
134
- 'ZOHO_ON_IMPORT_ERROR' => 'ABORT',
136
+ 'ZOHO_ON_IMPORT_ERROR' => 'SETCOLUMNEMPTY',
135
137
  'ZOHO_CREATE_TABLE' => 'false',
136
138
  'ZOHO_IMPORT_TYPE' => 'UPDATEADD',
137
139
  'ZOHO_IMPORT_DATA' => widgets.to_json,
138
140
  'ZOHO_IMPORT_FILETYPE' => 'JSON',
141
+ 'ZOHO_DATE_FORMAT' => "yyyy/MM/dd HH:mm:ss Z",
139
142
  'ZOHO_MATCHING_COLUMNS' => 'id',
140
143
  })
141
144
  end
@@ -158,11 +161,12 @@ describe ZohoReports::Client do
158
161
  },
159
162
  :body => {
160
163
  'ZOHO_AUTO_IDENTIFY' => 'true',
161
- 'ZOHO_ON_IMPORT_ERROR' => 'ABORT',
164
+ 'ZOHO_ON_IMPORT_ERROR' => 'SETCOLUMNEMPTY',
162
165
  'ZOHO_CREATE_TABLE' => 'false',
163
166
  'ZOHO_IMPORT_TYPE' => 'UPDATEADD',
164
167
  'ZOHO_IMPORT_DATA' => widgets.to_json,
165
168
  'ZOHO_IMPORT_FILETYPE' => 'JSON',
169
+ 'ZOHO_DATE_FORMAT' => "yyyy/MM/dd HH:mm:ss Z",
166
170
  'ZOHO_MATCHING_COLUMNS' => 'id',
167
171
  })
168
172
  end
@@ -29,12 +29,13 @@ module ZohoReports
29
29
  },
30
30
  :body => query_string({
31
31
  'ZOHO_AUTO_IDENTIFY' => 'true',
32
- 'ZOHO_ON_IMPORT_ERROR' => 'ABORT',
32
+ 'ZOHO_ON_IMPORT_ERROR' => 'SETCOLUMNEMPTY',
33
33
  'ZOHO_CREATE_TABLE' => 'true',
34
34
  'ZOHO_IMPORT_TYPE' => 'UPDATEADD',
35
35
  'ZOHO_IMPORT_DATA' => Widget.all.to_json,
36
36
  'ZOHO_IMPORT_FILETYPE' => 'JSON',
37
37
  'ZOHO_MATCHING_COLUMNS' => 'id',
38
+ 'ZOHO_DATE_FORMAT' => "yyyy/MM/dd HH:mm:ss Z"
38
39
  }))
39
40
  end
40
41
  end
@@ -60,12 +61,13 @@ module ZohoReports
60
61
  },
61
62
  :body => query_string({
62
63
  'ZOHO_AUTO_IDENTIFY' => 'true',
63
- 'ZOHO_ON_IMPORT_ERROR' => 'ABORT',
64
+ 'ZOHO_ON_IMPORT_ERROR' => 'SETCOLUMNEMPTY',
64
65
  'ZOHO_CREATE_TABLE' => 'false',
65
66
  'ZOHO_IMPORT_TYPE' => 'UPDATEADD',
66
67
  'ZOHO_IMPORT_DATA' => [@widget].to_json,
67
68
  'ZOHO_IMPORT_FILETYPE' => 'JSON',
68
69
  'ZOHO_MATCHING_COLUMNS' => 'id',
70
+ 'ZOHO_DATE_FORMAT' => "yyyy/MM/dd HH:mm:ss Z",
69
71
  }))
70
72
  end
71
73
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zoho_reports
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neil Giarratana
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-21 00:00:00.000000000 Z
11
+ date: 2014-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler