duke 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,150 @@
1
+ /* Based on http://html5boilerplate.com */
2
+
3
+ h1, h2, h3, h4, h5, h6 {
4
+ font-weight: bold;
5
+ }
6
+
7
+ a, a:active, a:visited {
8
+ color: #FFF;
9
+ }
10
+
11
+ a:hover {
12
+ color: #D1FF03;
13
+ }
14
+
15
+ ul, ol {
16
+ margin-left: 1.8em;
17
+ }
18
+
19
+ ol {
20
+ list-style-type: decimal;
21
+ }
22
+
23
+ /* Remove margins for navigation lists */
24
+ nav ul, nav li {
25
+ margin: 0;
26
+ }
27
+
28
+ small {
29
+ font-size: 85%;
30
+ }
31
+
32
+ strong, th {
33
+ font-weight: bold;
34
+ }
35
+
36
+ td, td img {
37
+ vertical-align: top;
38
+ }
39
+
40
+ sub {
41
+ vertical-align: sub;
42
+ font-size: smaller;
43
+ }
44
+
45
+ sup {
46
+ vertical-align: super;
47
+ font-size: smaller;
48
+ }
49
+
50
+ pre {
51
+ padding: 15px;
52
+ white-space: pre-line;
53
+ }
54
+
55
+ /* align checkboxes, radios, text inputs with their label
56
+ by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css */
57
+ input[type="radio"] {
58
+ vertical-align: text-bottom;
59
+ }
60
+
61
+ input[type="checkbox"] {
62
+ vertical-align: bottom;
63
+ }
64
+
65
+ /* hand cursor on clickable input elements */
66
+ label,
67
+ input[type=button],
68
+ input[type=submit],
69
+ button {
70
+ cursor: pointer;
71
+ }
72
+
73
+ /* webkit browsers add a 2px margin outside the chrome of form elements */
74
+ button, input, select, textarea {
75
+ margin: 0;
76
+ }
77
+
78
+ /* webkit browsers add a 2px margin outside the chrome of form elements */
79
+ button::-moz-focus-inner {
80
+ border:0;
81
+ }
82
+
83
+ /* These selection declarations have to be separate.
84
+ No text-shadow: twitter.com/miketaylr/status/12228805301
85
+ Also: hot pink. */
86
+ ::-moz-selection {
87
+ background: #D1FF03;
88
+ color:#000;
89
+ text-shadow: none;
90
+ }
91
+
92
+ ::selection {
93
+ background:#D1FF03;
94
+ color:#000;
95
+ text-shadow: none;
96
+ }
97
+
98
+ /*
99
+ * Non-semantic helper classes
100
+ */
101
+
102
+ /* Hide for both screenreaders and browsers
103
+ css-discuss.incutio.com/wiki/Screenreader_Visibility */
104
+ .hidden {
105
+ display: none;
106
+ visibility: hidden;
107
+ }
108
+
109
+ /* Hide visually and from screenreaders, but maintain layout */
110
+ .invisible {
111
+ visibility: hidden;
112
+ }
113
+
114
+ /* >> The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix */
115
+ .clearfix:before,
116
+ .clearfix:after {
117
+ content: "\0020";
118
+ display: block;
119
+ height: 0;
120
+ visibility: hidden;
121
+ }
122
+
123
+ .clearfix:after {
124
+ clear: both;
125
+ }
126
+
127
+ /* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */
128
+ .clearfix {
129
+ zoom: 1;
130
+ }
131
+
132
+ /* Fontz */
133
+
134
+ /* fonts.css from the YUI Library: developer.yahoo.com/yui/
135
+ Refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages
136
+
137
+ There are three custom edits:
138
+ * remove arial, helvetica from explicit font stack
139
+ * we normalize monospace styles ourselves
140
+ * table font-size is reset in the HTML5 reset above so there is no need to repeat
141
+ */
142
+ body {
143
+ font:13px/1.231 sans-serif;
144
+ *font-size:small;
145
+ font-smooth: always;
146
+ } /* hack retained to preserve specificity <- WTF? */
147
+
148
+ select, input, textarea, button {
149
+ font:99% sans-serif;
150
+ }
@@ -0,0 +1,74 @@
1
+ /* Based on http://ubuwaits.github.com/css3-buttons */
2
+
3
+ button.blue {
4
+ background: -webkit-gradient(linear, 0 0, 0 100%,
5
+ color-stop(0, #59D9EA),
6
+ color-stop(0.5, #00899A),
7
+ color-stop(0.5, #007988),
8
+ color-stop(1, #004F59));
9
+ border: 0;
10
+ border-radius: 4px;
11
+ -moz-border-radius: 4px;
12
+ -webkit-border-radius: 4px;
13
+ -webkit-box-shadow: inset 0px 0px 0px 1px rgba(36, 51, 53, 0.4), 0 1px 3px #333;
14
+ color: #fff;
15
+ font-size: 197%;
16
+ float: right;
17
+ text-align: center;
18
+ text-shadow: 0px -1px 1px rgba(0, 0, 0, .8), 0 1px 1px rgba(255, 255, 255, 0.3);
19
+ width: 220px;
20
+ padding: 12px 0;
21
+ }
22
+
23
+ button.blue:hover {
24
+ background: -webkit-gradient(linear, 0 0, 0 100%,
25
+ color-stop(0, #77F7FF),
26
+ color-stop(0.5, #1EA7B8),
27
+ color-stop(0.5, #148D9C),
28
+ color-stop(1, #14636D));
29
+ }
30
+
31
+ button.blue:active {
32
+ background: -webkit-gradient(linear, 0 0, 0 100%,
33
+ color-stop(0, #45C5D6),
34
+ color-stop(0.5, #007586),
35
+ color-stop(0.5, #006574),
36
+ color-stop(1, #003B45));
37
+ -webkit-box-shadow: inset 0px 0px 0px 1px rgba(36, 51, 53, 0.4);
38
+ }
39
+
40
+ button.black {
41
+ background: -webkit-gradient(linear, 0 0, 0 100%,
42
+ color-stop(0, #434343),
43
+ color-stop(0.5, #2F2F2F),
44
+ color-stop(0.5, #252525),
45
+ color-stop(1, #111111));
46
+ border: 0;
47
+ border-radius: 4px;
48
+ -moz-border-radius: 4px;
49
+ -webkit-border-radius: 4px;
50
+ -webkit-box-shadow: inset 0px 0px 0px 1px rgba(0, 0, 0, 0.5), 0 1px 3px #333;
51
+ color: #fff;
52
+ font-size: 197%;
53
+ text-align: center;
54
+ text-shadow: 0px -1px 1px rgba(0, 0, 0, .8), 0 1px 1px rgba(255, 255, 255, 0.3);
55
+ width: 220px;
56
+ padding: 12px 0;
57
+ }
58
+
59
+ button.black:hover {
60
+ background: -webkit-gradient(linear, 0 0, 0 100%,
61
+ color-stop(0, #575757),
62
+ color-stop(0.5, #434343),
63
+ color-stop(0.5, #393939),
64
+ color-stop(1, #252525));
65
+ }
66
+
67
+ button.black:active {
68
+ background: -webkit-gradient(linear, 0 0, 0 100%,
69
+ color-stop(0, #2F2F2F),
70
+ color-stop(0.5, #252525),
71
+ color-stop(0.5, #1B1B1B),
72
+ color-stop(1, #111111));
73
+ -webkit-box-shadow: inset 0px 0px 0px 1px rgba(0, 0, 0, 0.5);
74
+ }
@@ -0,0 +1,105 @@
1
+ body, select, input, textarea {
2
+ background-color: #FFF;
3
+ }
4
+
5
+ hgroup {
6
+ background-color: #00DFFC;
7
+ padding: 12px 0 12px 0;
8
+ border-bottom: 2px solid #00B4CC;
9
+ }
10
+
11
+ hgroup h1, hgroup h2 {
12
+ width:640px;
13
+ padding-left: 20px;
14
+ margin-left: auto;
15
+ margin-right: auto;
16
+ }
17
+
18
+ hgroup h1 {
19
+ padding-left: 13px;
20
+ }
21
+
22
+ hgroup h1 {
23
+ color: #008C9E;
24
+ font-size: 400%;
25
+ }
26
+
27
+ hgroup h2 {
28
+ color: #343838;
29
+ }
30
+
31
+ section {
32
+ margin-left: auto;
33
+ margin-right: auto;
34
+ width: 660px;
35
+ }
36
+
37
+ ul {
38
+ width: 660px;
39
+ list-style: none;
40
+ margin: 0 0 15px 0;
41
+ }
42
+
43
+ li {
44
+ background: #CCC;
45
+ height: 90px;
46
+ margin-top: 15px;
47
+ }
48
+
49
+ form {
50
+ padding-top: 16px;
51
+ margin: 0 20px;
52
+ float: right;
53
+ }
54
+
55
+ input {
56
+ border-radius: 4px;
57
+ -moz-border-radius: 4px;
58
+ -webkit-border-radius: 4px;
59
+ font-size: 200%;
60
+ font-weight: bold;
61
+ padding: 11px;
62
+ text-align: center;
63
+ float: left;
64
+ font-style: italic;
65
+ }
66
+
67
+ .start input {
68
+ width: 195px;
69
+ margin-right: 20px;
70
+ }
71
+
72
+ #create input {
73
+ width: 354px;
74
+ margin-right: 20px;
75
+ }
76
+
77
+ .chunky-text {
78
+ font-size: 200%;
79
+ font-weight: bold;
80
+ padding: 12px 0;
81
+ color: #ffffff;
82
+ text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
83
+ display: inline;
84
+ line-height: 90px;
85
+ margin-left: 20px;
86
+ }
87
+
88
+ .port {
89
+ line-height: 65px;
90
+ float: right;
91
+ width: 220px;
92
+ text-align: center;
93
+ }
94
+
95
+ .fail {
96
+ background: #DC2323;
97
+ }
98
+
99
+ .pass {
100
+ background: #1FBD00;
101
+ }
102
+
103
+ .building {
104
+ background: #FDD820;
105
+ }
@@ -0,0 +1,92 @@
1
+ /* Based on http://html5boilerplate.com */
2
+
3
+ html, body, div, span, object, iframe,
4
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
5
+ abbr, address, cite, code,
6
+ del, dfn, em, img, ins, kbd, q, samp,
7
+ small, strong, sub, sup, var,
8
+ b, i,
9
+ dl, dt, dd, ol, ul, li,
10
+ fieldset, form, label, legend,
11
+ table, caption, tbody, tfoot, thead, tr, th, td,
12
+ article, aside, canvas, details, figcaption, figure,
13
+ footer, header, hgroup, menu, nav, section, summary,
14
+ time, mark, audio, video {
15
+ margin:0;
16
+ padding:0;
17
+ border:0;
18
+ outline:0;
19
+ font-size:100%;
20
+ vertical-align:baseline;
21
+ background:transparent;
22
+ }
23
+
24
+ article, aside, details, figcaption, figure,
25
+ footer, header, hgroup, menu, nav, section {
26
+ display:block;
27
+ }
28
+
29
+ nav ul {
30
+ list-style:none;
31
+ }
32
+
33
+ blockquote, q {
34
+ quotes:none;
35
+ }
36
+
37
+ blockquote:before,
38
+ blockquote:after,
39
+ q:before,
40
+ q:after {
41
+ content:'';
42
+ content:none;
43
+ }
44
+
45
+ a {
46
+ margin:0;
47
+ padding:0;
48
+ font-size:100%;
49
+ vertical-align:baseline;
50
+ background:transparent;
51
+ }
52
+
53
+ ins {
54
+ background-color:#ff9;
55
+ color:#000;
56
+ text-decoration:none;
57
+ }
58
+
59
+ mark {
60
+ background-color:#ff9;
61
+ color:#000;
62
+ font-style:italic;
63
+ font-weight:bold;
64
+ }
65
+
66
+ del {
67
+ text-decoration: line-through;
68
+ }
69
+
70
+ abbr[title], dfn[title] {
71
+ border-bottom:1px dotted;
72
+ cursor:help;
73
+ }
74
+
75
+ /* tables still need cellspacing="0" in the markup */
76
+ table {
77
+ border-collapse:collapse;
78
+ border-spacing:0;
79
+ }
80
+
81
+ hr {
82
+ display:block;
83
+ height:1px;
84
+ border:0;
85
+ border-top:1px solid #ccc;
86
+ margin:1em 0;
87
+ padding:0;
88
+ }
89
+
90
+ input, select {
91
+ vertical-align:middle;
92
+ }
@@ -0,0 +1,46 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>Duke - The CIJoe Manager</title>
5
+ <meta charset="utf-8" />
6
+ <link rel="stylesheet" href="/stylesheets/reset.css" />
7
+ <link rel="stylesheet" href="/stylesheets/base.css" />
8
+ <link rel="stylesheet" href="/stylesheets/custom.css" />
9
+ <link rel="stylesheet" href="/stylesheets/button.css" />
10
+ </head>
11
+ <body>
12
+ <hgroup>
13
+ <h1>Duke</h1>
14
+ <h2>The CIJoe Manager</h2>
15
+ </hgroup>
16
+ <section>
17
+ <ul>
18
+ <li>
19
+ <form id="create" action="/projects" method="post">
20
+ <input name="project[repo_url]" placeholder="Repository"/>
21
+ <button type="submit" class="blue">Create</button>
22
+ </form>
23
+ </li>
24
+ <% @projects.each do |project| %>
25
+ <li class="project<%= status_style(project) %>">
26
+ <% if project.running? %>
27
+ <a class="chunky-text" href="<%= project.url %>"><%= project.repo_dir %></a>
28
+ <form class="stop" method="post" action="/projects/<%= project.repo_dir %>">
29
+ <input type="hidden" name="_method" value="put">
30
+ <button type="submit" class="black">Stop</button>
31
+ </form>
32
+ <p class="port chunky-text"><%= project.port %></p>
33
+ <% else %>
34
+ <p class="chunky-text"><%= project.repo_dir %></p>
35
+ <form class="start" method="post" action="/projects/<%= project.repo_dir %>">
36
+ <input type="hidden" name="_method" value="put">
37
+ <button type="submit" class="blue">Start</button>
38
+ <input name="project[port]" placeholder="Port"/>
39
+ </form>
40
+ <% end %>
41
+ </li>
42
+ <% end %>
43
+ </ul>
44
+ </section>
45
+ </body>
46
+ </html>
metadata ADDED
@@ -0,0 +1,146 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: duke
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 0
9
+ version: 0.1.0
10
+ platform: ruby
11
+ authors:
12
+ - Justin Marney
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-11-08 00:00:00 -05:00
18
+ default_executable: duke
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: thor
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
30
+ version: "0"
31
+ type: :runtime
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
34
+ name: cijoe
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ version: "0"
44
+ type: :runtime
45
+ version_requirements: *id002
46
+ - !ruby/object:Gem::Dependency
47
+ name: daemon_controller
48
+ prerelease: false
49
+ requirement: &id003 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ segments:
55
+ - 0
56
+ version: "0"
57
+ type: :runtime
58
+ version_requirements: *id003
59
+ - !ruby/object:Gem::Dependency
60
+ name: rspec
61
+ prerelease: false
62
+ requirement: &id004 !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ segments:
68
+ - 2
69
+ - 0
70
+ - 1
71
+ version: 2.0.1
72
+ type: :development
73
+ version_requirements: *id004
74
+ description: Allows you to easily manage multiple CIJoes.
75
+ email: gotascii@gmail.com
76
+ executables:
77
+ - duke
78
+ extensions: []
79
+
80
+ extra_rdoc_files:
81
+ - LICENSE
82
+ - README.rdoc
83
+ files:
84
+ - .gitignore
85
+ - Gemfile
86
+ - Gemfile.lock
87
+ - LICENSE
88
+ - README.rdoc
89
+ - Rakefile
90
+ - VERSION
91
+ - bin/duke
92
+ - duke.gemspec
93
+ - lib/duke.rb
94
+ - lib/duke/app.rb
95
+ - lib/duke/cli.rb
96
+ - lib/duke/controller.rb
97
+ - lib/duke/project.rb
98
+ - lib/ext/string.rb
99
+ - spec/duke/cli_spec.rb
100
+ - spec/duke/controller_spec.rb
101
+ - spec/duke/project_spec.rb
102
+ - spec/spec_helper.rb
103
+ - templates/config.ru
104
+ - templates/public/help.html
105
+ - templates/public/stylesheets/base.css
106
+ - templates/public/stylesheets/button.css
107
+ - templates/public/stylesheets/custom.css
108
+ - templates/public/stylesheets/reset.css
109
+ - templates/views/index.rhtml
110
+ has_rdoc: true
111
+ homepage: http://github.com/gotascii/duke
112
+ licenses: []
113
+
114
+ post_install_message:
115
+ rdoc_options:
116
+ - --charset=UTF-8
117
+ require_paths:
118
+ - lib
119
+ required_ruby_version: !ruby/object:Gem::Requirement
120
+ none: false
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ segments:
125
+ - 0
126
+ version: "0"
127
+ required_rubygems_version: !ruby/object:Gem::Requirement
128
+ none: false
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ segments:
133
+ - 0
134
+ version: "0"
135
+ requirements: []
136
+
137
+ rubyforge_project:
138
+ rubygems_version: 1.3.7
139
+ signing_key:
140
+ specification_version: 3
141
+ summary: Manage your CIJoes.
142
+ test_files:
143
+ - spec/duke/cli_spec.rb
144
+ - spec/duke/controller_spec.rb
145
+ - spec/duke/project_spec.rb
146
+ - spec/spec_helper.rb