superconductor 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +16 -0
  3. data/.rspec +3 -0
  4. data/.ruby-version +1 -0
  5. data/.scss-lint.yml +21 -0
  6. data/.travis.yml +5 -0
  7. data/.yardopts +1 -0
  8. data/Cargo.lock +679 -0
  9. data/Cargo.toml +25 -0
  10. data/Gemfile +4 -0
  11. data/Guardfile +70 -0
  12. data/LICENSE.txt +21 -0
  13. data/Makefile +4 -0
  14. data/README.md +58 -0
  15. data/Rakefile +9 -36
  16. data/assets/__pm.js +424 -0
  17. data/assets/__pm.scss +261 -0
  18. data/assets/_buttons.scss +50 -0
  19. data/assets/_checkbox.scss +59 -0
  20. data/assets/_colors.scss +15 -0
  21. data/assets/_details.scss +54 -0
  22. data/assets/_pm_commits.scss +171 -0
  23. data/assets/_pm_setup.scss +7 -0
  24. data/assets/_pm_tasks.scss +280 -0
  25. data/assets/_tokens.scss +56 -0
  26. data/bin/console +14 -0
  27. data/bin/make +2 -0
  28. data/bin/rake +17 -0
  29. data/bin/release +5 -0
  30. data/bin/setup +8 -0
  31. data/bin/start +5 -0
  32. data/config.ru +10 -0
  33. data/config/properties.yml +37 -0
  34. data/extconf.rb +2 -0
  35. data/lib/superconductor.rb +35 -1
  36. data/lib/superconductor/documentation.rb +34 -0
  37. data/lib/superconductor/middleware.rb +71 -0
  38. data/lib/superconductor/version.rb +1 -1
  39. data/src/lib.rs +101 -0
  40. data/src/server.rs +176 -0
  41. data/src/state/mod.rs +5 -0
  42. data/src/state/state.rs +233 -0
  43. data/src/state/xml.rs +380 -0
  44. data/src/task.rs +129 -0
  45. data/src/view.rs +396 -0
  46. data/superconductor.gemspec +41 -0
  47. metadata +173 -116
  48. data/MIT-LICENSE +0 -20
  49. data/README.rdoc +0 -3
  50. data/app/assets/javascripts/jquery-linedtextarea.js +0 -126
  51. data/app/assets/javascripts/superconductor.js +0 -2
  52. data/app/assets/javascripts/superconductor/panel.js.coffee +0 -42
  53. data/app/assets/stylesheets/jquery-linedtextarea.css +0 -68
  54. data/app/assets/stylesheets/scaffold.css +0 -56
  55. data/app/assets/stylesheets/superconductor.css +0 -4
  56. data/app/assets/stylesheets/superconductor/panel.css.scss +0 -142
  57. data/app/controllers/file_controller.rb +0 -24
  58. data/app/helpers/superconductor/panel_helper.rb +0 -2
  59. data/app/models/superconductor.rb +0 -5
  60. data/app/models/superconductor/exception.rb +0 -0
  61. data/app/views/superconductor/_panel.html.erb +0 -130
  62. data/app/views/superconductor/_panel.js.erb +0 -0
  63. data/config/routes.rb +0 -6
  64. data/lib/superconductor/engine.rb +0 -24
  65. data/lib/tasks/superconductor_tasks.rake +0 -4
  66. data/test/dummy/README.rdoc +0 -261
  67. data/test/dummy/Rakefile +0 -7
  68. data/test/dummy/app/assets/javascripts/application.js +0 -15
  69. data/test/dummy/app/assets/stylesheets/application.css +0 -13
  70. data/test/dummy/app/controllers/application_controller.rb +0 -3
  71. data/test/dummy/app/helpers/application_helper.rb +0 -2
  72. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  73. data/test/dummy/config.ru +0 -4
  74. data/test/dummy/config/application.rb +0 -56
  75. data/test/dummy/config/boot.rb +0 -10
  76. data/test/dummy/config/database.yml +0 -25
  77. data/test/dummy/config/environment.rb +0 -5
  78. data/test/dummy/config/environments/development.rb +0 -37
  79. data/test/dummy/config/environments/production.rb +0 -67
  80. data/test/dummy/config/environments/test.rb +0 -37
  81. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  82. data/test/dummy/config/initializers/inflections.rb +0 -15
  83. data/test/dummy/config/initializers/mime_types.rb +0 -5
  84. data/test/dummy/config/initializers/secret_token.rb +0 -7
  85. data/test/dummy/config/initializers/session_store.rb +0 -8
  86. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  87. data/test/dummy/config/locales/en.yml +0 -5
  88. data/test/dummy/config/routes.rb +0 -58
  89. data/test/dummy/public/404.html +0 -26
  90. data/test/dummy/public/422.html +0 -26
  91. data/test/dummy/public/500.html +0 -25
  92. data/test/dummy/public/favicon.ico +0 -0
  93. data/test/dummy/script/rails +0 -6
  94. data/test/integration/navigation_test.rb +0 -10
  95. data/test/superconductor_test.rb +0 -7
  96. data/test/test_helper.rb +0 -10
  97. data/test/unit/helpers/superconductor/panel_helper_test.rb +0 -4
