montage_rails 0.4.4 → 0.4.5

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b1b8534e9644f4c64558cc5c79171c14871b39ab
4
- data.tar.gz: e49a2d9155864309771a6003737a36762bf61e7f
3
+ metadata.gz: 02d31eb1e907b0b0e4988180c372a6020fedec72
4
+ data.tar.gz: 16776f80f8d09adbd832d6663db1221d6e05e151
5
5
  SHA512:
6
- metadata.gz: f357e839041c4a49bf0c7d015006488ca1dde2fd8c7a38089772d4f67359f8260d0d2a4ba9e8cc341b884ed50d4133a7a65aa9d4252dc72e05b56934642e2559
7
- data.tar.gz: d7b92373ffd07d132800ae65005bc9d2d7864c3bfc1e93bb38dfc94165fc59e73d9313997e6624961aa5f3090ce5df4728609465593c1e97ecfdead89b51c882
6
+ metadata.gz: 87d9a8110406da6e9503c398a4deaed3a62a50204bb53bbcdfe579d235a5fd62113f246542e0f98d0d4443e2147cc247c951fd5c9709a40061d65c89b7cf391b
7
+ data.tar.gz: 4c2bb6cde779fdbbf1dbf0906f96b1cd6223124e18e59e478fba36d57c9f46ad30c2f417d8cd74e1ee158dbbf6e078343699526a86138f6468f8bac27cc261e2
@@ -39,6 +39,12 @@ module MontageRails
39
39
  limit(1).to_a.first
40
40
  end
41
41
 
42
+ # Check if a record within the current scope exists
43
+ #
44
+ def exists?
45
+ to_a.any?
46
+ end
47
+
42
48
  # Utility method to allow viewing of the result set in a console
43
49
  #
44
50
  def inspect
@@ -1,3 +1,3 @@
1
1
  module MontageRails
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
@@ -13642,3 +13642,182 @@ MontageRailsTest: test_: .configure should require a username and password if no
13642
13642
  foo Load (0.0ms) bar
13643
13643
  foo Load (0.0ms) bar
13644
13644
  foo Load [CACHE] (0.0ms) bar
