i18n-edit 0.9.2 → 0.9.3

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: f3802b3756136865be2d5c0b85a3e46cfe3ff475
4
- data.tar.gz: 994ad7604abd7c69f35ff16061b62dae0a13b261
3
+ metadata.gz: 628be4a04ebb1cab1eb828f01f67791f651325df
4
+ data.tar.gz: 854ff9dce5032c479ba40f896c2eaf2f0fade727
5
5
  SHA512:
6
- metadata.gz: 825cc241291bc7d9dee948aaa3df6e60ebb43448ca757085756a26d87dcef6f54283dc9d602542a58a1635a9282bd2be41a65e415e37225d2976ae9cc6e00cff
7
- data.tar.gz: ef36ba8ea09851705fc43665c6a355cadd72855f2d22db6fed4e035027934fd50a1e36005ea31846b6e60399a3780e642f0cc479a4166d4675a53601f3169139
6
+ metadata.gz: a86fc9ce828f03557ccee243b1092bf19c48b618e7226a01660a6de90cd64e3a92852531523d671c03ad19e9f724958c3b1861c240fb683e1146b33c8a791f09
7
+ data.tar.gz: 9c95f325951a550166ab0277974a0d6347d61d40af4d711f805e39e342c7f4f147a2092d19c7e3a51a50d285f332f494d546f61b704907ac6517fda5ed60f59d
@@ -6,7 +6,7 @@ module I18n::Edit
6
6
  class EditController < ApplicationController
7
7
  private
8
8
  skip_before_action :verify_authenticity_token
9
- before_filter :security_check
9
+ before_action :security_check
10
10
 
11
11
  def self.traverse(key_locations, path, prefix, h)
12
12
  h.each do |key, value|
@@ -64,7 +64,7 @@ module I18n::Edit
64
64
  "the old text from the browser is #{old_text.inspect}, they don't match. " \
65
65
  'Refusing to write with inconsistent data. ' \
66
66
  "Your edit wasn't written.", layout: false, status: 201
67
- return false;
67
+ return false
68
68
  end
69
69
  container[hashes_path[-1]] = text
70
70
  new_file_path = path + '.i18n_edit_new'
@@ -78,17 +78,18 @@ module I18n::Edit
78
78
  end
79
79
  File.link(path, old_file_path)
80
80
  File.rename(new_file_path, path)
81
- return true;
81
+ return true
82
82
  end
83
83
 
84
84
  protected
85
85
  def security_check
86
86
  if ENV['I18N_EDIT'].nil?
87
- render plain: "I18_EDIT is not set in the environment.", status: 201;
88
- throw :abort
87
+ render plain: "I18_EDIT is not set in the environment.", status: 201
88
+ return false
89
89
  elsif !token_valid?(params)
90
- throw :abort
90
+ return false
91
91
  end
92
+ return true
92
93
  end
93
94
 
94
95
  public
@@ -1,5 +1,5 @@
1
1
  module I18n
2
2
  module Edit
3
- VERSION = '0.9.2'
3
+ VERSION = '0.9.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-edit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruce Perens