tentd-admin 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +201 -0
- data/LICENSE.txt +22 -0
- data/Procfile +1 -0
- data/README.md +104 -0
- data/Rakefile +30 -0
- data/assets/images/chosen-sprite.png +0 -0
- data/assets/images/glyphicons-halflings-white.png +0 -0
- data/assets/images/glyphicons-halflings.png +0 -0
- data/assets/javascripts/application.js.coffee +24 -0
- data/assets/javascripts/bootstrap.js +2027 -0
- data/assets/javascripts/chosen.jquery.js +1129 -0
- data/assets/javascripts/jquery.js +9301 -0
- data/assets/stylesheets/application.css.sass +34 -0
- data/assets/stylesheets/bootstrap-responsive.css +1040 -0
- data/assets/stylesheets/bootstrap.css +5624 -0
- data/assets/stylesheets/chosen.css.erb +397 -0
- data/config.ru +36 -0
- data/config/asset_sync.rb +12 -0
- data/lib/tentd-admin.rb +7 -0
- data/lib/tentd-admin/app.rb +242 -0
- data/lib/tentd-admin/set_entity.rb +10 -0
- data/lib/tentd-admin/setup_tent.rb +54 -0
- data/lib/tentd-admin/sprockets/environment.rb +23 -0
- data/lib/tentd-admin/sprockets/helpers.rb +5 -0
- data/lib/tentd-admin/version.rb +5 -0
- data/lib/tentd-admin/views/_profile_type_fields.slim +20 -0
- data/lib/tentd-admin/views/_profile_type_section.slim +4 -0
- data/lib/tentd-admin/views/apps.slim +39 -0
- data/lib/tentd-admin/views/auth_confirm.slim +34 -0
- data/lib/tentd-admin/views/dashboard.slim +53 -0
- data/lib/tentd-admin/views/followers.slim +12 -0
- data/lib/tentd-admin/views/followings.slim +22 -0
- data/lib/tentd-admin/views/layout.slim +15 -0
- data/lib/tentd-admin/views/profile.slim +11 -0
- data/lib/tentd-admin/views/setup.slim +20 -0
- data/tentd-admin.gemspec +32 -0
- metadata +252 -0
@@ -0,0 +1,53 @@
|
|
1
|
+
h2.page-header Profile
|
2
|
+
|
3
|
+
form.form-horizontal action=full_path('/profile') method='POST'
|
4
|
+
== csrf_tag
|
5
|
+
== method_override('PUT')
|
6
|
+
|
7
|
+
- @profile.each_pair do |type, data|
|
8
|
+
== slim :_profile_type_section, :locals => { :type => type, :data => data }
|
9
|
+
|
10
|
+
.form-actions
|
11
|
+
input.btn.btn-success type='submit' value='Save'
|
12
|
+
|
13
|
+
h2.page-header Authorized Apps
|
14
|
+
|
15
|
+
ul.unstyled
|
16
|
+
- @apps.each do |app|
|
17
|
+
li.app
|
18
|
+
.row
|
19
|
+
.span4
|
20
|
+
h3
|
21
|
+
a href=app.url = app.name
|
22
|
+
.span6
|
23
|
+
ul.unstyled
|
24
|
+
- app.authorizations.each do |auth|
|
25
|
+
li.authorization
|
26
|
+
.row
|
27
|
+
.span4
|
28
|
+
h4.page-header Scopes
|
29
|
+
= auth.scopes.map { |s| scope_name(s) }.join(', ')
|
30
|
+
|
31
|
+
h4.page-header Post Types
|
32
|
+
ul
|
33
|
+
- auth.post_types.each do |post_type|
|
34
|
+
li = post_type
|
35
|
+
|
36
|
+
h4.page-header Profile Info Types
|
37
|
+
ul
|
38
|
+
- auth.profile_info_types.each do |info_type|
|
39
|
+
li = info_type
|
40
|
+
|
41
|
+
.span2
|
42
|
+
- unless app.trusted
|
43
|
+
form.remove-app action=full_path("/apps/#{app.id}/authorizations/#{auth.id}") method="POST"
|
44
|
+
== method_override("DELETE")
|
45
|
+
== csrf_tag
|
46
|
+
input.btn.btn-danger type='submit' value="Revoke Authorization" confirm="Revoke #{app.name} Authorization?"
|
47
|
+
.span2
|
48
|
+
- unless app.trusted
|
49
|
+
form.remove-app action=full_path("/apps/#{app.id}") method="POST"
|
50
|
+
== method_override("DELETE")
|
51
|
+
== csrf_tag
|
52
|
+
input.btn.btn-danger type='submit' value="Remove App" confirm="Delete #{app.name}?"
|
53
|
+
hr/
|
@@ -0,0 +1,12 @@
|
|
1
|
+
h2.page-header Entities following you
|
2
|
+
|
3
|
+
- @followers.each do |follower|
|
4
|
+
.row.follower
|
5
|
+
.span4
|
6
|
+
h4 = follower.entity
|
7
|
+
|
8
|
+
.span2
|
9
|
+
form.remove action=full_path("/followers/#{follower.id}") method='POST'
|
10
|
+
== csrf_tag
|
11
|
+
== method_override('DELETE')
|
12
|
+
input.btn.btn-danger type='submit' value='Remove' title='Stop sending notifications'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
h2.page-header Entities you are following
|
2
|
+
|
3
|
+
form.form-horizontal action=full_path("/followings") method="POST"
|
4
|
+
== csrf_tag
|
5
|
+
|
6
|
+
.control-group
|
7
|
+
label.control-label Entity URI
|
8
|
+
.controls
|
9
|
+
input.input-xxlarge type='text' name='entity' value=@entity
|
10
|
+
input.btn.btn-success type='submit' name='commit' value='Follow'
|
11
|
+
|
12
|
+
- @followings.each do |following|
|
13
|
+
.row.following
|
14
|
+
.span4
|
15
|
+
h4 = following['entity']
|
16
|
+
|
17
|
+
.span2
|
18
|
+
form.unfollow action=full_path("/followings/#{following.id}") method='POST'
|
19
|
+
== csrf_tag
|
20
|
+
== method_override('DELETE')
|
21
|
+
input.btn.btn-danger type='submit' value='Unfollow'
|
22
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
doctype html
|
2
|
+
|
3
|
+
head
|
4
|
+
meta name="viewport" content="width=device-width, initial-scale=1.0"
|
5
|
+
link rel="stylesheet" type="text/css" href=asset_path("application.css")
|
6
|
+
script src=asset_path("application.js")
|
7
|
+
|
8
|
+
body
|
9
|
+
.navbar.navbar-static-top
|
10
|
+
.navbar-inner
|
11
|
+
.brand
|
12
|
+
a href='/admin' Tent Admin
|
13
|
+
|
14
|
+
.container
|
15
|
+
== yield
|
@@ -0,0 +1,11 @@
|
|
1
|
+
h2.page-header Profile
|
2
|
+
|
3
|
+
form.form-horizontal action=full_path('/profile') method='POST'
|
4
|
+
== csrf_tag
|
5
|
+
== method_override('PUT')
|
6
|
+
|
7
|
+
- @profile.each_pair do |type, data|
|
8
|
+
== slim :_profile_type_section, :locals => { :type => type, :data => data }
|
9
|
+
|
10
|
+
.form-actions
|
11
|
+
input.btn.btn-success type='submit' value='Save'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
h2 Server Setup
|
2
|
+
|
3
|
+
form.form-horizontal action=full_path("setup") method="POST"
|
4
|
+
== csrf_tag
|
5
|
+
|
6
|
+
.row
|
7
|
+
.span6
|
8
|
+
.control-group
|
9
|
+
label.control-label Entity URI
|
10
|
+
.controls
|
11
|
+
input.input-xxlarge type='text' name='entity' value=@core_profile_info.entity
|
12
|
+
|
13
|
+
.control-group
|
14
|
+
label.control-label Server URI
|
15
|
+
.controls
|
16
|
+
input.input-xxlarge type='text' name='servers' value=@core_profile_info.servers.first
|
17
|
+
|
18
|
+
.span12
|
19
|
+
.form-actions
|
20
|
+
input.btn.btn-success type='submit' name='commit' value='Confirm'
|
data/tentd-admin.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'tentd-admin/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "tentd-admin"
|
8
|
+
gem.version = Tentd::Admin::VERSION
|
9
|
+
gem.authors = ["Jesse Stuart", "Jonathan Rudenberg"]
|
10
|
+
gem.email = ["jessestuart@gmail.com", "jonathan@titanous.com"]
|
11
|
+
gem.description = %q{Default app for managing Tent server administration (e.g. apps, profile, followings, followers)}
|
12
|
+
gem.summary = %q{Admin app for Tent}
|
13
|
+
gem.homepage = "https://github.com/tent/tentd-admin"
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.require_paths = ["lib"]
|
19
|
+
|
20
|
+
gem.add_runtime_dependency 'tent-client'
|
21
|
+
gem.add_runtime_dependency 'tentd'
|
22
|
+
|
23
|
+
gem.add_runtime_dependency 'sinatra'
|
24
|
+
gem.add_runtime_dependency 'rack_csrf'
|
25
|
+
gem.add_runtime_dependency 'sprockets', '~> 2.0'
|
26
|
+
gem.add_runtime_dependency 'sass'
|
27
|
+
gem.add_runtime_dependency 'coffee-script'
|
28
|
+
gem.add_runtime_dependency 'hashie'
|
29
|
+
gem.add_runtime_dependency 'slim'
|
30
|
+
|
31
|
+
gem.add_development_dependency 'uglifier'
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,252 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tentd-admin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Jesse Stuart
|
9
|
+
- Jonathan Rudenberg
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2012-09-20 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: tent-client
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: tentd
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
type: :runtime
|
40
|
+
prerelease: false
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: sinatra
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: rack_csrf
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
type: :runtime
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: sprockets
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ~>
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '2.0'
|
87
|
+
type: :runtime
|
88
|
+
prerelease: false
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ~>
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '2.0'
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: sass
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ! '>='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
type: :runtime
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: coffee-script
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
115
|
+
requirements:
|
116
|
+
- - ! '>='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :runtime
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
none: false
|
123
|
+
requirements:
|
124
|
+
- - ! '>='
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
- !ruby/object:Gem::Dependency
|
128
|
+
name: hashie
|
129
|
+
requirement: !ruby/object:Gem::Requirement
|
130
|
+
none: false
|
131
|
+
requirements:
|
132
|
+
- - ! '>='
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
type: :runtime
|
136
|
+
prerelease: false
|
137
|
+
version_requirements: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
139
|
+
requirements:
|
140
|
+
- - ! '>='
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
143
|
+
- !ruby/object:Gem::Dependency
|
144
|
+
name: slim
|
145
|
+
requirement: !ruby/object:Gem::Requirement
|
146
|
+
none: false
|
147
|
+
requirements:
|
148
|
+
- - ! '>='
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
type: :runtime
|
152
|
+
prerelease: false
|
153
|
+
version_requirements: !ruby/object:Gem::Requirement
|
154
|
+
none: false
|
155
|
+
requirements:
|
156
|
+
- - ! '>='
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: uglifier
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
none: false
|
163
|
+
requirements:
|
164
|
+
- - ! '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
type: :development
|
168
|
+
prerelease: false
|
169
|
+
version_requirements: !ruby/object:Gem::Requirement
|
170
|
+
none: false
|
171
|
+
requirements:
|
172
|
+
- - ! '>='
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
175
|
+
description: Default app for managing Tent server administration (e.g. apps, profile,
|
176
|
+
followings, followers)
|
177
|
+
email:
|
178
|
+
- jessestuart@gmail.com
|
179
|
+
- jonathan@titanous.com
|
180
|
+
executables: []
|
181
|
+
extensions: []
|
182
|
+
extra_rdoc_files: []
|
183
|
+
files:
|
184
|
+
- .gitignore
|
185
|
+
- Gemfile
|
186
|
+
- Gemfile.lock
|
187
|
+
- LICENSE.txt
|
188
|
+
- Procfile
|
189
|
+
- README.md
|
190
|
+
- Rakefile
|
191
|
+
- assets/images/chosen-sprite.png
|
192
|
+
- assets/images/glyphicons-halflings-white.png
|
193
|
+
- assets/images/glyphicons-halflings.png
|
194
|
+
- assets/javascripts/application.js.coffee
|
195
|
+
- assets/javascripts/bootstrap.js
|
196
|
+
- assets/javascripts/chosen.jquery.js
|
197
|
+
- assets/javascripts/jquery.js
|
198
|
+
- assets/stylesheets/application.css.sass
|
199
|
+
- assets/stylesheets/bootstrap-responsive.css
|
200
|
+
- assets/stylesheets/bootstrap.css
|
201
|
+
- assets/stylesheets/chosen.css.erb
|
202
|
+
- config.ru
|
203
|
+
- config/asset_sync.rb
|
204
|
+
- lib/tentd-admin.rb
|
205
|
+
- lib/tentd-admin/app.rb
|
206
|
+
- lib/tentd-admin/set_entity.rb
|
207
|
+
- lib/tentd-admin/setup_tent.rb
|
208
|
+
- lib/tentd-admin/sprockets/environment.rb
|
209
|
+
- lib/tentd-admin/sprockets/helpers.rb
|
210
|
+
- lib/tentd-admin/version.rb
|
211
|
+
- lib/tentd-admin/views/_profile_type_fields.slim
|
212
|
+
- lib/tentd-admin/views/_profile_type_section.slim
|
213
|
+
- lib/tentd-admin/views/apps.slim
|
214
|
+
- lib/tentd-admin/views/auth_confirm.slim
|
215
|
+
- lib/tentd-admin/views/dashboard.slim
|
216
|
+
- lib/tentd-admin/views/followers.slim
|
217
|
+
- lib/tentd-admin/views/followings.slim
|
218
|
+
- lib/tentd-admin/views/layout.slim
|
219
|
+
- lib/tentd-admin/views/profile.slim
|
220
|
+
- lib/tentd-admin/views/setup.slim
|
221
|
+
- tentd-admin.gemspec
|
222
|
+
homepage: https://github.com/tent/tentd-admin
|
223
|
+
licenses: []
|
224
|
+
post_install_message:
|
225
|
+
rdoc_options: []
|
226
|
+
require_paths:
|
227
|
+
- lib
|
228
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
229
|
+
none: false
|
230
|
+
requirements:
|
231
|
+
- - ! '>='
|
232
|
+
- !ruby/object:Gem::Version
|
233
|
+
version: '0'
|
234
|
+
segments:
|
235
|
+
- 0
|
236
|
+
hash: -3985963110828271517
|
237
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
238
|
+
none: false
|
239
|
+
requirements:
|
240
|
+
- - ! '>='
|
241
|
+
- !ruby/object:Gem::Version
|
242
|
+
version: '0'
|
243
|
+
segments:
|
244
|
+
- 0
|
245
|
+
hash: -3985963110828271517
|
246
|
+
requirements: []
|
247
|
+
rubyforge_project:
|
248
|
+
rubygems_version: 1.8.23
|
249
|
+
signing_key:
|
250
|
+
specification_version: 3
|
251
|
+
summary: Admin app for Tent
|
252
|
+
test_files: []
|