sf-dropbox-ext 0.2.2 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +96 -87
- data/config/routes.rb +0 -2
- data/dropbox_ext.gemspec +1 -1
- data/lib/dropbox_ext/version.rb +1 -1
- metadata +5 -7
- data/app/controllers/dropbox_ext/items_controller.rb +0 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: bc80619e7f47a87c08c2321b161adac440c0af13b9f163c6a78019e60e8474b1
|
4
|
+
data.tar.gz: cfcab0a3e84f7484015eb2b9dbad15a92cfbbe769fa6ef9a2bda10d698583f1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8899066d56b639b657561d37da1ecfe77080d07439941b1fb96bd52ea1902896f1eb08f936836c346c3a4affcfb9b9e7da1de692b3a1d49bbea67f97af9daaf3
|
7
|
+
data.tar.gz: e6d7a4f8e9952f2261f94d101542758b38b25e3838f52a3da888cecaa540f9af94caefb9ac27d93b0350e565ca802339d45e2aad9609537b32144ee31d7d2404
|
data/Gemfile.lock
CHANGED
@@ -1,130 +1,139 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sf-dropbox-ext (0.
|
4
|
+
sf-dropbox-ext (0.2.7)
|
5
5
|
dropbox-sdk-v2
|
6
|
-
rails (~> 5
|
6
|
+
rails (~> 5)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actioncable (5.
|
12
|
-
actionpack (= 5.
|
13
|
-
nio4r (~>
|
14
|
-
websocket-driver (
|
15
|
-
actionmailer (5.
|
16
|
-
actionpack (= 5.
|
17
|
-
actionview (= 5.
|
18
|
-
activejob (= 5.
|
11
|
+
actioncable (5.2.4.3)
|
12
|
+
actionpack (= 5.2.4.3)
|
13
|
+
nio4r (~> 2.0)
|
14
|
+
websocket-driver (>= 0.6.1)
|
15
|
+
actionmailer (5.2.4.3)
|
16
|
+
actionpack (= 5.2.4.3)
|
17
|
+
actionview (= 5.2.4.3)
|
18
|
+
activejob (= 5.2.4.3)
|
19
19
|
mail (~> 2.5, >= 2.5.4)
|
20
20
|
rails-dom-testing (~> 2.0)
|
21
|
-
actionpack (5.
|
22
|
-
actionview (= 5.
|
23
|
-
activesupport (= 5.
|
24
|
-
rack (~> 2.0)
|
25
|
-
rack-test (
|
21
|
+
actionpack (5.2.4.3)
|
22
|
+
actionview (= 5.2.4.3)
|
23
|
+
activesupport (= 5.2.4.3)
|
24
|
+
rack (~> 2.0, >= 2.0.8)
|
25
|
+
rack-test (>= 0.6.3)
|
26
26
|
rails-dom-testing (~> 2.0)
|
27
27
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
28
|
-
actionview (5.
|
29
|
-
activesupport (= 5.
|
28
|
+
actionview (5.2.4.3)
|
29
|
+
activesupport (= 5.2.4.3)
|
30
30
|
builder (~> 3.1)
|
31
|
-
|
31
|
+
erubi (~> 1.4)
|
32
32
|
rails-dom-testing (~> 2.0)
|
33
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.
|
34
|
-
activejob (5.
|
35
|
-
activesupport (= 5.
|
33
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
34
|
+
activejob (5.2.4.3)
|
35
|
+
activesupport (= 5.2.4.3)
|
36
36
|
globalid (>= 0.3.6)
|
37
|
-
activemodel (5.
|
38
|
-
activesupport (= 5.
|
39
|
-
activerecord (5.
|
40
|
-
activemodel (= 5.
|
41
|
-
activesupport (= 5.
|
42
|
-
arel (
|
43
|
-
|
37
|
+
activemodel (5.2.4.3)
|
38
|
+
activesupport (= 5.2.4.3)
|
39
|
+
activerecord (5.2.4.3)
|
40
|
+
activemodel (= 5.2.4.3)
|
41
|
+
activesupport (= 5.2.4.3)
|
42
|
+
arel (>= 9.0)
|
43
|
+
activestorage (5.2.4.3)
|
44
|
+
actionpack (= 5.2.4.3)
|
45
|
+
activerecord (= 5.2.4.3)
|
46
|
+
marcel (~> 0.3.1)
|
47
|
+
activesupport (5.2.4.3)
|
44
48
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
45
|
-
i18n (
|
49
|
+
i18n (>= 0.7, < 2)
|
46
50
|
minitest (~> 5.1)
|
47
51
|
tzinfo (~> 1.1)
|
48
|
-
addressable (2.
|
49
|
-
public_suffix (
|
50
|
-
arel (
|
51
|
-
builder (3.2.
|
52
|
-
concurrent-ruby (1.
|
53
|
-
|
52
|
+
addressable (2.7.0)
|
53
|
+
public_suffix (>= 2.0.2, < 5.0)
|
54
|
+
arel (9.0.0)
|
55
|
+
builder (3.2.4)
|
56
|
+
concurrent-ruby (1.1.7)
|
57
|
+
crass (1.0.6)
|
58
|
+
domain_name (0.5.20190701)
|
54
59
|
unf (>= 0.0.5, < 1.0.0)
|
55
60
|
dropbox-sdk-v2 (0.0.3)
|
56
61
|
http (~> 2.0)
|
57
|
-
|
58
|
-
globalid (0.
|
59
|
-
activesupport (>= 4.
|
60
|
-
http (2.2.
|
62
|
+
erubi (1.9.0)
|
63
|
+
globalid (0.4.2)
|
64
|
+
activesupport (>= 4.2.0)
|
65
|
+
http (2.2.2)
|
61
66
|
addressable (~> 2.3)
|
62
67
|
http-cookie (~> 1.0)
|
63
68
|
http-form_data (~> 1.0.1)
|
64
69
|
http_parser.rb (~> 0.6.0)
|
65
70
|
http-cookie (1.0.3)
|
66
71
|
domain_name (~> 0.5)
|
67
|
-
http-form_data (1.0.
|
72
|
+
http-form_data (1.0.3)
|
68
73
|
http_parser.rb (0.6.0)
|
69
|
-
i18n (
|
70
|
-
|
74
|
+
i18n (1.8.5)
|
75
|
+
concurrent-ruby (~> 1.0)
|
76
|
+
loofah (2.7.0)
|
77
|
+
crass (~> 1.0.2)
|
71
78
|
nokogiri (>= 1.5.9)
|
72
|
-
mail (2.
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
rack
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
79
|
+
mail (2.7.1)
|
80
|
+
mini_mime (>= 0.1.1)
|
81
|
+
marcel (0.3.3)
|
82
|
+
mimemagic (~> 0.3.2)
|
83
|
+
method_source (1.0.0)
|
84
|
+
mimemagic (0.3.5)
|
85
|
+
mini_mime (1.0.2)
|
86
|
+
mini_portile2 (2.4.0)
|
87
|
+
minitest (5.14.2)
|
88
|
+
nio4r (2.5.3)
|
89
|
+
nokogiri (1.10.10)
|
90
|
+
mini_portile2 (~> 2.4.0)
|
91
|
+
public_suffix (4.0.6)
|
92
|
+
rack (2.2.3)
|
93
|
+
rack-test (1.1.0)
|
94
|
+
rack (>= 1.0, < 3)
|
95
|
+
rails (5.2.4.3)
|
96
|
+
actioncable (= 5.2.4.3)
|
97
|
+
actionmailer (= 5.2.4.3)
|
98
|
+
actionpack (= 5.2.4.3)
|
99
|
+
actionview (= 5.2.4.3)
|
100
|
+
activejob (= 5.2.4.3)
|
101
|
+
activemodel (= 5.2.4.3)
|
102
|
+
activerecord (= 5.2.4.3)
|
103
|
+
activestorage (= 5.2.4.3)
|
104
|
+
activesupport (= 5.2.4.3)
|
105
|
+
bundler (>= 1.3.0)
|
106
|
+
railties (= 5.2.4.3)
|
98
107
|
sprockets-rails (>= 2.0.0)
|
99
|
-
rails-dom-testing (2.0.
|
100
|
-
activesupport (>= 4.2.0
|
101
|
-
nokogiri (
|
102
|
-
rails-html-sanitizer (1.0
|
103
|
-
loofah (~> 2.
|
104
|
-
railties (5.
|
105
|
-
actionpack (= 5.
|
106
|
-
activesupport (= 5.
|
108
|
+
rails-dom-testing (2.0.3)
|
109
|
+
activesupport (>= 4.2.0)
|
110
|
+
nokogiri (>= 1.6)
|
111
|
+
rails-html-sanitizer (1.3.0)
|
112
|
+
loofah (~> 2.3)
|
113
|
+
railties (5.2.4.3)
|
114
|
+
actionpack (= 5.2.4.3)
|
115
|
+
activesupport (= 5.2.4.3)
|
107
116
|
method_source
|
108
117
|
rake (>= 0.8.7)
|
109
|
-
thor (>= 0.
|
110
|
-
rake (
|
111
|
-
sprockets (
|
118
|
+
thor (>= 0.19.0, < 2.0)
|
119
|
+
rake (13.0.1)
|
120
|
+
sprockets (4.0.2)
|
112
121
|
concurrent-ruby (~> 1.0)
|
113
122
|
rack (> 1, < 3)
|
114
|
-
sprockets-rails (3.2.
|
123
|
+
sprockets-rails (3.2.1)
|
115
124
|
actionpack (>= 4.0)
|
116
125
|
activesupport (>= 4.0)
|
117
126
|
sprockets (>= 3.0.0)
|
118
|
-
thor (0.
|
119
|
-
thread_safe (0.3.
|
120
|
-
tzinfo (1.2.
|
127
|
+
thor (1.0.1)
|
128
|
+
thread_safe (0.3.6)
|
129
|
+
tzinfo (1.2.7)
|
121
130
|
thread_safe (~> 0.1)
|
122
131
|
unf (0.1.4)
|
123
132
|
unf_ext
|
124
|
-
unf_ext (0.0.7.
|
125
|
-
websocket-driver (0.
|
133
|
+
unf_ext (0.0.7.7)
|
134
|
+
websocket-driver (0.7.3)
|
126
135
|
websocket-extensions (>= 0.1.0)
|
127
|
-
websocket-extensions (0.1.
|
136
|
+
websocket-extensions (0.1.5)
|
128
137
|
|
129
138
|
PLATFORMS
|
130
139
|
ruby
|
@@ -133,4 +142,4 @@ DEPENDENCIES
|
|
133
142
|
sf-dropbox-ext!
|
134
143
|
|
135
144
|
BUNDLED WITH
|
136
|
-
1.
|
145
|
+
1.17.2
|
data/config/routes.rb
CHANGED
data/dropbox_ext.gemspec
CHANGED
data/lib/dropbox_ext/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sf-dropbox-ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Standard File
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5
|
19
|
+
version: '5'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5
|
26
|
+
version: '5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: dropbox-sdk-v2
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,7 +56,6 @@ files:
|
|
56
56
|
- app/assets/stylesheets/dropbox_ext/application.css
|
57
57
|
- app/controllers/dropbox_ext/application_controller.rb
|
58
58
|
- app/controllers/dropbox_ext/dropbox_controller.rb
|
59
|
-
- app/controllers/dropbox_ext/items_controller.rb
|
60
59
|
- app/helpers/dropbox_ext/application_helper.rb
|
61
60
|
- app/helpers/dropbox_ext/dropbox_helper.rb
|
62
61
|
- app/helpers/dropbox_ext/encryption_helper.rb
|
@@ -91,8 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
90
|
- !ruby/object:Gem::Version
|
92
91
|
version: '0'
|
93
92
|
requirements: []
|
94
|
-
|
95
|
-
rubygems_version: 2.6.12
|
93
|
+
rubygems_version: 3.0.3
|
96
94
|
signing_key:
|
97
95
|
specification_version: 4
|
98
96
|
summary: Summary of DropboxExt.
|
@@ -1,49 +0,0 @@
|
|
1
|
-
require_dependency "dropbox_ext/application_controller"
|
2
|
-
|
3
|
-
module DropboxExt
|
4
|
-
class ItemsController < ApplicationController
|
5
|
-
|
6
|
-
def dropbox
|
7
|
-
if @dropbox
|
8
|
-
return @dropbox
|
9
|
-
end
|
10
|
-
|
11
|
-
require 'dropbox'
|
12
|
-
@dropbox = Dropbox::Client.new(params[:dbt])
|
13
|
-
end
|
14
|
-
|
15
|
-
def sync_decrypt_file
|
16
|
-
existing = dropbox.search("", "decrypt")
|
17
|
-
|
18
|
-
if existing.length > 0
|
19
|
-
file = existing[0]
|
20
|
-
days_old = (Time.now - file.client_modified).to_i / (24 * 60 * 60)
|
21
|
-
if days_old < 14
|
22
|
-
return
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
require 'open-uri'
|
27
|
-
content = open('https://raw.githubusercontent.com/standardfile/decrypt-html-page/master/decrypt.html').read
|
28
|
-
dropbox.upload("/decrypt.html", content, {:mode => "overwrite"})
|
29
|
-
end
|
30
|
-
|
31
|
-
def sync
|
32
|
-
items = params[:items]
|
33
|
-
auth_params = params[:auth_params]
|
34
|
-
|
35
|
-
if items && items.length > 0
|
36
|
-
payload = { "items" => items }
|
37
|
-
payload["auth_params"] = auth_params if auth_params != nil
|
38
|
-
folder = "/#{Time.current.year}/#{DateTime.now.strftime("%B")}"
|
39
|
-
filename = "#{DateTime.now.strftime("%B %d, %Y").sub(',', '')}.txt"
|
40
|
-
dropbox.upload("#{folder}/#{filename}", "#{JSON.pretty_generate(payload.as_json)}", {:mode => "overwrite"})
|
41
|
-
end
|
42
|
-
|
43
|
-
self.sync_decrypt_file()
|
44
|
-
|
45
|
-
render :json => {:success => true}
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
49
|
-
end
|