brief 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/brief/document.rb +12 -0
- data/lib/brief/model/serializers.rb +1 -0
- data/lib/brief/repository.rb +1 -1
- data/lib/brief/server/handlers/browse.rb +0 -1
- data/lib/brief/server/handlers/modify.rb +2 -2
- data/lib/brief/version.rb +1 -1
- data/spec/acceptance/modifying_spec.rb +0 -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: f1e4078f005e4ba5a99b045a245a897ca71683dc
|
4
|
+
data.tar.gz: d810cae63f5c24786b5a48b4af515b33a3fdf36c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 833e064d7b2aa8d619c5c8fce6a9bc401c3b4a070f71f1e75f41053d22fb7dd22d533403a82ad76ac8341b50cdd914ad989529c848b6d33c97dc3dfcbee12e18
|
7
|
+
data.tar.gz: 679d1d73a557be8df6a4a0891506cce9c2bc17510bb2db44d8fb1a53988847133d45fde71586cff46d2a4e895dcd6df31e59729bd28b373be848fa78ade9608f
|
data/Gemfile.lock
CHANGED
data/lib/brief/document.rb
CHANGED
@@ -52,6 +52,17 @@ module Brief
|
|
52
52
|
end
|
53
53
|
|
54
54
|
path.open('w') {|fh| fh.write(file_contents) }
|
55
|
+
refresh!
|
56
|
+
end
|
57
|
+
|
58
|
+
def refresh!
|
59
|
+
@content = nil
|
60
|
+
@raw_content = path.read
|
61
|
+
@frontmatter = nil
|
62
|
+
@raw_frontmatter = nil
|
63
|
+
@refreshing = true
|
64
|
+
load_frontmatter
|
65
|
+
true
|
55
66
|
end
|
56
67
|
|
57
68
|
def save!
|
@@ -62,6 +73,7 @@ module Brief
|
|
62
73
|
end
|
63
74
|
|
64
75
|
path.open('w+') {|fh| fh.write(file_contents) }
|
76
|
+
refresh!
|
65
77
|
end
|
66
78
|
|
67
79
|
def combined_data_and_content
|
data/lib/brief/repository.rb
CHANGED
@@ -69,7 +69,7 @@ module Brief::Server::Handlers
|
|
69
69
|
document.save!
|
70
70
|
end
|
71
71
|
|
72
|
-
doc.to_model
|
72
|
+
doc.to_model.as_json(content: true, rendered: true)
|
73
73
|
end
|
74
74
|
|
75
75
|
def remove
|
@@ -102,7 +102,7 @@ module Brief::Server::Handlers
|
|
102
102
|
|
103
103
|
document.save
|
104
104
|
|
105
|
-
document.to_model
|
105
|
+
document.to_model.as_json(content: true, rendered: true)
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
data/lib/brief/version.rb
CHANGED
@@ -49,7 +49,6 @@ describe "Modifying Documents", :type => :request do
|
|
49
49
|
needle = rand(36**36).to_s(36)
|
50
50
|
post "/update/concept.html.md", content: "# Modified Content #{ needle }", data: {needle: needle}
|
51
51
|
get("/browse/concepts")
|
52
|
-
|
53
52
|
needles = json.map {|h| h["data"]["needle"] }
|
54
53
|
expect(needles).to include(needle)
|
55
54
|
end
|