humongous 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YjZlYTVjNzdhOGQ4OTllMjNjMGU5ZGI2YzhiNzk2N2NjNTRmM2NlZA==
5
+ data.tar.gz: !binary |-
6
+ NGUwYzk0NWNlYWEyYzY0NzNkMzFiYWU5Y2YyNDg4M2Q5MDhlYWVhZA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ MTAxOGQ0MjdmNzViMWRlOTI3NjA1YjhhOTIwODY5YzFmNmJiZGIzYzNlNWJh
10
+ MjU5YjZjZTIyMDFmM2QxYzA5MmE0ZmE1NjY4MWI5OWYwODIxMjliOWE0Y2Yz
11
+ NjI0NTQ2ZWUxNzQxMGY5ZGI0NzVkOWFiNjVmZGUyMmU0M2U2MGQ=
12
+ data.tar.gz: !binary |-
13
+ ZjcwMWQ0M2Q4YzY3NGViYjQ5YTU0OTVhMTRiYjUyNjk2OTZhZTM4NDkwYmJk
14
+ MTg4ZTU1ZTMzNTI4YWU2M2Q3N2I2MmY5YmIzZTBmMTg3Zjg4NTEzMWU1MDk3
15
+ MzA0OTYxNTg5Yjk4MDY4ZWIxMjRlZDY0MzhmN2Q0NDViMjhiYjM=
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 Bagwan Pankaj
1
+ Copyright (c) 2012-2014 Bagwan Pankaj
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.markdown CHANGED
@@ -8,7 +8,7 @@ Humongous: A Ruby way to browse and maintain MongoDB instances, using HTML5.
8
8
 
9
9
  Install the gem by running:
10
10
 
11
- gem install humongous --pre
11
+ gem install humongous
12
12
 
13
13
  and run on terminal/console
14
14
 
@@ -48,7 +48,7 @@ For more info write me at me[at]bagwanpankaj.com
48
48
 
49
49
  ## Support
50
50
 
51
- Currently it only supports Ruby version >= 1.8.7. Humongous has been tested on MRI 18, MRI 19 and JRuby.
51
+ Currently it only supports Ruby version >= 1.8.7. Humongous has been tested against MRI 18, MRI 19 and JRuby.
52
52
 
53
53
  ## TODO's
54
54
 
@@ -56,7 +56,7 @@ There are lot of things and area to improve and develop. Since it in pre release
56
56
 
57
57
  * Error Handling [DONE]
58
58
  * Authentication module [DONE]
59
- * Sophisticated Querying support [In Progress]
59
+ * Sophisticated Querying support [DONE]
60
60
  * Better UI (need a real contribution here) [In Progress]
61
61
  * Better documentation
62
62
  * Example series
@@ -67,5 +67,5 @@ There are lot of things and area to improve and develop. Since it in pre release
67
67
 
68
68
  ## Copyright
69
69
 
70
- Copyright (c) 2012 [Bagwan Pankaj]. See LICENSE.txt for further details.
70
+ Copyright (c) 2012-2014 [Bagwan Pankaj]. See LICENSE.txt for further details.
71
71
 
data/bin/humongous CHANGED
@@ -14,7 +14,9 @@ Vegas::Runner.new(Humongous::Application, 'humongous',{
14
14
  :app_dir => File.expand_path(File.join('~', '.humongous')),
15
15
  :port => 9000,
16
16
  :before_run => lambda {|v|
17
+ puts "#################################################"
17
18
  puts "You are using Humongous(#{Humongous.version})"
18
19
  puts "Welcome aboard on Humongous. Enjoy!"
20
+ puts "#################################################"
19
21
  }
20
22
  })
@@ -30,16 +30,22 @@ module Humongous
30
30
  end
31
31
 
32
32
  error Mongo::ConnectionFailure do
33
- [502, headers, "Humongous is unable to find MongoDB instance. Check your MongoDB connection."]
33
+ halt 502, headers, "Humongous is unable to find MongoDB instance. Make sure that MongoDB is running."
34
34
  end
35
35
 
36
36
  error Mongo::OperationFailure do
37
37
  halt 401, {'Content-Type' => 'text/javascript'}, { :errmsg => "Need to login", :ok => false }.to_json
38
38
  end
39
39
 
