ember_serialize 0.0.4 → 0.0.5

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: d074ed0b07539c6d5cd680795d55bf40fb6e7ff8
4
- data.tar.gz: 5cee729773922c0e2834d1a9bf64658e1a8271e0
3
+ metadata.gz: a63e00e60fd0504935cc7d5d6295b3a063e09bf6
4
+ data.tar.gz: 0df2489b9ca6599caa25074e2b7e754d211e9931
5
5
  SHA512:
6
- metadata.gz: 72932d3e1bc697ace1a10fdfdf28c740d723340a023cd566c858f76ef7204a54e96f44a06b49b4fcb863a9ab401016ad478fe8a5deec00e757d01caabd2964f6
7
- data.tar.gz: 384010b62a3e9876f8a45608d53111e57cb247f71f6e1cc2644cfc95e59d0354930da48b3821b3500cd5ab881ba6b6b4ac28946ee979da1bbf57354fbd49dd48
6
+ metadata.gz: 7e79e24606521a5bf1348960d0fcff493a6c4d26916a0a82d69ebb2403b629ec1cf9f75afe39fc7d5cd43d0c010d662208fb18d2c59616ee5c364bbf039f22f9
7
+ data.tar.gz: f4f5abeb10131ee42b2f1478db29a0f73d669b6be5b746d46cfb853e2f3287e20eb1bdb40326130f9b53bfbc7d4811b3a29dfede6abc553911283788100a90b7
@@ -1,3 +1,3 @@
1
1
  module EmberSerialize
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -45,8 +45,9 @@ module EmberSerialize
45
45
  if match
46
46
  next unless serializer.name =~ /^#{match}/
47
47
  end
48
- schema = schema serializer
49
48
  model = model_class serializer
49
+ next unless model
50
+ schema = schema serializer
50
51
  ember_model_file = @models_dir + model.table_name.singularize + @extension
51
52
  new_content = ember_model_build(schema, model, ember_model_parse(ember_model_file, model))
52
53
  if new_content
@@ -228,7 +229,11 @@ MODEL
228
229
 
229
230
  def model_class(serializer)
230
231
  if serializer.respond_to? :model_class
231
- return serializer.model_class
232
+ begin
233
+ return serializer.model_class
234
+ rescue NameError
235
+ return nil
236
+ end
232
237
  end
233
238
  @model_classes ||= Hash.new do |h,k|
234
239
  h[k] = k.name.gsub(/Serializer$/,'').constantize
@@ -0,0 +1,3 @@
1
+ class ApplicationSerializer < ActiveModel::Serializer
2
+ attributes :id
3
+ end
@@ -1,4 +1,4 @@
1
- class CommentSerializer < ActiveModel::Serializer
1
+ class CommentSerializer < ApplicationSerializer
2
2
  attributes :id, :title, :body, :post_id
3
3
  has_one :author, class_name: 'User'
4
4
  end
@@ -1,4 +1,4 @@
1
- class PostSerializer < ActiveModel::Serializer
1
+ class PostSerializer < ApplicationSerializer
2
2
  attributes :id, :title, :body
3
3
  has_one :author_dude, class_name: 'User'
4
4
  has_many :comments
@@ -1,3 +1,3 @@
1
- class UserSerializer < ActiveModel::Serializer
1
+ class UserSerializer < ApplicationSerializer
2
2
  attributes :id, :name
3
3
  end
@@ -12323,3 +12323,442 @@ EmberSerializeTest: test_serializes_match_parameter
12323
12323
  EmberSerializeTest: test_skips_or_creates_models
12324
12324
  ------------------------------------------------
12325
12325
   (0.2ms) rollback transaction