13645
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
13646
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
13647
+  (0.1ms) select sqlite_version(*)
13648
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
13649
+  (0.1ms) SELECT version FROM "schema_migrations"
13650
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
13651
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
13652
+ foo Load (0.1ms) bar
13653
+ foo Load [CACHE] (0.0ms) bar
13654
+ foo Load (0.1ms) bar
13655
+ foo Load (0.1ms) bar
13656
+ foo Load (0.0ms) bar
13657
+ Movie Load (0.9ms) {:filter=>{:votes__gt=>900000}}
13658
+ foo Load (0.0ms) bar
13659
+ Movie Load (0.6ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13660
+ Movie Load (0.8ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13661
+ Movie Load (0.7ms) {:filter=>{:votes__gt=>900000}}
13662
+ Movie Load (0.9ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13663
+ Movie Load (0.7ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13664
+  (0.1ms) begin transaction
13665
+ -------------------------------------------------------------------------------------------------
13666
+ MontageRailsTest: test_: .configure should require a username and password if no token is given.
13667
+ -------------------------------------------------------------------------------------------------
13668
+  (0.0ms) rollback transaction
13669
+  (0.0ms) begin transaction
13670
+ ----------------------------------------------------------------------------------------------------
13671
+ MontageRailsTest: test_: .configure should not require a username and password if a token is given.
13672
+ ----------------------------------------------------------------------------------------------------
13673
+  (0.0ms) rollback transaction
13674
+  (0.0ms) begin transaction
13675
+ ---------------------------------------------------------------------------------------------------------------
13676
+ MontageRailsTest: test_: .configure should call the auth method and retrieve the token if it has not been set.
13677
+ ---------------------------------------------------------------------------------------------------------------
13678
+  (0.1ms) rollback transaction
13679
+  (0.0ms) begin transaction
13680
+ ---------------------------------------------------------------------------------------
13681
+ MontageRailsTest: test_: .configure should raise an exception if authentication fails.
13682
+ ---------------------------------------------------------------------------------------
13683
+  (0.1ms) rollback transaction
13684
+  (0.0ms) begin transaction
13685
+ -------------------------------------------------------------
13686
+ MontageRailsTest: test_: .configure should require a domain.
13687
+ -------------------------------------------------------------
13688
+  (0.1ms) rollback transaction
13689
+  (0.0ms) begin transaction
13690
+ -------------------------------------------------------------------------------------------
13691
+ MontageRailsTest: test_: .configure should accept a username, password, token, and domain.
13692
+ -------------------------------------------------------------------------------------------
13693
+  (0.1ms) rollback transaction
13694
+ Movie Load (0.8ms) {:filter=>{}}
13695
+ Movie Load (0.7ms) #<MontageRails::Relation:0x007f9b6444b4a0>
13696
+ Movie Load (0.7ms) #<MontageRails::Relation:0x007f9b68f89188>
13697
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
13698
+  (0.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
13699
+  (0.1ms) select sqlite_version(*)
13700
+  (0.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
13701
+  (0.1ms) SELECT version FROM "schema_migrations"
13702
+  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
13703
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
13704
+ foo Load (0.0ms) bar
13705
+ Movie Load (10.2ms) {:filter=>{:title=>"The Jerk"}}
13706
+ Movie Load (4.0ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13707
+ Movie Load (1.6ms) {:filter=>{:votes__gt=>900000}}
13708
+ Movie Load [CACHE] (0.0ms) {:filter=>{:votes__gt=>900000}}
13709
+ Movie Load [CACHE] (0.0ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13710
+ Movie Load [CACHE] (0.0ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13711
+ Movie Load [CACHE] (0.1ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13712
+ Movie Load (4.5ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13713
+ Movie Load (2.0ms) {:filter=>{:title=>"Foo"}}
13714
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
13715
+  (1.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
13716
+  (0.1ms) select sqlite_version(*)
13717
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
13718
+  (0.2ms) SELECT version FROM "schema_migrations"
13719
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
13720
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
13721
+ Movie Load (4.3ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13722
+ Studio Create (2.6ms) {:name=>"Universal"}
13723
+ Studio Load (2.3ms) 19442e09-5c2d-4e5d-8f34-675570e81414
13724
+ Movie Update (3.7ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13725
+ Studio Load [CACHE] (0.0ms) 19442e09-5c2d-4e5d-8f34-675570e81414
13726
+ Movie Create (6.5ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13727
+ Movie Update (2.0ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13728
+ Movie Create (8.8ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13729
+ Movie Update (2.8ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13730
+ Movie Create (3.1ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13731
+ Movie Create (6.7ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13732
+ Movie Update (2.0ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13733
+ Movie Create (5.9ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13734
+ Movie Update (1.9ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13735
+ Movie Create (6.0ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13736
+ Movie Update (2.5ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13737
+ Actor Create (2.8ms) {:movie_id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :name=>"Steve Martin"}
13738
+ Actor Create (1.9ms) {:movie_id=>nil, :name=>"Mark Hamill"}
13739
+ Actor Load (1.8ms) {:filter=>{:movie_id=>"69cc93af-1f0e-43bc-ac9a-19117111978e"}}
13740
+ Actor Load (1.2ms) {:filter=>{:movie_id=>"69cc93af-1f0e-43bc-ac9a-19117111978e"}, :limit=>1}
13741
+ Movie Load (2.2ms) #<MontageRails::Relation:0x007f86620ba2f8>
13742
+ Movie Create (6.3ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13743
+ Movie Update (1.7ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13744
+ Actor Create (1.8ms) {:movie_id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :name=>"Steve Martin"}
13745
+ Actor Create (1.6ms) {:movie_id=>nil, :name=>"Mark Hamill"}
13746
+ MontageRails::BaseTest::TestClass Load (1.5ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13747
+ Actor Load [CACHE] (0.0ms) {:filter=>{:movie_id=>"69cc93af-1f0e-43bc-ac9a-19117111978e"}, :limit=>1}
13748
+ Movie Create (8.5ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13749
+ Movie Update (2.1ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13750
+ Movie Load (2.0ms) {:filter=>{}}
13751
+ Movie Create (10.0ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13752
+ Movie Update (2.2ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13753
+ Movie Update (2.9ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13754
+ Movie Create (9.4ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13755
+ Movie Update (2.9ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13756
+ Movie Create (6.3ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13757
+ Movie Update (2.6ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13758
+ Movie Create (6.1ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13759
+ Movie Update (1.8ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13760
+ Movie Create (6.5ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13761
+ Movie Update (2.1ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13762
+ Actor Create (1.9ms) {:movie_id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :name=>"Steve Martin"}
13763
+ Actor Create (3.0ms) {:movie_id=>nil, :name=>"Mark Hamill"}
13764
+ Actor Load (2.2ms) {:filter=>{:movie_id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :name=>"Steve Martin"}, :limit=>1}
13765
+ Movie Create (6.5ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13766
+ Movie Update (2.2ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13767
+ Movie Create (5.8ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13768
+ Movie Update (1.8ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13769
+ Movie Load (2.7ms) #<MontageRails::Relation:0x007f865fb0d938>
13770
+ Movie Create (6.5ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13771
+ Movie Update (2.0ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13772
+ Movie Create (6.5ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13773
+ Movie Update (1.9ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13774
+ Movie Update (1.8ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13775
+ Movie Create (8.0ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13776
+ Movie Update (2.2ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13777
+ Movie Create (8.0ms) {:studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>500, :year=>1983}
13778
+ Movie Update (1.9ms) 69cc93af-1f0e-43bc-ac9a-19117111978e: {:id=>"69cc93af-1f0e-43bc-ac9a-19117111978e", :studio_id=>"19442e09-5c2d-4e5d-8f34-675570e81414", :rank=>4, :rating=>2.0, :title=>"The Jerk", :votes=>600, :year=>1983}
13779
+ foo Load (0.1ms) bar
13780
+ foo Load (0.0ms) bar
13781
+ foo Load (0.0ms) bar
13782
+ foo Load [CACHE] (0.0ms) bar
13783
+ foo Load (0.1ms) bar
13784
+ Movie Load (6.0ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13785
+ Movie Load [CACHE] (0.0ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13786
+ Movie Load [CACHE] (0.0ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13787
+ Movie Load (2.3ms) {:filter=>{:title=>"Foo"}}
13788
+ Movie Load [CACHE] (0.0ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13789
+ foo Load (0.0ms) bar
13790
+ Movie Load (1.6ms) {:filter=>{:votes__gt=>900000}}
13791
+ Movie Load (3.8ms) {:filter=>{:title=>"The Jerk"}}
13792
+ Movie Load (5.0ms) {:filter=>{:title=>"The Jerk"}, :limit=>1}
13793
+ Movie Load [CACHE] (0.0ms) {:filter=>{:votes__gt=>900000}}
13794
+  (0.1ms) begin transaction
13795
+ ---------------------------------------------------------------------------------------------------------------
13796
+ MontageRailsTest: test_: .configure should call the auth method and retrieve the token if it has not been set.
13797
+ ---------------------------------------------------------------------------------------------------------------
13798
+  (0.1ms) rollback transaction
13799
+  (0.2ms) begin transaction
13800
+ -------------------------------------------------------------------------------------------------
13801
+ MontageRailsTest: test_: .configure should require a username and password if no token is given.
13802
+ -------------------------------------------------------------------------------------------------
13803
+  (0.0ms) rollback transaction
13804
+  (0.0ms) begin transaction
13805
+ ---------------------------------------------------------------------------------------
13806
+ MontageRailsTest: test_: .configure should raise an exception if authentication fails.
13807
+ ---------------------------------------------------------------------------------------
13808
+  (0.0ms) rollback transaction
13809
+  (0.0ms) begin transaction
13810
+ -------------------------------------------------------------------------------------------
13811
+ MontageRailsTest: test_: .configure should accept a username, password, token, and domain.
13812
+ -------------------------------------------------------------------------------------------
13813
+  (0.0ms) rollback transaction
13814
+  (0.0ms) begin transaction
13815
+ -------------------------------------------------------------
13816
+ MontageRailsTest: test_: .configure should require a domain.
13817
+ -------------------------------------------------------------
13818
+  (0.1ms) rollback transaction
13819
+  (0.0ms) begin transaction
13820
+ ----------------------------------------------------------------------------------------------------
13821
+ MontageRailsTest: test_: .configure should not require a username and password if a token is given.
13822
+ ----------------------------------------------------------------------------------------------------
13823
+  (0.0ms) rollback transaction
@@ -38,6 +38,16 @@ class MontageRails::RelationTest < Minitest::Test
38
38
  end
39
39
  end
40
40
 
41
+ context "#exists?" do
42
+ should "return false if the record does not exist" do
43
+ refute MontageRails::Relation.new(Movie).where(title: "Foo").exists?
44
+ end
45
+
46
+ should "return true if the record does exist" do
47
+ assert MontageRails::Relation.new(Movie).where(title: "The Jerk").exists?
48
+ end
49
+ end
50
+
41
51
  context "#reset" do
42
52
  setup do
43
53
  @movie = MontageRails::Relation.new(Movie).where(title: "The Jerk").limit(1)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: montage_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - dphaener
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-03 00:00:00.000000000 Z
11
+ date: 2015-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails