hobo 1.4.0.pre7 → 1.4.0.pre8
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES-1.4.txt +2 -2
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/app/helpers/hobo_permissions_helper.rb +1 -1
- data/lib/generators/hobo/plugin.rb +1 -1
- data/lib/hobo.rb +1 -1
- data/lib/hobo/extensions/active_record/permissions.rb +1 -1
- data/lib/hobo/extensions/array.rb +1 -1
- metadata +107 -78
data/CHANGES-1.4.txt
CHANGED
@@ -731,7 +731,7 @@ Unfortunately, 2 of the integration tests fails on firefox, which
|
|
731
731
|
works out of the box, so we also have to install capybara-webkit and
|
732
732
|
selenium-chrome.
|
733
733
|
|
734
|
-
$ git clone -b
|
734
|
+
$ git clone -b hobo-1.4 git://github.com/Hobo/agility-gitorial.git
|
735
735
|
$ cd agility-gitorial
|
736
736
|
|
737
737
|
Make sure you have the prerequisites for capybara-webkit:
|
@@ -741,7 +741,7 @@ https://github.com/thoughtbot/capybara-webkit/wiki/Installing-QT
|
|
741
741
|
$ rake db:migrate
|
742
742
|
|
743
743
|
Download the selenium-chrome server and place in your path:
|
744
|
-
http://code.google.com/p/
|
744
|
+
http://code.google.com/p/chromedriver/downloads/list
|
745
745
|
|
746
746
|
$ rake test:integration
|
747
747
|
|
data/Rakefile
CHANGED
@@ -14,7 +14,7 @@ require 'hobo'
|
|
14
14
|
|
15
15
|
include Rake::DSL
|
16
16
|
|
17
|
-
RUBY = File.join(
|
17
|
+
RUBY = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']).sub(/.*\s.*/m, '"\&"')
|
18
18
|
RUBYDOCTEST = ENV['RUBYDOCTEST'] || "#{RUBY} -S rubydoctest"
|
19
19
|
|
20
20
|
GEM_ROOT = File.expand_path('../', __FILE__)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.0.
|
1
|
+
1.4.0.pre8
|
@@ -19,7 +19,7 @@ module HoboPermissionsHelper
|
|
19
19
|
def can_create?(object=this)
|
20
20
|
if object.is_a?(Class) and object < ActiveRecord::Base
|
21
21
|
object = object.new
|
22
|
-
elsif (refl = object.try.
|
22
|
+
elsif (refl = object.try.proxy_association._?.reflection) && refl.macro == :has_many
|
23
23
|
if Hobo.simple_has_many_association?(object)
|
24
24
|
object = object.build
|
25
25
|
object.set_creator(current_user)
|
data/lib/hobo.rb
CHANGED
@@ -56,7 +56,7 @@ module Hobo
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def simple_has_many_association?(array_or_reflection)
|
59
|
-
refl = array_or_reflection.respond_to?(:
|
59
|
+
refl = array_or_reflection.respond_to?(:proxy_association) ? array_or_reflection.proxy_association.reflection : array_or_reflection
|
60
60
|
return false unless refl.is_a?(ActiveRecord::Reflection::AssociationReflection)
|
61
61
|
refl.macro == :has_many and
|
62
62
|
(not refl.through_reflection) and
|
@@ -118,7 +118,7 @@ ActiveRecord::Associations::HasManyThroughAssociation.class_eval do
|
|
118
118
|
joiner = klass.where(construct_join_attributes(r)).first
|
119
119
|
joiner.is_a?(Hobo::Model) && !joiner.destroyable_by?(user)
|
120
120
|
}
|
121
|
-
raise Hobo::PermissionDeniedError, "#{@owner.class}##{
|
121
|
+
raise Hobo::PermissionDeniedError, "#{@owner.class}##{proxy_association.reflection.name}.destroy"
|
122
122
|
end
|
123
123
|
delete_records_without_hobo_permission_check(records, method)
|
124
124
|
end
|
@@ -19,7 +19,7 @@ class Array
|
|
19
19
|
collection = paginate_without_hobo_metadata(*args, &block)
|
20
20
|
collection.member_class = member_class
|
21
21
|
collection.origin = try.proxy_owner
|
22
|
-
collection.origin_attribute = try.
|
22
|
+
collection.origin_attribute = try.proxy_association._?.reflection._?.name
|
23
23
|
collection
|
24
24
|
end
|
25
25
|
alias_method_chain :paginate, :hobo_metadata
|
metadata
CHANGED
@@ -1,103 +1,135 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: hobo
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.4.0.pre8
|
4
5
|
prerelease: 6
|
5
|
-
version: 1.4.0.pre7
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Tom Locke
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-08-01 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: hobo_support
|
17
|
-
|
18
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 1.4.0.
|
18
|
+
requirements:
|
19
|
+
- - '='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.4.0.pre8
|
24
22
|
type: :runtime
|
25
|
-
version_requirements: *id001
|
26
|
-
- !ruby/object:Gem::Dependency
|
27
|
-
name: hobo_fields
|
28
23
|
prerelease: false
|
29
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - '='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.4.0.pre8
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: hobo_fields
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
30
33
|
none: false
|
31
|
-
requirements:
|
32
|
-
- -
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: 1.4.0.
|
34
|
+
requirements:
|
35
|
+
- - '='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 1.4.0.pre8
|
35
38
|
type: :runtime
|
36
|
-
version_requirements: *id002
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: dryml
|
39
39
|
prerelease: false
|
40
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - '='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.4.0.pre8
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: dryml
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
41
49
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: 1.4.0.
|
50
|
+
requirements:
|
51
|
+
- - '='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.4.0.pre8
|
46
54
|
type: :runtime
|
47
|
-
version_requirements: *id003
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: will_paginate
|
50
55
|
prerelease: false
|
51
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.4.0.pre8
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: will_paginate
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
52
65
|
none: false
|
53
|
-
requirements:
|
66
|
+
requirements:
|
54
67
|
- - ~>
|
55
|
-
- !ruby/object:Gem::Version
|
68
|
+
- !ruby/object:Gem::Version
|
56
69
|
version: 3.0.0
|
57
70
|
type: :runtime
|
58
|
-
version_requirements: *id004
|
59
|
-
- !ruby/object:Gem::Dependency
|
60
|
-
name: rubydoctest
|
61
71
|
prerelease: false
|
62
|
-
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
73
|
none: false
|
64
|
-
requirements:
|
65
|
-
- -
|
66
|
-
- !ruby/object:Gem::Version
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 3.0.0
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rubydoctest
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
67
85
|
version: 1.1.3
|
68
86
|
type: :development
|
69
|
-
version_requirements: *id005
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: shoulda
|
72
87
|
prerelease: false
|
73
|
-
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 1.1.3
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: shoulda
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
74
97
|
none: false
|
75
|
-
requirements:
|
76
|
-
- -
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version:
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
79
102
|
type: :development
|
80
|
-
version_requirements: *id006
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: irt
|
83
103
|
prerelease: false
|
84
|
-
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: irt
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
85
113
|
none: false
|
86
|
-
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
89
117
|
version: 1.2.10
|
90
118
|
type: :development
|
91
|
-
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 1.2.10
|
92
126
|
description: The web app builder for Rails
|
93
127
|
email: tom@tomlocke.com
|
94
|
-
executables:
|
128
|
+
executables:
|
95
129
|
- hobo
|
96
130
|
extensions: []
|
97
|
-
|
98
131
|
extra_rdoc_files: []
|
99
|
-
|
100
|
-
files:
|
132
|
+
files:
|
101
133
|
- CHANGES-1.1.txt
|
102
134
|
- CHANGES-1.3.txt
|
103
135
|
- CHANGES-1.4.txt
|
@@ -309,31 +341,28 @@ files:
|
|
309
341
|
- test/permissions/test_permissions.rb
|
310
342
|
homepage: http://hobocentral.net
|
311
343
|
licenses: []
|
312
|
-
|
313
344
|
post_install_message:
|
314
|
-
rdoc_options:
|
345
|
+
rdoc_options:
|
315
346
|
- --charset=UTF-8
|
316
|
-
require_paths:
|
347
|
+
require_paths:
|
317
348
|
- lib
|
318
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
349
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
319
350
|
none: false
|
320
|
-
requirements:
|
321
|
-
- -
|
322
|
-
- !ruby/object:Gem::Version
|
323
|
-
version:
|
324
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
351
|
+
requirements:
|
352
|
+
- - ! '>='
|
353
|
+
- !ruby/object:Gem::Version
|
354
|
+
version: '0'
|
355
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
325
356
|
none: false
|
326
|
-
requirements:
|
327
|
-
- -
|
328
|
-
- !ruby/object:Gem::Version
|
357
|
+
requirements:
|
358
|
+
- - ! '>='
|
359
|
+
- !ruby/object:Gem::Version
|
329
360
|
version: 1.3.6
|
330
361
|
requirements: []
|
331
|
-
|
332
362
|
rubyforge_project: hobo
|
333
|
-
rubygems_version: 1.8.
|
363
|
+
rubygems_version: 1.8.24
|
334
364
|
signing_key:
|
335
365
|
specification_version: 3
|
336
366
|
summary: The web app builder for Rails
|
337
367
|
test_files: []
|
338
|
-
|
339
368
|
has_rdoc:
|