cloudstrg 0.0.5 → 0.0.6
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/assets/javascripts/cloudstrg/configs.js +2 -0
- data/app/assets/javascripts/cloudstrg/remoteobjects.js +2 -0
- data/app/assets/stylesheets/cloudstrg/configs.css +4 -0
- data/app/assets/stylesheets/cloudstrg/remoteobjects.css +4 -0
- data/app/controllers/cloudstrg/configs_controller.rb +103 -0
- data/app/controllers/cloudstrg/configs_controller.rb~ +103 -0
- data/app/controllers/cloudstrg/remoteobjects_controller.rb +91 -0
- data/app/controllers/cloudstrg/remoteobjects_controller.rb~ +90 -0
- data/app/helpers/cloudstrg/configs_helper.rb +4 -0
- data/app/helpers/cloudstrg/remoteobjects_helper.rb +4 -0
- data/app/models/cloudstrg/cloudstrgplugin.rb +3 -0
- data/app/models/cloudstrg/cloudstrgplugin.rb~ +8 -0
- data/app/models/cloudstrg/config.rb +9 -0
- data/app/models/cloudstrg/config.rb~ +30 -0
- data/app/models/cloudstrg/remoteobject.rb +11 -0
- data/app/models/cloudstrg/remoteobject.rb~ +9 -0
- data/app/views/cloudstrg/configs/_form.html.erb +26 -0
- data/app/views/cloudstrg/configs/_form.html.erb~ +26 -0
- data/app/views/cloudstrg/configs/edit.html.erb +6 -0
- data/app/views/cloudstrg/configs/index.html.erb +29 -0
- data/app/views/cloudstrg/configs/index.html.erb~ +29 -0
- data/app/views/cloudstrg/configs/new.html.erb +5 -0
- data/app/views/cloudstrg/configs/show.html.erb +15 -0
- data/app/views/cloudstrg/configs/show.html.erb~ +15 -0
- data/app/views/cloudstrg/remoteobjects/_form.html.erb +33 -0
- data/app/views/cloudstrg/remoteobjects/edit.html.erb +6 -0
- data/app/views/cloudstrg/remoteobjects/index.html.erb +29 -0
- data/app/views/cloudstrg/remoteobjects/new.html.erb +5 -0
- data/app/views/cloudstrg/remoteobjects/show.html.erb +25 -0
- data/config/routes.rb +6 -0
- data/config/routes.rb~ +8 -0
- data/db/migrate/20121109112536_create_cloudstrg_remoteobjects.rb~ +12 -0
- data/db/migrate/20121109175154_create_cloudstrg_remoteobjects.rb +12 -0
- data/db/migrate/20121109175154_create_cloudstrg_remoteobjects.rb~ +12 -0
- data/db/migrate/20121113105908_create_cloudstrg_configs.rb +10 -0
- data/db/migrate/20121113105908_create_cloudstrg_configs.rb~ +10 -0
- data/db/migrate/20121116111055_rename_cloudstrg_config_plugin_id_to_cloudstrg_config_cloudstrgplugin_id.rb +5 -0
- data/db/migrate/20121119105425_rename_remoteobject_plugin_id_to_remoteobject_cloudstrgplugin_id.rb +5 -0
- data/db/migrate/20121119184135_add_file_remote_id_to_cloudstrg_remoteobjects.rb +5 -0
- data/db/migrate/20121119184135_add_file_remote_id_to_cloudstrg_remoteobjects.rb~ +5 -0
- data/db/migrate/20121120022309_change_file_remote_id_type_to_string.rb +6 -0
- data/lib/cloudstrg/cloudstrg.rb +44 -23
- data/lib/cloudstrg/cloudstrg.rb~ +164 -0
- data/lib/cloudstrg/version.rb +1 -1
- data/lib/cloudstrg.rb +1 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20121107132518_create_cloudstrg_cloudstrgplugins.cloudstrg.rb +11 -0
- data/test/dummy/db/schema.rb +23 -0
- data/test/dummy/log/development.log +16 -0
- data/test/fixtures/cloudstrg/configs.yml +9 -0
- data/test/fixtures/cloudstrg/remoteobjects.yml +13 -0
- data/test/functional/cloudstrg/configs_controller_test.rb +51 -0
- data/test/functional/cloudstrg/remoteobjects_controller_test.rb +51 -0
- data/test/unit/cloudstrg/config_test.rb +9 -0
- data/test/unit/cloudstrg/remoteobject_test.rb +9 -0
- data/test/unit/helpers/cloudstrg/configs_helper_test.rb +6 -0
- data/test/unit/helpers/cloudstrg/remoteobjects_helper_test.rb +6 -0
- metadata +64 -3
- data/lib/cloudstrg/version.rb~ +0 -3
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Cloudstrg
|
4
|
+
class RemoteobjectsControllerTest < ActionController::TestCase
|
5
|
+
setup do
|
6
|
+
@remoteobject = remoteobjects(:one)
|
7
|
+
end
|
8
|
+
|
9
|
+
test "should get index" do
|
10
|
+
get :index
|
11
|
+
assert_response :success
|
12
|
+
assert_not_nil assigns(:remoteobjects)
|
13
|
+
end
|
14
|
+
|
15
|
+
test "should get new" do
|
16
|
+
get :new
|
17
|
+
assert_response :success
|
18
|
+
end
|
19
|
+
|
20
|
+
test "should create remoteobject" do
|
21
|
+
assert_difference('Remoteobject.count') do
|
22
|
+
post :create, remoteobject: { filehash: @remoteobject.filehash, filename: @remoteobject.filename, plugin_id: @remoteobject.plugin_id, user_id: @remoteobject.user_id }
|
23
|
+
end
|
24
|
+
|
25
|
+
assert_redirected_to remoteobject_path(assigns(:remoteobject))
|
26
|
+
end
|
27
|
+
|
28
|
+
test "should show remoteobject" do
|
29
|
+
get :show, id: @remoteobject
|
30
|
+
assert_response :success
|
31
|
+
end
|
32
|
+
|
33
|
+
test "should get edit" do
|
34
|
+
get :edit, id: @remoteobject
|
35
|
+
assert_response :success
|
36
|
+
end
|
37
|
+
|
38
|
+
test "should update remoteobject" do
|
39
|
+
put :update, id: @remoteobject, remoteobject: { filehash: @remoteobject.filehash, filename: @remoteobject.filename, plugin_id: @remoteobject.plugin_id, user_id: @remoteobject.user_id }
|
40
|
+
assert_redirected_to remoteobject_path(assigns(:remoteobject))
|
41
|
+
end
|
42
|
+
|
43
|
+
test "should destroy remoteobject" do
|
44
|
+
assert_difference('Remoteobject.count', -1) do
|
45
|
+
delete :destroy, id: @remoteobject
|
46
|
+
end
|
47
|
+
|
48
|
+
assert_redirected_to remoteobjects_path
|
49
|
+
end
|
50
|
+
end
|
51
|
+
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.
|
4
|
+
version: 0.0.6
|
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-
|
12
|
+
date: 2012-11-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -50,14 +50,38 @@ executables: []
|
|
50
50
|
extensions: []
|
51
51
|
extra_rdoc_files: []
|
52
52
|
files:
|
53
|
+
- app/helpers/cloudstrg/remoteobjects_helper.rb
|
54
|
+
- app/helpers/cloudstrg/configs_helper.rb
|
53
55
|
- app/helpers/cloudstrg/cloudstrgplugins_helper.rb
|
54
56
|
- app/helpers/cloudstrg/application_helper.rb
|
55
57
|
- app/models/cloudstrg/cloudstrgplugin.rb
|
58
|
+
- app/models/cloudstrg/config.rb
|
59
|
+
- app/models/cloudstrg/remoteobject.rb~
|
60
|
+
- app/models/cloudstrg/config.rb~
|
61
|
+
- app/models/cloudstrg/cloudstrgplugin.rb~
|
62
|
+
- app/models/cloudstrg/remoteobject.rb
|
56
63
|
- app/assets/stylesheets/cloudstrg/cloudstrgplugins.css
|
57
64
|
- app/assets/stylesheets/cloudstrg/application.css
|
65
|
+
- app/assets/stylesheets/cloudstrg/remoteobjects.css
|
66
|
+
- app/assets/stylesheets/cloudstrg/configs.css
|
58
67
|
- app/assets/stylesheets/scaffold.css
|
59
68
|
- app/assets/javascripts/cloudstrg/cloudstrgplugins.js
|
69
|
+
- app/assets/javascripts/cloudstrg/remoteobjects.js
|
70
|
+
- app/assets/javascripts/cloudstrg/configs.js
|
60
71
|
- app/assets/javascripts/cloudstrg/application.js
|
72
|
+
- app/views/cloudstrg/remoteobjects/new.html.erb
|
73
|
+
- app/views/cloudstrg/remoteobjects/show.html.erb
|
74
|
+
- app/views/cloudstrg/remoteobjects/edit.html.erb
|
75
|
+
- app/views/cloudstrg/remoteobjects/_form.html.erb
|
76
|
+
- app/views/cloudstrg/remoteobjects/index.html.erb
|
77
|
+
- app/views/cloudstrg/configs/new.html.erb
|
78
|
+
- app/views/cloudstrg/configs/show.html.erb~
|
79
|
+
- app/views/cloudstrg/configs/_form.html.erb~
|
80
|
+
- app/views/cloudstrg/configs/show.html.erb
|
81
|
+
- app/views/cloudstrg/configs/edit.html.erb
|
82
|
+
- app/views/cloudstrg/configs/index.html.erb~
|
83
|
+
- app/views/cloudstrg/configs/_form.html.erb
|
84
|
+
- app/views/cloudstrg/configs/index.html.erb
|
61
85
|
- app/views/cloudstrg/cloudstrgplugins/new.html.erb
|
62
86
|
- app/views/cloudstrg/cloudstrgplugins/show.html.erb
|
63
87
|
- app/views/cloudstrg/cloudstrgplugins/edit.html.erb
|
@@ -65,24 +89,47 @@ files:
|
|
65
89
|
- app/views/cloudstrg/cloudstrgplugins/index.html.erb
|
66
90
|
- app/views/layouts/cloudstrg/application.html.erb
|
67
91
|
- app/controllers/cloudstrg/cloudstrgplugins_controller.rb
|
92
|
+
- app/controllers/cloudstrg/configs_controller.rb
|
93
|
+
- app/controllers/cloudstrg/configs_controller.rb~
|
94
|
+
- app/controllers/cloudstrg/remoteobjects_controller.rb~
|
68
95
|
- app/controllers/cloudstrg/application_controller.rb
|
96
|
+
- app/controllers/cloudstrg/remoteobjects_controller.rb
|
69
97
|
- config/routes.rb
|
98
|
+
- config/routes.rb~
|
99
|
+
- db/migrate/20121116111055_rename_cloudstrg_config_plugin_id_to_cloudstrg_config_cloudstrgplugin_id.rb
|
100
|
+
- db/migrate/20121119184135_add_file_remote_id_to_cloudstrg_remoteobjects.rb~
|
101
|
+
- db/migrate/20121113105908_create_cloudstrg_configs.rb~
|
102
|
+
- db/migrate/20121109175154_create_cloudstrg_remoteobjects.rb
|
103
|
+
- db/migrate/20121113105908_create_cloudstrg_configs.rb
|
104
|
+
- db/migrate/20121119184135_add_file_remote_id_to_cloudstrg_remoteobjects.rb
|
105
|
+
- db/migrate/20121119105425_rename_remoteobject_plugin_id_to_remoteobject_cloudstrgplugin_id.rb
|
106
|
+
- db/migrate/20121109175154_create_cloudstrg_remoteobjects.rb~
|
107
|
+
- db/migrate/20121109112536_create_cloudstrg_remoteobjects.rb~
|
70
108
|
- db/migrate/20121105173015_create_cloudstrg_cloudstrgplugins.rb
|
109
|
+
- db/migrate/20121120022309_change_file_remote_id_type_to_string.rb
|
71
110
|
- lib/cloudstrg/version.rb
|
72
|
-
- lib/cloudstrg/version.rb~
|
73
111
|
- lib/cloudstrg/engine.rb
|
112
|
+
- lib/cloudstrg/cloudstrg.rb~
|
74
113
|
- lib/cloudstrg/cloudstrg.rb
|
75
114
|
- lib/tasks/cloudstrg_tasks.rake
|
76
115
|
- lib/cloudstrg.rb
|
77
116
|
- MIT-LICENSE
|
78
117
|
- Rakefile
|
79
118
|
- README.rdoc
|
119
|
+
- test/functional/cloudstrg/configs_controller_test.rb
|
120
|
+
- test/functional/cloudstrg/remoteobjects_controller_test.rb
|
80
121
|
- test/functional/cloudstrg/cloudstrgplugins_controller_test.rb
|
81
122
|
- test/unit/helpers/cloudstrg/cloudstrgplugins_helper_test.rb
|
123
|
+
- test/unit/helpers/cloudstrg/configs_helper_test.rb
|
124
|
+
- test/unit/helpers/cloudstrg/remoteobjects_helper_test.rb
|
125
|
+
- test/unit/cloudstrg/remoteobject_test.rb
|
126
|
+
- test/unit/cloudstrg/config_test.rb
|
82
127
|
- test/unit/cloudstrg/cloudstrgplugin_test.rb
|
83
128
|
- test/test_helper.rb
|
84
129
|
- test/integration/navigation_test.rb
|
85
130
|
- test/fixtures/cloudstrg/cloudstrgplugins.yml
|
131
|
+
- test/fixtures/cloudstrg/configs.yml
|
132
|
+
- test/fixtures/cloudstrg/remoteobjects.yml
|
86
133
|
- test/dummy/script/rails
|
87
134
|
- test/dummy/config.ru
|
88
135
|
- test/dummy/app/helpers/application_helper.rb
|
@@ -94,6 +141,9 @@ files:
|
|
94
141
|
- test/dummy/public/404.html
|
95
142
|
- test/dummy/public/422.html
|
96
143
|
- test/dummy/public/favicon.ico
|
144
|
+
- test/dummy/db/schema.rb
|
145
|
+
- test/dummy/db/migrate/20121107132518_create_cloudstrg_cloudstrgplugins.cloudstrg.rb
|
146
|
+
- test/dummy/db/development.sqlite3
|
97
147
|
- test/dummy/config/boot.rb
|
98
148
|
- test/dummy/config/routes.rb
|
99
149
|
- test/dummy/config/database.yml
|
@@ -138,12 +188,20 @@ signing_key:
|
|
138
188
|
specification_version: 3
|
139
189
|
summary: Base API for cloud storage drivers
|
140
190
|
test_files:
|
191
|
+
- test/functional/cloudstrg/configs_controller_test.rb
|
192
|
+
- test/functional/cloudstrg/remoteobjects_controller_test.rb
|
141
193
|
- test/functional/cloudstrg/cloudstrgplugins_controller_test.rb
|
142
194
|
- test/unit/helpers/cloudstrg/cloudstrgplugins_helper_test.rb
|
195
|
+
- test/unit/helpers/cloudstrg/configs_helper_test.rb
|
196
|
+
- test/unit/helpers/cloudstrg/remoteobjects_helper_test.rb
|
197
|
+
- test/unit/cloudstrg/remoteobject_test.rb
|
198
|
+
- test/unit/cloudstrg/config_test.rb
|
143
199
|
- test/unit/cloudstrg/cloudstrgplugin_test.rb
|
144
200
|
- test/test_helper.rb
|
145
201
|
- test/integration/navigation_test.rb
|
146
202
|
- test/fixtures/cloudstrg/cloudstrgplugins.yml
|
203
|
+
- test/fixtures/cloudstrg/configs.yml
|
204
|
+
- test/fixtures/cloudstrg/remoteobjects.yml
|
147
205
|
- test/dummy/script/rails
|
148
206
|
- test/dummy/config.ru
|
149
207
|
- test/dummy/app/helpers/application_helper.rb
|
@@ -155,6 +213,9 @@ test_files:
|
|
155
213
|
- test/dummy/public/404.html
|
156
214
|
- test/dummy/public/422.html
|
157
215
|
- test/dummy/public/favicon.ico
|
216
|
+
- test/dummy/db/schema.rb
|
217
|
+
- test/dummy/db/migrate/20121107132518_create_cloudstrg_cloudstrgplugins.cloudstrg.rb
|
218
|
+
- test/dummy/db/development.sqlite3
|
158
219
|
- test/dummy/config/boot.rb
|
159
220
|
- test/dummy/config/routes.rb
|
160
221
|
- test/dummy/config/database.yml
|
data/lib/cloudstrg/version.rb~
DELETED