mongobile 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
data/lib/mongobile/app.rb CHANGED
@@ -55,6 +55,18 @@ module Mongobile
55
55
  redirect "/database/#{params[:id]}"
56
56
  end
57
57
 
58
+ def humanize(v)
59
+ if v.kind_of?(Hash)
60
+ v.inspect
61
+ elsif v.kind_of?(Array)
62
+ v.inspect
63
+ elsif v.kind_of?(Time)
64
+ v.strftime("%d %B %Y %H:%M:%S")
65
+ else
66
+ v
67
+ end
68
+ end
69
+
58
70
  private
59
71
  def error_not_found
60
72
  status 404
@@ -18,7 +18,7 @@
18
18
  -normalize_stats(@collection.stats).each do |k,v|
19
19
  %b
20
20
  &="#{k}="
21
- &=v
21
+ &=humanize v
22
22
  %br
23
23
  %h1
24
24
  Documents
@@ -30,7 +30,7 @@
30
30
  -document.each do |k,v|
31
31
  %b
32
32
  &="#{k}="
33
- &= v
33
+ &=humanize v
34
34
  %br
35
35
 
36
36
  %div(data-role="footer")
@@ -15,7 +15,7 @@
15
15
  -normalize_stats(@database.stats).each do |k,v|
16
16
  %b
17
17
  &="#{k}="
18
- &=v
18
+ &=humanize v
19
19
  %br
20
20
 
21
21
  %h1
data/lib/mongobile.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'rubygems'
1
2
  require 'bundler/setup'
2
3
 
3
4
  require 'sinatra'
data/mongobile.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mongobile}
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David A. Cuadrado"]
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongobile
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 21
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 0
8
- - 4
9
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
10
11
  platform: ruby
11
12
  authors:
12
13
  - David A. Cuadrado
@@ -18,136 +19,145 @@ date: 2010-12-21 00:00:00 -05:00
18
19
  default_executable: mongobile
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
- name: sinatra
22
- requirement: &id001 !ruby/object:Gem::Requirement
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
23
  none: false
24
24
  requirements:
25
25
  - - ~>
26
26
  - !ruby/object:Gem::Version
27
+ hash: 19
27
28
  segments:
28
29
  - 1
29
30
  - 1
30
31
  - 0
31
32
  version: 1.1.0
32
- type: :runtime
33
+ requirement: *id001
33
34
  prerelease: false
34
- version_requirements: *id001
35
+ type: :runtime
36
+ name: sinatra
35
37
  - !ruby/object:Gem::Dependency
36
- name: bson
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
+ version_requirements: &id002 !ruby/object:Gem::Requirement
38
39
  none: false
39
40
  requirements:
40
41
  - - ~>
41
42
  - !ruby/object:Gem::Version
43
+ hash: 27
42
44
  segments:
43
45
  - 1
44
46
  - 1
45
47
  - 4
46
48
  version: 1.1.4
47
- type: :runtime
49
+ requirement: *id002
48
50
  prerelease: false
49
- version_requirements: *id002
51
+ type: :runtime
52
+ name: bson
50
53
  - !ruby/object:Gem::Dependency
51
- name: mongo
52
- requirement: &id003 !ruby/object:Gem::Requirement
54
+ version_requirements: &id003 !ruby/object:Gem::Requirement
53
55
  none: false
54
56
  requirements:
55
57
  - - ~>
56
58
  - !ruby/object:Gem::Version
59
+ hash: 27
57
60
  segments:
58
61
  - 1
59
62
  - 1
60
63
  - 4
61
64
  version: 1.1.4
62
- type: :runtime
65
+ requirement: *id003
63
66
  prerelease: false
64
- version_requirements: *id003
67
+ type: :runtime
68
+ name: mongo
65
69
  - !ruby/object:Gem::Dependency
66
- name: haml
67
- requirement: &id004 !ruby/object:Gem::Requirement
70
+ version_requirements: &id004 !ruby/object:Gem::Requirement
68
71
  none: false
69
72
  requirements:
70
73
  - - ">="
71
74
  - !ruby/object:Gem::Version
75
+ hash: 3
72
76
  segments:
73
77
  - 0
74
78
  version: "0"
75
- type: :runtime
79
+ requirement: *id004
76
80
  prerelease: false
77
- version_requirements: *id004
81
+ type: :runtime
82
+ name: haml
78
83
  - !ruby/object:Gem::Dependency
79
- name: rspec
80
- requirement: &id005 !ruby/object:Gem::Requirement
84
+ version_requirements: &id005 !ruby/object:Gem::Requirement
81
85
  none: false
82
86
  requirements:
83
87
  - - ~>
84
88
  - !ruby/object:Gem::Version
89
+ hash: 3
85
90
  segments:
86
91
  - 2
87
92
  - 3
88
93
  - 0
89
94
  version: 2.3.0
90
- type: :development
95
+ requirement: *id005
91
96
  prerelease: false
92
- version_requirements: *id005
97
+ type: :development
98
+ name: rspec
93
99
  - !ruby/object:Gem::Dependency
94
- name: yard
95
- requirement: &id006 !ruby/object:Gem::Requirement
100
+ version_requirements: &id006 !ruby/object:Gem::Requirement
96
101
  none: false
97
102
  requirements:
98
103
  - - ~>
99
104
  - !ruby/object:Gem::Version
105
+ hash: 7
100
106
  segments:
101
107
  - 0
102
108
  - 6
103
109
  - 0
104
110
  version: 0.6.0
105
- type: :development
111
+ requirement: *id006
106
112
  prerelease: false
107
- version_requirements: *id006
113
+ type: :development
114
+ name: yard
108
115
  - !ruby/object:Gem::Dependency
109
- name: bundler
110
- requirement: &id007 !ruby/object:Gem::Requirement
116
+ version_requirements: &id007 !ruby/object:Gem::Requirement
111
117
  none: false
112
118
  requirements:
113
119
  - - ~>
114
120
  - !ruby/object:Gem::Version
121
+ hash: 23
115
122
  segments:
116
123
  - 1
117
124
  - 0
118
125
  - 0
119
126
  version: 1.0.0
120
- type: :development
127
+ requirement: *id007
121
128
  prerelease: false
122
- version_requirements: *id007
129
+ type: :development
130
+ name: bundler
123
131
  - !ruby/object:Gem::Dependency
124
- name: jeweler
125
- requirement: &id008 !ruby/object:Gem::Requirement
132
+ version_requirements: &id008 !ruby/object:Gem::Requirement
126
133
  none: false
127
134
  requirements:
128
135
  - - ~>
129
136
  - !ruby/object:Gem::Version
137
+ hash: 7
130
138
  segments:
131
139
  - 1
132
140
  - 5
133
141
  - 2
134
142
  version: 1.5.2
135
- type: :development
143
+ requirement: *id008
136
144
  prerelease: false
137
- version_requirements: *id008
145
+ type: :development
146
+ name: jeweler
138
147
  - !ruby/object:Gem::Dependency
139
- name: rcov
140
- requirement: &id009 !ruby/object:Gem::Requirement
148
+ version_requirements: &id009 !ruby/object:Gem::Requirement
141
149
  none: false
142
150
  requirements:
143
151
  - - ">="
144
152
  - !ruby/object:Gem::Version
153
+ hash: 3
145
154
  segments:
146
155
  - 0
147
156
  version: "0"
148
- type: :development
157
+ requirement: *id009
149
158
  prerelease: false
150
- version_requirements: *id009
159
+ type: :development
160
+ name: rcov
151
161
  description: admin ui for mongodb based on jquery mobile
152
162
  email: krawek@gmail.com
153
163
  executables:
@@ -205,7 +215,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
215
  requirements:
206
216
  - - ">="
207
217
  - !ruby/object:Gem::Version
208
- hash: 3620814989688952816
218
+ hash: 3
209
219
  segments:
210
220
  - 0
211
221
  version: "0"
@@ -214,6 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
224
  requirements:
215
225
  - - ">="
216
226
  - !ruby/object:Gem::Version
227
+ hash: 3
217
228
  segments:
218
229
  - 0
219
230
  version: "0"