conjur-asset-ui-api 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,22 @@
1
+ require 'conjur/webserver/renderer'
2
+
3
+ # use our own runner template
4
+ module Jasmine
5
+ def self.runner_template
6
+ File.read(File.join(File.dirname(__FILE__), "run.html.erb"))
7
+ end
8
+ end
9
+
10
+ Jasmine.configure do |config|
11
+ class << config
12
+ def renderer
13
+ @renderer ||= Conjur::WebServer::Renderer.new src_dir
14
+ end
15
+
16
+ def method_missing *a, &b
17
+ renderer.send(*a, &b)
18
+ rescue NoMethodError
19
+ super
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
+ <html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <meta content="text/html;charset=UTF-8" http-equiv="Content-Type"/>
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <title>Jasmine suite</title>
7
+ <link rel="shortcut icon" type="image/png" href="/__images__/jasmine_favicon.png">
8
+ <% css_files.each do |css_file| %>
9
+ <link rel="stylesheet" href="<%= css_file %>" type="text/css" media="screen"/>
10
+ <% end %>
11
+
12
+ <%= client_libs %>
13
+ <%= client_code %>
14
+
15
+ </head>
16
+ <!-- TODO: turbolinks breaks spec filter links -->
17
+ <body data-no-turbolink>
18
+ <div id="jasmine_content"></div>
19
+ <% js_files.each do |js_file| %>
20
+ <script src="<%= js_file %>" type="text/javascript"></script>
21
+ <% end %>
22
+ </body>
23
+ </html>
@@ -0,0 +1,22 @@
1
+ // Generated by LiveScript 1.2.0
2
+ (function(){
3
+ var renderComponent;
4
+ renderComponent = React.renderComponent;
5
+ describe('AuditEntry', function(_){
6
+ return it('shows both role and resource on role checks', function(){
7
+ var role, resource, table, x$;
8
+ role = 'the-role';
9
+ resource = 'the-resource';
10
+ renderComponent(AuditEntry({
11
+ kind: 'role',
12
+ action: 'check',
13
+ role: "acct:rolkind:" + role,
14
+ resource: "acct:reskind:" + resource
15
+ }), table = document.createElement('table'));
16
+ x$ = expect(table.innerText);
17
+ x$.toContain(role);
18
+ x$.toContain(resource);
19
+ return x$;
20
+ });
21
+ });
22
+ }).call(this);
@@ -0,0 +1,18 @@
1
+ {render-component} = React
2
+
3
+ describe \AuditEntry, (_)->
4
+ it 'shows both role and resource on role checks', ->
5
+ role = 'the-role'
6
+ resource = 'the-resource'
7
+
8
+ render-component do
9
+ AuditEntry do
10
+ kind: \role
11
+ action: \check
12
+ role: "acct:rolkind:#role"
13
+ resource: "acct:reskind:#resource"
14
+ table = document.create-element \table
15
+
16
+ expect table.inner-text
17
+ ..to-contain role
18
+ ..to-contain resource
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conjur-asset-ui-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Mason
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-03-20 00:00:00.000000000 Z
13
+ date: 2014-04-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: puma
@@ -180,6 +180,20 @@ dependencies:
180
180
  - - '>='
181
181
  - !ruby/object:Gem::Version
182
182
  version: '0'
183
+ - !ruby/object:Gem::Dependency
184
+ name: jasmine
185
+ requirement: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ type: :development
191
+ prerelease: false
192
+ version_requirements: !ruby/object:Gem::Requirement
193
+ requirements:
194
+ - - '>='
195
+ - !ruby/object:Gem::Version
196
+ version: '0'
183
197
  description:
184
198
  email:
185
199
  - jon@conjur.net
@@ -212,8 +226,11 @@ files:
212
226
  - lib/conjur/webserver/conjur_info.rb
213
227
  - lib/conjur/webserver/home.rb
214
228
  - lib/conjur/webserver/login.rb
229
+ - lib/conjur/webserver/renderer.rb
215
230
  - lib/conjur/webserver/server.rb
216
231
  - livescript/views/audit.ls
232
+ - public/_client_code.html
233
+ - public/_client_libs.html
217
234
  - public/css/bootstrap.css
218
235
  - public/css/styles.less
219
236
  - public/fonts/glyphicons-halflings-regular.eot
@@ -226,7 +243,7 @@ files:
226
243
  - public/images/icon-person.svg
