github-css-rails 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 43b2c2996dd6065a0816812fc1f33181dd24acdf
4
+ data.tar.gz: 23fa0384b2646afdd06f943cabc40204f92780ff
5
+ SHA512:
6
+ metadata.gz: 6ecb0e6140d1f7d7ff93f9ecb5434221205b642c2ef8ef2a8e3581cd3685675efc57686a1d52ab8de164c5b3e8501081f97e14bef9c712f14a640c997191d89e
7
+ data.tar.gz: 789a8fc7c6a2105de434dc7d749dfcb4e16a73fbbad2ed8b82800b48e9d4b7c72cc491dd2afd1efb2e1f9e325d519bb95abbb76565bda1797c8cbd8a1a1ac516
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in githubcssrails.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Doc Walker
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # github-css-rails [![Gem Version](https://badge.fury.io/rb/github-css-rails.png)](http://badge.fury.io/rb/github-css-rails)
2
+
3
+ > Created by Doc Walker
4
+
5
+ Provides GitHub Flavored Markdown CSS for the Rails 3.1+ asset pipeline.
6
+
7
+ ## Installation
8
+
9
+ Add these lines to your application's Gemfile:
10
+
11
+ # github flavored markdown css packaged for the rails asset pipeline
12
+ gem 'github-css-rails', '~> 1.0'
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install github-css-rails
21
+
22
+ ## Usage
23
+
24
+ Add these lines to `app/assets/stylesheets/application.css`
25
+
26
+ provides GitHub Flavored Markdown CSS from gem 'github-css-rails':
27
+ = require github
28
+
29
+ ## Contributing
30
+
31
+ 1. Fork it
32
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
33
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
34
+ 4. Push to the branch (`git push origin my-new-feature`)
35
+ 5. Create new Pull Request
36
+
37
+ ## Acknowledgements
38
+
39
+ - [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown)
40
+ - [Github Markdown Stylesheet](https://gist.github.com/tuzz/3331384)
41
+ - [RailsCast #245](http://railscasts.com/episodes/245-new-gem-with-bundler) New Gem with Bundler -- inspiration
42
+ - [Gemify Assets for Rails](http://prioritized.net/blog/gemify-assets-for-rails/) -- guidance
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'github-css-rails/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "github-css-rails"
8
+ spec.version = GithubCss::Rails::VERSION
9
+ spec.authors = ["Doc Walker"]
10
+ spec.email = ["doc.walker@jameshardie.com"]
11
+ spec.description = %q{Provides GitHub Flavored Markdown CSS for the Rails 3.1+ asset pipeline.}
12
+ spec.summary = %q{Provides GitHub Flavored Markdown CSS for the Rails 3.1+ asset pipeline.}
13
+ spec.homepage = "https://github.com/jhx/gem-github-css-rails"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "railties", "~> 3.1"
22
+ spec.requirements << "jQuery"
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.3"
25
+ spec.add_development_dependency "rake"
26
+ end
@@ -0,0 +1,2 @@
1
+ require "github-css-rails/version"
2
+ require "github-css-rails/engine" if defined?(::Rails)
@@ -0,0 +1,6 @@
1
+ module GithubCss
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module GithubCss
2
+ module Rails
3
+ # Refer to Semantic Versioning 2.0.0 (http://semver.org).
4
+ VERSION = "1.0.0"
5
+ end
6
+ end
@@ -0,0 +1,396 @@
1
+ /* Github Markdown Stylesheet */
2
+ /* Based on https://gist.github.com/3331384 */
3
+
4
+ body {
5
+ font-family: Helvetica, arial, sans-serif;
6
+ font-size: 14px;
7
+ line-height: 1.6;
8
+ padding-top: 10px;
9
+ padding-bottom: 10px;
10
+ background-color: white;
11
+ padding: 30px;
12
+ color: #333;
13
+ }
14
+
15
+ body > *:first-child {
16
+ margin-top: 0 !important;
17
+ }
18
+
19
+ body > *:last-child {
20
+ margin-bottom: 0 !important;
21
+ }
22
+
23
+ a {
24
+ color: #4183C4;
25
+ text-decoration: none;
26
+ }
27
+
28
+ a.absent {
29
+ color: #cc0000;
30
+ }
31
+
32
+ a.anchor {
33
+ display: block;
34
+ padding-left: 30px;
35
+ margin-left: -30px;
36
+ cursor: pointer;
37
+ position: absolute;
38
+ top: 0;
39
+ left: 0;
40
+ bottom: 0;
41
+ }
42
+
43
+ h1, h2, h3, h4, h5, h6 {
44
+ margin: 20px 0 10px;
45
+ padding: 0;
46
+ font-weight: bold;
47
+ -webkit-font-smoothing: antialiased;
48
+ cursor: text;
49
+ position: relative;
50
+ }
51
+
52
+ h2:first-child, h1:first-child, h1:first-child + h2, h3:first-child, h4:first-child, h5:first-child, h6:first-child {
53
+ margin-top: 0;
54
+ padding-top: 0;
55
+ }
56
+
57
+ h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {
58
+ text-decoration: none;
59
+ }
60
+
61
+ h1 tt, h1 code {
62
+ font-size: inherit;
63
+ }
64
+
65
+ h2 tt, h2 code {
66
+ font-size: inherit;
67
+ }
68
+
69
+ h3 tt, h3 code {
70
+ font-size: inherit;
71
+ }
72
+
73
+ h4 tt, h4 code {
74
+ font-size: inherit;
75
+ }
76
+
77
+ h5 tt, h5 code {
78
+ font-size: inherit;
79
+ }
80
+
81
+ h6 tt, h6 code {
82
+ font-size: inherit;
83
+ }
84
+
85
+ h1 {
86
+ font-size: 28px;
87
+ color: black;
88
+ }
89
+
90
+ h2 {
91
+ font-size: 24px;
92
+ border-bottom: 1px solid #cccccc;
93
+ color: black;
94
+ }
95
+
96
+ h3 {
97
+ font-size: 18px;
98
+ }
99
+
100
+ h4 {
101
+ font-size: 16px;
102
+ }
103
+
104
+ h5 {
105
+ font-size: 14px;
106
+ }
107
+
108
+ h6 {
109
+ color: #777777;
110
+ font-size: 14px;
111
+ }
112
+
113
+ p blockquote {
114
+ margin: 10px 0;
115
+ }
116
+
117
+ ul, ol, dl, li, table, pre {
118
+ margin: 0px 0;
119
+ }
120
+
121
+ hr {
122
+ background: transparent url("http://tinyurl.com/bq5kskr") repeat-x 0 0;
123
+ border: 0 none;
124
+ color: #cccccc;
125
+ height: 4px;
126
+ padding: 0;
127
+ }
128
+
129
+ body > h2:first-child {
130
+ margin-top: 0;
131
+ padding-top: 0;
132
+ }
133
+
134
+ body > h1:first-child {
135
+ margin-top: 0;
136
+ padding-top: 0;
137
+ }
138
+
139
+ body > h1:first-child + h2 {
140
+ margin-top: 0;
141
+ padding-top: 0;
142
+ }
143
+
144
+ body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {
145
+ margin-top: 0;
146
+ padding-top: 0;
147
+ }
148
+
149
+ a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
150
+ margin-top: 0;
151
+ padding-top: 0;
152
+ }
153
+
154
+ h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {
155
+ margin-top: 0;
156
+ }
157
+
158
+ li p.first {
159
+ display: inline-block;
160
+ }
161
+
162
+ ul, ol {
163
+ padding-left: 30px;
164
+ }
165
+
166
+ ul :first-child, ol :first-child {
167
+ margin-top: 0;
168
+ }
169
+
170
+ ul :last-child, ol :last-child {
171
+ margin-bottom: 0;
172
+ }
173
+
174
+ dl {
175
+ padding: 0;
176
+ }
177
+
178
+ dl dt {
179
+ font-size: 14px;
180
+ font-weight: bold;
181
+ font-style: italic;
182
+ padding: 0;
183
+ margin: 15px 0 5px;
184
+ }
185
+
186
+ dl dt:first-child {
187
+ padding: 0;
188
+ }
189
+
190
+ dl dt > :first-child {
191
+ margin-top: 0;
192
+ }
193
+
194
+ dl dt > :last-child {
195
+ margin-bottom: 0;
196
+ }
197
+
198
+ dl dd {
199
+ margin: 0 0 15px;
200
+ padding: 0 15px;
201
+ }
202
+
203
+ dl dd > :first-child {
204
+ margin-top: 0;
205
+ }
206
+
207
+ dl dd > :last-child {
208
+ margin-bottom: 0;
209
+ }
210
+
211
+ blockquote {
212
+ border-left: 4px solid #dddddd;
213
+ padding: 0 15px;
214
+ color: #777777;
215
+ }
216
+
217
+ blockquote > :first-child {
218
+ margin-top: 0;
219
+ }
220
+
221
+ blockquote > :last-child {
222
+ margin-bottom: 0;
223
+ }
224
+
225
+ table {
226
+ padding: 0;
227
+ border-collapse: collapse;
228
+ }
229
+
230
+ table tr {
231
+ border-top: 1px solid #cccccc;
232
+ background-color: white;
233
+ margin: 0;
234
+ padding: 0;
235
+ }
236
+
237
+ table tr:nth-child(2n) {
238
+ background-color: #f8f8f8;
239
+ }
240
+
241
+ table tr th {
242
+ font-weight: bold;
243
+ border: 1px solid #cccccc;
244
+ text-align: left;
245
+ margin: 0;
246
+ padding: 6px 13px;
247
+ }
248
+
249
+ table tr td {
250
+ border: 1px solid #cccccc;
251
+ text-align: left;
252
+ margin: 0;
253
+ padding: 6px 13px;
254
+ }
255
+
256
+ table tr th :first-child, table tr td :first-child {
257
+ margin-top: 0;
258
+ }
259
+
260
+ table tr th :last-child, table tr td :last-child {
261
+ margin-bottom: 0;
262
+ }
263
+
264
+ img {
265
+ max-width: 100%;
266
+ }
267
+
268
+ span.frame {
269
+ display: block;
270
+ overflow: hidden;
271
+ }
272
+
273
+ span.frame > span {
274
+ border: 1px solid #dddddd;
275
+ display: block;
276
+ float: left;
277
+ overflow: hidden;
278
+ margin: 13px 0 0;
279
+ padding: 7px;
280
+ width: auto;
281
+ }
282
+
283
+ span.frame span img {
284
+ display: block;
285
+ float: left;
286
+ }
287
+
288
+ span.frame span span {
289
+ clear: both;
290
+ color: #333333;
291
+ display: block;
292
+ padding: 5px 0 0;
293
+ }
294
+
295
+ span.align-center {
296
+ display: block;
297
+ overflow: hidden;
298
+ clear: both;
299
+ }
300
+
301
+ span.align-center > span {
302
+ display: block;
303
+ overflow: hidden;
304
+ margin: 13px auto 0;
305
+ text-align: center;
306
+ }
307
+
308
+ span.align-center span img {
309
+ margin: 0 auto;
310
+ text-align: center;
311
+ }
312
+
313
+ span.align-right {
314
+ display: block;
315
+ overflow: hidden;
316
+ clear: both;
317
+ }
318
+
319
+ span.align-right > span {
320
+ display: block;
321
+ overflow: hidden;
322
+ margin: 13px 0 0;
323
+ text-align: right;
324
+ }
325
+
326
+ span.align-right span img {
327
+ margin: 0;
328
+ text-align: right;
329
+ }
330
+
331
+ span.float-left {
332
+ display: block;
333
+ margin-right: 13px;
334
+ overflow: hidden;
335
+ float: left;
336
+ }
337
+
338
+ span.float-left span {
339
+ margin: 13px 0 0;
340
+ }
341
+
342
+ span.float-right {
343
+ display: block;
344
+ margin-left: 13px;
345
+ overflow: hidden;
346
+ float: right;
347
+ }
348
+
349
+ span.float-right > span {
350
+ display: block;
351
+ overflow: hidden;
352
+ margin: 13px auto 0;
353
+ text-align: right;
354
+ }
355
+
356
+ code, tt {
357
+ margin: 0 2px;
358
+ padding: 0 5px;
359
+ white-space: nowrap;
360
+ border: 1px solid #eaeaea;
361
+ background-color: #f8f8f8;
362
+ border-radius: 3px;
363
+ }
364
+
365
+ pre code {
366
+ margin: 0;
367
+ padding: 0;
368
+ white-space: pre;
369
+ border: none;
370
+ background: transparent;
371
+ }
372
+
373
+ .highlight pre {
374
+ background-color: #f8f8f8;
375
+ border: 1px solid #cccccc;
376
+ font-size: 13px;
377
+ line-height: 19px;
378
+ overflow: auto;
379
+ padding: 6px 10px;
380
+ border-radius: 3px;
381
+ }
382
+
383
+ pre {
384
+ background-color: #f8f8f8;
385
+ border: 1px solid #cccccc;
386
+ font-size: 13px;
387
+ line-height: 19px;
388
+ overflow: auto;
389
+ padding: 6px 10px;
390
+ border-radius: 3px;
391
+ }
392
+
393
+ pre code, pre tt {
394
+ background-color: transparent;
395
+ border: none;
396
+ }
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: github-css-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Doc Walker
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-07-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: railties
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '3.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '3.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Provides GitHub Flavored Markdown CSS for the Rails 3.1+ asset pipeline.
56
+ email:
57
+ - doc.walker@jameshardie.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - .gitignore
63
+ - Gemfile
64
+ - LICENSE.txt
65
+ - README.md
66
+ - Rakefile
67
+ - github-css-rails.gemspec
68
+ - lib/github-css-rails.rb
69
+ - lib/github-css-rails/engine.rb
70
+ - lib/github-css-rails/version.rb
71
+ - vendor/assets/stylesheets/github.css
72
+ homepage: https://github.com/jhx/gem-github-css-rails
73
+ licenses:
74
+ - MIT
75
+ metadata: {}
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ! '>='
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ requirements:
91
+ - jQuery
92
+ rubyforge_project:
93
+ rubygems_version: 2.0.3
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: Provides GitHub Flavored Markdown CSS for the Rails 3.1+ asset pipeline.
97
+ test_files: []