data/MIT-LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright 2012 YOURNAME
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc DELETED
@@ -1,3 +0,0 @@
1
- = Superconductor
2
-
3
- This project rocks and uses MIT-LICENSE.
@@ -1,126 +0,0 @@
1
- /**
2
- * jQuery Lined Textarea Plugin
3
- * http://alan.blog-city.com/jquerylinedtextarea.htm
4
- *
5
- * Copyright (c) 2010 Alan Williamson
6
- *
7
- * Version:
8
- * $Id: jquery-linedtextarea.js 464 2010-01-08 10:36:33Z alan $
9
- *
10
- * Released under the MIT License:
11
- * http://www.opensource.org/licenses/mit-license.php
12
- *
13
- * Usage:
14
- * Displays a line number count column to the left of the textarea
15
- *
16
- * Class up your textarea with a given class, or target it directly
17
- * with JQuery Selectors
18
- *
19
- * $(".lined").linedtextarea({
20
- * selectedLine: 10,
21
- * selectedClass: 'lineselect'
22
- * });
23
- *
24
- * History:
25
- * - 2010.01.08: Fixed a Google Chrome layout problem
26
- * - 2010.01.07: Refactored code for speed/readability; Fixed horizontal sizing
27
- * - 2010.01.06: Initial Release
28
- *
29
- */
30
- (function($) {
31
-
32
- $.fn.linedtextarea = function(options) {
33
-
34
- // Get the Options
35
- var opts = $.extend({}, $.fn.linedtextarea.defaults, options);
36
-
37
-
38
- /*
39
- * Helper function to make sure the line numbers are always
40
- * kept up to the current system
41
- */
42
- var fillOutLines = function(codeLines, h, lineNo){
43
- while ( (codeLines.height() - h ) <= 0 ){
44
- if ( lineNo == opts.selectedLine )
45
- codeLines.append("<div class='lineno lineselect'>" + lineNo + "</div>");
46
- else
47
- codeLines.append("<div class='lineno'>" + lineNo + "</div>");
48
-
49
- lineNo++;
50
- }
51
- return lineNo;
52
- };
53
-
54
-
55
- /*
56
- * Iterate through each of the elements are to be applied to
57
- */
58
- return this.each(function() {
59
- var lineNo = 1;
60
- var textarea = $(this);
61
-
62
- /* Turn off the wrapping of as we don't want to screw up the line numbers */
63
- textarea.attr("wrap", "off");
64
- textarea.css({resize:'none'});
65
- var originalTextAreaWidth = textarea.outerWidth();
66
-
67
- /* Wrap the text area in the elements we need */
68
- textarea.wrap("<div class='linedtextarea'></div>");
69
- var linedTextAreaDiv = textarea.parent().wrap("<div class='linedwrap' style='width:" + originalTextAreaWidth + "px'></div>");
70
- var linedWrapDiv = linedTextAreaDiv.parent();
71
-
72
- linedWrapDiv.prepend("<div class='lines' style='width:50px'></div>");
73
-
74
- var linesDiv = linedWrapDiv.find(".lines");
75
- linesDiv.height( textarea.height() + 6 );
76
-
77
-
78
- /* Draw the number bar; filling it out where necessary */
79
- linesDiv.append( "<div class='codelines'></div>" );
80
- var codeLinesDiv = linesDiv.find(".codelines");
81
- lineNo = fillOutLines( codeLinesDiv, linesDiv.height(), 1 );
82
-
83
- /* Move the textarea to the selected line */
84
- if ( opts.selectedLine != -1 && !isNaN(opts.selectedLine) ){
85
- var fontSize = parseInt( textarea.height() / (lineNo-2) );
86
- var position = parseInt( fontSize * opts.selectedLine ) - (textarea.height()/2);
87
- textarea[0].scrollTop = position;
88
- }
89
-
90
-
91
- /* Set the width */
92
- var sidebarWidth = linesDiv.outerWidth();
93
- var paddingHorizontal = parseInt( linedWrapDiv.css("border-left-width") ) + parseInt( linedWrapDiv.css("border-right-width") ) + parseInt( linedWrapDiv.css("padding-left") ) + parseInt( linedWrapDiv.css("padding-right") );
94
- var linedWrapDivNewWidth = originalTextAreaWidth - paddingHorizontal;
95
- var textareaNewWidth = originalTextAreaWidth - sidebarWidth - paddingHorizontal - 20;
96
-
97
- textarea.width( textareaNewWidth );
98
- linedWrapDiv.width( linedWrapDivNewWidth );
99
-
100
-
101
-
102
- /* React to the scroll event */
103
- textarea.scroll( function(tn){
104
- var domTextArea = $(this)[0];
105
- var scrollTop = domTextArea.scrollTop;
106
- var clientHeight = domTextArea.clientHeight;
107
- codeLinesDiv.css( {'margin-top': (-1*scrollTop) + "px"} );
108
- lineNo = fillOutLines( codeLinesDiv, scrollTop + clientHeight, lineNo );
109
- });
110
-
111
-
112
- /* Should the textarea get resized outside of our control */
113
- textarea.resize( function(tn){
114
- var domTextArea = $(this)[0];
115
- linesDiv.height( domTextArea.clientHeight + 6 );
116
- });
117
-
118
- });
119
- };
120
-
121
- // default options
122
- $.fn.linedtextarea.defaults = {
123
- selectedLine: -1,
124
- selectedClass: 'lineselect'
125
- };
126
- })(jQuery);
@@ -1,2 +0,0 @@
1
- //= require 'jquery-linedtextarea'
2
- //= require_tree ./superconductor
@@ -1,42 +0,0 @@
1
- jQuery ->
2
- panel = $('aside#superconductor')
3
- toolbar = panel.find('menu[type=toolbar]')
4
-
5
- initialTimeout = setTimeout( ->
6
- panel.addClass('closed')
7
- , 2500)
8
-
9
- toolbar.find('button.expander').click ->
10
- clearTimeout(initialTimeout)
11
- panel.removeClass('closed').toggleClass('expanded')
12
-
13
- toolbar.find('button.closer').click ->
14
- clearTimeout(initialTimeout)
15
- panel.addClass('closed')
16
-
17
- panel.click ->
18
- clearTimeout(initialTimeout)
19
-
20
- $(window).keyup (e) ->
21
- clearTimeout(initialTimeout)
22
- panel.toggleClass('closed') if e.which == 27
23
-
24
- $('aside#superconductor ul.methods li a').live 'click', (e) ->
25
- e.preventDefault()
26
- parent = $(this).parent('li')
27
- if parent.hasClass('open')
28
- parent.removeClass('open').children('form').remove()
29
- else
30
- $.ajax {
31
- url: this.href,
32
- dataType: 'json',
33
- context: this,
34
- success: (data, status, xhr) ->
35
- form = $('<form action="'+this.href+'" method="post" data-method="put"></form>')
36
- form.append($('<textarea'+( if data.writable then '' else ' disabled="disabled"' )+'>'+data.content+'</textarea>'))
37
- form.append($('<input type="submit" value="Save Changes" />')) if data.writable
38
- parent.addClass('open').append(form)
39
- form.find('textarea').linedtextarea({selectedLine: this.hash.slice(1)})
40
- }
41
-
42
-
@@ -1,68 +0,0 @@
1
- /**
2
- * jQuery Lined Textarea Plugin
3
- * http://alan.blog-city.com/jquerylinedtextarea.htm
4
- *
5
- * Copyright (c) 2010 Alan Williamson
6
- *
7
- * Released under the MIT License:
8
- * http://www.opensource.org/licenses/mit-license.php
9
- *
10
- * Usage:
11
- * Displays a line number count column to the left of the textarea
12
- *
13
- * Class up your textarea with a given class, or target it directly
14
- * with JQuery Selectors
15
- *
16
- * $(".lined").linedtextarea({
17
- * selectedLine: 10,
18
- * selectedClass: 'lineselect'
19
- * });
20
- *
21
- */
22
-
23
- .linedwrap {
24
- border: 1px solid #c0c0c0;
25
- padding: 3px;
26
- }
27
-
28
- .linedtextarea {
29
- padding: 0px;
30
- margin: 0px;
31
- }
32
-
33
- .linedtextarea textarea, .linedwrap .codelines .lineno {
34
- font-size: 10pt;
35
- font-family: monospace;
36
- line-height: normal !important;
37
- }
38
-
39
- .linedtextarea textarea {
40
- padding-right:0.3em;
41
- padding-top:0.3em;
42
- border: 0;
43
- }
44
-
45
- .linedwrap .lines {
46
- margin-top: 0px;
47
- width: 50px;
48
- float: left;
49
- overflow: hidden;
50
- border-right: 1px solid #c0c0c0;
51
- margin-right: 10px;
52
- }
53
-
54
- .linedwrap .codelines {
55
- padding-top: 5px;
56
- }
57
-
58
- .linedwrap .codelines .lineno {
59
- color:#AAAAAA;
60
- padding-right: 0.5em;
61
- padding-top: 0.0em;
62
- text-align: right;
63
- white-space: nowrap;
64
- }
65
-
66
- .linedwrap .codelines .lineselect {
67
- color: red;
68
- }
@@ -1,56 +0,0 @@
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
- }
@@ -1,4 +0,0 @@
1
- /*
2
- *= require jquery-linedtextarea
3
- *= require_tree ./superconductor/
4
- */
@@ -1,142 +0,0 @@
1
- aside#superconductor {
2
- position: fixed;
3
- top: 0;
4
- right: 0;
5
- bottom: 0;
6
- width: 35%;
7
- margin: 0;
8
- z-index: 99999;
9
- font-family: arial, helvetica, verdana, sans-serif;
10
- background-color: #000000;
11
- background-color: rgba(0,0,0,0.7);
12
- background: -webkit-linear-gradient(top, rgba(0,0,0,0.7), rgba(0,0,0,0.7), rgba(0,0,0,0.85));
13
- border: none;
14
- border-left: solid black 1px;
15
- overflow: auto;
16
- visibility: visible;
17
- font-size: 10pt;
18
- opacity: 1;
19
- -webkit-transition: width 0.5s, opacity 0.5s;
20
- box-shadow: 0 0 10px rgba(0,0,0,0.7);
21
- color: white;
22
- &.expanded {
23
- width: 100%;
24
- menu[type=toolbar] button.expander:before { content: '\21E5' }
25
- -webkit-transition: width 0.5s, opacity 0.5s;
26
- }
27
- &.closed {
28
- visibility: hidden;
29
- opacity: 0;
30
- -webkit-transition: visibility 0s 0.5s, opacity 0.5s;
31
- }
32
-
33
- // **
34
- h1, h2, h3, h4, h5, h6, p, ul, dl, section {
35
- text-align: left;
36
- margin-left: 5px;
37
- }
38
- h1 { font-size: 1.25em; }
39
- h2 { font-size: 1.1em; }
40
- dl {
41
- dt {
42
- float: left;
43
- min-width: 80px;
44
- margin-left: 10px;
45
- }
46
- dd {
47
- margin-left: 90px;
48
- }
49
- }
50
- code {
51
- white-space: pre;
52
- font-family: "Lucida Sans Typewriter", monospace;
53
- font-size: 9pt;
54
- }
55
- hr {
56
- border: none;
57
- border-top: dotted #555555 1px;
58
- }
59
- > hr {
60
- margin-left: -15px;
61
- }
62
- textarea {
63
- font-size: 10pt;
64
- margin: 0;
65
- padding: 2px;
66
- }
67
- details {
68
- margin: -1px 20px 0 20px;
69
- &[open] {
70
- border-left: dotted #555555 1px;
71
- margin-left: 19px;
72
- margin-bottom: 1em;
73
- & > summary {
74
- background-color: rgba(50,50,50,0.5);
75
- }
76
- }
77
- > summary {
78
- outline: none;
79
- border: dotted #555555 1px;
80
- padding: 2px;
81
- overflow: hidden;
82
- white-space: nowrap;
83
- text-overflow: ellipsis;
84
- margin-left: -15px;
85
- cursor: pointer;
86
- }
87
- ul.methods {
88
- padding: 0;
89
- list-style-type: none;
90
- li {
91
- > a, > span {
92
- padding: 3px 5px;
93
- display: block;
94
- width: 200px;
95
- float: left;
96
- white-space: nowrap;
97
- text-overflow: ellipsis;
98
- overflow: hidden;
99
- }
100
- &.open {
101
- a {
102
- padding: 2px 4px;
103
- border: dotted #555555 1px;
104
- background-color: rgba(50,50,50,0.5);
105
- margin-bottom: -1px;
106
- }
107
- form {
108
- clear: left;
109
- border: dotted #555555 1px;
110
- margin: 0;
111
- textarea { width: 100%; height: 200px; }
112
- .linedwrap { border: none; }
113
- }
114
- }
115
- }
116
- &:after { display: block; content: ''; clear: both; }
117
- }
118
-
119
- ul.array {
120
- margin: 0.2em;
121
- padding-left: 1.75em;
122
- }
123
- }
124
- > menu[type=toolbar] {
125
- margin: 0;
126
- position: fixed;
127
- top: 0;
128
- right: 0;
129
- button {
130
- background: #333333;
131
- border: solid #FFFFFF 1px;
132
- color: #FFFFFF;
133
- border-radius: 0;
134
- padding: 2px;
135
- width: 25px;
136
- height: 25px;
137
- font-size: 16px;
138
- margin: 2px;
139
- &.expander:before { content: '\21E4' }
140
- }
141
- }
142
- }