227
244
  - public/images/icon-service-dots.svg
228
245
  - public/images/icon-variable.png
229
- - public/index.html
246
+ - public/index.html.erb
230
247
  - public/js/lib/JSXTransformer.js
231
248
  - public/js/lib/async.js
232
249
  - public/js/lib/backbone.js
@@ -243,12 +260,17 @@ files:
243
260
  - public/js/lib/underscore-min.js
244
261
  - public/js/lib/underscore.string.min.js
245
262
  - public/js/main.js
263
+ - public/js/models/groupRecord.js
264
+ - public/js/models/hostRecord.js
265
+ - public/js/models/layerRecord.js
246
266
  - public/js/models/namespace.js
247
267
  - public/js/models/policyList.js
248
268
  - public/js/models/record.js
249
269
  - public/js/models/resourceList.js
250
270
  - public/js/models/userList.js
271
+ - public/js/models/userRecord.js
251
272
  - public/js/models/variableList.js
273
+ - public/js/models/variableRecord.js
252
274
  - public/js/views/audit.js
253
275
  - public/js/views/dashboard.js
254
276
  - public/js/views/generic.js
@@ -261,6 +283,7 @@ files:
261
283
  - public/js/views/mixins/search.js
262
284
  - public/js/views/namespaces.js
263
285
  - public/js/views/navSearch.js
286
+ - public/js/views/owned.js
264
287
  - public/js/views/permissions.js
265
288
  - public/js/views/policies.js
266
289
  - public/js/views/policy.js
@@ -272,6 +295,12 @@ files:
272
295
  - public/js/views/users.js
273
296
  - public/js/views/variable.js
274
297
  - public/js/views/variables.js
298
+ - spec/javascripts/helpers/.gitkeep
299
+ - spec/javascripts/support/jasmine.yml
300
+ - spec/javascripts/support/jasmine_helper.rb
301
+ - spec/javascripts/support/run.html.erb
302
+ - spec/javascripts/views/AuditSpec.js
303
+ - spec/javascripts/views/AuditSpec.ls
275
304
  - vendor/prelude-ls/.gitignore
276
305
  - vendor/prelude-ls/.travis.yml
277
306
  - vendor/prelude-ls/CHANGELOG.md
@@ -325,4 +354,10 @@ rubygems_version: 2.0.3
325
354
  signing_key:
326
355
  specification_version: 4
327
356
  summary: Conjur User Interface Plugin
