fredit 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,7 @@ class FreditController < ::ApplicationController
18
18
  def update
19
19
  @path = secure_path params[:file_path]
20
20
 
21
- edit_msg = !params[:edit_message].blank? ? Shellwords.shellescape(params[:edit_message].gsub('"', '')) : "unspecified edit"
21
+ edit_msg = !params[:edit_message].blank? ? Shellwords.shellescape(params[:edit_message].gsub(/["']/, '')) : "unspecified edit"
22
22
 
23
23
  session[:commit_author] = (params[:commit_author] || '').gsub(/['"]/, '')
24
24
  author = session[:commit_author]
@@ -32,14 +32,14 @@ class FreditController < ::ApplicationController
32
32
  if params[:commit] =~ /delete/i
33
33
  `git rm #@path`
34
34
  flash[:notice] = "#@path deleted"
35
- res = system %Q|git commit --author="#{author}" -m "#{edit_msg}" #{@path}|
35
+ res = system %Q|git commit --author='#{author}' -m '#{edit_msg}' #{@path}|
36
36
  @path = nil
37
37
  else
38
38
  n = params[:source].gsub(/\r\n/, "\n")
39
39
  File.open(@path, 'w') {|f| f.write(n)}
40
40
  system %Q|git add #{@path}|
41
41
  flash[:notice] = "#@path updated"
42
- res = system %Q|git commit --author="#{author}" -m "#{edit_msg}" #{@path}|
42
+ res = system %Q|git commit --author='#{author}' -m '#{edit_msg}' #{@path}|
43
43
  end
44
44
  if res == false
45
45
  flash[:notice] = "Something went wrong with git. Make sure you changed something and filled in required fields."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fredit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -43,7 +43,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
43
43
  version: '0'
44
44
  segments:
45
45
  - 0
46
- hash: 234921565
46
+ hash: -150563923
47
47
  required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  none: false
49
49
  requirements:
@@ -52,11 +52,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  version: '0'
53
53
  segments:
54
54
  - 0
55
- hash: 234921565
55
+ hash: -150563923
56
56
  requirements: []
57
57
  rubyforge_project:
58
58
  rubygems_version: 1.8.11
59
59
  signing_key:
60
60
  specification_version: 3
61
- summary: fredit 0.0.9
61
+ summary: fredit 0.1.0
62
62
  test_files: []