inflorm 0.1.0 → 0.2.0

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: d695f0a82e3f0f6c2efdc498261063ba56f1d924
4
- data.tar.gz: 581f6187ef37d2e14dec68dfd827b54d13441b6e
3
+ metadata.gz: 0a4032c45249288be552e46e4a67c6189409dcba
4
+ data.tar.gz: 4008b3bee7ad9f9bd50ceac1e4f01fbcc0db5a1a
5
5
  SHA512:
6
- metadata.gz: 3e56cdff307f20cf309b456bd2b0a9e36896a36bca05b33242363126ca540d8c18d99520e134564a91950a57d8a5c0c108bd73635ccf1babfed35ed572805de0
7
- data.tar.gz: ae4eeef4bfff80668cda0154787f82b4147a1149d33b15f83d6b7f97bca9c8f0db431dbd812cb9cdfbfea0bd799b8ec344fdc748d1ab09e256e1dc916f874934
6
+ metadata.gz: acb1008dfa1bb3b94a93b380e1c5f12e44ed825cb8bae900f84a0740d44f385e5d08fa01f2661ac5de646e66b8bfefdd70a93ae067c3bd05fda3b7f79a3c9813
7
+ data.tar.gz: c286e8652141c32aaaf5ac4d13480b09c7e02c319c27de6614eaefcc317d3a21d65383604f54b916ed60152dce5f563bd88e13451890baf9c777fe745bdfac68
data/Rakefile CHANGED
@@ -1 +1,11 @@
1
1
  require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task :default => :spec
9
+ rescue LoadError
10
+ # no rspec available
11
+ end
@@ -1,3 +1,3 @@
1
1
  module Inflorm
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/inflorm.rb CHANGED
@@ -11,8 +11,6 @@ module Inflorm
11
11
  include Virtus.model
12
12
  include ActiveModel::Validations
13
13
 
14
- attribute :id, String
15
-
16
14
  # Need to override Virtus.model to_h, but self.included is run *after* our module
17
15
  # is included, so we can't define this method below with the others (unless we prepended)
18
16
  # Note we're unfortunately relying on rails monkey patching
@@ -26,7 +24,7 @@ module Inflorm
26
24
  end
27
25
 
28
26
  def persisted?
29
- id.present?
27
+ respond_to?(:id) && id.present?
30
28
  end
31
29
 
32
30
  def marked_for_destruction?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inflorm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Robertson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-07 00:00:00.000000000 Z
11
+ date: 2015-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler