spectacles 0.5.0 → 0.5.1

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: 72c4f603eca294959744110e6f109164d6beb7b1
4
- data.tar.gz: 6d10abba5e67986bbe723234440e080851058045
3
+ metadata.gz: 2e52e394df12083b7bf0f9c1a11d7bd0c289cf31
4
+ data.tar.gz: f9e492ffaf04763f7b0426a5f02e4bb3a411f3af
5
5
  SHA512:
6
- metadata.gz: 6f3af5c5ef71d28aab5738ed071c8c97f2098ccad0e40e9ff6652734381cd19956adc335a8443c486316c7e8f8fce8985c0a0600e8da18be78a43c27356735f9
7
- data.tar.gz: adfb83a2ac5413909ce3dce00cddeba1945e4d95617cfb91ba23a72eb471f4a66a899a13322cc15151fc76597eae39cea435a1b205be84cf3cc4f3daa3a3efde
6
+ metadata.gz: 639f04580f920782af8dea089d4e2d174c23283c3c808813e0ed0950b1b86ac28483c398e22f07dd1030ac5b0342d4de13502fd0258d8bbd02df94ee0cd149e2
7
+ data.tar.gz: 54591a3d0620f44d364adcac8d21eac4075ba0382e9780acbaa5db30e2f4e5499b9673fa11420ddb4ff457951119883c071ff075d27e1358db7a4a59a55858b9
@@ -1,3 +1,3 @@
1
1
  module Spectacles
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -2,6 +2,11 @@ module Spectacles
2
2
  class View < ActiveRecord::Base
3
3
  self.abstract_class = true
4
4
 
5
+ def self.new(*)
6
+ warn "DEPRECATION WARNING: #{self} is an abstract class and should not be instantiated. In v1.0, calling `#{self}.new` will raise a NotImplementedError."
7
+ super # raise NotImplementedError, "#{self} is an abstract class and can not be instantiated."
8
+ end
9
+
5
10
  def self.view_exists?
6
11
  self.connection.view_exists?(self.view_name)
7
12
  end
@@ -18,6 +23,10 @@ module Spectacles
18
23
  comparison_object.attributes == attributes
19
24
  end
20
25
 
26
+ def persisted?
27
+ false
28
+ end
29
+
21
30
  def readonly?
22
31
  true
23
32
  end
@@ -7,7 +7,7 @@ shared_examples_for "a view model" do
7
7
  end
8
8
 
9
9
  class NewProductUser < Spectacles::View
10
- scope :duck_lovers, where(:product_name => 'Rubber Duck')
10
+ scope :duck_lovers, lambda { where(:product_name => 'Rubber Duck') }
11
11
  end
12
12
 
13
13
  describe "Spectacles::View" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spectacles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Hutchison, Brandon Dewitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-03 00:00:00.000000000 Z
11
+ date: 2014-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord