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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b414746de1313eabc5f64d32bafe473099cc2d5
4
- data.tar.gz: cb3f076ee49965246f2e0bb6a3e9bc90d0c7f20f
3
+ metadata.gz: 595a088a0513eb12f863dc3ae15ca6900acb7af4
4
+ data.tar.gz: 8eb6bee1b04ac9349fc5838b4bbfa5daa0e1a827
5
5
  SHA512:
6
- metadata.gz: a7fd7e64d649737ebd6caa4536d12756447f6cdeebfb83c7c85a94a7569494393d293da50a18fa68458b57ad21752c44bd2300b9df09e9ed3b7b72557ab22bd7
7
- data.tar.gz: 724f46bddea7aeb0f82ea8deb81ae5e5b1e3c8c2adf8a00d970c6a6d64731ab63d9de86c168d53d06ef9fea62d1f51b25ef174fbb2bf21879d077ae4beb7d439
6
+ metadata.gz: e5309028219a055869c5f91d042046ee8b9344fe474738990bf0382031ffc5a79356c9e13ddf5f16f49001c4eb950e60384bd0cc2deda0ac0b2e33cfd77b0b46
7
+ data.tar.gz: 8a8baa3873f1d6abcf17bd5143b651c079a85367f15f24be8d3d768fb8b8fb4979eb0e496ddabadbb5e4321b67fa5aadcd160039ecca444b1144af7bcdb92ee8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brief (1.7.3)
4
+ brief (1.8.0)
5
5
  activemodel
6
6
  activesupport (>= 4.0)
7
7
  commander (>= 4.2.1)
@@ -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.docs_path, path)
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
@@ -1,3 +1,3 @@
1
1
  module Brief
2
- VERSION = '1.8.0'
2
+ VERSION = '1.8.1'
3
3
  end
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe "Manipulating Data" do
4
+ # TODO
5
+ end
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.0
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