12326
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
12327
+  (0.1ms) begin transaction
12328
+ -----------------------------------------------
12329
+ EmberSerializeTest: test_accepts_async_argument
12330
+ -----------------------------------------------
12331
+  (0.1ms) rollback transaction
12332
+  (0.0ms) begin transaction
12333
+ ------------------------------------------------
12334
+ EmberSerializeTest: test_accepts_engine_argument
12335
+ ------------------------------------------------
12336
+  (0.1ms) rollback transaction
12337
+  (0.0ms) begin transaction
12338
+ ---------------------------------
12339
+ EmberSerializeTest: test_app_name
12340
+ ---------------------------------
12341
+  (0.1ms) rollback transaction
12342
+  (0.1ms) begin transaction
12343
+ -------------------------------------
12344
+ EmberSerializeTest: test_builds_model
12345
+ -------------------------------------
12346
+  (0.2ms) rollback transaction
12347
+  (0.1ms) begin transaction
12348
+ --------------------------------------
12349
+ EmberSerializeTest: test_camelize_name
12350
+ --------------------------------------
12351
+  (0.1ms) rollback transaction
12352
+  (0.0ms) begin transaction
12353
+ ------------------------------------
12354
+ EmberSerializeTest: test_ember_model
12355
+ ------------------------------------
12356
+  (0.0ms) rollback transaction
12357
+  (0.1ms) begin transaction
12358
+ ------------------------------------------------
12359
+ EmberSerializeTest: test_ember_reflect_attribute
12360
+ ------------------------------------------------
12361
+  (0.1ms) rollback transaction
12362
+  (0.0ms) begin transaction
12363
+ -------------------------------------------------
12364
+ EmberSerializeTest: test_ember_reflect_belongs_to
12365
+ -------------------------------------------------
12366
+  (0.1ms) rollback transaction
12367
+  (0.1ms) begin transaction
12368
+ -----------------------------------------------
12369
+ EmberSerializeTest: test_ember_reflect_has_many
12370
+ -----------------------------------------------
12371
+  (0.0ms) rollback transaction
12372
+  (0.1ms) begin transaction
12373
+ ----------------------------------
12374
+ EmberSerializeTest: test_existence
12375
+ ----------------------------------
12376
+  (0.0ms) rollback transaction
12377
+  (0.0ms) begin transaction
12378
+ -----------------------------------
12379
+ EmberSerializeTest: test_initialize
12380
+ -----------------------------------
12381
+  (0.0ms) rollback transaction
12382
+  (0.1ms) begin transaction
12383
+ ----------------------------------------------
12384
+ EmberSerializeTest: test_makes_model_directory
12385
+ ----------------------------------------------
12386
+  (0.1ms) rollback transaction
12387
+  (0.0ms) begin transaction
12388
+ ----------------------------------------------
12389
+ EmberSerializeTest: test_parses_async_argument
12390
+ ----------------------------------------------
12391
+  (0.1ms) rollback transaction
12392
+  (0.1ms) begin transaction
12393
+ -------------------------------------
12394
+ EmberSerializeTest: test_parses_model
12395
+ -------------------------------------
12396
+  (0.1ms) rollback transaction
12397
+  (0.1ms) begin transaction
12398
+ ------------------------------------------------
12399
+ EmberSerializeTest: test_serialize_as_is_setting
12400
+ ------------------------------------------------
12401
+  (0.1ms) rollback transaction
12402
+  (0.1ms) begin transaction
12403
+ -----------------------------------------------------
12404
+ EmberSerializeTest: test_serialize_finds_associations
12405
+ -----------------------------------------------------
12406
+  (0.1ms) rollback transaction
12407
+  (0.1ms) begin transaction
12408
+ -------------------------------------------------
12409
+ EmberSerializeTest: test_serialize_finds_existing
12410
+ -------------------------------------------------
12411
+  (0.1ms) rollback transaction
12412
+  (0.1ms) begin transaction
12413
+ -------------------------------------------------
12414
+ EmberSerializeTest: test_serialize_ignore_setting
12415
+ -------------------------------------------------
12416
+  (0.1ms) rollback transaction
12417
+  (0.1ms) begin transaction
12418
+ --------------------------------------------------
12419
+ EmberSerializeTest: test_serialize_ignores_outside
12420
+ --------------------------------------------------
12421
+  (0.1ms) rollback transaction
12422
+  (0.1ms) begin transaction
12423
+ ---------------------------------------------------
12424
+ EmberSerializeTest: test_serializes_match_parameter
12425
+ ---------------------------------------------------
12426
+  (0.1ms) rollback transaction
12427
+  (0.1ms) begin transaction
12428
+ ------------------------------------------------
12429
+ EmberSerializeTest: test_skips_or_creates_models
12430
+ ------------------------------------------------
12431
+  (0.1ms) rollback transaction
12432
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
12433
+  (0.1ms) begin transaction
12434
+ -----------------------------------------------
12435
+ EmberSerializeTest: test_accepts_async_argument
12436
+ -----------------------------------------------
12437
+  (0.2ms) rollback transaction
12438
+  (0.1ms) begin transaction
12439
+ ------------------------------------------------
12440
+ EmberSerializeTest: test_accepts_engine_argument
12441
+ ------------------------------------------------
12442
+  (0.1ms) rollback transaction
12443
+  (0.1ms) begin transaction
12444
+ ---------------------------------
12445
+ EmberSerializeTest: test_app_name
12446
+ ---------------------------------
12447
+  (0.0ms) rollback transaction
12448
+  (0.1ms) begin transaction
12449
+ -------------------------------------
12450
+ EmberSerializeTest: test_builds_model
12451
+ -------------------------------------
12452
+  (0.2ms) rollback transaction
12453
+  (0.1ms) begin transaction
12454
+ --------------------------------------
12455
+ EmberSerializeTest: test_camelize_name
12456
+ --------------------------------------
12457
+  (0.1ms) rollback transaction
12458
+  (0.1ms) begin transaction
12459
+ --------------------------------------------------------------------------
12460
+ EmberSerializeTest: test_does_not_throw_NameError_on_ApplicationSerializer
12461
+ --------------------------------------------------------------------------
12462
+  (0.1ms) rollback transaction
12463
+  (0.1ms) begin transaction
12464
+ ------------------------------------
12465
+ EmberSerializeTest: test_ember_model
12466
+ ------------------------------------
12467
+  (0.0ms) rollback transaction
12468
+  (0.0ms) begin transaction
12469
+ ------------------------------------------------
12470
+ EmberSerializeTest: test_ember_reflect_attribute
12471
+ ------------------------------------------------
12472
+  (0.1ms) rollback transaction
12473
+  (0.1ms) begin transaction
12474
+ -------------------------------------------------
12475
+ EmberSerializeTest: test_ember_reflect_belongs_to
12476
+ -------------------------------------------------
12477
+  (0.1ms) rollback transaction
12478
+  (0.1ms) begin transaction
12479
+ -----------------------------------------------
12480
+ EmberSerializeTest: test_ember_reflect_has_many
12481
+ -----------------------------------------------
12482
+  (0.1ms) rollback transaction
12483
+  (0.0ms) begin transaction
12484
+ ----------------------------------
12485
+ EmberSerializeTest: test_existence
12486
+ ----------------------------------
12487
+  (0.1ms) rollback transaction
12488
+  (0.1ms) begin transaction
12489
+ -----------------------------------
12490
+ EmberSerializeTest: test_initialize
12491
+ -----------------------------------
12492
+  (0.0ms) rollback transaction
12493
+  (0.0ms) begin transaction
12494
+ ----------------------------------------------
12495
+ EmberSerializeTest: test_makes_model_directory
12496
+ ----------------------------------------------
12497
+  (0.1ms) rollback transaction
12498
+  (0.0ms) begin transaction
12499
+ ----------------------------------------------
12500
+ EmberSerializeTest: test_parses_async_argument
12501
+ ----------------------------------------------
12502
+  (0.1ms) rollback transaction
12503
+  (0.0ms) begin transaction
12504
+ -------------------------------------
12505
+ EmberSerializeTest: test_parses_model
12506
+ -------------------------------------
12507
+  (0.1ms) rollback transaction
12508
+  (0.1ms) begin transaction
12509
+ ------------------------------------------------
12510
+ EmberSerializeTest: test_serialize_as_is_setting
12511
+ ------------------------------------------------
12512
+  (0.1ms) rollback transaction
12513
+  (0.1ms) begin transaction
12514
+ -----------------------------------------------------
12515
+ EmberSerializeTest: test_serialize_finds_associations
12516
+ -----------------------------------------------------
12517
+  (0.1ms) rollback transaction
12518
+  (0.1ms) begin transaction
12519
+ -------------------------------------------------
12520
+ EmberSerializeTest: test_serialize_finds_existing
12521
+ -------------------------------------------------
12522
+  (0.1ms) rollback transaction
12523
+  (0.0ms) begin transaction
12524
+ -------------------------------------------------
12525
+ EmberSerializeTest: test_serialize_ignore_setting
12526
+ -------------------------------------------------
12527
+  (0.1ms) rollback transaction
12528
+  (0.1ms) begin transaction
12529
+ --------------------------------------------------
12530
+ EmberSerializeTest: test_serialize_ignores_outside
12531
+ --------------------------------------------------
12532
+  (0.1ms) rollback transaction
12533
+  (0.1ms) begin transaction
12534
+ ---------------------------------------------------
12535
+ EmberSerializeTest: test_serializes_match_parameter
12536
+ ---------------------------------------------------
12537
+  (0.3ms) rollback transaction
12538
+  (0.1ms) begin transaction
12539
+ ------------------------------------------------
12540
+ EmberSerializeTest: test_skips_or_creates_models
12541
+ ------------------------------------------------
12542
+  (0.1ms) rollback transaction
12543
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
12544
+  (0.1ms) begin transaction
12545
+ -----------------------------------------------
12546
+ EmberSerializeTest: test_accepts_async_argument
12547
+ -----------------------------------------------
12548
+  (0.1ms) rollback transaction
12549
+  (0.1ms) begin transaction
12550
+ ------------------------------------------------
12551
+ EmberSerializeTest: test_accepts_engine_argument
12552
+ ------------------------------------------------
12553
+  (0.1ms) rollback transaction
12554
+  (0.1ms) begin transaction
12555
+ ---------------------------------
12556
+ EmberSerializeTest: test_app_name
12557
+ ---------------------------------
12558
+  (0.0ms) rollback transaction
12559
+  (0.0ms) begin transaction
12560
+ -------------------------------------
12561
+ EmberSerializeTest: test_builds_model
12562
+ -------------------------------------
12563
+  (0.1ms) rollback transaction
12564
+  (0.2ms) begin transaction
12565
+ --------------------------------------
12566
+ EmberSerializeTest: test_camelize_name
12567
+ --------------------------------------
12568
+  (0.1ms) rollback transaction
12569
+  (0.0ms) begin transaction
12570
+ --------------------------------------------------------------------------
12571
+ EmberSerializeTest: test_does_not_throw_NameError_on_ApplicationSerializer
12572
+ --------------------------------------------------------------------------
12573
+  (0.1ms) rollback transaction
12574
+  (0.1ms) begin transaction
12575
+ ------------------------------------
12576
+ EmberSerializeTest: test_ember_model
12577
+ ------------------------------------
12578
+  (0.1ms) rollback transaction
12579
+  (0.0ms) begin transaction
12580
+ ------------------------------------------------
12581
+ EmberSerializeTest: test_ember_reflect_attribute
12582
+ ------------------------------------------------
12583
+  (0.0ms) rollback transaction
12584
+  (0.0ms) begin transaction
12585
+ -------------------------------------------------
12586
+ EmberSerializeTest: test_ember_reflect_belongs_to
12587
+ -------------------------------------------------
12588
+  (0.1ms) rollback transaction
12589
+  (0.0ms) begin transaction
12590
+ -----------------------------------------------
12591
+ EmberSerializeTest: test_ember_reflect_has_many
12592
+ -----------------------------------------------
12593
+  (0.1ms) rollback transaction
12594
+  (0.0ms) begin transaction
12595
+ ----------------------------------
12596
+ EmberSerializeTest: test_existence
12597
+ ----------------------------------
12598
+  (0.0ms) rollback transaction
12599
+  (0.1ms) begin transaction
12600
+ -----------------------------------
12601
+ EmberSerializeTest: test_initialize
12602
+ -----------------------------------
12603
+  (0.0ms) rollback transaction
12604
+  (0.0ms) begin transaction
12605
+ ----------------------------------------------
12606
+ EmberSerializeTest: test_makes_model_directory
12607
+ ----------------------------------------------
12608
+  (0.0ms) rollback transaction
12609
+  (0.0ms) begin transaction
12610
+ ----------------------------------------------
12611
+ EmberSerializeTest: test_parses_async_argument
12612
+ ----------------------------------------------
12613
+  (0.1ms) rollback transaction
12614
+  (0.0ms) begin transaction
12615
+ -------------------------------------
12616
+ EmberSerializeTest: test_parses_model
12617
+ -------------------------------------
12618
+  (0.1ms) rollback transaction
12619
+  (0.1ms) begin transaction
12620
+ ------------------------------------------------
12621
+ EmberSerializeTest: test_serialize_as_is_setting
12622
+ ------------------------------------------------
12623
+  (0.1ms) rollback transaction
12624
+  (0.1ms) begin transaction
12625
+ -----------------------------------------------------
12626
+ EmberSerializeTest: test_serialize_finds_associations
12627
+ -----------------------------------------------------
12628
+  (0.1ms) rollback transaction
12629
+  (0.0ms) begin transaction
12630
+ -------------------------------------------------
12631
+ EmberSerializeTest: test_serialize_finds_existing
12632
+ -------------------------------------------------
12633
+  (0.1ms) rollback transaction
12634
+  (0.1ms) begin transaction
12635
+ -------------------------------------------------
12636
+ EmberSerializeTest: test_serialize_ignore_setting
12637
+ -------------------------------------------------
12638
+  (0.1ms) rollback transaction
12639
+  (0.1ms) begin transaction
12640
+ --------------------------------------------------
12641
+ EmberSerializeTest: test_serialize_ignores_outside
12642
+ --------------------------------------------------
12643
+  (0.1ms) rollback transaction
12644
+  (0.1ms) begin transaction
12645
+ ---------------------------------------------------
12646
+ EmberSerializeTest: test_serializes_match_parameter
12647
+ ---------------------------------------------------
12648
+  (0.1ms) rollback transaction
12649
+  (0.1ms) begin transaction
12650
+ ------------------------------------------------
12651
+ EmberSerializeTest: test_skips_or_creates_models
12652
+ ------------------------------------------------
12653
+  (0.1ms) rollback transaction
12654
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
12655
+  (0.1ms) begin transaction
12656
+ -----------------------------------------------
12657
+ EmberSerializeTest: test_accepts_async_argument
12658
+ -----------------------------------------------
12659
+  (0.2ms) rollback transaction
12660
+  (0.1ms) begin transaction
12661
+ ------------------------------------------------
12662
+ EmberSerializeTest: test_accepts_engine_argument
12663
+ ------------------------------------------------
12664
+  (0.1ms) rollback transaction
12665
+  (0.0ms) begin transaction
12666
+ ---------------------------------
12667
+ EmberSerializeTest: test_app_name
12668
+ ---------------------------------
12669
+  (0.0ms) rollback transaction
12670
+  (0.1ms) begin transaction
12671
+ -------------------------------------
12672
+ EmberSerializeTest: test_builds_model
12673
+ -------------------------------------
12674
+  (0.1ms) rollback transaction
12675
+  (0.0ms) begin transaction
12676
+ --------------------------------------
12677
+ EmberSerializeTest: test_camelize_name
12678
+ --------------------------------------
12679
+  (0.0ms) rollback transaction
12680
+  (0.1ms) begin transaction
12681
+ --------------------------------------------------------------------------
12682
+ EmberSerializeTest: test_does_not_throw_NameError_on_ApplicationSerializer
12683
+ --------------------------------------------------------------------------
12684
+  (0.1ms) rollback transaction
12685
+  (0.1ms) begin transaction
12686
+ ------------------------------------
12687
+ EmberSerializeTest: test_ember_model
12688
+ ------------------------------------
12689
+  (0.1ms) rollback transaction
12690
+  (0.0ms) begin transaction
12691
+ ------------------------------------------------
12692
+ EmberSerializeTest: test_ember_reflect_attribute
12693
+ ------------------------------------------------
12694
+  (0.0ms) rollback transaction
12695
+  (0.1ms) begin transaction
12696
+ -------------------------------------------------
12697
+ EmberSerializeTest: test_ember_reflect_belongs_to
12698
+ -------------------------------------------------
12699
+  (0.1ms) rollback transaction
12700
+  (0.1ms) begin transaction
12701
+ -----------------------------------------------
12702
+ EmberSerializeTest: test_ember_reflect_has_many
12703
+ -----------------------------------------------
12704
+  (0.1ms) rollback transaction
12705
+  (0.0ms) begin transaction
12706
+ ----------------------------------
12707
+ EmberSerializeTest: test_existence
12708
+ ----------------------------------
12709
+  (0.0ms) rollback transaction
12710
+  (0.1ms) begin transaction
12711
+ -----------------------------------
12712
+ EmberSerializeTest: test_initialize
12713
+ -----------------------------------
12714
+  (0.0ms) rollback transaction
12715
+  (0.1ms) begin transaction
12716
+ ----------------------------------------------
12717
+ EmberSerializeTest: test_makes_model_directory
12718
+ ----------------------------------------------
12719
+  (0.1ms) rollback transaction
12720
+  (0.1ms) begin transaction
12721
+ ----------------------------------------------
12722
+ EmberSerializeTest: test_parses_async_argument
12723
+ ----------------------------------------------
12724
+  (0.1ms) rollback transaction
12725
+  (0.1ms) begin transaction
12726
+ -------------------------------------
12727
+ EmberSerializeTest: test_parses_model
12728
+ -------------------------------------
12729
+  (0.1ms) rollback transaction
12730
+  (0.0ms) begin transaction
12731
+ ------------------------------------------------
12732
+ EmberSerializeTest: test_serialize_as_is_setting
12733
+ ------------------------------------------------
12734
+  (0.1ms) rollback transaction
12735
+  (0.1ms) begin transaction
12736
+ -----------------------------------------------------
12737
+ EmberSerializeTest: test_serialize_finds_associations
12738
+ -----------------------------------------------------
12739
+  (0.1ms) rollback transaction
12740
+  (0.0ms) begin transaction
12741
+ -------------------------------------------------
12742
+ EmberSerializeTest: test_serialize_finds_existing
12743
+ -------------------------------------------------
12744
+  (0.1ms) rollback transaction
12745
+  (0.0ms) begin transaction
12746
+ -------------------------------------------------
12747
+ EmberSerializeTest: test_serialize_ignore_setting
12748
+ -------------------------------------------------
12749
+  (0.1ms) rollback transaction
12750
+  (0.0ms) begin transaction
12751
+ --------------------------------------------------
12752
+ EmberSerializeTest: test_serialize_ignores_outside
12753
+ --------------------------------------------------
12754
+  (0.1ms) rollback transaction
12755
+  (0.0ms) begin transaction
12756
+ ---------------------------------------------------
12757
+ EmberSerializeTest: test_serializes_match_parameter
12758
+ ---------------------------------------------------
12759
+  (0.1ms) rollback transaction
12760
+  (0.1ms) begin transaction
12761
+ ------------------------------------------------
12762
+ EmberSerializeTest: test_skips_or_creates_models
12763
+ ------------------------------------------------
12764
+  (0.1ms) rollback transaction
@@ -127,7 +127,7 @@ WITHOUTEM
127
127
  end
