cloudstrg 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -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|
@@ -4,8 +4,6 @@ module Cloudstrg
4
4
 
5
5
  belongs_to :cloudstrgplugin, :class_name => Cloudstrg::Cloudstrgplugin
6
6
 
7
- #has_many :remoteobjects, :class_name => Cloudstrg::Remoteobject, :dependent => :destroy
8
-
9
7
  belongs_to :user, :class_name => Cloudstrg.user_class
10
8
  end
11
9
  end
@@ -26,4 +26,4 @@
26
26
  <%= link_to 'New Config', new_config_path %>
27
27
  |
28
28
  <% end %>
29
- <%= link_to 'Back', main_app.scenes_path %>
29
+ <%= link_to 'Index', main_app.scenes_path %>
@@ -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
@@ -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.find_by_name(plugin_name)
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?
@@ -1,3 +1,3 @@
1
1
  module Cloudstrg
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -0,0 +1,3 @@
1
+ module Cloudstrg
2
+ VERSION = "0.0.8"
3
+ end
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.8
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-11-28 00:00:00.000000000 Z
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