40
- helpers do
41
- include Humongous::Helpers::SinatraHelpers
40
+ error Mongo::InvalidNSName do
41
+ halt 502, headers, "Humongous is unable to find MongoDB instance. Make sure that MongoDB is running."
42
42
  end
43
+
44
+ error Mongo::AuthenticationError do
45
+ halt 502, headers, "Humongous is unable to find MongoDB instance. Make sure that MongoDB is running."
46
+ end
47
+
48
+ helpers { include Humongous::Helpers::SinatraHelpers }
43
49
 
44
50
  reciever = lambda do
45
51
  begin
@@ -5,12 +5,12 @@ module Humongous
5
5
 
6
6
  def connection(params)
7
7
  opts = opts_to_connect(params)
8
- session[:connection] ||= Mongo::Connection.new(opts[:url], opts[:port])
8
+ session[:connection] = Mongo::Connection.new(opts[:url], opts[:port])
9
9
  end
10
10
 
11
11
  def autanticate!
12
12
  @connection.apply_saved_authentication and return unless @connection.auths.blank?
13
- return if params[:auth].blank?
13
+ return if params[:auth].blank? || params[:auth][:db].blank?
14
14
  @connection.add_auth(params[:auth][:db], params[:auth][:username], params[:auth][:password])
15
15
  @connection.apply_saved_authentication
16
16
  end
@@ -24,10 +24,7 @@ module Humongous
24
24
  :password => ""
25
25
  }
26
26
  return @options if params.blank?
27
- @options[:url] = params[:url]
28
- @options[:port] = params[:port]
29
- @options[:freeze] = true
30
- @options
27
+ @options.merge!({ :url => params[:url], :port => params[:port], :freeze => true })
31
28
  end
32
29
 
33
30
  def get_uri(params = {})
@@ -4,9 +4,9 @@ $(document).ready(function(){
4
4
  backdrop: "static"
5
5
  });
6
6
  $("#login_dialog a").click( function(e){
7
- if(validate("#login_dialog .modal-body form")){
7
+ // if(validate("#login_dialog .modal-body form")){
8
8
  $("#login_dialog .modal-body form").submit();
9
- }
9
+ // }
10
10
  e.preventDefault();
11
11
  });