128
128
 
129
129
  test "builds model" do
130
- ams = ActiveModel::Serializer.descendants.sort_by(&:name)[1]
130
+ ams = ActiveModel::Serializer.descendants.sort_by(&:name)[2]
131
131
  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('comments')", " # 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('comments')"}, [], [], false, " "]
132
132
  match = "# for more details see: http://emberjs.com/guides/models/defining-models/
133
133
 
@@ -207,6 +207,14 @@ EmberSerialize.Post = DS.Model.extend
207
207
  assert_match /async: true/, lines.grep(/authorDude:/).first, 'accepts async arg'
208
208
  end
209
209
 
210
+ test "does not throw NameError on ApplicationSerializer" do
211
+ revert_models
212
+ # this should pass on the ApplicationSerializer
213
+ assert_nothing_raised NameError do
214
+ @serializer.serialize
215
+ end
216
+ end
217
+
210
218
  test "parses async argument" do
211
219
  revert_models
212
220
  prep_model 'async_parse', 'post'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember_serialize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noel Peden
@@ -131,6 +131,7 @@ files:
131
131
  - test/dummy/app/models/comment.rb
132
132
  - test/dummy/app/models/post.rb
133
133
  - test/dummy/app/models/user.rb
134
+ - test/dummy/app/serializers/application_serializer.rb
134
135
  - test/dummy/app/serializers/comment_serializer.rb
135
136
  - test/dummy/app/serializers/post_serializer.rb
136
137
  - test/dummy/app/serializers/user_serializer.rb
@@ -220,6 +221,7 @@ test_files:
220
221
  - test/dummy/app/models/comment.rb
221
222
  - test/dummy/app/models/post.rb
222
223
  - test/dummy/app/models/user.rb
224
+ - test/dummy/app/serializers/application_serializer.rb
223
225
  - test/dummy/app/serializers/comment_serializer.rb
224
226
  - test/dummy/app/serializers/post_serializer.rb
225
227
  - test/dummy/app/serializers/user_serializer.rb