ember_serialize 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ember_serialize.rb +2 -1
- data/lib/ember_serialize/version.rb +1 -1
- data/test/dummy/app/assets/javascripts/models/default/post.js.coffee +1 -1
- data/test/dummy/app/assets/javascripts/models/post.js.coffee +1 -1
- data/test/dummy/app/assets/javascripts/models/tests/async.js.coffee +1 -1
- data/test/dummy/app/assets/javascripts/models/tests/async_parse.js.coffee +1 -1
- data/test/dummy/app/assets/javascripts/models/tests/find_existing.js.coffee +1 -1
- data/test/dummy/app/assets/javascripts/models/tests/ignore.js.coffee +1 -1
- data/test/dummy/app/assets/javascripts/models/tests/ignore_id.js.coffee +1 -1
- data/test/dummy/app/assets/javascripts/models/tests/ignore_outside.js.coffee +1 -1
- data/test/dummy/log/test.log +393 -0
- data/test/ember_serialize_test.rb +6 -6
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69ccc3471a52b442d9fb38daaa0e8de01078b949
|
4
|
+
data.tar.gz: 946427a20cab44780be6173e1f1b4a553a29c568
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fb5de05a21f861b8012dca478ac6cf8abc5d4b74ceed51fb752934bc4e63ed9be32d531130933c4212b5176d30635a49ec1f30e279aa18b2112376b55c406a3
|
7
|
+
data.tar.gz: 1be336db47ea845e084a4f5fc964a1b7181f94252a811bdc96b5cdbc7c7c51f771ce6300ded4c9fa04f8ce6b1fa80ff7c8dd6683457c6e5ea6cbd267287a473f
|
data/lib/ember_serialize.rb
CHANGED
@@ -127,7 +127,8 @@ MODEL
|
|
127
127
|
if existing[camel_name].to_s =~ /hasMany/
|
128
128
|
existing[camel_name]
|
129
129
|
else
|
130
|
-
|
130
|
+
assoc_name = assoc.table_name.singularize
|
131
|
+
"#{indent}#{camel_name}: DS.hasMany('#{assoc_name}'#{_async})"
|
131
132
|
end
|
132
133
|
end
|
133
134
|
else
|
@@ -5,6 +5,6 @@ EmberSerialize.Post = DS.Model.extend
|
|
5
5
|
# ember_serialize:async false
|
6
6
|
title: DS.attr('string'),
|
7
7
|
body: DS.attr('text'),
|
8
|
-
comments: DS.hasMany('
|
8
|
+
comments: DS.hasMany('comment')
|
9
9
|
# ember_serialize:end
|
10
10
|
authorDude: DS.belongsTo('user',{inverse: 'ignore_outside'}),
|
data/test/dummy/log/test.log
CHANGED
@@ -17661,5 +17661,398 @@ EmberSerializeTest: test_setting_ignore
|
|
17661
17661
|
[1m[35m (0.1ms)[0m begin transaction
|
17662
17662
|
------------------------------------------------
|
17663
17663
|
EmberSerializeTest: test_skips_or_creates_models
|
17664
|
+
------------------------------------------------
|
17665
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17666
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.6ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
17667
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17668
|
+
-----------------------------------------------
|
17669
|
+
EmberSerializeTest: test_accepts_async_argument
|
17670
|
+
-----------------------------------------------
|
17671
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17672
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17673
|
+
------------------------------------------------
|
17674
|
+
EmberSerializeTest: test_accepts_engine_argument
|
17675
|
+
------------------------------------------------
|
17676
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17677
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17678
|
+
---------------------------------
|
17679
|
+
EmberSerializeTest: test_app_name
|
17680
|
+
---------------------------------
|
17681
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17682
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17683
|
+
-------------------------------------
|
17684
|
+
EmberSerializeTest: test_builds_model
|
17685
|
+
-------------------------------------
|
17686
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
17687
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17688
|
+
--------------------------------------
|
17689
|
+
EmberSerializeTest: test_camelize_name
|
17690
|
+
--------------------------------------
|
17691
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17692
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17693
|
+
--------------------------------------------------------------------------
|
17694
|
+
EmberSerializeTest: test_does_not_throw_NameError_on_ApplicationSerializer
|
17695
|
+
--------------------------------------------------------------------------
|
17696
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17697
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17698
|
+
------------------------------------
|
17699
|
+
EmberSerializeTest: test_ember_model
|
17700
|
+
------------------------------------
|
17701
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17702
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17703
|
+
------------------------------------------------
|
17704
|
+
EmberSerializeTest: test_ember_reflect_attribute
|
17705
|
+
------------------------------------------------
|
17706
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17707
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17708
|
+
-------------------------------------------------
|
17709
|
+
EmberSerializeTest: test_ember_reflect_belongs_to
|
17710
|
+
-------------------------------------------------
|
17711
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17712
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17713
|
+
-----------------------------------------------
|
17714
|
+
EmberSerializeTest: test_ember_reflect_has_many
|
17715
|
+
-----------------------------------------------
|
17716
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
17717
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17718
|
+
----------------------------------
|
17719
|
+
EmberSerializeTest: test_existence
|
17720
|
+
----------------------------------
|
17721
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17722
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17723
|
+
----------------------------------
|
17724
|
+
EmberSerializeTest: test_ignore_id
|
17725
|
+
----------------------------------
|
17726
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17727
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17728
|
+
-----------------------------------
|
17729
|
+
EmberSerializeTest: test_initialize
|
17730
|
+
-----------------------------------
|
17731
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17732
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17733
|
+
----------------------------------------------
|
17734
|
+
EmberSerializeTest: test_makes_model_directory
|
17735
|
+
----------------------------------------------
|
17736
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17737
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17738
|
+
----------------------------------------------
|
17739
|
+
EmberSerializeTest: test_parses_async_argument
|
17740
|
+
----------------------------------------------
|
17741
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17742
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17743
|
+
-------------------------------------
|
17744
|
+
EmberSerializeTest: test_parses_model
|
17745
|
+
-------------------------------------
|
17746
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
17747
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17748
|
+
------------------------------------------------
|
17749
|
+
EmberSerializeTest: test_serialize_as_is_setting
|
17750
|
+
------------------------------------------------
|
17751
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17752
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17753
|
+
-----------------------------------------------------
|
17754
|
+
EmberSerializeTest: test_serialize_finds_associations
|
17755
|
+
-----------------------------------------------------
|
17756
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17757
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17758
|
+
-------------------------------------------------
|
17759
|
+
EmberSerializeTest: test_serialize_finds_existing
|
17760
|
+
-------------------------------------------------
|
17761
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17762
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17763
|
+
-------------------------------------------------
|
17764
|
+
EmberSerializeTest: test_serialize_ignore_setting
|
17765
|
+
-------------------------------------------------
|
17766
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17767
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17768
|
+
--------------------------------------------------
|
17769
|
+
EmberSerializeTest: test_serialize_ignores_outside
|
17770
|
+
--------------------------------------------------
|
17771
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17772
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17773
|
+
---------------------------------------------------
|
17774
|
+
EmberSerializeTest: test_serializes_match_parameter
|
17775
|
+
---------------------------------------------------
|
17776
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17777
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17778
|
+
--------------------------------------
|
17779
|
+
EmberSerializeTest: test_setting_as_is
|
17780
|
+
--------------------------------------
|
17781
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17782
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17783
|
+
--------------------------------------
|
17784
|
+
EmberSerializeTest: test_setting_async
|
17785
|
+
--------------------------------------
|
17786
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17787
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17788
|
+
---------------------------------------
|
17789
|
+
EmberSerializeTest: test_setting_ignore
|
17790
|
+
---------------------------------------
|
17791
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17792
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17793
|
+
------------------------------------------------
|
17794
|
+
EmberSerializeTest: test_skips_or_creates_models
|
17795
|
+
------------------------------------------------
|
17796
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17797
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
17798
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17799
|
+
-----------------------------------------------
|
17800
|
+
EmberSerializeTest: test_accepts_async_argument
|
17801
|
+
-----------------------------------------------
|
17802
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17803
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17804
|
+
------------------------------------------------
|
17805
|
+
EmberSerializeTest: test_accepts_engine_argument
|
17806
|
+
------------------------------------------------
|
17807
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17808
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17809
|
+
---------------------------------
|
17810
|
+
EmberSerializeTest: test_app_name
|
17811
|
+
---------------------------------
|
17812
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17813
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17814
|
+
-------------------------------------
|
17815
|
+
EmberSerializeTest: test_builds_model
|
17816
|
+
-------------------------------------
|
17817
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17818
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17819
|
+
--------------------------------------
|
17820
|
+
EmberSerializeTest: test_camelize_name
|
17821
|
+
--------------------------------------
|
17822
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17823
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17824
|
+
--------------------------------------------------------------------------
|
17825
|
+
EmberSerializeTest: test_does_not_throw_NameError_on_ApplicationSerializer
|
17826
|
+
--------------------------------------------------------------------------
|
17827
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17828
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17829
|
+
------------------------------------
|
17830
|
+
EmberSerializeTest: test_ember_model
|
17831
|
+
------------------------------------
|
17832
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17833
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17834
|
+
------------------------------------------------
|
17835
|
+
EmberSerializeTest: test_ember_reflect_attribute
|
17836
|
+
------------------------------------------------
|
17837
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17838
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17839
|
+
-------------------------------------------------
|
17840
|
+
EmberSerializeTest: test_ember_reflect_belongs_to
|
17841
|
+
-------------------------------------------------
|
17842
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17843
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17844
|
+
-----------------------------------------------
|
17845
|
+
EmberSerializeTest: test_ember_reflect_has_many
|
17846
|
+
-----------------------------------------------
|
17847
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17848
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17849
|
+
----------------------------------
|
17850
|
+
EmberSerializeTest: test_existence
|
17851
|
+
----------------------------------
|
17852
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17853
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17854
|
+
----------------------------------
|
17855
|
+
EmberSerializeTest: test_ignore_id
|
17856
|
+
----------------------------------
|
17857
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17858
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17859
|
+
-----------------------------------
|
17860
|
+
EmberSerializeTest: test_initialize
|
17861
|
+
-----------------------------------
|
17862
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17863
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17864
|
+
----------------------------------------------
|
17865
|
+
EmberSerializeTest: test_makes_model_directory
|
17866
|
+
----------------------------------------------
|
17867
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17868
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17869
|
+
----------------------------------------------
|
17870
|
+
EmberSerializeTest: test_parses_async_argument
|
17871
|
+
----------------------------------------------
|
17872
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17873
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17874
|
+
-------------------------------------
|
17875
|
+
EmberSerializeTest: test_parses_model
|
17876
|
+
-------------------------------------
|
17877
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
17878
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17879
|
+
------------------------------------------------
|
17880
|
+
EmberSerializeTest: test_serialize_as_is_setting
|
17881
|
+
------------------------------------------------
|
17882
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17883
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17884
|
+
-----------------------------------------------------
|
17885
|
+
EmberSerializeTest: test_serialize_finds_associations
|
17886
|
+
-----------------------------------------------------
|
17887
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17888
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17889
|
+
-------------------------------------------------
|
17890
|
+
EmberSerializeTest: test_serialize_finds_existing
|
17891
|
+
-------------------------------------------------
|
17892
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17893
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17894
|
+
-------------------------------------------------
|
17895
|
+
EmberSerializeTest: test_serialize_ignore_setting
|
17896
|
+
-------------------------------------------------
|
17897
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17898
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17899
|
+
--------------------------------------------------
|
17900
|
+
EmberSerializeTest: test_serialize_ignores_outside
|
17901
|
+
--------------------------------------------------
|
17902
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17903
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17904
|
+
---------------------------------------------------
|
17905
|
+
EmberSerializeTest: test_serializes_match_parameter
|
17906
|
+
---------------------------------------------------
|
17907
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17908
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17909
|
+
--------------------------------------
|
17910
|
+
EmberSerializeTest: test_setting_as_is
|
17911
|
+
--------------------------------------
|
17912
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
17913
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17914
|
+
--------------------------------------
|
17915
|
+
EmberSerializeTest: test_setting_async
|
17916
|
+
--------------------------------------
|
17917
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17918
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17919
|
+
---------------------------------------
|
17920
|
+
EmberSerializeTest: test_setting_ignore
|
17921
|
+
---------------------------------------
|
17922
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17923
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17924
|
+
------------------------------------------------
|
17925
|
+
EmberSerializeTest: test_skips_or_creates_models
|
17926
|
+
------------------------------------------------
|
17927
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17928
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
17929
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17930
|
+
-----------------------------------------------
|
17931
|
+
EmberSerializeTest: test_accepts_async_argument
|
17932
|
+
-----------------------------------------------
|
17933
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17934
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17935
|
+
------------------------------------------------
|
17936
|
+
EmberSerializeTest: test_accepts_engine_argument
|
17937
|
+
------------------------------------------------
|
17938
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17939
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17940
|
+
---------------------------------
|
17941
|
+
EmberSerializeTest: test_app_name
|
17942
|
+
---------------------------------
|
17943
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17944
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17945
|
+
-------------------------------------
|
17946
|
+
EmberSerializeTest: test_builds_model
|
17947
|
+
-------------------------------------
|
17948
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17949
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17950
|
+
--------------------------------------
|
17951
|
+
EmberSerializeTest: test_camelize_name
|
17952
|
+
--------------------------------------
|
17953
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17954
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17955
|
+
--------------------------------------------------------------------------
|
17956
|
+
EmberSerializeTest: test_does_not_throw_NameError_on_ApplicationSerializer
|
17957
|
+
--------------------------------------------------------------------------
|
17958
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17959
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17960
|
+
------------------------------------
|
17961
|
+
EmberSerializeTest: test_ember_model
|
17962
|
+
------------------------------------
|
17963
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17964
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17965
|
+
------------------------------------------------
|
17966
|
+
EmberSerializeTest: test_ember_reflect_attribute
|
17967
|
+
------------------------------------------------
|
17968
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17969
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17970
|
+
-------------------------------------------------
|
17971
|
+
EmberSerializeTest: test_ember_reflect_belongs_to
|
17972
|
+
-------------------------------------------------
|
17973
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17974
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17975
|
+
-----------------------------------------------
|
17976
|
+
EmberSerializeTest: test_ember_reflect_has_many
|
17977
|
+
-----------------------------------------------
|
17978
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17979
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17980
|
+
----------------------------------
|
17981
|
+
EmberSerializeTest: test_existence
|
17982
|
+
----------------------------------
|
17983
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17984
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17985
|
+
----------------------------------
|
17986
|
+
EmberSerializeTest: test_ignore_id
|
17987
|
+
----------------------------------
|
17988
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17989
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17990
|
+
-----------------------------------
|
17991
|
+
EmberSerializeTest: test_initialize
|
17992
|
+
-----------------------------------
|
17993
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17994
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17995
|
+
----------------------------------------------
|
17996
|
+
EmberSerializeTest: test_makes_model_directory
|
17997
|
+
----------------------------------------------
|
17998
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17999
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18000
|
+
----------------------------------------------
|
18001
|
+
EmberSerializeTest: test_parses_async_argument
|
18002
|
+
----------------------------------------------
|
18003
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18004
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18005
|
+
-------------------------------------
|
18006
|
+
EmberSerializeTest: test_parses_model
|
18007
|
+
-------------------------------------
|
18008
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18009
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18010
|
+
------------------------------------------------
|
18011
|
+
EmberSerializeTest: test_serialize_as_is_setting
|
18012
|
+
------------------------------------------------
|
18013
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18014
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18015
|
+
-----------------------------------------------------
|
18016
|
+
EmberSerializeTest: test_serialize_finds_associations
|
18017
|
+
-----------------------------------------------------
|
18018
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18019
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18020
|
+
-------------------------------------------------
|
18021
|
+
EmberSerializeTest: test_serialize_finds_existing
|
18022
|
+
-------------------------------------------------
|
18023
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18024
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18025
|
+
-------------------------------------------------
|
18026
|
+
EmberSerializeTest: test_serialize_ignore_setting
|
18027
|
+
-------------------------------------------------
|
18028
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18029
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18030
|
+
--------------------------------------------------
|
18031
|
+
EmberSerializeTest: test_serialize_ignores_outside
|
18032
|
+
--------------------------------------------------
|
18033
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18034
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18035
|
+
---------------------------------------------------
|
18036
|
+
EmberSerializeTest: test_serializes_match_parameter
|
18037
|
+
---------------------------------------------------
|
18038
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18039
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18040
|
+
--------------------------------------
|
18041
|
+
EmberSerializeTest: test_setting_as_is
|
18042
|
+
--------------------------------------
|
18043
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18044
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18045
|
+
--------------------------------------
|
18046
|
+
EmberSerializeTest: test_setting_async
|
18047
|
+
--------------------------------------
|
18048
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18049
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18050
|
+
---------------------------------------
|
18051
|
+
EmberSerializeTest: test_setting_ignore
|
18052
|
+
---------------------------------------
|
18053
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18054
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18055
|
+
------------------------------------------------
|
18056
|
+
EmberSerializeTest: test_skips_or_creates_models
|
17664
18057
|
------------------------------------------------
|
17665
18058
|
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
@@ -132,21 +132,21 @@ WITHOUTEM
|
|
132
132
|
end
|
133
133
|
|
134
134
|
test "ember_reflect has_many" do
|
135
|
-
assert_equal ["posts", " posts: DS.hasMany('
|
136
|
-
assert_equal ["posts", " posts: DS.hasMany('
|
137
|
-
assert_equal ["posts", " posts: DS.hasMany('
|
135
|
+
assert_equal ["posts", " posts: DS.hasMany('post')"], @serializer.ember_reflect(User, :posts, :has_many, false, {}, ' '), 'has_many'
|
136
|
+
assert_equal ["posts", " posts: DS.hasMany('post', {async: true})"], @serializer.ember_reflect(User, :posts, :has_many, true, {}, ' '), 'has_many async true'
|
137
|
+
assert_equal ["posts", " posts: DS.hasMany('post', {inverse: 'lemoo'})"], @serializer.ember_reflect(User, :posts, :has_many, false, {'posts' => " posts: DS.hasMany('post', {inverse: 'lemoo'})"}, ' '), 'has_many existing'
|
138
138
|
end
|
139
139
|
|
140
140
|
test "parses model" do
|
141
141
|
revert_models
|
142
|
-
match = [["# for more details see: http://emberjs.com/guides/models/defining-models/", "", "EmberSerialize.Post = DS.Model.extend", " # ember_serialize:start", " title: DS.attr('string'),", " body: DS.attr('text'),", " comments: DS.hasMany('
|
142
|
+
match = [["# for more details see: http://emberjs.com/guides/models/defining-models/", "", "EmberSerialize.Post = DS.Model.extend", " # ember_serialize:start", " title: DS.attr('string'),", " body: DS.attr('text'),", " comments: DS.hasMany('comment')", " # ember_serialize:end"], 3, 7, {"title"=>" title: DS.attr('string')", "body"=>" body: DS.attr('text')", "comments"=>" comments: DS.hasMany('comment')"}, [], [], true, " "]
|
143
143
|
result = @serializer.ember_model_parse "#{@mdir}post.js.coffee", Post
|
144
144
|
assert_equal match, result, 'ember_model_parse'
|
145
145
|
end
|
146
146
|
|
147
147
|
test "builds model" do
|
148
148
|
ams = ActiveModel::Serializer.descendants.sort_by(&:name)[2]
|
149
|
-
args = [["# for more details see: http://emberjs.com/guides/models/defining-models/", "", "EmberSerialize.Post = DS.Model.extend", " # ember_serialize:start", " # ember_serialize:async false", " id: DS.attr('integer'),", " title: DS.attr('string'),", " body: DS.attr('text'),", " authorDude: DS.belongsTo('user'),", " comments: DS.hasMany('
|
149
|
+
args = [["# for more details see: http://emberjs.com/guides/models/defining-models/", "", "EmberSerialize.Post = DS.Model.extend", " # ember_serialize:start", " # ember_serialize:async false", " id: DS.attr('integer'),", " title: DS.attr('string'),", " body: DS.attr('text'),", " authorDude: DS.belongsTo('user'),", " comments: DS.hasMany('comment')", " # ember_serialize:end"], 3, 10, {"id"=>" id: DS.attr('integer')", "title"=>" title: DS.attr('string')", "body"=>" body: DS.attr('text')", "authorDude"=>" authorDude: DS.belongsTo('user')", "comments"=>" comments: DS.hasMany('comment')"}, [], [], false, " "]
|
150
150
|
match = "# for more details see: http://emberjs.com/guides/models/defining-models/
|
151
151
|
|
152
152
|
EmberSerialize.Post = DS.Model.extend
|
@@ -156,7 +156,7 @@ EmberSerialize.Post = DS.Model.extend
|
|
156
156
|
body: DS.attr('text'),
|
157
157
|
createdAt: DS.attr('date'),
|
158
158
|
authorDude: DS.belongsTo('user'),
|
159
|
-
comments: DS.hasMany('
|
159
|
+
comments: DS.hasMany('comment')
|
160
160
|
# ember_serialize:end"
|
161
161
|
result = @serializer.ember_model_build @serializer.schema(ams),
|
162
162
|
Post, args
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ember_serialize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noel Peden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -102,13 +102,15 @@ executables: []
|
|
102
102
|
extensions: []
|
103
103
|
extra_rdoc_files: []
|
104
104
|
files:
|
105
|
+
- MIT-LICENSE
|
106
|
+
- Rakefile
|
107
|
+
- lib/ember_serialize.rb
|
105
108
|
- lib/ember_serialize/railtie.rb
|
106
109
|
- lib/ember_serialize/version.rb
|
107
|
-
- lib/ember_serialize.rb
|
108
110
|
- lib/tasks/ember_serialize_tasks.rake
|
109
|
-
- MIT-LICENSE
|
110
|
-
- Rakefile
|
111
111
|
- test/ci.sh
|
112
|
+
- test/dummy/README.rdoc
|
113
|
+
- test/dummy/Rakefile
|
112
114
|
- test/dummy/app/assets/javascripts/application.js.coffee
|
113
115
|
- test/dummy/app/assets/javascripts/models/comment.js.coffee
|
114
116
|
- test/dummy/app/assets/javascripts/models/default/comment.js.coffee
|
@@ -138,6 +140,7 @@ files:
|
|
138
140
|
- test/dummy/bin/bundle
|
139
141
|
- test/dummy/bin/rails
|
140
142
|
- test/dummy/bin/rake
|
143
|
+
- test/dummy/config.ru
|
141
144
|
- test/dummy/config/application.rb
|
142
145
|
- test/dummy/config/boot.rb
|
143
146
|
- test/dummy/config/database.yml
|
@@ -156,7 +159,6 @@ files:
|
|
156
159
|
- test/dummy/config/locales/en.yml
|
157
160
|
- test/dummy/config/routes.rb
|
158
161
|
- test/dummy/config/secrets.yml
|
159
|
-
- test/dummy/config.ru
|
160
162
|
- test/dummy/db/development.sqlite3
|
161
163
|
- test/dummy/db/migrate/20140825151402_create_users.rb
|
162
164
|
- test/dummy/db/migrate/20140825151509_create_posts.rb
|
@@ -170,8 +172,6 @@ files:
|
|
170
172
|
- test/dummy/public/422.html
|
171
173
|
- test/dummy/public/500.html
|
172
174
|
- test/dummy/public/favicon.ico
|
173
|
-
- test/dummy/Rakefile
|
174
|
-
- test/dummy/README.rdoc
|
175
175
|
- test/dummy/tmp/ember-rails/ember-data.js
|
176
176
|
- test/dummy/tmp/ember-rails/ember.js
|
177
177
|
- test/ember_serialize_test.rb
|
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
198
|
rubyforge_project:
|
199
|
-
rubygems_version: 2.
|
199
|
+
rubygems_version: 2.2.2
|
200
200
|
signing_key:
|
201
201
|
specification_version: 4
|
202
202
|
summary: Generate ember models from Rails serializers
|