code42_api_rails 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c45add59110e012980ff808a973e08ecf78daf8c
4
- data.tar.gz: eea16008c0938e30ad6adca5a9b702aa6c967395
3
+ metadata.gz: 704dada6a51c3c64ea95a90b4173d06a020794af
4
+ data.tar.gz: a90e15ea6b2bbce64683b9fc92bd336d6787790d
5
5
  SHA512:
6
- metadata.gz: 9fd9f7e1f9d3112455a18d43b5378c0757c70421096ba5ec75fbc717f7557421a8c5d242ac3c197db3e23d33b71849b2d31f6babfad564955ed91051dd4b320e
7
- data.tar.gz: 75f318e48b5176ff308ee0bd3bf0e1ea7d7a803c02f320d550d840f62dfd7029af56e3e0ef3998d0929924e370806ccd8d7434d289d23478fe2cfa557ac3220a
6
+ metadata.gz: 765565d82032bea8997e89753828159079babc89b1186b875735a8b81467a1a22efb269eddd5cd098949d649a22ce171909bad3fbd544118f04ead2184aa4f94
7
+ data.tar.gz: 54ce81d2b1ba84053762c6c963bc72c55fe1627574012585693896830892a91cdd29dcfa6b9b2c82e4be083cf084dd27701e769addac97805467b837ba404afa
@@ -16,7 +16,7 @@ Feature: API Response
16
16
  "id": 3,
17
17
  "first_name": "Stephen",
18
18
  "last_name": "Colbert",
19
- "created_at": "2014-01-01T06:00:00.000Z",
20
- "updated_at": "2014-01-01T06:00:00.000Z"
19
+ "created_at": "2014-01-01T06:00:00Z",
20
+ "updated_at": "2014-01-01T06:00:00Z"
21
21
  }
