draftsman 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 +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +11 -2
- data/lib/draftsman/config.rb +2 -1
- data/lib/draftsman/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18529a182611eb7a54a2d4ad3c9660c5f8756160
|
4
|
+
data.tar.gz: 2a6922255fc23dd50d362de6907b25f93680d270
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dff6540ec5fd444399ec5491ae13821f0a2e3f38485ff22034730d2f7988dd380fd41288099df0a56da3afe4de62c84b3640bb50f24ab6bda7088abbb971229
|
7
|
+
data.tar.gz: 5282edde2006086ee7cac30e284616d0f8912255a933f55e4b58b3c5edd0d237c8d61760a415a114568bb95ea61be1cd623324448d167c714f8af5a0e69b3bca
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 0.5.1 - August 20, 2016
|
4
|
+
|
5
|
+
- [@chrisdpeters](https://github.com/chrisdpeters)
|
6
|
+
[Fixed](https://github.com/liveeditor/draftsman/commit/b19efe6abf73b2e62a420df2aef39dc9eabf20dc)
|
7
|
+
Make Draftsman enabled in Rails by default
|
8
|
+
|
3
9
|
## 0.5.0 - August 20, 2016
|
4
10
|
|
5
11
|
- [@npezza93](https://github.com/npezza93)
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Draftsman v0.5.
|
1
|
+
# Draftsman v0.5.1 (beta)
|
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.
|
@@ -52,7 +52,7 @@ Works well with Rails, Sinatra, or any other application that depends on ActiveR
|
|
52
52
|
Add Draftsman to your `Gemfile`.
|
53
53
|
|
54
54
|
```ruby
|
55
|
-
gem 'draftsman', '~> 0.5.
|
55
|
+
gem 'draftsman', '~> 0.5.1'
|
56
56
|
```
|
57
57
|
|
58
58
|
Or if you want to grab the latest from `master`:
|
@@ -86,6 +86,15 @@ optional if you don't want to store drafts for destroys.
|
|
86
86
|
|
87
87
|
Add `has_drafts` to the models you want to have drafts on.
|
88
88
|
|
89
|
+
Lastly, if your controllers have a `current_user` method, you can easily track who is responsible for changes by
|
90
|
+
adding a controller filter.
|
91
|
+
|
92
|
+
```ruby
|
93
|
+
class ApplicationController
|
94
|
+
before_action :set_draftsman_whodunnit
|
95
|
+
end
|
96
|
+
```
|
97
|
+
|
89
98
|
### Sinatra
|
90
99
|
|
91
100
|
In order to configure Draftsman for usage with [Sinatra][5], your Sinatra app must be using `ActiveRecord` 3 or greater.
|
data/lib/draftsman/config.rb
CHANGED
@@ -8,7 +8,8 @@ module Draftsman
|
|
8
8
|
def initialize
|
9
9
|
@timestamp_field = :created_at
|
10
10
|
@mutex = Mutex.new
|
11
|
-
@serializer
|
11
|
+
@serializer = Draftsman::Serializers::Yaml
|
12
|
+
@enabled = true
|
12
13
|
end
|
13
14
|
|
14
15
|
# Indicates whether Draftsman is on or off. Default: true.
|
data/lib/draftsman/version.rb
CHANGED