kojac 0.13.0 → 0.15.0
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/kojac_ember.js +1 -1
- data/app/controllers/{kojac_base_controller.rb → kojac_front_controller.rb} +3 -1
- data/app/controllers/kojac_front_methods.rb +32 -23
- data/app/policies/concentric_policy.rb +131 -0
- data/app/policies/kojac_base_policy.rb +1 -153
- data/app/serializers/kojac_base_serializer.rb +3 -1
- data/kojac.gemspec +2 -1
- data/lib/kojac/concentric.rb +41 -14
- data/lib/kojac/kojac_controller.rb +7 -0
- data/lib/kojac/kojac_rails.rb +179 -117
- data/lib/kojac/version.rb +1 -1
- data/lib/kojac.rb +6 -1
- data/spec/demo/.generators +8 -0
- data/spec/demo/.rakeTasks +7 -0
- data/spec/demo/.ruby-version +1 -1
- data/spec/demo/Gemfile +7 -2
- data/spec/demo/Gemfile.lock +118 -85
- data/spec/demo/app/policies/user_policy.rb +20 -27
- data/spec/demo/spec/controllers/allowed_fields_spec.rb +8 -8
- data/spec/demo/spec/features/concentric_spec.rb +6 -6
- data/spec/{model_ring_spec.rb → demo/spec/models/model_ring_spec.rb} +8 -22
- data/spec/demo/spec/spec_utils.rb +5 -5
- metadata +40 -7
- data/lib/kojac/kojac_policy.rb +0 -70
data/spec/demo/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
|
-
remote:
|
2
|
+
remote: ../..
|
3
3
|
specs:
|
4
|
-
kojac (0.
|
4
|
+
kojac (0.15.0)
|
5
5
|
active_model_serializers (= 0.9.0.alpha1)
|
6
6
|
buzztools (~> 0.0.5)
|
7
7
|
pundit (~> 0.2.3)
|
@@ -10,121 +10,149 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
actionmailer (4.
|
14
|
-
actionpack (= 4.
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
actionmailer (4.2.5)
|
14
|
+
actionpack (= 4.2.5)
|
15
|
+
actionview (= 4.2.5)
|
16
|
+
activejob (= 4.2.5)
|
17
|
+
mail (~> 2.5, >= 2.5.4)
|
18
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
19
|
+
actionpack (4.2.5)
|
20
|
+
actionview (= 4.2.5)
|
21
|
+
activesupport (= 4.2.5)
|
22
|
+
rack (~> 1.6)
|
21
23
|
rack-test (~> 0.6.2)
|
24
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
25
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
26
|
+
actionview (4.2.5)
|
27
|
+
activesupport (= 4.2.5)
|
28
|
+
builder (~> 3.1)
|
29
|
+
erubis (~> 2.7.0)
|
30
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
31
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
22
32
|
active_model_serializers (0.9.0.alpha1)
|
23
33
|
activemodel (>= 3.2)
|
24
|
-
|
25
|
-
activesupport (= 4.
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
builder (3.
|
42
|
-
buzztools (0.0.
|
34
|
+
activejob (4.2.5)
|
35
|
+
activesupport (= 4.2.5)
|
36
|
+
globalid (>= 0.3.0)
|
37
|
+
activemodel (4.2.5)
|
38
|
+
activesupport (= 4.2.5)
|
39
|
+
builder (~> 3.1)
|
40
|
+
activerecord (4.2.5)
|
41
|
+
activemodel (= 4.2.5)
|
42
|
+
activesupport (= 4.2.5)
|
43
|
+
arel (~> 6.0)
|
44
|
+
activesupport (4.2.5)
|
45
|
+
i18n (~> 0.7)
|
46
|
+
json (~> 1.7, >= 1.7.7)
|
47
|
+
minitest (~> 5.1)
|
48
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
49
|
+
tzinfo (~> 1.1)
|
50
|
+
arel (6.0.3)
|
51
|
+
builder (3.2.2)
|
52
|
+
buzztools (0.0.11)
|
43
53
|
diff-lcs (1.2.5)
|
44
54
|
erubis (2.7.0)
|
45
|
-
execjs (2.0
|
46
|
-
factory_girl (4.
|
55
|
+
execjs (2.6.0)
|
56
|
+
factory_girl (4.5.0)
|
47
57
|
activesupport (>= 3.0.0)
|
48
|
-
factory_girl_rails (4.
|
49
|
-
factory_girl (~> 4.
|
58
|
+
factory_girl_rails (4.5.0)
|
59
|
+
factory_girl (~> 4.5.0)
|
50
60
|
railties (>= 3.0.0)
|
51
|
-
faker (1.
|
61
|
+
faker (1.6.1)
|
52
62
|
i18n (~> 0.5)
|
63
|
+
globalid (0.3.6)
|
64
|
+
activesupport (>= 4.1.0)
|
53
65
|
hike (1.2.3)
|
54
|
-
i18n (0.
|
66
|
+
i18n (0.7.0)
|
55
67
|
jbuilder (1.5.3)
|
56
68
|
activesupport (>= 3.0.0)
|
57
69
|
multi_json (>= 1.2.0)
|
58
|
-
jquery-rails (
|
59
|
-
|
70
|
+
jquery-rails (4.0.5)
|
71
|
+
rails-dom-testing (~> 1.0)
|
72
|
+
railties (>= 4.2.0)
|
60
73
|
thor (>= 0.14, < 2.0)
|
61
|
-
json (1.8.
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
74
|
+
json (1.8.3)
|
75
|
+
loofah (2.0.3)
|
76
|
+
nokogiri (>= 1.5.9)
|
77
|
+
mail (2.6.3)
|
78
|
+
mime-types (>= 1.16, < 3)
|
79
|
+
mime-types (2.99)
|
80
|
+
mini_portile2 (2.0.0)
|
81
|
+
minitest (5.8.3)
|
82
|
+
multi_json (1.11.2)
|
83
|
+
nokogiri (1.6.7)
|
84
|
+
mini_portile2 (~> 2.0.0.rc2)
|
85
|
+
psych (2.0.4)
|
69
86
|
pundit (0.2.3)
|
70
87
|
activesupport (>= 3.0.0)
|
71
|
-
rack (1.
|
72
|
-
rack-test (0.6.
|
88
|
+
rack (1.6.4)
|
89
|
+
rack-test (0.6.3)
|
73
90
|
rack (>= 1.0)
|
74
|
-
rails (4.
|
75
|
-
actionmailer (= 4.
|
76
|
-
actionpack (= 4.
|
77
|
-
|
78
|
-
|
91
|
+
rails (4.2.5)
|
92
|
+
actionmailer (= 4.2.5)
|
93
|
+
actionpack (= 4.2.5)
|
94
|
+
actionview (= 4.2.5)
|
95
|
+
activejob (= 4.2.5)
|
96
|
+
activemodel (= 4.2.5)
|
97
|
+
activerecord (= 4.2.5)
|
98
|
+
activesupport (= 4.2.5)
|
79
99
|
bundler (>= 1.3.0, < 2.0)
|
80
|
-
railties (= 4.
|
81
|
-
sprockets-rails
|
82
|
-
|
83
|
-
|
84
|
-
|
100
|
+
railties (= 4.2.5)
|
101
|
+
sprockets-rails
|
102
|
+
rails-deprecated_sanitizer (1.0.3)
|
103
|
+
activesupport (>= 4.2.0.alpha)
|
104
|
+
rails-dom-testing (1.0.7)
|
105
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
106
|
+
nokogiri (~> 1.6.0)
|
107
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
108
|
+
rails-html-sanitizer (1.0.2)
|
109
|
+
loofah (~> 2.0)
|
110
|
+
railties (4.2.5)
|
111
|
+
actionpack (= 4.2.5)
|
112
|
+
activesupport (= 4.2.5)
|
85
113
|
rake (>= 0.8.7)
|
86
114
|
thor (>= 0.18.1, < 2.0)
|
87
|
-
rake (10.
|
88
|
-
rdoc (
|
89
|
-
|
90
|
-
|
91
|
-
rspec-
|
115
|
+
rake (10.4.2)
|
116
|
+
rdoc (4.2.0)
|
117
|
+
responders (2.1.0)
|
118
|
+
railties (>= 4.2.0, < 5)
|
119
|
+
rspec-core (2.14.8)
|
120
|
+
rspec-expectations (2.14.5)
|
92
121
|
diff-lcs (>= 1.1.3, < 2.0)
|
93
|
-
rspec-mocks (2.14.
|
94
|
-
rspec-rails (2.14.
|
122
|
+
rspec-mocks (2.14.6)
|
123
|
+
rspec-rails (2.14.2)
|
95
124
|
actionpack (>= 3.0)
|
125
|
+
activemodel (>= 3.0)
|
96
126
|
activesupport (>= 3.0)
|
97
127
|
railties (>= 3.0)
|
98
128
|
rspec-core (~> 2.14.0)
|
99
129
|
rspec-expectations (~> 2.14.0)
|
100
130
|
rspec-mocks (~> 2.14.0)
|
101
|
-
sass (3.2.
|
102
|
-
sass-rails (4.0.
|
131
|
+
sass (3.2.19)
|
132
|
+
sass-rails (4.0.5)
|
103
133
|
railties (>= 4.0.0, < 5.0)
|
104
|
-
sass (
|
105
|
-
sprockets
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
134
|
+
sass (~> 3.2.2)
|
135
|
+
sprockets (~> 2.8, < 3.0)
|
136
|
+
sprockets-rails (~> 2.0)
|
137
|
+
sdoc (0.4.1)
|
138
|
+
json (~> 1.7, >= 1.7.7)
|
139
|
+
rdoc (~> 4.0)
|
140
|
+
sprockets (2.12.4)
|
110
141
|
hike (~> 1.2)
|
111
142
|
multi_json (~> 1.0)
|
112
143
|
rack (~> 1.0)
|
113
144
|
tilt (~> 1.1, != 1.3.0)
|
114
|
-
sprockets-rails (2.
|
145
|
+
sprockets-rails (2.3.3)
|
115
146
|
actionpack (>= 3.0)
|
116
147
|
activesupport (>= 3.0)
|
117
|
-
sprockets (
|
118
|
-
sqlite3 (1.3.
|
119
|
-
thor (0.
|
120
|
-
thread_safe (0.
|
121
|
-
atomic
|
148
|
+
sprockets (>= 2.8, < 4.0)
|
149
|
+
sqlite3 (1.3.11)
|
150
|
+
thor (0.19.1)
|
151
|
+
thread_safe (0.3.5)
|
122
152
|
tilt (1.4.1)
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
tzinfo (0.3.38)
|
127
|
-
uglifier (2.3.2)
|
153
|
+
tzinfo (1.2.2)
|
154
|
+
thread_safe (~> 0.1)
|
155
|
+
uglifier (2.7.2)
|
128
156
|
execjs (>= 0.3.0)
|
129
157
|
json (>= 1.8.0)
|
130
158
|
underscore_plus (0.9.1)
|
@@ -140,9 +168,14 @@ DEPENDENCIES
|
|
140
168
|
jbuilder (~> 1.2)
|
141
169
|
jquery-rails
|
142
170
|
kojac!
|
143
|
-
|
144
|
-
|
171
|
+
psych (= 2.0.4)
|
172
|
+
rails (~> 4.2)
|
173
|
+
responders (~> 2.0)
|
174
|
+
rspec-rails (~> 2.14)
|
145
175
|
sass-rails (~> 4.0.0)
|
146
176
|
sdoc
|
147
177
|
sqlite3
|
148
178
|
uglifier (>= 1.3.0)
|
179
|
+
|
180
|
+
BUNDLED WITH
|
181
|
+
1.10.6
|
@@ -4,46 +4,39 @@ class UserPolicy < KojacBasePolicy
|
|
4
4
|
user.id == record.id
|
5
5
|
end
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
allow_filter do |aPolicy,aResult,aRing,aAbility|
|
16
|
-
if aRing <= SYSADMIN_RING # sysadmin can do all, so pass through
|
17
|
-
aResult
|
18
|
-
elsif (aPolicy.user.owner_id and aPolicy.record.owner_id != aPolicy.user.owner_id) # user has a ring that doesn't match record
|
19
|
-
aResult = []
|
20
|
-
elsif aRing > USER_RING # outside of user, can't do anything
|
21
|
-
aResult
|
7
|
+
allow_filter do |p,fields|
|
8
|
+
ring = p.user.ring
|
9
|
+
if ring <= SYSADMIN_RING # sysadmin can do all, so pass through
|
10
|
+
fields
|
11
|
+
elsif (p.user.owner_id and p.record.owner_id != p.user.owner_id) # user has a ring that doesn't match record
|
12
|
+
fields = []
|
13
|
+
elsif ring > USER_RING # outside of user, can't do anything
|
14
|
+
fields
|
22
15
|
else
|
23
|
-
if
|
24
|
-
case
|
16
|
+
if p.is_self? or (ring < p.record.ring and ring <= ADMIN_RING) # can admin if self or admin and lower rank
|
17
|
+
case p.ability
|
25
18
|
when :write
|
26
|
-
|
19
|
+
fields += User::PUBLIC_FIELDS + User::PRIVATE_FIELDS
|
27
20
|
when :read
|
28
|
-
|
21
|
+
fields += User::PRIVATE_FIELDS
|
29
22
|
end
|
30
23
|
end
|
31
|
-
|
24
|
+
fields
|
32
25
|
end
|
33
26
|
end
|
34
27
|
|
35
|
-
# allow_filter ring: :guest_admin, ability: :write do |aPolicy,
|
36
|
-
#
|
28
|
+
# allow_filter ring: :guest_admin, ability: :write do |aPolicy,aFields|
|
29
|
+
# aPolicy.is_self? ? aFields : []
|
37
30
|
# end
|
38
31
|
#
|
39
|
-
# allow_filter ability: [:create, :write] do |aPolicy,
|
32
|
+
# allow_filter ability: [:create, :write] do |aPolicy,aFields|
|
40
33
|
# # logic here to set aResult
|
41
|
-
#
|
34
|
+
# aFields
|
42
35
|
# end
|
43
36
|
#
|
44
37
|
# # prevent guest_admin from creating or writing Users, even though outer rings can
|
45
|
-
# allow_filter ring: :guest_admin, ability: [:create, :write] do |
|
46
|
-
#
|
38
|
+
# allow_filter ring: :guest_admin, ability: [:create, :write] do |aPolicy,aFields|
|
39
|
+
# []
|
47
40
|
# end
|
48
41
|
|
49
42
|
# def permitted_attributes(aAbility=nil)
|
@@ -56,7 +49,7 @@ class UserPolicy < KojacBasePolicy
|
|
56
49
|
#
|
57
50
|
# result = super(aAbility)
|
58
51
|
#
|
59
|
-
# if is_self? &&
|
52
|
+
# if is_self? && user_ring <= USER_RING
|
60
53
|
# case aAbility
|
61
54
|
# when :write
|
62
55
|
# result = (result | (User::PUBLIC_FIELDS + User::PRIVATE_FIELDS)).sort
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe KojacFrontController do
|
4
4
|
|
5
5
|
#before(:each) do
|
6
6
|
# #@user = FactoryGirl.create(:user, ring: 3)
|
@@ -17,7 +17,7 @@ describe KojacBaseController do
|
|
17
17
|
draw_routes do
|
18
18
|
get ":controller/:action"
|
19
19
|
end
|
20
|
-
result,error =
|
20
|
+
result,error = exec_op(read_op)
|
21
21
|
result.keys.sort.should == (User::PUBLIC_FIELDS).map(&:to_s).sort
|
22
22
|
end
|
23
23
|
|
@@ -31,7 +31,7 @@ describe KojacBaseController do
|
|
31
31
|
draw_routes do
|
32
32
|
get ":controller/:action"
|
33
33
|
end
|
34
|
-
result,error =
|
34
|
+
result,error = exec_op(read_op)
|
35
35
|
result.keys.sort.should == (User::PUBLIC_FIELDS + User::PRIVATE_FIELDS + User::ADMIN_FIELDS + User::READ_ONLY_FIELDS).map(&:to_s).sort
|
36
36
|
end
|
37
37
|
|
@@ -49,7 +49,7 @@ describe KojacBaseController do
|
|
49
49
|
draw_routes do
|
50
50
|
get ":controller/:action"
|
51
51
|
end
|
52
|
-
result,error =
|
52
|
+
result,error = exec_op(send_op)
|
53
53
|
|
54
54
|
error['kind'].should == 'Exception'
|
55
55
|
error.g?('errors.0.message').should == "You are not authorized to perform this action"
|
@@ -66,7 +66,7 @@ describe KojacBaseController do
|
|
66
66
|
draw_routes do
|
67
67
|
get ":controller/:action"
|
68
68
|
end
|
69
|
-
result,error =
|
69
|
+
result,error = exec_op(send_op)
|
70
70
|
result.keys.sort.should == (User::PUBLIC_FIELDS + User::PRIVATE_FIELDS).map(&:to_s).sort
|
71
71
|
end
|
72
72
|
|
@@ -83,7 +83,7 @@ describe KojacBaseController do
|
|
83
83
|
draw_routes do
|
84
84
|
get ":controller/:action"
|
85
85
|
end
|
86
|
-
result,error =
|
86
|
+
result,error = exec_op(send_op)
|
87
87
|
result['last_name'].should == send_op.g?('value.last_name')
|
88
88
|
result.keys.sort.should == (User::PUBLIC_FIELDS + User::PRIVATE_FIELDS).map(&:to_s).sort
|
89
89
|
end
|
@@ -102,7 +102,7 @@ describe KojacBaseController do
|
|
102
102
|
draw_routes do
|
103
103
|
get ":controller/:action"
|
104
104
|
end
|
105
|
-
result,error =
|
105
|
+
result,error = exec_op(send_op)
|
106
106
|
result['last_name'].should == send_op.g?('value.last_name')
|
107
107
|
user2.reload
|
108
108
|
user2.last_name.should == send_op.g?('value.last_name')
|
@@ -123,7 +123,7 @@ describe KojacBaseController do
|
|
123
123
|
draw_routes do
|
124
124
|
get ":controller/:action"
|
125
125
|
end
|
126
|
-
result,error =
|
126
|
+
result,error = exec_op(send_op)
|
127
127
|
error['kind'].should == 'Exception'
|
128
128
|
error.g?('errors.0.message').should == "You are not authorized to perform this action"
|
129
129
|
user2.reload
|
@@ -72,13 +72,13 @@ describe "ConcentricTestModel" do
|
|
72
72
|
end
|
73
73
|
|
74
74
|
class TestUserPolicy < KojacBasePolicy
|
75
|
-
allow_filter ability: :write, ring: :boss do |
|
76
|
-
|
77
|
-
|
75
|
+
allow_filter ability: :write, ring: :boss do |p,fields| # boss can't write other people's passwords
|
76
|
+
fields -= [:password] if p.user.id != p.record.id
|
77
|
+
fields
|
78
78
|
end
|
79
|
-
allow_filter do |
|
80
|
-
|
81
|
-
|
79
|
+
allow_filter do |p,fields| # boss can't write other people's passwords
|
80
|
+
fields = [] if p.user.id != p.record.id and p.user.ring >= p.record.ring and p.user.ring >= Concentric.lookup_ring(:master)
|
81
|
+
fields
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
@@ -11,13 +11,9 @@ describe "Simple Item1 rings" do
|
|
11
11
|
|
12
12
|
|
13
13
|
it "can specify ring fields" do
|
14
|
-
Item1.
|
15
|
-
|
16
|
-
|
17
|
-
nil,
|
18
|
-
{:write=>[:address, :name], :read=>[:address, :member_code, :name]}
|
19
|
-
]
|
20
|
-
Item1.rings_abilities.should == []
|
14
|
+
Item1.rings_abilities.should == {
|
15
|
+
3 => {:write=>[:address, :name], :read=>[:address, :member_code, :name]}
|
16
|
+
}
|
21
17
|
end
|
22
18
|
end
|
23
19
|
|
@@ -26,27 +22,17 @@ describe "Item2 rings with abilities" do
|
|
26
22
|
class Item2 < ActiveRecord::Base
|
27
23
|
include Concentric::Model
|
28
24
|
|
29
|
-
ring 2, [:
|
25
|
+
ring 2, [:delete] => :this
|
30
26
|
ring 3, :write => [:name,:address]
|
31
27
|
ring 3, :read => [:name,:address,:member_code]
|
32
|
-
ring 4, :read
|
33
28
|
end
|
34
29
|
|
35
30
|
|
36
31
|
it "can specify ring fields" do
|
37
|
-
Item2.
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
{:write=>[:address, :name], :read=>[:address, :member_code, :name]}
|
42
|
-
]
|
43
|
-
Item2.rings_abilities.should == [
|
44
|
-
nil,
|
45
|
-
nil,
|
46
|
-
[:delete,:write],
|
47
|
-
nil,
|
48
|
-
[:read]
|
49
|
-
]
|
32
|
+
Item2.rings_abilities.should == {
|
33
|
+
2 => {:delete=>true},
|
34
|
+
3 => {:write=>[:address, :name], :read=>[:address, :member_code, :name]}
|
35
|
+
}
|
50
36
|
end
|
51
37
|
end
|
52
38
|
|
@@ -5,11 +5,11 @@ def stub_login_user(aValues=nil)
|
|
5
5
|
aValues ||= {}
|
6
6
|
aValues[:ring] ||= USER_RING
|
7
7
|
user = FactoryGirl.create(:user,aValues)
|
8
|
-
|
8
|
+
KojacFrontController.any_instance.stub(:current_user).and_return(user)
|
9
9
|
user
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
12
|
+
def exec_op(read_op)
|
13
13
|
content = {
|
14
14
|
options: {},
|
15
15
|
ops: [
|
@@ -19,14 +19,14 @@ def do_op(read_op)
|
|
19
19
|
request.accept = "application/json"
|
20
20
|
post :receive, format: :json, kojac: content
|
21
21
|
result = nil
|
22
|
-
|
22
|
+
err = nil
|
23
23
|
output = JSON.parse response.body
|
24
24
|
if output['error']
|
25
25
|
response.status.should >= 400
|
26
26
|
output.g?('error.errors').should be_a Array
|
27
27
|
output.g?('error.kind').should be
|
28
28
|
output['error']['errors'].length.should >= 1
|
29
|
-
|
29
|
+
err = output['error']
|
30
30
|
else
|
31
31
|
response.status.should == 200
|
32
32
|
output['ops'].should be_a Array
|
@@ -34,7 +34,7 @@ def do_op(read_op)
|
|
34
34
|
op = output['ops'].first
|
35
35
|
result = op['results'][op['result_key']]
|
36
36
|
end
|
37
|
-
[result,
|
37
|
+
[result,err]
|
38
38
|
end
|
39
39
|
|
40
40
|
# from http://openhood.com/rails/rails%203/2010/07/20/add-routes-at-runtime-rails-3/
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kojac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gary McGhee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: buzztools
|
@@ -66,6 +66,34 @@ dependencies:
|
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.9.0.alpha1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
69
97
|
description: KOJAC is an opinionated design and implementation for data management
|
70
98
|
within Single Page Applications. It relates most heavily to the client and data
|
71
99
|
protocol. The server may continue the key/value style down to a key/value-style
|
@@ -86,9 +114,10 @@ files:
|
|
86
114
|
- app/assets/javascripts/kojac.js
|
87
115
|
- app/assets/javascripts/kojac_canjs.js
|
88
116
|
- app/assets/javascripts/kojac_ember.js
|
89
|
-
- app/controllers/
|
117
|
+
- app/controllers/kojac_front_controller.rb
|
90
118
|
- app/controllers/kojac_front_methods.rb
|
91
119
|
- app/controllers/kojac_metal_controller.rb
|
120
|
+
- app/policies/concentric_policy.rb
|
92
121
|
- app/policies/kojac_base_policy.rb
|
93
122
|
- app/serializers/kojac_base_serializer.rb
|
94
123
|
- diagram.odg
|
@@ -96,7 +125,7 @@ files:
|
|
96
125
|
- lib/kojac.rb
|
97
126
|
- lib/kojac/app_serialize.rb
|
98
127
|
- lib/kojac/concentric.rb
|
99
|
-
- lib/kojac/
|
128
|
+
- lib/kojac/kojac_controller.rb
|
100
129
|
- lib/kojac/kojac_rails.rb
|
101
130
|
- lib/kojac/version.rb
|
102
131
|
- lib/tasks/kojac_tasks.rake
|
@@ -104,7 +133,9 @@ files:
|
|
104
133
|
- spec/can_cache_spec.js
|
105
134
|
- spec/can_factory_spec.js
|
106
135
|
- spec/can_model_spec.js
|
136
|
+
- spec/demo/.generators
|
107
137
|
- spec/demo/.gitignore
|
138
|
+
- spec/demo/.rakeTasks
|
108
139
|
- spec/demo/.ruby-version
|
109
140
|
- spec/demo/Gemfile
|
110
141
|
- spec/demo/Gemfile.lock
|
@@ -162,6 +193,7 @@ files:
|
|
162
193
|
- spec/demo/spec/factories/users.rb
|
163
194
|
- spec/demo/spec/features/concentric_spec.rb
|
164
195
|
- spec/demo/spec/features/serialization_spec.rb
|
196
|
+
- spec/demo/spec/models/model_ring_spec.rb
|
165
197
|
- spec/demo/spec/spec_helper.rb
|
166
198
|
- spec/demo/spec/spec_utils.rb
|
167
199
|
- spec/demo/vendor/assets/javascripts/.keep
|
@@ -207,7 +239,6 @@ files:
|
|
207
239
|
- spec/mockjson/order_item__51.js
|
208
240
|
- spec/mockjson/product.js
|
209
241
|
- spec/mockjson/product__3.js
|
210
|
-
- spec/model_ring_spec.rb
|
211
242
|
- spec/operation_include_spec.js
|
212
243
|
- spec/run.html
|
213
244
|
- spec/spec.js
|
@@ -235,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
266
|
version: '0'
|
236
267
|
requirements: []
|
237
268
|
rubyforge_project:
|
238
|
-
rubygems_version: 2.4.
|
269
|
+
rubygems_version: 2.4.8
|
239
270
|
signing_key:
|
240
271
|
specification_version: 4
|
241
272
|
summary: KOJAC is an opinionated design and implementation for data management within
|
@@ -244,7 +275,9 @@ test_files:
|
|
244
275
|
- spec/can_cache_spec.js
|
245
276
|
- spec/can_factory_spec.js
|
246
277
|
- spec/can_model_spec.js
|
278
|
+
- spec/demo/.generators
|
247
279
|
- spec/demo/.gitignore
|
280
|
+
- spec/demo/.rakeTasks
|
248
281
|
- spec/demo/.ruby-version
|
249
282
|
- spec/demo/Gemfile
|
250
283
|
- spec/demo/Gemfile.lock
|
@@ -302,6 +335,7 @@ test_files:
|
|
302
335
|
- spec/demo/spec/factories/users.rb
|
303
336
|
- spec/demo/spec/features/concentric_spec.rb
|
304
337
|
- spec/demo/spec/features/serialization_spec.rb
|
338
|
+
- spec/demo/spec/models/model_ring_spec.rb
|
305
339
|
- spec/demo/spec/spec_helper.rb
|
306
340
|
- spec/demo/spec/spec_utils.rb
|
307
341
|
- spec/demo/vendor/assets/javascripts/.keep
|
@@ -347,7 +381,6 @@ test_files:
|
|
347
381
|
- spec/mockjson/order_item__51.js
|
348
382
|
- spec/mockjson/product.js
|
349
383
|
- spec/mockjson/product__3.js
|
350
|
-
- spec/model_ring_spec.rb
|
351
384
|
- spec/operation_include_spec.js
|
352
385
|
- spec/run.html
|
353
386
|
- spec/spec.js
|