humongous 1.0.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE.txt +1 -1
- data/README.markdown +5 -5
- data/lib/humongous/application.rb +42 -31
- data/lib/humongous/helpers.rb +16 -18
- data/lib/humongous/public/javascripts/query_browser.js +22 -13
- data/lib/humongous/version.rb +1 -1
- data/lib/humongous/views/index.erb +8 -7
- metadata +13 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ad9369e3d213e9e01c3035211675e402dfe7c8bd1aee66c92e9ad9a59b5d2186
|
4
|
+
data.tar.gz: ab1c5141dfbb78f2a3c55c07726d95088937dbe0bf1826ab9590d8e11a818fe9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7320a9d915a2f69df8477817157280cb17ac92d4b2dc13fe5efea3e917eb5a9f4c006cf94ec28f81439e64b85eb2a1cba9d6a2ef77bcb0cd21c28a0e5fef379
|
7
|
+
data.tar.gz: aa9fdcf76e0312fb50f087ea92fcb2deeb0462de5f4ecdd8c5fe7b85269841ffc6d5b270cbfb52fa9dd0f8da9d67d4fb03ce21e7a45379cc86795c07b4fa0b5b
|
data/LICENSE.txt
CHANGED
data/README.markdown
CHANGED
@@ -4,12 +4,12 @@
|
|
4
4
|
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/humongous.png)](http://badge.fury.io/rb/humongous)
|
6
6
|
|
7
|
-
_ _
|
8
|
-
| | | |_ _ _ __ ___ ___ _ __ __ _ ___ _ _ ___
|
7
|
+
_ _
|
8
|
+
| | | |_ _ _ __ ___ ___ _ __ __ _ ___ _ _ ___
|
9
9
|
| |_| | | | | '_ ` _ \ / _ \| '_ \ / _` |/ _ \| | | / __|
|
10
10
|
| _ | |_| | | | | | | (_) | | | | (_| | (_) | |_| \__ \
|
11
11
|
|_| |_|\__,_|_| |_| |_|\___/|_| |_|\__, |\___/ \__,_|___/
|
12
|
-
|___/
|
12
|
+
|___/
|
13
13
|
|
14
14
|
|
15
15
|
|
@@ -75,10 +75,10 @@ There are lot of things and area to improve and develop. Since it in pre release
|
|
75
75
|
* Example series
|
76
76
|
|
77
77
|
## Contributing to Humongous
|
78
|
-
|
78
|
+
|
79
79
|
* Fork, branch, code, and then send me a pull request. :)
|
80
80
|
|
81
81
|
## Copyright
|
82
82
|
|
83
|
-
Copyright (c) 2012-
|
83
|
+
Copyright (c) 2012-2016 [Bagwan Pankaj]. See LICENSE.txt for further details.
|
84
84
|
|
@@ -4,7 +4,7 @@ module Humongous
|
|
4
4
|
|
5
5
|
class Application < Sinatra::Base
|
6
6
|
DEFAULT_OPTIONS = {
|
7
|
-
:url => "
|
7
|
+
:url => "127.0.0.1",
|
8
8
|
:port => "27017",
|
9
9
|
:username => "",
|
10
10
|
:password => ""
|
@@ -29,19 +29,19 @@ module Humongous
|
|
29
29
|
autanticate!
|
30
30
|
end
|
31
31
|
|
32
|
-
error Mongo::
|
32
|
+
error Mongo::Error::ConnectionCheckOutTimeout do
|
33
33
|
halt 502, headers, "Humongous is unable to find MongoDB instance. Make sure that MongoDB is running."
|
34
34
|
end
|
35
35
|
|
36
|
-
error Mongo::OperationFailure do
|
36
|
+
error Mongo::Error::OperationFailure do
|
37
37
|
halt 401, {'Content-Type' => 'text/javascript'}, { :errmsg => "Need to login", :ok => false }.to_json
|
38
38
|
end
|
39
39
|
|
40
|
-
error Mongo::
|
40
|
+
error Mongo::Error::InvalidDatabaseName do
|
41
41
|
halt 502, headers, "Humongous is unable to find MongoDB instance. Make sure that MongoDB is running."
|
42
42
|
end
|
43
43
|
|
44
|
-
error Mongo::
|
44
|
+
error Mongo::Error::AuthError do
|
45
45
|
halt 502, headers, "Humongous is unable to find MongoDB instance. Make sure that MongoDB is running."
|
46
46
|
end
|
47
47
|
|
@@ -49,13 +49,13 @@ module Humongous
|
|
49
49
|
|
50
50
|
reciever = lambda do
|
51
51
|
begin
|
52
|
-
@databases = @connection.
|
53
|
-
@server_info = @connection.server_info
|
54
|
-
@header_string = "Server #{
|
55
|
-
rescue Mongo::OperationFailure => e
|
52
|
+
@databases = @connection.list_databases
|
53
|
+
@server_info = @connection.cluster.servers.collect{|c| c.scan!.config } #@connection.server_info
|
54
|
+
@header_string = "Server #{opts_to_connect[:url]}:#{opts_to_connect[:port]} stats"
|
55
|
+
rescue Mongo::Error::OperationFailure => e
|
56
56
|
@databases = []
|
57
57
|
@server_info = { :errmsg => "Need to login", :ok => false }
|
58
|
-
@header_string = "Server #{
|
58
|
+
@header_string = "Server #{opts_to_connect[:url]}:#{opts_to_connect[:port]} stats"
|
59
59
|
@force_login = true
|
60
60
|
end
|
61
61
|
erb :index
|
@@ -65,22 +65,25 @@ module Humongous
|
|
65
65
|
post "/", &reciever
|
66
66
|
|
67
67
|
get "/database/:db_name" do
|
68
|
-
@
|
68
|
+
@connection = @connection.use(params[:db_name])
|
69
|
+
@database = @connection.database
|
69
70
|
@header_string = "Database #{@database.name} (#{@database.collection_names.size}) stats"
|
70
71
|
content_type :json
|
71
|
-
{ :collections => @database.collection_names, :stats =>
|
72
|
+
{ :collections => @database.collection_names, :stats => [], :header => @header_string }.to_json
|
72
73
|
end
|
73
74
|
|
74
75
|
get "/database/:db_name/collection/:collection_name" do
|
75
|
-
@
|
76
|
+
@connection = @connection.use(params[:db_name])
|
77
|
+
@database = @connection.database
|
76
78
|
@collection = @database.collection(params[:collection_name])
|
77
79
|
content_type :json
|
78
|
-
{ :stats =>
|
80
|
+
{ :stats => [], :header => "Collection #{@database.name}.#{@collection.name} (#{@collection.count}) stats" }.to_json
|
79
81
|
end
|
80
82
|
|
81
83
|
delete "/database/:db_name/collection/:collection_name" do
|
82
|
-
@
|
83
|
-
|
84
|
+
@connection = @connection.use(params[:db_name])
|
85
|
+
@database = @connection.database
|
86
|
+
if @database.collection(params[:collection_name]).drop
|
84
87
|
content_type :json
|
85
88
|
{ :status => "OK", :dropped => true }.to_json
|
86
89
|
end
|
@@ -99,7 +102,8 @@ module Humongous
|
|
99
102
|
opts[:sort] = JSON.parse(json_converter(params[:sort])) if params[:sort].present?
|
100
103
|
opts[:limit] = params[:limit].to_i
|
101
104
|
opts = default_opts.merge(opts)
|
102
|
-
@
|
105
|
+
@connection = @connection.use(params[:db_name])
|
106
|
+
@database = @connection.database
|
103
107
|
@collection = @database.collection(params[:collection_name])
|
104
108
|
@records = @collection.find(selector,opts).to_a
|
105
109
|
@records = @records.collect{|record| doc_to_bson(record, :from_bson) }
|
@@ -108,29 +112,33 @@ module Humongous
|
|
108
112
|
end
|
109
113
|
|
110
114
|
post "/database/:db_name/collection/:collection_name/save" do
|
111
|
-
@
|
115
|
+
@connection = @connection.use(params[:db_name])
|
116
|
+
@database = @connection.database
|
112
117
|
@collection = @database.collection(params[:collection_name])
|
113
118
|
doc = params[:doc]
|
114
119
|
doc = doc_to_bson(doc, :to_bson)
|
115
|
-
|
116
|
-
@collection.save(doc)
|
120
|
+
@collection.update_one(doc)
|
117
121
|
content_type :json
|
118
122
|
{ :status => "OK", :saved => true }.to_json
|
119
123
|
end
|
120
124
|
|
121
125
|
delete "/database/:db_name" do
|
122
126
|
content_type :json
|
123
|
-
@connection.
|
127
|
+
@connection = @connection.use(params[:db_name])
|
128
|
+
drop_doc = @connection.database.drop
|
129
|
+
{ :status => "OK", :saved => true, message: drop_doc.documents[0] }.to_json
|
124
130
|
end
|
125
131
|
|
126
132
|
post "/database" do
|
127
|
-
@connection.
|
133
|
+
@connection = @connection.use(params[:database_name])
|
134
|
+
@connection.database["test"].create
|
128
135
|
content_type :json
|
129
136
|
{ :status => "OK", :created => true, :name => params["database_name"] }.to_json
|
130
137
|
end
|
131
138
|
|
132
139
|
post "/database/:database_name/collection" do
|
133
|
-
@connection.
|
140
|
+
@connection = @connection.use(params[:database_name])
|
141
|
+
@connection.database[params[:collection_name]].create
|
134
142
|
content_type :json
|
135
143
|
{ :status => "OK", :created => true, :name => params["collection_name"] }.to_json
|
136
144
|
end
|
@@ -141,25 +149,27 @@ module Humongous
|
|
141
149
|
query = JSON.parse(json_converter(params[:remove_query])) if params[:remove_query].present?
|
142
150
|
query["_id"] = BSON::ObjectId.from_string(query["_id"]) if query.present? && query["_id"].present?
|
143
151
|
selector = selector.merge(query) if !!query
|
144
|
-
@
|
152
|
+
@connection = @connection.use(params[:database_name])
|
153
|
+
@database = @connection.database
|
145
154
|
@collection = @database.collection(params["collection_name"])
|
146
155
|
content_type :json
|
147
156
|
{ :removed => @collection.remove( selector, opts ), :status => "OK" }.to_json
|
148
157
|
end
|
149
|
-
|
158
|
+
|
150
159
|
post "/database/:database_name/collection/:collection_name/insert" do
|
151
160
|
created = false
|
152
|
-
@
|
161
|
+
@connection = @connection.use(params[:database_name])
|
162
|
+
@database = @connection.database
|
153
163
|
@collection = @database.collection(params[:collection_name])
|
154
164
|
if params[:doc].present?
|
155
|
-
doc = JSON.parse(
|
156
|
-
@collection.
|
165
|
+
doc = JSON.parse(params[:doc])
|
166
|
+
@collection.insert_one(doc)
|
157
167
|
created = true
|
158
168
|
end
|
159
169
|
content_type :json
|
160
170
|
{ :created => created, :id => true, :status => "OK" }.to_json
|
161
171
|
end
|
162
|
-
|
172
|
+
|
163
173
|
post "/database/:database_name/collection/:collection_name/mapreduce" do
|
164
174
|
opts = { :out => { :inline => true }, :raw => true }
|
165
175
|
opts[:finalize] = params[:finalize] unless params[:finalize].blank?
|
@@ -167,7 +177,8 @@ module Humongous
|
|
167
177
|
opts[:query] = JSON.parse(json_converter(params[:query])) unless params[:query].blank?
|
168
178
|
opts[:sort] = params[:sort] unless params[:sort].blank?
|
169
179
|
opts[:limit] = params[:limit] unless params[:limit].blank?
|
170
|
-
@
|
180
|
+
@connection = @connection.use(params[:database_name])
|
181
|
+
@database = @connection.database
|
171
182
|
@collection = @database.collection(params[:collection_name])
|
172
183
|
content_type :json
|
173
184
|
@collection.map_reduce( params[:map], params[:reduce], opts ).to_json
|
@@ -175,4 +186,4 @@ module Humongous
|
|
175
186
|
|
176
187
|
end
|
177
188
|
|
178
|
-
end
|
189
|
+
end
|
data/lib/humongous/helpers.rb
CHANGED
@@ -1,51 +1,49 @@
|
|
1
1
|
module Humongous
|
2
2
|
module Helpers
|
3
|
-
|
3
|
+
|
4
4
|
module SinatraHelpers
|
5
|
-
|
5
|
+
|
6
6
|
def connection(params)
|
7
7
|
opts = opts_to_connect(params)
|
8
|
-
session[:connection] = Mongo::
|
8
|
+
session[:connection] = Mongo::Client.new(get_uri(opts))
|
9
9
|
end
|
10
10
|
|
11
11
|
def autanticate!
|
12
|
-
@connection.apply_saved_authentication and return unless @connection.auths.blank?
|
13
12
|
return if params[:auth].blank? || params[:auth][:db].blank?
|
14
|
-
@connection.
|
15
|
-
@connection.apply_saved_authentication
|
13
|
+
@connection.with( database: params[:auth][:db], user: params[:auth][:username], password: params[:auth][:password])
|
16
14
|
end
|
17
15
|
|
18
16
|
def opts_to_connect(params = {})
|
19
17
|
return @options if @options && @options[:freeze]
|
20
18
|
@options = {
|
21
|
-
:url => "
|
19
|
+
:url => "127.0.0.1",
|
22
20
|
:port => "27017",
|
23
21
|
:username => "",
|
24
22
|
:password => ""
|
25
23
|
}
|
26
24
|
return @options if params.blank?
|
27
|
-
@options.merge!(
|
25
|
+
@options.merge!(params)
|
28
26
|
end
|
29
27
|
|
30
28
|
def get_uri(params = {})
|
31
29
|
@options = {
|
32
|
-
:url => "
|
30
|
+
:url => "127.0.0.1",
|
33
31
|
:port => "27017",
|
34
32
|
:username => "",
|
35
33
|
:password => ""
|
36
34
|
}
|
37
35
|
@options = @options.merge(params)
|
38
|
-
|
36
|
+
if @options[:username].present? && @options[:password].present?
|
39
37
|
"mongodb://#{@options[:username]}:#{@options[:password]}@#{@options[:url]}:#{@options[:port]}"
|
40
38
|
else
|
41
39
|
"mongodb://#{@options[:url]}:#{@options[:port]}"
|
42
40
|
end
|
43
41
|
end
|
44
|
-
|
42
|
+
|
45
43
|
def default_opts
|
46
44
|
{ :skip => 0, :limit => 10 }
|
47
45
|
end
|
48
|
-
|
46
|
+
|
49
47
|
def to_bson( options )
|
50
48
|
ids = options.keys.grep /_id$/
|
51
49
|
ids.each do |id|
|
@@ -60,7 +58,7 @@ module Humongous
|
|
60
58
|
end
|
61
59
|
options
|
62
60
|
end
|
63
|
-
|
61
|
+
|
64
62
|
def doc_to_bson( doc, converter )
|
65
63
|
doc = send(converter, doc)
|
66
64
|
doc.each do |k,v|
|
@@ -71,7 +69,7 @@ module Humongous
|
|
71
69
|
end
|
72
70
|
doc
|
73
71
|
end
|
74
|
-
|
72
|
+
|
75
73
|
def from_bson( options )
|
76
74
|
ids = options.select{ |k,v| v.is_a? BSON::ObjectId }
|
77
75
|
ids.each do | k, v |
|
@@ -79,12 +77,12 @@ module Humongous
|
|
79
77
|
end
|
80
78
|
options
|
81
79
|
end
|
82
|
-
|
80
|
+
|
83
81
|
def json_converter( params_json )
|
84
82
|
params_json.gsub(/(\w+):/, '"\1":')
|
85
83
|
end
|
86
|
-
|
84
|
+
|
87
85
|
end
|
88
|
-
|
86
|
+
|
89
87
|
end
|
90
|
-
end
|
88
|
+
end
|
@@ -40,7 +40,6 @@ app.html.query_browser = {
|
|
40
40
|
url: "/database/" + db + "/collection/" + coll + "/save",
|
41
41
|
data: { "doc": JSON.parse(data) },
|
42
42
|
success: function( data ){
|
43
|
-
console.log(data)
|
44
43
|
$('#object_modal').modal('toggle');
|
45
44
|
}
|
46
45
|
})
|
@@ -49,8 +48,8 @@ app.html.query_browser = {
|
|
49
48
|
return(
|
50
49
|
{ tag: "UL", cls: "pills", children: [
|
51
50
|
{ tag: "LI", cls: "active", child: { tag: "A", href: "#", text: "Find", show: "find_form" }, onClick: this._pills_click_handler },
|
52
|
-
{ tag: "LI", child: { tag: "A", href: "#", text: "Remove", show: "remove_form" }, onClick: this._pills_click_handler },
|
53
|
-
{ tag: "LI", child: { tag: "A", href: "#", text: "Insert", show: "insert_form" }, onClick: this._pills_click_handler },
|
51
|
+
{ tag: "LI", child: { tag: "A", href: "#", text: "Remove", show: "remove_form", editor: 'remove_query' }, onClick: this._pills_click_handler },
|
52
|
+
{ tag: "LI", child: { tag: "A", href: "#", text: "Insert", show: "insert_form", editor: 'insert_query' }, onClick: this._pills_click_handler },
|
54
53
|
{ tag: "LI", child: { tag: "A", href: "#", text: "MapReduce", show: "mapreduce_form" }, onClick: this._pills_click_handler }
|
55
54
|
]}
|
56
55
|
)
|
@@ -60,7 +59,17 @@ app.html.query_browser = {
|
|
60
59
|
$( click_container ).parent().siblings().removeClass( "active" );
|
61
60
|
$( click_container ).parent().addClass( "active" );
|
62
61
|
$(".query_form_container").children().remove();
|
63
|
-
$( app.query_forms[click_container.attr("show")] ).appendTo(".query_form_container")
|
62
|
+
$( app.query_forms[click_container.attr("show")] ).appendTo(".query_form_container");
|
63
|
+
if(click_container.attr("editor")){
|
64
|
+
if(ace){
|
65
|
+
ace.config.set('basePath', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.11');
|
66
|
+
var editor = ace.edit(click_container.attr("editor"));
|
67
|
+
if(editor){
|
68
|
+
editor.setTheme("ace/theme/monokai");
|
69
|
+
editor.session.setMode("ace/mode/json");
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
64
73
|
}
|
65
74
|
};
|
66
75
|
app.html.build_results = {
|
@@ -171,7 +180,7 @@ app.html.template.select_field = app.merge( app.html.template.abstract_field, {
|
|
171
180
|
}
|
172
181
|
} );
|
173
182
|
app.query_forms = {
|
174
|
-
find_form: { tag: "FORM", cls: "find_form", children:
|
183
|
+
find_form: { tag: "FORM", cls: "find_form", children:
|
175
184
|
[
|
176
185
|
{ tag: "FIELDSET", children: [
|
177
186
|
// this._get_legend(),
|
@@ -211,7 +220,7 @@ app.query_forms = {
|
|
211
220
|
{ tag: "DIV", cls: "input_row", children: [
|
212
221
|
{ tag: "DIV", cls: "query_form", children: [
|
213
222
|
{ tag: "LABEL", "for": "remove_query", text: "Query", style: "margin: 0 10px 0" },
|
214
|
-
{ tag: "
|
223
|
+
{ tag: "DIV", style: "height: 50px; width: 400px", placeholder: "{}", id: "remove_query", name: "remove_query" }
|
215
224
|
] },
|
216
225
|
{ tag: "INPUT", type: 'submit', cls: "submit_btn btn", value: "Remove" },
|
217
226
|
{ tag: "DIV", cls: "clear" }
|
@@ -224,7 +233,6 @@ app.query_forms = {
|
|
224
233
|
data: $(this).serialize(),
|
225
234
|
type: $(this).attr("method"),
|
226
235
|
success: function( data ){
|
227
|
-
console.log(data);
|
228
236
|
if(data.removed){
|
229
237
|
var alert = { tag: "DIV", cls: "alert-message success fade in", "data-alert": "true", children: [
|
230
238
|
{ tag: "A", cls: "close", href: "#", text: "x" },
|
@@ -247,7 +255,7 @@ app.query_forms = {
|
|
247
255
|
{ tag: "DIV", cls: "input_row", children: [
|
248
256
|
{ tag: "DIV", cls: "query_form", children: [
|
249
257
|
{ tag: "LABEL", "for": "insert_query", text: "Query", style: "margin: 0 10px 0" },
|
250
|
-
{ tag: "
|
258
|
+
{ tag: "DIV", style: "height: 200px; width: 500px", placeholder: "{}", id: "insert_query", name: "doc" }
|
251
259
|
] },
|
252
260
|
{ tag: "INPUT", type: 'submit', cls: "submit_btn btn", value: "Insert" },
|
253
261
|
{ tag: "DIV", cls: "clear" }
|
@@ -255,12 +263,14 @@ app.query_forms = {
|
|
255
263
|
]
|
256
264
|
}, onSubmit: function(e){
|
257
265
|
e.preventDefault();
|
266
|
+
if(ace){
|
267
|
+
var editor = ace.edit("insert_query");
|
268
|
+
};
|
258
269
|
app.ax({
|
259
270
|
url: "/database/" + app.storage.get("database") + "/collection/" + app.storage.get("collection") + "/insert",
|
260
|
-
data:
|
271
|
+
data: editor ? { doc: editor.getValue() } : {},
|
261
272
|
type: $(this).attr("method"),
|
262
273
|
success: function( data ){
|
263
|
-
console.log(data);
|
264
274
|
if(data.created){
|
265
275
|
var alert = { tag: "DIV", cls: "alert-message success fade in", "data-alert": "true", children: [
|
266
276
|
{ tag: "A", cls: "close", href: "#", text: "x" },
|
@@ -278,7 +288,7 @@ app.query_forms = {
|
|
278
288
|
});
|
279
289
|
}
|
280
290
|
},
|
281
|
-
mapreduce_form: { tag: "FORM", cls: "mapreduce_form", children:
|
291
|
+
mapreduce_form: { tag: "FORM", cls: "mapreduce_form", children:
|
282
292
|
[
|
283
293
|
{ tag: "FIELDSET", children: [
|
284
294
|
// this._get_legend(),
|
@@ -326,7 +336,6 @@ app.query_forms = {
|
|
326
336
|
data: $(this).serialize(),
|
327
337
|
type: $(this).attr("method"),
|
328
338
|
success: function( data ){
|
329
|
-
console.log(data);
|
330
339
|
$( ".query_result" ).children().remove();
|
331
340
|
if(app.isArray( data.results )){
|
332
341
|
$( app.html.build_results.create( data.results ) ).appendTo( '.query_result' );
|
@@ -341,4 +350,4 @@ app.query_forms = {
|
|
341
350
|
});
|
342
351
|
}
|
343
352
|
}
|
344
|
-
}
|
353
|
+
}
|
data/lib/humongous/version.rb
CHANGED
@@ -20,12 +20,12 @@
|
|
20
20
|
<link rel="apple-touch-icon" href="/images/apple-touch-icon.png">
|
21
21
|
<link rel="apple-touch-icon" sizes="72x72" href="/images/apple-touch-icon-72x72.png">
|
22
22
|
<link rel="apple-touch-icon" sizes="114x114" href="/images/apple-touch-icon-114x114.png">
|
23
|
-
|
23
|
+
|
24
24
|
<script type='text/javascript' src='/javascripts/jquery.min.js'></script>
|
25
25
|
<script type='text/javascript' src='/javascripts/jquery.nohtml.js'></script>
|
26
26
|
<script type='text/javascript' src='/javascripts/bootstrap-modal.js'></script>
|
27
27
|
<script type='text/javascript' src='/javascripts/bootstrap-alerts.js'></script>
|
28
|
-
|
28
|
+
|
29
29
|
<script type='text/javascript' src='/javascripts/core.js'></script>
|
30
30
|
<script type='text/javascript' src='/javascripts/storage.js'></script>
|
31
31
|
<script type='text/javascript' src='/javascripts/query_browser.js'></script>
|
@@ -63,9 +63,9 @@
|
|
63
63
|
<div class="database_list">
|
64
64
|
<table>
|
65
65
|
<tbody>
|
66
|
-
<% @databases.each do |
|
66
|
+
<% @databases.each do | db | %>
|
67
67
|
<tr>
|
68
|
-
<td data-source=<%= "/database/#{
|
68
|
+
<td data-source=<%= "/database/#{db[:name]}" %>><%= db[:name] %></td>
|
69
69
|
</tr>
|
70
70
|
<% end %>
|
71
71
|
</tbody>
|
@@ -92,7 +92,7 @@
|
|
92
92
|
<div class="yielder zebra-striped">
|
93
93
|
<table>
|
94
94
|
<tbody>
|
95
|
-
<% @server_info.each do | property, value | %>
|
95
|
+
<% @server_info.first.each do | property, value | %>
|
96
96
|
<tr>
|
97
97
|
<th><%= property %></th>
|
98
98
|
<td><%= value %></td>
|
@@ -106,7 +106,7 @@
|
|
106
106
|
</div>
|
107
107
|
|
108
108
|
<%= erb :_credits %>
|
109
|
-
|
109
|
+
|
110
110
|
<%= erb :_license %>
|
111
111
|
|
112
112
|
<%= erb :_login_dialog %>
|
@@ -122,5 +122,6 @@
|
|
122
122
|
})
|
123
123
|
</script>
|
124
124
|
<% end %>
|
125
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.11/ace.min.js" type="text/javascript" charset="utf-8" async defer></script>
|
125
126
|
</body>
|
126
|
-
</html>
|
127
|
+
</html>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: humongous
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bagwanpankaj
|
@@ -16,70 +16,70 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1.
|
19
|
+
version: 0.1.11
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.1.
|
26
|
+
version: 0.1.11
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sinatra
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.0.8
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 2.0.8
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: bson
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 4.8.2
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 4.8.2
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mongo
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 2.12.1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 2.12.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: json
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 2.3.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 2.3.0
|
83
83
|
description: 'Humongous: A Ruby way to browse and maintain mongo instance. Using HTML5.'
|
84
84
|
email: bagwanpankaj@gmail.com
|
85
85
|
executables:
|
@@ -132,10 +132,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: 1.3.1
|
134
134
|
requirements: []
|
135
|
-
|
136
|
-
rubygems_version: 2.4.5
|
135
|
+
rubygems_version: 3.1.2
|
137
136
|
signing_key:
|
138
137
|
specification_version: 3
|
139
138
|
summary: 'Humongous: A Mongo Browser for Ruby'
|
140
139
|
test_files: []
|
141
|
-
has_rdoc:
|