draftsman 0.3.2 → 0.3.3

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: c32bf1dbb24a4fea24cf03abe3c859a965a46cae
4
- data.tar.gz: c46acc2bf65572dc84890b66326d98a4d01c8c51
3
+ metadata.gz: e7c171351b9d3dbd76bc30ae5385e99a771c9e52
4
+ data.tar.gz: b59f30aeed82d65392097f6e2d9cd2cb275420f1
5
5
  SHA512:
6
- metadata.gz: d25357aecfb9899638710cebb6950b05f7f1359b8151f62a2965b3eaf358ec71e7ad1bc27a347eba321ce97ea3999803ba387c3bfc817703c5eb8b62de1f24cb
7
- data.tar.gz: 3c0f135e0d1d5920344e879b8dbb26ede69ae6a6ee8c0dec43d5f5df8a4e6bfab251821b2c9daac3de8b2691f7f529b575a75bfdbe80b5febfec414aaf88a902
6
+ metadata.gz: f1cefc9d992c9de7e485a29b1c5affd5f0bd4580a901346f7234bdce2cdc87143fde506b72b23da237daa6913c28f04c6787435e45b5afbbd3b2b51ec619ae8a
7
+ data.tar.gz: a43b06c0e6d444559e988efe34368c2e86aa642992193b7b72a970cbfc978719fc39701a5eb20d11bdb73d12867098f2aa5239b9edc8fb441d51fbd0e2d4edb8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.3.3 - April 8, 2015
4
+
5
+ - Fixed regression [#18](https://github.com/liveeditor/draftsman/pull/19) - Exception when destroying drafts
6
+
3
7
  ## 0.3.2 - April 6, 2015
4
8
 
5
9
  - Fixed [#8](https://github.com/liveeditor/draftsman/issues/8) - Update specs to use new community standards
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Draftsman v0.3.2 (alpha)
1
+ # Draftsman v0.3.3 (alpha)
2
2
 
3
3
  Draftsman is a Ruby gem that lets you create draft versions of your database records. If you're developing a system in
4
4
  need of simple drafts or a publishing approval queue, then Draftsman just might be what you need.
@@ -33,8 +33,8 @@ class Draftsman::Draft < ActiveRecord::Base
33
33
  end
34
34
 
35
35
  # Returns whether the `previous_draft` column is using the `json` type supported by PostgreSQL.
36
- def self.previous_changes_col_is_json?
37
- @previous_changes_col_is_json ||= columns_hash['object_changes'].type == :json
36
+ def self.previous_draft_col_is_json?
37
+ @previous_draft_col_is_json ||= columns_hash['previous_draft'].type == :json
38
38
  end
39
39
 
40
40
  def self.updates
@@ -233,7 +233,7 @@ module Draftsman
233
233
  if self.draft?
234
234
  attrs = send(self.class.draft_association_name).attributes
235
235
 
236
- data[:previous_draft] = if self.class.draft_class.previous_changes_col_is_json?
236
+ data[:previous_draft] = if self.class.draft_class.previous_draft_col_is_json?
237
237
  attrs
238
238
  else
239
239
  Draftsman.serializer.dump(attrs)
@@ -1,3 +1,3 @@
1
1
  module Draftsman
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
@@ -11,6 +11,10 @@ describe Draftsman::Draft do
11
11
  it 'does not have a JSON object_changes column' do
12
12
  expect(subject.object_changes_col_is_json?).to eql false
13
13
  end
14
+
15
+ it 'does not have a JSON previous_draft column' do
16
+ expect(subject.previous_draft_col_is_json?).to eql false
17
+ end
14
18
  end
15
19
 
16
20
  describe 'instance methods' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: draftsman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Peters
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-06 00:00:00.000000000 Z
11
+ date: 2015-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord