superconductor 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,56 @@
1
+ body { background-color: #fff; color: #333; }
2
+
3
+ body, p, ol, ul, td {
4
+ font-family: verdana, arial, helvetica, sans-serif;
5
+ font-size: 13px;
6
+ line-height: 18px;
7
+ }
8
+
9
+ pre {
10
+ background-color: #eee;
11
+ padding: 10px;
12
+ font-size: 11px;
13
+ }
14
+
15
+ a { color: #000; }
16
+ a:visited { color: #666; }
17
+ a:hover { color: #fff; background-color:#000; }
18
+
19
+ div.field, div.actions {
20
+ margin-bottom: 10px;
21
+ }
22
+
23
+ #notice {
24
+ color: green;
25
+ }
26
+
27
+ .field_with_errors {
28
+ padding: 2px;
29
+ background-color: red;
30
+ display: table;
31
+ }
32
+
33
+ #error_explanation {
34
+ width: 450px;
35
+ border: 2px solid red;
36
+ padding: 7px;
37
+ padding-bottom: 0;
38
+ margin-bottom: 20px;
39
+ background-color: #f0f0f0;
40
+ }
41
+
42
+ #error_explanation h2 {
43
+ text-align: left;
44
+ font-weight: bold;
45
+ padding: 5px 5px 5px 15px;
46
+ font-size: 12px;
47
+ margin: -7px;
48
+ margin-bottom: 0px;
49
+ background-color: #c00;
50
+ color: #fff;
51
+ }
52
+
53
+ #error_explanation ul li {
54
+ font-size: 12px;
55
+ list-style: square;
56
+ }
@@ -7,8 +7,9 @@ body.debugging {
7
7
  }
8
8
 
9
9
  section#superconductor_panel {
10
+ details summary { cursor: pointer; }
10
11
  color: white;
11
- z-index: 99999;
12
+ z-index: 998;
12
13
  a, a:link, a:visited { color: white; }
13
14
  -webkit-transition: opacity 0.5s;
14
15
  display: none;
@@ -21,23 +22,20 @@ section#superconductor_panel {
21
22
  bottom: 0px;
22
23
  right: -300px;
23
24
  width: 300px;
24
- footer { clear: both; height: 0px; }
25
+ br { clear: both; height: 0px; }
25
26
  background: -webkit-gradient(linear, left top, left bottom, from(#444444), to(#222222));
26
- & > details {
27
- -webkit-transition: height 2s;
28
- summary {
29
- & > a { float: right; }
30
- cursor: pointer;
27
+ > details {
28
+ > summary {
29
+ background: -webkit-gradient(linear, left top, left bottom, from(#333333), to(#000000));
31
30
  white-space: nowrap;
32
31
  padding: 10px;
33
- }
34
- & > summary {
35
- background: -webkit-gradient(linear, left top, left bottom, from(#333333), to(#000000));
32
+ > a { float: right; }
36
33
  }
37
34
  dl {
38
35
  padding: 5px 10px 10px 10px;
39
36
  margin: 0px 5px 0px 5px;
40
37
  dt {
38
+ font-weight: bold;
41
39
  clear: left;
42
40
  float: left;
43
41
  min-width: 100px;
@@ -49,6 +47,8 @@ section#superconductor_panel {
49
47
  overflow: hidden;
50
48
  text-overflow: ellipsis;
51
49
  }
50
+ > details {
51
+ }
52
52
  }
53
53
  }
54
54
  }
@@ -1,5 +1,5 @@
1
1
  module Superconductor::PanelHelper
2
- def superconductor_panel
3
- render "superconductor/panel"
2
+ def superconductor_panel(&block)
3
+ render :layout => "superconductor/panel", &block
4
4
  end
5
5
  end
@@ -0,0 +1,5 @@
1
+ module Superconductor
2
+ def self.table_name_prefix
3
+ 'superconductor_'
4
+ end
5
+ end
@@ -22,7 +22,7 @@
22
22
  <dt>Format</dt>
23
23
  <dd><%= request.format %></dd>
24
24
  </dl>
25
- <footer />
25
+ <br />
26
26
  </details>
27
27
  </details>
28
28
  <details open>
@@ -30,10 +30,31 @@
30
30
  <dl>
31
31
  <% controller.instance_variables.reject { |k| k.to_s.starts_with?('@_') }.map { |k| [k, instance_variable_get(k)] }.each do |k, v| %>
32
32
  <dt><%= k %></dt>
33
- <dd><%= v %></dd>
33
+ <dd>
34
+ <% if v.is_a?(ActiveRecord::Relation) %>
35
+ <details>
36
+ <summary><%= v.klass.name.pluralize %></summary>
37
+ <dl>
38
+ <dd><%= v.to_sql %>
39
+ </dl>
40
+ </details>
41
+ <% elsif v.is_a?(ActiveRecord::Base) %>
42
+ <details>
43
+ <summary><%= "New " if v.new_record? %><%= v.class.name %></summary>
44
+ <dl>
45
+ <% v.attributes.each do |attribute,value| %>
46
+ <dt><%= attribute %></dt>
47
+ <dd><%= value %></dd>
48
+ <% end %>
49
+ </dl>
50
+ </details>
51
+ <% else %>
52
+ <%= v %>
53
+ <% end %>
54
+ </dd>
34
55
  <% end %>
35
- <footer />
36
56
  </dl>
57
+ <br />
37
58
  </details>
38
59
  <details>
39
60
  <summary>Session</summary>
@@ -50,7 +71,7 @@
50
71
  <summary>
51
72
  <%= controller.class.name %>#<%= action_name %>
52
73
  <a href="edit-source://<%= file %>?<%= lineno %>">Edit Source</a>
53
- <footer />
74
+ <br />
54
75
  </summary>
55
76
  <%= form_tag superconductor_file_path, :method => :put do %>
56
77
  <%= hidden_field_tag :file, file %>
@@ -59,4 +80,5 @@
59
80
  </details>
60
81
  <% rescue %>
61
82
  <% end %>
83
+ <%= yield %>
62
84
  </section>
@@ -1,3 +1,3 @@
1
1
  module Superconductor
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jaden Carver
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-01-19 00:00:00 -07:00
17
+ date: 2012-01-24 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -55,6 +55,8 @@ extensions: []
55
55
  extra_rdoc_files: []
56
56
 
57
57
  files:
58
+ - app/models/superconductor.rb
59
+ - app/assets/stylesheets/scaffold.css
58
60
  - app/assets/stylesheets/superconductor/panel.css.scss
59
61
  - app/assets/stylesheets/superconductor.css
60
62
  - app/assets/javascripts/superconductor.js