12
12
  $("#loader").bind("ajaxSend", function(){
@@ -1,3 +1,3 @@
1
1
  module Humongous
2
- VERSION = "0.2.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -39,6 +39,7 @@
39
39
  <a class="brand" href="#">Humongous</a>
40
40
  <ul class="nav">
41
41
  <li class="active"><a href="#">Mongo</a></li>
42
+ <li><a href="#" data-target="#login_dialog" data-toggle="modal" onClick="$('#login_dialog').modal();">Login</a></li>
42
43
  <li><a data-controls-modal="credits" data-backdrop="true" data-keyboard="true">About</a></li>
43
44
  <li><a data-controls-modal="license" data-backdrop="true" data-keyboard="true">License</a></li>
44
45
  </ul>
@@ -133,7 +134,7 @@
133
134
  </ul>
134
135
  </div>
135
136
  </div>
136
- <div class="modal-footer"><span>&copy; Bagwan Pankaj 2012</span></div>
137
+ <div class="modal-footer"><span>&copy; Bagwan Pankaj 2012-2014</span></div>
137
138
  </div>
138
139
 
139
140
  <div id="license" style="display:none" class="modal hide fade">
@@ -142,7 +143,7 @@
142
143
  <h3>Humongous License</h3>
143
144
  </div>
144
145
  <div class="modal-body">
145
- <p>Copyright (c) 2012 Bagwan Pankaj</p>
146
+ <p>Copyright (c) 2012-2014 Bagwan Pankaj</p>
146
147
  <p>
147
148
  Permission is hereby granted, free of charge, to any person obtaining
148
149
  a copy of this software and associated documentation files (the
@@ -166,7 +167,7 @@
166
167
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
167
168
  </p>
168
169
  </div>
169
- <div class="modal-footer"><span>&copy; Bagwan Pankaj 2012</span></div>
170
+ <div class="modal-footer"><span>&copy; Bagwan Pankaj 2012-2014</span></div>
170
171
  </div>
171
172
  <div id="loader" style="display:none" class="modal">
172
173
  <div class="modal-body">
@@ -175,6 +176,7 @@
175
176
  </div>
176
177
  <div id="login_dialog" style="display:none" class="modal">
177
178
  <div class="modal-header">
179
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
178
180
  <!-- <a href="#" class="close">x</a> -->
179
181
  <h3>Provide MongoDB Access Credentials</h3>
180
182
  </div>
@@ -220,7 +222,7 @@
220
222
  </div>
221
223
 
222
224
  <footer>
223
- <p>&copy; Bagwan Pankaj 2012</p>
225
+ <p>&copy; Bagwan Pankaj 2012-2014</p>
224
226
  </footer>
225
227
 
226
228
  </div> <!-- /container -->
data/lib/humongous.rb CHANGED
@@ -31,8 +31,10 @@ module Humongous
31
31
  end
32
32
 
33
33
  def self.run!
34
- puts "Hi There, Welcome and thanks for using Humongous."
35
- puts "Welcome aboard Humongous."
34
+ puts "#################################################"
35
+ puts "You are using Humongous(#{Humongous.version})"
36
+ puts "Welcome aboard on Humongous. Enjoy!"
37
+ puts "#################################################"
36
38
 
37
39
  Application.run!
38
40
  end
metadata CHANGED
@@ -1,71 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: humongous
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
5
- prerelease:
4
+ version: 1.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - bagwanpankaj
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-02-20 00:00:00.000000000Z
11
+ date: 2012-02-20 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: vegas
16
- requirement: &2152825240 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - =
17
+ - - '='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.1.8
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *2152825240
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.1.8
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: sinatra
27
- requirement: &2152824760 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - =
31
+ - - '='
31
32
  - !ruby/object:Gem::Version
32
33
  version: 1.3.2
33
34
  type: :runtime
34
35
  prerelease: false
35
- version_requirements: *2152824760
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.3.2
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: bson_ext
38
- requirement: &2152824280 !ruby/object:Gem::Requirement
39
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
- - - =
45
+ - - '='
42
46
  - !ruby/object:Gem::Version
43
47
  version: 1.5.2
44
48
  type: :runtime
45
49
  prerelease: false
46
- version_requirements: *2152824280
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 1.5.2
47
55
  - !ruby/object:Gem::Dependency
48
56
  name: mongo
49
- requirement: &2152823800 !ruby/object:Gem::Requirement
50
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
- - - =
59
+ - - '='
53
60
  - !ruby/object:Gem::Version
54
61
  version: 1.5.2
55
62
  type: :runtime
56
63
  prerelease: false
57
- version_requirements: *2152823800
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 1.5.2
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: json
60
- requirement: &2152823320 !ruby/object:Gem::Requirement
61
- none: false
71
+ requirement: !ruby/object:Gem::Requirement
62
72
  requirements:
63
- - - =
73
+ - - '='
64
74
  - !ruby/object:Gem::Version
65
75
  version: 1.6.5
66
76
  type: :runtime
67
77
  prerelease: false
68
- version_requirements: *2152823320
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 1.6.5
69
83
  description: ! 'Humongous: A Ruby way to browse and maintain mongo instance. Using
70
84
  HTML5.'
71
85
  email: bagwanpankaj@gmail.com
@@ -99,27 +113,25 @@ files:
99
113
  homepage: http://github.com/bagwanpankaj/humongous
100
114
  licenses:
101
115
  - MIT
116
+ metadata: {}
102
117
  post_install_message:
103
118
  rdoc_options: []
104
119
  require_paths:
105
120
  - lib
106
121
  required_ruby_version: !ruby/object:Gem::Requirement
107
- none: false
108
122
  requirements:
109
123
  - - ! '>='
110
124
  - !ruby/object:Gem::Version
111
125
  version: 1.8.7
112
126
  required_rubygems_version: !ruby/object:Gem::Requirement
113
- none: false
114
127
  requirements:
115
128
  - - ! '>'
116
129
  - !ruby/object:Gem::Version
117
130
  version: 1.3.1
118
131
  requirements: []
119
132
  rubyforge_project:
120
- rubygems_version: 1.8.10
133
+ rubygems_version: 2.0.5
121
134
  signing_key:
122
135
  specification_version: 3
123
136
  summary: ! 'Humongous: A Mongo Browser for Ruby'
124
137
  test_files: []
125
- has_rdoc: