nox 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.travis.yml +3 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +33 -0
- data/Rakefile +7 -0
- data/bin/nox +10 -0
- data/github.css +62 -0
- data/lib/nox.rb +40 -0
- data/lib/nox/ghserver.rb +58 -0
- data/lib/nox/version.rb +3 -0
- data/normalize.css +427 -0
- data/nox.gemspec +31 -0
- metadata +191 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 90a28ff6f4202bdbc4f5091178935967e34be7f0
|
4
|
+
data.tar.gz: c7e97abf0d35e1a8d8542afd38b2a59a2a532925
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3ea4b279edbba9c69bf86ce51ab0fd8e3a7455712b40983e84fb5027ef941cba818572607f79735d2e9ebbd15437c25eded5bf6068d74da7ded09c97ab41d736
|
7
|
+
data.tar.gz: 71e1c3fe5715753e68194b449ca1cbf359753f8984eb85561a89017297ca9aecabcfc89e327c732578b34c01a820cd88b3fe31382e1d375709c35e83b42c1804
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Nick Townsend
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# Nox
|
2
|
+
|
3
|
+
[![Gem Version](http://img.shields.io/gem/v/nox.svg)][gem]
|
4
|
+
|
5
|
+
[gem]: https://rubygems.org/gems/nox
|
6
|
+
|
7
|
+
Nox is a command line tool (based on Thor) for doing things:
|
8
|
+
|
9
|
+
* Run a micro-webserver to display GitHub markup in pages
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Install with:
|
14
|
+
|
15
|
+
$ gem install nox
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
### Command Line Tool
|
20
|
+
|
21
|
+
Type: `nox help` to get started
|
22
|
+
|
23
|
+
## Development
|
24
|
+
|
25
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
26
|
+
|
27
|
+
## Contributing
|
28
|
+
|
29
|
+
1. Fork it ( https://github.com/townsen/lux/fork )
|
30
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
31
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
32
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
33
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/nox
ADDED
data/github.css
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
pre { background-color: rgb(247,247,247); padding: 16px 16px 16px 16px }
|
2
|
+
.hll { background-color: #ffffcc }
|
3
|
+
.c { color: #999988; font-style: italic } /* Comment */
|
4
|
+
.err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
5
|
+
.k { color: #000000; font-weight: bold } /* Keyword */
|
6
|
+
.o { color: #000000; font-weight: bold } /* Operator */
|
7
|
+
.cm { color: #999988; font-style: italic } /* Comment.Multiline */
|
8
|
+
.cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */
|
9
|
+
.c1 { color: #999988; font-style: italic } /* Comment.Single */
|
10
|
+
.cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
|
11
|
+
.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
|
12
|
+
.ge { color: #000000; font-style: italic } /* Generic.Emph */
|
13
|
+
.gr { color: #aa0000 } /* Generic.Error */
|
14
|
+
.gh { color: #999999 } /* Generic.Heading */
|
15
|
+
.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
|
16
|
+
.go { color: #888888 } /* Generic.Output */
|
17
|
+
.gp { color: #555555 } /* Generic.Prompt */
|
18
|
+
.gs { font-weight: bold } /* Generic.Strong */
|
19
|
+
.gu { color: #aaaaaa } /* Generic.Subheading */
|
20
|
+
.gt { color: #aa0000 } /* Generic.Traceback */
|
21
|
+
.kc { color: #000000; font-weight: bold } /* Keyword.Constant */
|
22
|
+
.kd { color: #000000; font-weight: bold } /* Keyword.Declaration */
|
23
|
+
.kn { color: #000000; font-weight: bold } /* Keyword.Namespace */
|
24
|
+
.kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */
|
25
|
+
.kr { color: #000000; font-weight: bold } /* Keyword.Reserved */
|
26
|
+
.kt { color: #445588; font-weight: bold } /* Keyword.Type */
|
27
|
+
.m { color: #009999 } /* Literal.Number */
|
28
|
+
.s { color: #d01040 } /* Literal.String */
|
29
|
+
.na { color: #008080 } /* Name.Attribute */
|
30
|
+
.nb { color: #0086B3 } /* Name.Builtin */
|
31
|
+
.nc { color: #445588; font-weight: bold } /* Name.Class */
|
32
|
+
.no { color: #008080 } /* Name.Constant */
|
33
|
+
.nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */
|
34
|
+
.ni { color: #800080 } /* Name.Entity */
|
35
|
+
.ne { color: #990000; font-weight: bold } /* Name.Exception */
|
36
|
+
.nf { color: #990000; font-weight: bold } /* Name.Function */
|
37
|
+
.nl { color: #990000; font-weight: bold } /* Name.Label */
|
38
|
+
.nn { color: #555555 } /* Name.Namespace */
|
39
|
+
.nt { color: #000080 } /* Name.Tag */
|
40
|
+
.nv { color: #008080 } /* Name.Variable */
|
41
|
+
.ow { color: #000000; font-weight: bold } /* Operator.Word */
|
42
|
+
.w { color: #bbbbbb } /* Text.Whitespace */
|
43
|
+
.mf { color: #009999 } /* Literal.Number.Float */
|
44
|
+
.mh { color: #009999 } /* Literal.Number.Hex */
|
45
|
+
.mi { color: #009999 } /* Literal.Number.Integer */
|
46
|
+
.mo { color: #009999 } /* Literal.Number.Oct */
|
47
|
+
.sb { color: #d01040 } /* Literal.String.Backtick */
|
48
|
+
.sc { color: #d01040 } /* Literal.String.Char */
|
49
|
+
.sd { color: #d01040 } /* Literal.String.Doc */
|
50
|
+
.s2 { color: #d01040 } /* Literal.String.Double */
|
51
|
+
.se { color: #d01040 } /* Literal.String.Escape */
|
52
|
+
.sh { color: #d01040 } /* Literal.String.Heredoc */
|
53
|
+
.si { color: #d01040 } /* Literal.String.Interpol */
|
54
|
+
.sx { color: #d01040 } /* Literal.String.Other */
|
55
|
+
.sr { color: #009926 } /* Literal.String.Regex */
|
56
|
+
.s1 { color: #d01040 } /* Literal.String.Single */
|
57
|
+
.ss { color: #990073 } /* Literal.String.Symbol */
|
58
|
+
.bp { color: #999999 } /* Name.Builtin.Pseudo */
|
59
|
+
.vc { color: #008080 } /* Name.Variable.Class */
|
60
|
+
.vg { color: #008080 } /* Name.Variable.Global */
|
61
|
+
.vi { color: #008080 } /* Name.Variable.Instance */
|
62
|
+
.il { color: #009999 } /* Literal.Number.Integer.Long */
|
data/lib/nox.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'nox/version'
|
2
|
+
require 'nox/ghserver'
|
3
|
+
|
4
|
+
require 'highline/import'
|
5
|
+
require 'thor'
|
6
|
+
require 'webrick'
|
7
|
+
|
8
|
+
# The Thor subclass containing useful tasks
|
9
|
+
#
|
10
|
+
class Nox::App < Thor
|
11
|
+
|
12
|
+
desc "version", "Show the version"
|
13
|
+
def version
|
14
|
+
puts "Version #{Nox::VERSION}"
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "ghserver [PATH]", "Start a webserver that does GitHub markup"
|
18
|
+
method_option :port, type: :numeric, aliases: '-p', default: 8019, desc: 'Port'
|
19
|
+
def ghserver(path=Dir.getwd)
|
20
|
+
|
21
|
+
WEBrick::HTTPServlet::FileHandler.add_handler('md', ::Nox::GitHubRenderer)
|
22
|
+
WEBrick::HTTPServlet::FileHandler.add_handler('markdown', ::Nox::GitHubRenderer)
|
23
|
+
server = WEBrick::HTTPServer.new DocumentRoot: path, BindAddress: '0.0.0.0', Port: options.port
|
24
|
+
server.mount '/style.css', ::Nox::Styles
|
25
|
+
|
26
|
+
['INT', 'TERM'].each {|signal| trap(signal) { server.shutdown } }
|
27
|
+
server.start
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def die msg, rc = 1
|
34
|
+
HighLine.say HighLine.color(msg, HighLine::RED)
|
35
|
+
exit(rc)
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
# vim: ft=ruby sts=2 sw=2 ts=8
|
data/lib/nox/ghserver.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# Classes used by the GitHub server task
|
2
|
+
#
|
3
|
+
# Although we don't actually use this, without it: 'uninitialized constant GitHub'
|
4
|
+
require 'github/markup'
|
5
|
+
|
6
|
+
require 'html/pipeline'
|
7
|
+
require 'html/pipeline/rouge_filter'
|
8
|
+
require 'webrick'
|
9
|
+
|
10
|
+
module Nox
|
11
|
+
class GitHubRenderer < WEBrick::HTTPServlet::AbstractServlet
|
12
|
+
|
13
|
+
def initialize config, filename
|
14
|
+
@filename = filename
|
15
|
+
@pipeline = HTML::Pipeline.new [
|
16
|
+
HTML::Pipeline::MarkdownFilter,
|
17
|
+
HTML::Pipeline::RougeFilter
|
18
|
+
]
|
19
|
+
end
|
20
|
+
|
21
|
+
def do_GET req, rsp
|
22
|
+
begin
|
23
|
+
rsp.status = 200
|
24
|
+
rsp['Content-Type'] = 'text/html'
|
25
|
+
styles = []
|
26
|
+
styles << %{<link crossorigin="anonymous" href="/style.css" media="all" rel="stylesheet"> }
|
27
|
+
styles << %{ <style> body { padding: 25px 25px 25px 25px; } </style> }
|
28
|
+
render = @pipeline.call File.read(@filename)
|
29
|
+
rsp.body = <<-BODY
|
30
|
+
<html>
|
31
|
+
<head>#{styles.join('')}</head>
|
32
|
+
<body>
|
33
|
+
<article class="markdown-body">
|
34
|
+
#{render[:output]}
|
35
|
+
</article>
|
36
|
+
</body>
|
37
|
+
</html>
|
38
|
+
BODY
|
39
|
+
rescue
|
40
|
+
rsp.status = 400
|
41
|
+
rsp['Content-Type'] = 'text/plain'
|
42
|
+
rsp.body = "HTML Pipeline failed: #{$!}"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
class Styles < WEBrick::HTTPServlet::AbstractServlet
|
48
|
+
def do_GET req, rsp
|
49
|
+
begin
|
50
|
+
rsp.status = 200
|
51
|
+
rsp['Content-Type'] = 'text/css'
|
52
|
+
rsp.body = ['normalize', 'github'].map do |style|
|
53
|
+
File.read(File.absolute_path("../../#{style}.css", File.dirname(__FILE__)))
|
54
|
+
end.join("\n")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
data/lib/nox/version.rb
ADDED
data/normalize.css
ADDED
@@ -0,0 +1,427 @@
|
|
1
|
+
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
|
2
|
+
|
3
|
+
/**
|
4
|
+
* 1. Set default font family to sans-serif.
|
5
|
+
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
6
|
+
* user zoom.
|
7
|
+
*/
|
8
|
+
|
9
|
+
html {
|
10
|
+
font-family: sans-serif; /* 1 */
|
11
|
+
-ms-text-size-adjust: 100%; /* 2 */
|
12
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
13
|
+
}
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Remove default margin.
|
17
|
+
*/
|
18
|
+
|
19
|
+
body {
|
20
|
+
margin: 0;
|
21
|
+
}
|
22
|
+
|
23
|
+
/* HTML5 display definitions
|
24
|
+
========================================================================== */
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Correct `block` display not defined for any HTML5 element in IE 8/9.
|
28
|
+
* Correct `block` display not defined for `details` or `summary` in IE 10/11
|
29
|
+
* and Firefox.
|
30
|
+
* Correct `block` display not defined for `main` in IE 11.
|
31
|
+
*/
|
32
|
+
|
33
|
+
article,
|
34
|
+
aside,
|
35
|
+
details,
|
36
|
+
figcaption,
|
37
|
+
figure,
|
38
|
+
footer,
|
39
|
+
header,
|
40
|
+
hgroup,
|
41
|
+
main,
|
42
|
+
menu,
|
43
|
+
nav,
|
44
|
+
section,
|
45
|
+
summary {
|
46
|
+
display: block;
|
47
|
+
}
|
48
|
+
|
49
|
+
/**
|
50
|
+
* 1. Correct `inline-block` display not defined in IE 8/9.
|
51
|
+
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
|
52
|
+
*/
|
53
|
+
|
54
|
+
audio,
|
55
|
+
canvas,
|
56
|
+
progress,
|
57
|
+
video {
|
58
|
+
display: inline-block; /* 1 */
|
59
|
+
vertical-align: baseline; /* 2 */
|
60
|
+
}
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Prevent modern browsers from displaying `audio` without controls.
|
64
|
+
* Remove excess height in iOS 5 devices.
|
65
|
+
*/
|
66
|
+
|
67
|
+
audio:not([controls]) {
|
68
|
+
display: none;
|
69
|
+
height: 0;
|
70
|
+
}
|
71
|
+
|
72
|
+
/**
|
73
|
+
* Address `[hidden]` styling not present in IE 8/9/10.
|
74
|
+
* Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
|
75
|
+
*/
|
76
|
+
|
77
|
+
[hidden],
|
78
|
+
template {
|
79
|
+
display: none;
|
80
|
+
}
|
81
|
+
|
82
|
+
/* Links
|
83
|
+
========================================================================== */
|
84
|
+
|
85
|
+
/**
|
86
|
+
* Remove the gray background color from active links in IE 10.
|
87
|
+
*/
|
88
|
+
|
89
|
+
a {
|
90
|
+
background-color: transparent;
|
91
|
+
}
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Improve readability when focused and also mouse hovered in all browsers.
|
95
|
+
*/
|
96
|
+
|
97
|
+
a:active,
|
98
|
+
a:hover {
|
99
|
+
outline: 0;
|
100
|
+
}
|
101
|
+
|
102
|
+
/* Text-level semantics
|
103
|
+
========================================================================== */
|
104
|
+
|
105
|
+
/**
|
106
|
+
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
|
107
|
+
*/
|
108
|
+
|
109
|
+
abbr[title] {
|
110
|
+
border-bottom: 1px dotted;
|
111
|
+
}
|
112
|
+
|
113
|
+
/**
|
114
|
+
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
|
115
|
+
*/
|
116
|
+
|
117
|
+
b,
|
118
|
+
strong {
|
119
|
+
font-weight: bold;
|
120
|
+
}
|
121
|
+
|
122
|
+
/**
|
123
|
+
* Address styling not present in Safari and Chrome.
|
124
|
+
*/
|
125
|
+
|
126
|
+
dfn {
|
127
|
+
font-style: italic;
|
128
|
+
}
|
129
|
+
|
130
|
+
/**
|
131
|
+
* Address variable `h1` font-size and margin within `section` and `article`
|
132
|
+
* contexts in Firefox 4+, Safari, and Chrome.
|
133
|
+
*/
|
134
|
+
|
135
|
+
h1 {
|
136
|
+
font-size: 2em;
|
137
|
+
margin: 0.67em 0;
|
138
|
+
}
|
139
|
+
|
140
|
+
/**
|
141
|
+
* Address styling not present in IE 8/9.
|
142
|
+
*/
|
143
|
+
|
144
|
+
mark {
|
145
|
+
background: #ff0;
|
146
|
+
color: #000;
|
147
|
+
}
|
148
|
+
|
149
|
+
/**
|
150
|
+
* Address inconsistent and variable font size in all browsers.
|
151
|
+
*/
|
152
|
+
|
153
|
+
small {
|
154
|
+
font-size: 80%;
|
155
|
+
}
|
156
|
+
|
157
|
+
/**
|
158
|
+
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
159
|
+
*/
|
160
|
+
|
161
|
+
sub,
|
162
|
+
sup {
|
163
|
+
font-size: 75%;
|
164
|
+
line-height: 0;
|
165
|
+
position: relative;
|
166
|
+
vertical-align: baseline;
|
167
|
+
}
|
168
|
+
|
169
|
+
sup {
|
170
|
+
top: -0.5em;
|
171
|
+
}
|
172
|
+
|
173
|
+
sub {
|
174
|
+
bottom: -0.25em;
|
175
|
+
}
|
176
|
+
|
177
|
+
/* Embedded content
|
178
|
+
========================================================================== */
|
179
|
+
|
180
|
+
/**
|
181
|
+
* Remove border when inside `a` element in IE 8/9/10.
|
182
|
+
*/
|
183
|
+
|
184
|
+
img {
|
185
|
+
border: 0;
|
186
|
+
}
|
187
|
+
|
188
|
+
/**
|
189
|
+
* Correct overflow not hidden in IE 9/10/11.
|
190
|
+
*/
|
191
|
+
|
192
|
+
svg:not(:root) {
|
193
|
+
overflow: hidden;
|
194
|
+
}
|
195
|
+
|
196
|
+
/* Grouping content
|
197
|
+
========================================================================== */
|
198
|
+
|
199
|
+
/**
|
200
|
+
* Address margin not present in IE 8/9 and Safari.
|
201
|
+
*/
|
202
|
+
|
203
|
+
figure {
|
204
|
+
margin: 1em 40px;
|
205
|
+
}
|
206
|
+
|
207
|
+
/**
|
208
|
+
* Address differences between Firefox and other browsers.
|
209
|
+
*/
|
210
|
+
|
211
|
+
hr {
|
212
|
+
-moz-box-sizing: content-box;
|
213
|
+
box-sizing: content-box;
|
214
|
+
height: 0;
|
215
|
+
}
|
216
|
+
|
217
|
+
/**
|
218
|
+
* Contain overflow in all browsers.
|
219
|
+
*/
|
220
|
+
|
221
|
+
pre {
|
222
|
+
overflow: auto;
|
223
|
+
}
|
224
|
+
|
225
|
+
/**
|
226
|
+
* Address odd `em`-unit font size rendering in all browsers.
|
227
|
+
*/
|
228
|
+
|
229
|
+
code,
|
230
|
+
kbd,
|
231
|
+
pre,
|
232
|
+
samp {
|
233
|
+
font-family: monospace, monospace;
|
234
|
+
font-size: 1em;
|
235
|
+
}
|
236
|
+
|
237
|
+
/* Forms
|
238
|
+
========================================================================== */
|
239
|
+
|
240
|
+
/**
|
241
|
+
* Known limitation: by default, Chrome and Safari on OS X allow very limited
|
242
|
+
* styling of `select`, unless a `border` property is set.
|
243
|
+
*/
|
244
|
+
|
245
|
+
/**
|
246
|
+
* 1. Correct color not being inherited.
|
247
|
+
* Known issue: affects color of disabled elements.
|
248
|
+
* 2. Correct font properties not being inherited.
|
249
|
+
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
|
250
|
+
*/
|
251
|
+
|
252
|
+
button,
|
253
|
+
input,
|
254
|
+
optgroup,
|
255
|
+
select,
|
256
|
+
textarea {
|
257
|
+
color: inherit; /* 1 */
|
258
|
+
font: inherit; /* 2 */
|
259
|
+
margin: 0; /* 3 */
|
260
|
+
}
|
261
|
+
|
262
|
+
/**
|
263
|
+
* Address `overflow` set to `hidden` in IE 8/9/10/11.
|
264
|
+
*/
|
265
|
+
|
266
|
+
button {
|
267
|
+
overflow: visible;
|
268
|
+
}
|
269
|
+
|
270
|
+
/**
|
271
|
+
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
272
|
+
* All other form control elements do not inherit `text-transform` values.
|
273
|
+
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
|
274
|
+
* Correct `select` style inheritance in Firefox.
|
275
|
+
*/
|
276
|
+
|
277
|
+
button,
|
278
|
+
select {
|
279
|
+
text-transform: none;
|
280
|
+
}
|
281
|
+
|
282
|
+
/**
|
283
|
+
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
284
|
+
* and `video` controls.
|
285
|
+
* 2. Correct inability to style clickable `input` types in iOS.
|
286
|
+
* 3. Improve usability and consistency of cursor style between image-type
|
287
|
+
* `input` and others.
|
288
|
+
*/
|
289
|
+
|
290
|
+
button,
|
291
|
+
html input[type="button"], /* 1 */
|
292
|
+
input[type="reset"],
|
293
|
+
input[type="submit"] {
|
294
|
+
-webkit-appearance: button; /* 2 */
|
295
|
+
cursor: pointer; /* 3 */
|
296
|
+
}
|
297
|
+
|
298
|
+
/**
|
299
|
+
* Re-set default cursor for disabled elements.
|
300
|
+
*/
|
301
|
+
|
302
|
+
button[disabled],
|
303
|
+
html input[disabled] {
|
304
|
+
cursor: default;
|
305
|
+
}
|
306
|
+
|
307
|
+
/**
|
308
|
+
* Remove inner padding and border in Firefox 4+.
|
309
|
+
*/
|
310
|
+
|
311
|
+
button::-moz-focus-inner,
|
312
|
+
input::-moz-focus-inner {
|
313
|
+
border: 0;
|
314
|
+
padding: 0;
|
315
|
+
}
|
316
|
+
|
317
|
+
/**
|
318
|
+
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
319
|
+
* the UA stylesheet.
|
320
|
+
*/
|
321
|
+
|
322
|
+
input {
|
323
|
+
line-height: normal;
|
324
|
+
}
|
325
|
+
|
326
|
+
/**
|
327
|
+
* It's recommended that you don't attempt to style these elements.
|
328
|
+
* Firefox's implementation doesn't respect box-sizing, padding, or width.
|
329
|
+
*
|
330
|
+
* 1. Address box sizing set to `content-box` in IE 8/9/10.
|
331
|
+
* 2. Remove excess padding in IE 8/9/10.
|
332
|
+
*/
|
333
|
+
|
334
|
+
input[type="checkbox"],
|
335
|
+
input[type="radio"] {
|
336
|
+
box-sizing: border-box; /* 1 */
|
337
|
+
padding: 0; /* 2 */
|
338
|
+
}
|
339
|
+
|
340
|
+
/**
|
341
|
+
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
342
|
+
* `font-size` values of the `input`, it causes the cursor style of the
|
343
|
+
* decrement button to change from `default` to `text`.
|
344
|
+
*/
|
345
|
+
|
346
|
+
input[type="number"]::-webkit-inner-spin-button,
|
347
|
+
input[type="number"]::-webkit-outer-spin-button {
|
348
|
+
height: auto;
|
349
|
+
}
|
350
|
+
|
351
|
+
/**
|
352
|
+
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
|
353
|
+
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome
|
354
|
+
* (include `-moz` to future-proof).
|
355
|
+
*/
|
356
|
+
|
357
|
+
input[type="search"] {
|
358
|
+
-webkit-appearance: textfield; /* 1 */
|
359
|
+
-moz-box-sizing: content-box;
|
360
|
+
-webkit-box-sizing: content-box; /* 2 */
|
361
|
+
box-sizing: content-box;
|
362
|
+
}
|
363
|
+
|
364
|
+
/**
|
365
|
+
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
366
|
+
* Safari (but not Chrome) clips the cancel button when the search input has
|
367
|
+
* padding (and `textfield` appearance).
|
368
|
+
*/
|
369
|
+
|
370
|
+
input[type="search"]::-webkit-search-cancel-button,
|
371
|
+
input[type="search"]::-webkit-search-decoration {
|
372
|
+
-webkit-appearance: none;
|
373
|
+
}
|
374
|
+
|
375
|
+
/**
|
376
|
+
* Define consistent border, margin, and padding.
|
377
|
+
*/
|
378
|
+
|
379
|
+
fieldset {
|
380
|
+
border: 1px solid #c0c0c0;
|
381
|
+
margin: 0 2px;
|
382
|
+
padding: 0.35em 0.625em 0.75em;
|
383
|
+
}
|
384
|
+
|
385
|
+
/**
|
386
|
+
* 1. Correct `color` not being inherited in IE 8/9/10/11.
|
387
|
+
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
388
|
+
*/
|
389
|
+
|
390
|
+
legend {
|
391
|
+
border: 0; /* 1 */
|
392
|
+
padding: 0; /* 2 */
|
393
|
+
}
|
394
|
+
|
395
|
+
/**
|
396
|
+
* Remove default vertical scrollbar in IE 8/9/10/11.
|
397
|
+
*/
|
398
|
+
|
399
|
+
textarea {
|
400
|
+
overflow: auto;
|
401
|
+
}
|
402
|
+
|
403
|
+
/**
|
404
|
+
* Don't inherit the `font-weight` (applied by a rule above).
|
405
|
+
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
|
406
|
+
*/
|
407
|
+
|
408
|
+
optgroup {
|
409
|
+
font-weight: bold;
|
410
|
+
}
|
411
|
+
|
412
|
+
/* Tables
|
413
|
+
========================================================================== */
|
414
|
+
|
415
|
+
/**
|
416
|
+
* Remove most spacing between table cells.
|
417
|
+
*/
|
418
|
+
|
419
|
+
table {
|
420
|
+
border-collapse: collapse;
|
421
|
+
border-spacing: 0;
|
422
|
+
}
|
423
|
+
|
424
|
+
td,
|
425
|
+
th {
|
426
|
+
padding: 0;
|
427
|
+
}
|
data/nox.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'nox/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "nox"
|
8
|
+
spec.version = Nox::VERSION
|
9
|
+
spec.authors = ["Nick Townsend"]
|
10
|
+
spec.email = ["nick.townsend@mac.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Handy utilities for coding}
|
13
|
+
spec.homepage = "https://github.com/townsen/nox"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.bindir = "bin"
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_runtime_dependency "thor", "~> 0.19"
|
22
|
+
spec.add_runtime_dependency "highline", "~> 1.7"
|
23
|
+
spec.add_runtime_dependency "html-pipeline"
|
24
|
+
spec.add_runtime_dependency "html-pipeline-rouge_filter"
|
25
|
+
spec.add_runtime_dependency "github-markup", "~> 1.4.0"
|
26
|
+
spec.add_runtime_dependency "github-markdown", "~> 0.6.8"
|
27
|
+
spec.add_runtime_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_runtime_dependency "rouge", "~> 1.9.0", "!= 1.9.1"
|
29
|
+
|
30
|
+
spec.add_development_dependency "bundler", "~> 1.9"
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,191 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: nox
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nick Townsend
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.19'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.19'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: highline
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.7'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.7'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: html-pipeline
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: html-pipeline-rouge_filter
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: github-markup
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.4.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.4.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: github-markdown
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.6.8
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.6.8
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '10.0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '10.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rouge
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.9.0
|
118
|
+
- - "!="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: 1.9.1
|
121
|
+
type: :runtime
|
122
|
+
prerelease: false
|
123
|
+
version_requirements: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - "~>"
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: 1.9.0
|
128
|
+
- - "!="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: 1.9.1
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: bundler
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '1.9'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '1.9'
|
145
|
+
description:
|
146
|
+
email:
|
147
|
+
- nick.townsend@mac.com
|
148
|
+
executables:
|
149
|
+
- nox
|
150
|
+
extensions: []
|
151
|
+
extra_rdoc_files: []
|
152
|
+
files:
|
153
|
+
- ".gitignore"
|
154
|
+
- ".travis.yml"
|
155
|
+
- CODE_OF_CONDUCT.md
|
156
|
+
- Gemfile
|
157
|
+
- LICENSE.txt
|
158
|
+
- README.md
|
159
|
+
- Rakefile
|
160
|
+
- bin/nox
|
161
|
+
- github.css
|
162
|
+
- lib/nox.rb
|
163
|
+
- lib/nox/ghserver.rb
|
164
|
+
- lib/nox/version.rb
|
165
|
+
- normalize.css
|
166
|
+
- nox.gemspec
|
167
|
+
homepage: https://github.com/townsen/nox
|
168
|
+
licenses:
|
169
|
+
- MIT
|
170
|
+
metadata: {}
|
171
|
+
post_install_message:
|
172
|
+
rdoc_options: []
|
173
|
+
require_paths:
|
174
|
+
- lib
|
175
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - ">="
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '0'
|
185
|
+
requirements: []
|
186
|
+
rubyforge_project:
|
187
|
+
rubygems_version: 2.4.5
|
188
|
+
signing_key:
|
189
|
+
specification_version: 4
|
190
|
+
summary: Handy utilities for coding
|
191
|
+
test_files: []
|