encrypted_field 0.1.5 → 0.1.6

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: d68e0e192e3abf0c29358f757b62e73b7e1b74f1
4
- data.tar.gz: 537df6bed9bc830c9f0a1ef11a2f5086c8eb12e6
3
+ metadata.gz: 4d5406a4db7280cdbae1d2c2b9675867efc73b0e
4
+ data.tar.gz: 2c8dbf08eca68888eb7ef4ed1a0b445efb16904d
5
5
  SHA512:
6
- metadata.gz: 60fb08193ea80927a487dbcda847f833289afa9b2c17177d5d5972265fb84c21e4653bc530728e3519658df2ce6103463e5579ed7e078f524850206de6522533
7
- data.tar.gz: 9be09862feccc0f7adfe781bfab1be3cbfddcea7ad9d3829c2282e91b306dfbf7763d4fb5c56db464c74baa1de31e627686712ddfd9077f3e172d5ea4746856c
6
+ metadata.gz: e05913c4b2864046aa3225ec80b13e3d1073cd084be3d70f5442abfbf30bd1e82fb79fb5198502eefd04332845167a071ecba7f0fefa737d132ed7f2f4beb4f4
7
+ data.tar.gz: 2381dfd11fdc418bdadde4b6e08bd4317f3f9798d7f4c597d99f1aa52e424ddfb8b78103d75068b6370dcae48c90f0fdf9a9c3e2a16cd9235c546005548fd902
@@ -1,3 +1,3 @@
1
1
  module EncryptedField
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -13,3 +13,20 @@ $(document).on('turbolinks:load', function(){
13
13
  })
14
14
  });
15
15
  });
16
+
17
+ // Rails 4, without TurboLinks
18
+ $(document).on('ready page:load', function(){
19
+ if ( typeof(Turbolinks) == 'undefined' ) {
20
+ $('form').submit(function( event ) {
21
+ var encrypt = new JSEncrypt();
22
+ $('[data-encrypt]').each(function(){
23
+ unencrypted = $(this);
24
+ encrypt.setKey($('#public_key').val());
25
+ encrypted = encrypt.encrypt(unencrypted.val());
26
+ if (encrypted != false) {
27
+ unencrypted.val(encrypted);
28
+ }
29
+ })
30
+ });
31
+ }
32
+ });
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: encrypted_field
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - akil
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-26 00:00:00.000000000 Z
11
+ date: 2017-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  requirements: []
100
100
  rubyforge_project:
101
- rubygems_version: 2.6.14
101
+ rubygems_version: 2.4.6
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: client side encryption