22
22
  """
@@ -2,6 +2,7 @@ module Code42Api
2
2
  class Railtie < Rails::Railtie
3
3
  config.before_initialize do
4
4
  config.active_support.use_standard_json_time_format = true
5
+ ActiveSupport::JSON::Encoding.time_precision = 0
5
6
  end
6
7
  end
7
8
  end
@@ -1,3 +1,3 @@
1
1
  module Code42Api
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -3,6 +3,6 @@ require 'test_helper'
3
3
  class Code42ApiTest < ActiveSupport::TestCase
4
4
  test "time as json returns a iso8601 string" do
5
5
  time = Time.utc(2014,1,1,12,0,0).in_time_zone
6
- assert_equal "2014-01-01T12:00:00.000Z", time.as_json
6
+ assert_equal "2014-01-01T12:00:00Z", time.as_json
7
7
  end
8
8
  end
@@ -1817,6 +1817,109 @@ Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
1817
1817
  SQL (0.0ms) INSERT INTO "authors" ("created_at", "first_name", "id", "last_name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-01-01 06:00:00.000000"], ["first_name", "Stephen"], ["id", 3], ["last_name", "King"], ["updated_at", "2014-01-01 06:00:00.000000"]]
1818
1818
   (0.0ms) RELEASE SAVEPOINT active_record_1
1819
1819
  Started PUT "/authors/3" for 127.0.0.1 at 2014-01-01 06:00:00 UTC
1820
+ Processing by AuthorsController#update as JSON
1821
+ Parameters: {"author"=>{"last_name"=>nil}, "id"=>"3"}
1822
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT 1 [["id", 3]]
1823
+  (0.0ms) SAVEPOINT active_record_1
1824
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1825
+ Completed 422 Unprocessable Entity in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
1826
+  (0.5ms) rollback transaction
1827
+  (0.1ms) begin transaction
1828
+ ---------------------------------------------------------
1829
+ Code42ApiTest: test_time_as_json_returns_a_iso8601_string
1830
+ ---------------------------------------------------------
1831
+  (0.1ms) rollback transaction
1832
+  (0.1ms) begin transaction
1833
+ ------------------------
1834
+ ErrorsTest: test_as_json
1835
+ ------------------------
1836
+  (0.1ms) rollback transaction
1837
+  (0.0ms) begin transaction
1838
+ ---------------------------
1839
+ ErrorsTest: test_error_type
1840
+ ---------------------------
1841
+  (0.1ms) rollback transaction
1842
+  (0.1ms) begin transaction
1843
+ ---------------------------------------------------------
1844
+ Code42ApiTest: test_time_as_json_returns_a_iso8601_string
1845
+ ---------------------------------------------------------
1846
+  (0.0ms) rollback transaction
1847
+  (0.0ms) begin transaction
1848
+ ------------------------
1849
+ ErrorsTest: test_as_json
1850
+ ------------------------
1851
+  (0.1ms) rollback transaction
1852
+  (0.1ms) begin transaction
1853
+ ---------------------------
1854
+ ErrorsTest: test_error_type
1855
+ ---------------------------
1856
+  (0.0ms) rollback transaction
1857
+  (0.1ms) begin transaction
1858
+  (0.1ms) commit transaction
1859
+  (0.0ms) begin transaction
1860
+  (0.0ms) SAVEPOINT active_record_1
1861
+ SQL (0.0ms) INSERT INTO "authors" ("created_at", "first_name", "id", "last_name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-01-01 06:00:00.000000"], ["first_name", "Stephen"], ["id", 3], ["last_name", "King"], ["updated_at", "2014-01-01 06:00:00.000000"]]
1862
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1863
+ Started PUT "/authors/3" for 127.0.0.1 at 2014-01-01 06:00:00 UTC
1864
+ Processing by AuthorsController#update as JSON
1865
+ Parameters: {"author"=>{"last_name"=>"Colbert"}, "id"=>"3"}
1866
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT 1 [["id", 3]]
1867
+  (0.0ms) SAVEPOINT active_record_1
1868
+ SQL (0.0ms) UPDATE "authors" SET "last_name" = ? WHERE "authors"."id" = 3 [["last_name", "Colbert"]]
1869
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1870
+ Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
1871
+  (0.5ms) rollback transaction
1872
+  (0.1ms) begin transaction
1873
+  (0.0ms) commit transaction
1874
+  (0.1ms) begin transaction
1875
+  (0.0ms) SAVEPOINT active_record_1
1876
+ SQL (0.0ms) INSERT INTO "authors" ("created_at", "first_name", "id", "last_name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-01-01 06:00:00.000000"], ["first_name", "Stephen"], ["id", 3], ["last_name", "King"], ["updated_at", "2014-01-01 06:00:00.000000"]]
1877
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1878
+ Started PUT "/authors/3" for 127.0.0.1 at 2014-01-01 06:00:00 UTC
1879
+ Processing by AuthorsController#update as JSON
1880
+ Parameters: {"author"=>{"last_name"=>nil}, "id"=>"3"}
1881
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT 1 [["id", 3]]
1882
+  (0.0ms) SAVEPOINT active_record_1
1883
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1884
+ Completed 422 Unprocessable Entity in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
1885
+  (0.4ms) rollback transaction
1886
+  (0.1ms) begin transaction
1887
+ ------------------------
1888
+ ErrorsTest: test_as_json
1889
+ ------------------------
1890
+  (0.1ms) rollback transaction
1891
+  (0.1ms) begin transaction
1892
+ ---------------------------
1893
+ ErrorsTest: test_error_type
1894
+ ---------------------------
1895
+  (0.0ms) rollback transaction
1896
+  (0.0ms) begin transaction
1897
+ ---------------------------------------------------------
1898
+ Code42ApiTest: test_time_as_json_returns_a_iso8601_string
1899
+ ---------------------------------------------------------
1900
+  (0.0ms) rollback transaction
1901
+  (0.1ms) begin transaction
1902
+  (0.1ms) commit transaction
1903
+  (0.0ms) begin transaction
1904
+  (0.0ms) SAVEPOINT active_record_1
1905
+ SQL (0.0ms) INSERT INTO "authors" ("created_at", "first_name", "id", "last_name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-01-01 06:00:00.000000"], ["first_name", "Stephen"], ["id", 3], ["last_name", "King"], ["updated_at", "2014-01-01 06:00:00.000000"]]
1906
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1907
+ Started PUT "/authors/3" for 127.0.0.1 at 2014-01-01 06:00:00 UTC
1908
+ Processing by AuthorsController#update as JSON
1909
+ Parameters: {"author"=>{"last_name"=>"Colbert"}, "id"=>"3"}
1910
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT 1 [["id", 3]]
1911
+  (0.0ms) SAVEPOINT active_record_1
1912
+ SQL (0.0ms) UPDATE "authors" SET "last_name" = ? WHERE "authors"."id" = 3 [["last_name", "Colbert"]]
1913
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1914
+ Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
1915
+  (0.5ms) rollback transaction
1916
+  (0.1ms) begin transaction
1917
+  (0.0ms) commit transaction
1918
+  (0.0ms) begin transaction
1919
+  (0.0ms) SAVEPOINT active_record_1
1920
+ SQL (0.0ms) INSERT INTO "authors" ("created_at", "first_name", "id", "last_name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-01-01 06:00:00.000000"], ["first_name", "Stephen"], ["id", 3], ["last_name", "King"], ["updated_at", "2014-01-01 06:00:00.000000"]]
1921
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1922
+ Started PUT "/authors/3" for 127.0.0.1 at 2014-01-01 06:00:00 UTC
1820
1923
  Processing by AuthorsController#update as JSON
1821
1924
  Parameters: {"author"=>{"last_name"=>nil}, "id"=>"3"}
1822
1925
  Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT 1 [["id", 3]]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: code42_api_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Colgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-25 00:00:00.000000000 Z
11
+ date: 2014-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails