puffer 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -2
- data/VERSION +1 -1
- data/app/controllers/puffer/dashboard_base.rb +13 -0
- data/app/controllers/puffer/sessions_base.rb +17 -0
- data/app/helpers/puffer_helper.rb +29 -1
- data/app/views/layouts/puffer.html.erb +7 -1
- data/app/views/layouts/puffer_dashboard.html.erb +29 -0
- data/app/views/layouts/puffer_sessions.html.erb +21 -0
- data/app/views/puffer/_form.html.erb +1 -0
- data/app/views/puffer/edit.html.erb +0 -16
- data/app/views/puffer/index.html.erb +0 -12
- data/app/views/puffer/new.html.erb +0 -15
- data/app/views/puffer/show.html.erb +1 -8
- data/app/views/puffer_dashboard/index.html.erb +17 -0
- data/app/views/puffer_sessions/new.html.erb +12 -0
- data/config/routes.rb +0 -7
- data/lib/generators/puffer/controller/controller_generator.rb +1 -1
- data/lib/generators/puffer/controller/templates/controller.rb +4 -1
- data/lib/generators/puffer/install/install_generator.rb +9 -0
- data/lib/generators/puffer/install/templates/dashboard_controller.rb +3 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/puffer.js +1 -1
- data/lib/generators/puffer/install/templates/puffer/stylesheets/puffer.css +83 -12
- data/lib/generators/puffer/install/templates/sessions_controller.rb +29 -0
- data/lib/puffer/base.rb +2 -7
- data/lib/puffer/controller/config.rb +4 -4
- data/lib/puffer/controller/dsl.rb +1 -1
- data/lib/puffer/controller/helpers.rb +1 -19
- data/lib/puffer/controller/mutate.rb +23 -8
- data/lib/puffer/extensions/controller.rb +9 -0
- data/lib/puffer/extensions/form.rb +3 -1
- data/lib/puffer/extensions/mapper.rb +9 -7
- data/lib/puffer/fields/field.rb +12 -12
- data/lib/puffer/resource/routing.rb +1 -1
- data/lib/puffer/resource.rb +6 -6
- data/puffer.gemspec +14 -5
- data/spec/dummy/app/controllers/admin/categories_controller.rb +1 -1
- data/spec/dummy/app/controllers/admin/posts_controller.rb +5 -3
- data/spec/dummy/app/controllers/admin/profiles_controller.rb +1 -1
- data/spec/dummy/app/controllers/admin/users_controller.rb +1 -1
- data/spec/dummy/app/controllers/puffer/dashboard_controller.rb +3 -0
- data/spec/dummy/app/controllers/puffer/sessions_controller.rb +16 -0
- data/spec/dummy/config/routes.rb +5 -56
- data/spec/dummy/public/puffer/stylesheets/puffer.css +90 -12
- data/spec/lib/fields_spec.rb +13 -13
- metadata +16 -7
- data/app/controllers/admin/dashboard_controller.rb +0 -13
- data/app/views/admin/dashboard/index.html.erb +0 -1
- data/app/views/puffer/toggle.rjs +0 -1
data/spec/lib/fields_spec.rb
CHANGED
@@ -7,49 +7,49 @@ end
|
|
7
7
|
describe "Field" do
|
8
8
|
|
9
9
|
it "#model" do
|
10
|
-
field = Puffer::Fields::Field.new
|
10
|
+
field = Puffer::Fields::Field.new 'user.profile.name', Post
|
11
11
|
field.model.should == Profile
|
12
|
-
field = Puffer::Fields::Field.new
|
12
|
+
field = Puffer::Fields::Field.new 'user.email', Post
|
13
13
|
field.model.should == User
|
14
|
-
field = Puffer::Fields::Field.new
|
14
|
+
field = Puffer::Fields::Field.new 'user', Post
|
15
15
|
field.model.should == Post
|
16
|
-
field = Puffer::Fields::Field.new
|
16
|
+
field = Puffer::Fields::Field.new 'title', Post
|
17
17
|
field.model.should == Post
|
18
18
|
end
|
19
19
|
|
20
20
|
it "#name" do
|
21
|
-
field = Puffer::Fields::Field.new
|
21
|
+
field = Puffer::Fields::Field.new 'user.profile.name', Post
|
22
22
|
field.name.should == 'name'
|
23
23
|
end
|
24
24
|
|
25
25
|
it "#query_column" do
|
26
|
-
field = Puffer::Fields::Field.new
|
26
|
+
field = Puffer::Fields::Field.new 'user.profile.name', Post
|
27
27
|
field.query_column.should == 'profiles.name'
|
28
|
-
field = Puffer::Fields::Field.new
|
28
|
+
field = Puffer::Fields::Field.new 'user.email', Post
|
29
29
|
field.query_column.should == 'users.email'
|
30
|
-
field = Puffer::Fields::Field.new
|
30
|
+
field = Puffer::Fields::Field.new 'user.full_name', Post
|
31
31
|
field.query_column.should == nil
|
32
32
|
end
|
33
33
|
|
34
34
|
it "#column" do
|
35
|
-
field = Puffer::Fields::Field.new
|
35
|
+
field = Puffer::Fields::Field.new 'user.profile.name', Post
|
36
36
|
field.column.name.should == 'name'
|
37
|
-
field = Puffer::Fields::Field.new
|
37
|
+
field = Puffer::Fields::Field.new 'user.full_name', Post
|
38
38
|
field.column.should == nil
|
39
39
|
end
|
40
40
|
|
41
41
|
it '#type' do
|
42
|
-
field = Puffer::Fields::Field.new
|
42
|
+
field = Puffer::Fields::Field.new 'user.created_at', Post
|
43
43
|
field.type.should == :datetime
|
44
44
|
end
|
45
45
|
|
46
46
|
it '#type with virtual field' do
|
47
|
-
field = Puffer::Fields::Field.new
|
47
|
+
field = Puffer::Fields::Field.new 'user.full_name', Post
|
48
48
|
field.type.should == :string
|
49
49
|
end
|
50
50
|
|
51
51
|
it '#type was specified' do
|
52
|
-
field = Puffer::Fields::Field.new
|
52
|
+
field = Puffer::Fields::Field.new 'user.full_name', Post, :type => :text
|
53
53
|
field.type.should == :text
|
54
54
|
end
|
55
55
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puffer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 63
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 16
|
10
|
+
version: 0.0.16
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- pyromaniac
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-12 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -199,10 +199,12 @@ files:
|
|
199
199
|
- VERSION
|
200
200
|
- app/cells/puffer/base/additional.html.erb
|
201
201
|
- app/cells/puffer/base_cell.rb
|
202
|
-
- app/controllers/
|
202
|
+
- app/controllers/puffer/dashboard_base.rb
|
203
|
+
- app/controllers/puffer/sessions_base.rb
|
203
204
|
- app/helpers/puffer_helper.rb
|
204
|
-
- app/views/admin/dashboard/index.html.erb
|
205
205
|
- app/views/layouts/puffer.html.erb
|
206
|
+
- app/views/layouts/puffer_dashboard.html.erb
|
207
|
+
- app/views/layouts/puffer_sessions.html.erb
|
206
208
|
- app/views/puffer/_form.html.erb
|
207
209
|
- app/views/puffer/associated/_many.html.erb
|
208
210
|
- app/views/puffer/associated/many.rjs
|
@@ -212,7 +214,8 @@ files:
|
|
212
214
|
- app/views/puffer/index.html.erb
|
213
215
|
- app/views/puffer/new.html.erb
|
214
216
|
- app/views/puffer/show.html.erb
|
215
|
-
- app/views/
|
217
|
+
- app/views/puffer_dashboard/index.html.erb
|
218
|
+
- app/views/puffer_sessions/new.html.erb
|
216
219
|
- autotest/discover.rb
|
217
220
|
- config/routes.rb
|
218
221
|
- lib/generators/puffer/controller/USAGE
|
@@ -220,6 +223,7 @@ files:
|
|
220
223
|
- lib/generators/puffer/controller/templates/controller.rb
|
221
224
|
- lib/generators/puffer/install/USAGE
|
222
225
|
- lib/generators/puffer/install/install_generator.rb
|
226
|
+
- lib/generators/puffer/install/templates/dashboard_controller.rb
|
223
227
|
- lib/generators/puffer/install/templates/puffer.rb
|
224
228
|
- lib/generators/puffer/install/templates/puffer/javascripts/puffer.js
|
225
229
|
- lib/generators/puffer/install/templates/puffer/javascripts/rails.js
|
@@ -228,6 +232,7 @@ files:
|
|
228
232
|
- lib/generators/puffer/install/templates/puffer/javascripts/right.js
|
229
233
|
- lib/generators/puffer/install/templates/puffer/stylesheets/puffer.css
|
230
234
|
- lib/generators/puffer/install/templates/puffer/stylesheets/reset.css
|
235
|
+
- lib/generators/puffer/install/templates/sessions_controller.rb
|
231
236
|
- lib/puffer.rb
|
232
237
|
- lib/puffer/base.rb
|
233
238
|
- lib/puffer/controller/actions.rb
|
@@ -268,6 +273,8 @@ files:
|
|
268
273
|
- spec/dummy/app/controllers/admin/tags_controller.rb
|
269
274
|
- spec/dummy/app/controllers/admin/users_controller.rb
|
270
275
|
- spec/dummy/app/controllers/application_controller.rb
|
276
|
+
- spec/dummy/app/controllers/puffer/dashboard_controller.rb
|
277
|
+
- spec/dummy/app/controllers/puffer/sessions_controller.rb
|
271
278
|
- spec/dummy/app/helpers/application_helper.rb
|
272
279
|
- spec/dummy/app/models/category.rb
|
273
280
|
- spec/dummy/app/models/friendship.rb
|
@@ -377,6 +384,8 @@ test_files:
|
|
377
384
|
- spec/dummy/app/controllers/admin/tags_controller.rb
|
378
385
|
- spec/dummy/app/controllers/admin/users_controller.rb
|
379
386
|
- spec/dummy/app/controllers/application_controller.rb
|
387
|
+
- spec/dummy/app/controllers/puffer/dashboard_controller.rb
|
388
|
+
- spec/dummy/app/controllers/puffer/sessions_controller.rb
|
380
389
|
- spec/dummy/app/helpers/application_helper.rb
|
381
390
|
- spec/dummy/app/models/category.rb
|
382
391
|
- spec/dummy/app/models/friendship.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
Dashboard!!!!!!!!!!
|
data/app/views/puffer/toggle.rjs
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
page["#{model_name}_#{@field}_#{record.id}"].checked = record.send @field.name.to_sym
|