328
- test_files: []
357
+ test_files:
358
+ - spec/javascripts/helpers/.gitkeep
359
+ - spec/javascripts/support/jasmine.yml
360
+ - spec/javascripts/support/jasmine_helper.rb
361
+ - spec/javascripts/support/run.html.erb
362
+ - spec/javascripts/views/AuditSpec.js
363
+ - spec/javascripts/views/AuditSpec.ls
@@ -1,121 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Conjur UI</title>
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <link href='http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic' rel='stylesheet' type='text/css'>
7
-
8
- <script src="/js/lib/pace.js"></script>
9
- <!-- Bootstrap -->
10
- <link href="/css/bootstrap.css" rel="stylesheet">
11
-
12
- <!-- Some styles of our own -->
13
- <link href="/css/styles.less" rel="stylesheet/less">
14
-
15
- <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
16
- <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
17
- <!--[if lt IE 9]>
18
- <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
19
- <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
20
- <![endif]-->
21
-
22
- <script src="/js/lib/sorted-set.no-require.js"></script>
23
- <script src="/js/lib/less.js"></script>
24
- <script src="/js/lib/react-with-addons.js"></script>
25
- <script src="/js/lib/JSXTransformer.js"></script>
26
- <script src="http://cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js"></script>
27
- <script src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
28
- <script src="/js/lib/async.js"></script>
29
- <script src="/js/lib/underscore-min.js"></script>
30
- <script src="/js/lib/underscore.string.min.js"></script>
31
- <script src="/js/lib/backbone.js"></script>
32
- <script src="/js/lib/bootstrap.js"></script>
33
- <script src="/js/lib/date.extensions.js"></script>
34
- <script src="/js/lib/moment.js"></script>
35
- <script src="/js/lib/prelude-browser-min.js"></script>
36
- </head>
37
- <body>
38
- <div class="container">
39
- <div class="navbar navbar-default" role="navigation">
40
- <div class="navbar-collapse collapse">
41
- <ul class="nav navbar-nav">
42
- <li id="nav-home" class="nav-item"><a href="/ui">Dashboard</a></li>
43
- <li id="nav-groups" class="dropdown">
44
- <a class="dropdown-toggle" data-toggle="dropdown" href="#">
45
- Actors <span class="caret"></span>
46
- </a>
47
- <ul class="dropdown-menu">
48
- <li id="nav-users" class="nav-item"><a href="/ui/users">Users</a></li>
49
- <li id="nav-groups" class="nav-item"><a href="/ui/groups">Groups</a></li>
50
- <li class="divider"></li>
51
- <li id="nav-hosts" class="nav-item"><a href="/ui/hosts">Hosts</a></li>
52
- <li id="nav-layers" class="nav-item"><a href="/ui/layers">Layers</a></li>
53
- </ul>
54
- </li>
55
- <li id="nav-assets" class="dropdown">
56
- <a class="dropdown-toggle" data-toggle="dropdown" href="#">
57
- Assets <span class="caret"></span>
58
- </a>
59
- <ul class="dropdown-menu">
60
- <li id="nav-hosts" class="nav-item"><a href="/ui/hosts">Hosts</a></li>
61
- <li id="nav-variables" class="nav-item"><a href="/ui/variables">Variables</a></li>
62
- <li id="nav-key-pairs" class="nav-item"><a href="/ui/key-pairs">Key Pairs</a></li>
63
- <li id="nav-web-services" class="nav-item"><a href="/ui/webservices">Web Services</a></li>
64
- </ul>
65
- </li>
66
- <li id="nav-policies" class="nav-item"><a href="/ui/policies">Policies</a></li>
67
- <li id="nav-audit" class="nav-item"><a href="/ui/audit">Audit</a></li>
68
- </ul>
69
- <div class="navbar-right" id="inlineSearchContainer">
70
- </div>
71
- </div>
72
- </div>
73
-
74
- </div>
75
- <div class="alert alert-danger alert-dismissable" id="flash">
76
- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
77
- <span class="text"></span>
78
- </div>
79
- <div id="content"></div>
80
- <div id="bottom"></div>
81
- </div><!-- /.container -->
82
-
83
-
84
- <div id="modal">
85
-
86
- </div>
87
-
88
-
89
- <script src="/js/models/namespace.js"></script>
90
- <script src="/js/models/resourceList.js"></script>
91
- <script src="/js/models/policyList.js"></script>
92
- <script src="/js/models/userList.js"></script>
93
- <script src="/js/models/variableList.js"></script>
94
- <script src="/js/models/record.js"></script>
95
- <script type="text/jsx" src="/js/views/mixins/search.js"></script>
96
- <script type="text/jsx" src="/js/views/audit.js"></script>
97
- <script type="text/jsx" src="/js/views/dashboard.js"></script>
98
- <script type="text/jsx" src="/js/views/generic.js"></script>
99
- <script type="text/jsx" src="/js/views/namespaces.js"></script>
100
- <script type="text/jsx" src="/js/views/users.js"></script>
101
- <script type="text/jsx" src="/js/views/hosts.js"></script>
102
- <script type="text/jsx" src="/js/views/host.js"></script>
103
- <script type="text/jsx" src="/js/views/role.js"></script>
104
- <script type="text/jsx" src="/js/views/group.js"></script>
105
- <script type="text/jsx" src="/js/views/groups.js"></script>
106
- <script type="text/jsx" src="/js/views/layer.js"></script>
107
- <script type="text/jsx" src="/js/views/layers.js"></script>
108
- <script type="text/jsx" src="/js/views/variable.js"></script>
109
- <script type="text/jsx" src="/js/views/variables.js"></script>
110
- <script type="text/jsx" src="/js/views/policies.js"></script>
111
- <script type="text/jsx" src="/js/views/policy.js"></script>
112
- <script type="text/jsx" src="/js/views/resource.js"></script>
113
- <script type="text/jsx" src="/js/views/permissions.js"></script>
114
- <script type="text/jsx" src="/js/views/user.js"></script>
115
- <script type="text/jsx" src="/js/views/time.js"></script>
116
- <script type="text/jsx" src="/js/views/navSearch.js"></script>
117
- <script type="text/jsx" src="/js/views/searchResults.js"></script>
118
- <script src="/js/views/audit.js"></script>
119
- <script type="text/jsx" src="/js/main.js"></script>
120
- </body>
121
- </html>