brief 1.8.0 → 1.8.1
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/server/handlers/modify.rb +11 -1
- data/lib/brief/version.rb +1 -1
- data/spec/acceptance/data_manipulation_spec.rb +5 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 595a088a0513eb12f863dc3ae15ca6900acb7af4
|
4
|
+
data.tar.gz: 8eb6bee1b04ac9349fc5838b4bbfa5daa0e1a827
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5309028219a055869c5f91d042046ee8b9344fe474738990bf0382031ffc5a79356c9e13ddf5f16f49001c4eb950e60384bd0cc2deda0ac0b2e33cfd77b0b46
|
7
|
+
data.tar.gz: 8a8baa3873f1d6abcf17bd5143b651c079a85367f15f24be8d3d768fb8b8fb4979eb0e496ddabadbb5e4321b67fa5aadcd160039ecca444b1144af7bcdb92ee8
|
data/Gemfile.lock
CHANGED
@@ -56,7 +56,7 @@ module Brief::Server::Handlers
|
|
56
56
|
return @errors
|
57
57
|
end
|
58
58
|
|
59
|
-
if !Brief::Util.ensure_child_path(briefcase.
|
59
|
+
if !Brief::Util.ensure_child_path(briefcase.root, path)
|
60
60
|
@errors[:path] = "Invalid Path"
|
61
61
|
return @errors
|
62
62
|
end
|
@@ -78,6 +78,11 @@ module Brief::Server::Handlers
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def remove
|
81
|
+
if !Brief::Util.ensure_child_path(briefcase.root, path)
|
82
|
+
@errors[:path] = "Invalid Path"
|
83
|
+
return @errors
|
84
|
+
end
|
85
|
+
|
81
86
|
doc = Brief::Document.new(path)
|
82
87
|
doc.path.unlink rescue nil
|
83
88
|
|
@@ -92,6 +97,11 @@ module Brief::Server::Handlers
|
|
92
97
|
contents = params[:content] || params[:contents]
|
93
98
|
raw = params[:raw]
|
94
99
|
|
100
|
+
if !Brief::Util.ensure_child_path(briefcase.root, path)
|
101
|
+
@errors[:path] = "Invalid Path"
|
102
|
+
return @errors
|
103
|
+
end
|
104
|
+
|
95
105
|
document = briefcase.document_at(path)
|
96
106
|
|
97
107
|
if document.nil? || !document.exist?
|
data/lib/brief/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brief
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Soeder
|
@@ -290,6 +290,7 @@ files:
|
|
290
290
|
- lib/brief/version.rb
|
291
291
|
- spec/acceptance/aggregators_spec.rb
|
292
292
|
- spec/acceptance/browsing_spec.rb
|
293
|
+
- spec/acceptance/data_manipulation_spec.rb
|
293
294
|
- spec/acceptance/modifying_spec.rb
|
294
295
|
- spec/acceptance/schema_spec.rb
|
295
296
|
- spec/acceptance/showing_spec.rb
|
@@ -368,6 +369,7 @@ summary: Brief makes writing more powerful
|
|
368
369
|
test_files:
|
369
370
|
- spec/acceptance/aggregators_spec.rb
|
370
371
|
- spec/acceptance/browsing_spec.rb
|
372
|
+
- spec/acceptance/data_manipulation_spec.rb
|
371
373
|
- spec/acceptance/modifying_spec.rb
|
372
374
|
- spec/acceptance/schema_spec.rb
|
373
375
|
- spec/acceptance/showing_spec.rb
|