cloudstrg 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/cloudstrg/configs_controller.rb~ +2 -7
- data/app/models/cloudstrg/remoteobject.rb~ +0 -2
- data/app/views/cloudstrg/configs/index.html.erb~ +1 -1
- data/lib/cloudstrg/cloudstrg.rb +10 -0
- data/lib/cloudstrg/cloudstrg.rb~ +1 -1
- data/lib/cloudstrg/version.rb +1 -1
- data/lib/cloudstrg/version.rb~ +3 -0
- metadata +3 -2
|
@@ -9,11 +9,6 @@ module Cloudstrg
|
|
|
9
9
|
# GET /configs.json
|
|
10
10
|
def index
|
|
11
11
|
@config = @user.cloudstrgconfig
|
|
12
|
-
if params.has_key? :redirection_url
|
|
13
|
-
puts params[:redirection_url]
|
|
14
|
-
@redirection_url = params[:redirection_url]
|
|
15
|
-
end
|
|
16
|
-
puts "Qui"
|
|
17
12
|
|
|
18
13
|
respond_to do |format|
|
|
19
14
|
format.html # index.html.erb
|
|
@@ -37,7 +32,7 @@ module Cloudstrg
|
|
|
37
32
|
def new
|
|
38
33
|
@config = @user.cloudstrgconfig
|
|
39
34
|
if not @config
|
|
40
|
-
@config = @user.build_cloudstrgconfig
|
|
35
|
+
@config = @user.cloudstrgconfig.build_cloudstrgconfig
|
|
41
36
|
end
|
|
42
37
|
@driver_list = CloudStrg.driver_list
|
|
43
38
|
|
|
@@ -56,7 +51,7 @@ module Cloudstrg
|
|
|
56
51
|
# POST /configs
|
|
57
52
|
# POST /configs.json
|
|
58
53
|
def create
|
|
59
|
-
@config = @user.build_cloudstrgconfig(params[:config])
|
|
54
|
+
@config = @user.cloudstrgconfig.build_cloudstrgconfig(params[:config])
|
|
60
55
|
@driver_list = CloudStrg.driver_list
|
|
61
56
|
|
|
62
57
|
respond_to do |format|
|
data/lib/cloudstrg/cloudstrg.rb
CHANGED
|
@@ -119,6 +119,16 @@ module CloudStrg
|
|
|
119
119
|
raise NotImplementedError
|
|
120
120
|
end
|
|
121
121
|
|
|
122
|
+
###
|
|
123
|
+
# This method check if a referer is valid
|
|
124
|
+
#
|
|
125
|
+
# Params:
|
|
126
|
+
# referer: a string containing the request referer
|
|
127
|
+
#
|
|
128
|
+
def check_referer referer
|
|
129
|
+
raise NotImplementedError
|
|
130
|
+
end
|
|
131
|
+
|
|
122
132
|
def save_remoteobject(user, filename, filecontent, file_remote_id)
|
|
123
133
|
plugin_name = self.class.to_s.split('Strg')[0].downcase
|
|
124
134
|
puts plugin_name
|
data/lib/cloudstrg/cloudstrg.rb~
CHANGED
|
@@ -122,7 +122,7 @@ module CloudStrg
|
|
|
122
122
|
def save_remoteobject(user, filename, filecontent, file_remote_id)
|
|
123
123
|
plugin_name = self.class.to_s.split('Strg')[0].downcase
|
|
124
124
|
puts plugin_name
|
|
125
|
-
plugin = Cloudstrg::Cloudstrgplugin.
|
|
125
|
+
plugin = Cloudstrg::Cloudstrgplugin.find_by_plugin_name(plugin_name)
|
|
126
126
|
|
|
127
127
|
file = Cloudstrg::Remoteobject.where(:user_id => user, :cloudstrgplugin_id => plugin, :filename => filename)
|
|
128
128
|
if not file.empty?
|
data/lib/cloudstrg/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cloudstrg
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-
|
|
12
|
+
date: 2012-12-17 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|
|
@@ -108,6 +108,7 @@ files:
|
|
|
108
108
|
- db/migrate/20121105173015_create_cloudstrg_cloudstrgplugins.rb
|
|
109
109
|
- db/migrate/20121120022309_change_file_remote_id_type_to_string.rb
|
|
110
110
|
- lib/cloudstrg/version.rb
|
|
111
|
+
- lib/cloudstrg/version.rb~
|
|
111
112
|
- lib/cloudstrg/engine.rb
|
|
112
113
|
- lib/cloudstrg/cloudstrg.rb~
|
|
113
114
|
- lib/cloudstrg/cloudstrg.rb
|