blogdown 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +23 -23
  3. data/.travis.yml +5 -0
  4. data/1.PNG +0 -0
  5. data/2.PNG +0 -0
  6. data/Gemfile +3 -3
  7. data/LICENSE.txt +22 -22
  8. data/README.md +53 -54
  9. data/Rakefile +13 -2
  10. data/blogdown.gemspec +33 -31
  11. data/lib/blogdown.rb +13 -13
  12. data/lib/blogdown/app.rb +7 -27
  13. data/lib/blogdown/cli.rb +0 -13
  14. data/lib/blogdown/file_pipeline.rb +5 -3
  15. data/lib/blogdown/publisher.rb +22 -21
  16. data/lib/blogdown/version.rb +1 -1
  17. data/lib/public/css/blogdown.css +131 -0
  18. data/lib/public/css/bootstrap-theme.css +347 -0
  19. data/lib/public/css/bootstrap-theme.css.map +1 -0
  20. data/lib/public/css/bootstrap-theme.min.css +7 -0
  21. data/lib/public/css/bootstrap.css +5785 -0
  22. data/lib/public/css/bootstrap.css.map +1 -0
  23. data/lib/public/css/bootstrap.min.css +7 -0
  24. data/lib/public/css/prettify.css +30 -0
  25. data/lib/public/fonts/glyphicons-halflings-regular.eot +0 -0
  26. data/lib/public/fonts/glyphicons-halflings-regular.svg +229 -0
  27. data/lib/public/fonts/glyphicons-halflings-regular.ttf +0 -0
  28. data/lib/public/fonts/glyphicons-halflings-regular.woff +0 -0
  29. data/lib/public/js/blogdown.js +8 -0
  30. data/lib/public/js/bootstrap.js +1951 -0
  31. data/lib/public/js/bootstrap.min.js +6 -0
  32. data/lib/public/js/jquery.js +9154 -0
  33. data/lib/views/index.erb +29 -0
  34. data/lib/views/layout.erb +36 -0
  35. data/spec/blogdown/blogdown_spec.rb +3 -14
  36. data/spec/fixtures/hello.md +1 -0
  37. data/spec/spec_helper.rb +7 -0
  38. metadata +42 -40
  39. data/features/server.feature +0 -8
  40. data/features/step_definitions/blogdown_steps.rb +0 -15
  41. data/features/support/env.rb +0 -2
  42. data/lib/public/images/body-bg.png +0 -0
  43. data/lib/public/images/highlight-bg.jpg +0 -0
  44. data/lib/public/images/hr.png +0 -0
  45. data/lib/public/images/octocat-icon.png +0 -0
  46. data/lib/public/images/tar-gz-icon.png +0 -0
  47. data/lib/public/images/zip-icon.png +0 -0
  48. data/lib/public/javascripts/main.js +0 -0
  49. data/lib/public/stylesheets/print.css +0 -226
  50. data/lib/public/stylesheets/pygment_trac.css +0 -69
  51. data/lib/public/stylesheets/stylesheet.css +0 -371
  52. data/lib/views/base.erb +0 -42
  53. data/lib/views/home.erb +0 -18
  54. data/lib/views/post.erb +0 -438
  55. data/spec/fixtures/posts/hello.md +0 -12
@@ -0,0 +1,29 @@
1
+ <div class="row">
2
+ <!-- The sidebar
3
+ ============================================-->
4
+ <div class="col-lg-3" id="bd-sidebar">
5
+ <ul class="nav nav-list bd-sidenav">
6
+ <% wiki_files.each_key do|f| %>
7
+ <li>
8
+ <a href="#<%= f%>">
9
+ <i class="icon-chevron-right"></i>
10
+ <%= f %>
11
+ </a>
12
+ </li>
13
+ <% end %>
14
+ </ul>
15
+ </div>
16
+
17
+ <!-- The post sections
18
+ ================================================-->
19
+ <div class="col-lg-9 section">
20
+
21
+ <% wiki_files.each do|k,v| %>
22
+ <h1 id="<%= k%>"><%= k%></h1>
23
+ <%= v%>
24
+ <% end %>
25
+ </div>
26
+
27
+ </div>
28
+
29
+
@@ -0,0 +1,36 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head lang="en">
4
+ <meta charset="UTF-8">
5
+ <title>dropdowns</title>
6
+ <link href="css/bootstrap.css" rel="stylesheet" type="text/css">
7
+ <link href="css/blogdown.css" rel="stylesheet" type="text/css">
8
+ <script src="js/prettify.js" type="text/javascript"></script>
9
+
10
+ <script src="js/jquery.js" type="text/javascript"></script>
11
+ <script src="js/bootstrap.js" type="text/javascript"></script>
12
+ <script src="js/blogdown.js" type="text/javascript"></script>
13
+ </head>
14
+
15
+ <body data-spy="scroll" data-target="#bd-sidebar">
16
+
17
+ <div class="navbar navbar-static-top bd-navbar">
18
+ <div class="navbar-inner">
19
+ <a href="#" class="navbar-brand bd-brand">blogdown</a>
20
+ <ul class="nav nav-pills pull-right bd-nav">
21
+ <li>
22
+ <a href="#">home</a>
23
+ </li>
24
+ <li>
25
+ <a href="#">about</a>
26
+ </li>
27
+ </ul>
28
+ </div>
29
+ </div>
30
+ <!-- Main content
31
+ ================================-->
32
+ <div class="container">
33
+ <%= yield %>
34
+ </div>
35
+ </body>
36
+ </html>
@@ -1,28 +1,17 @@
1
1
  # This is just a funny looking spec, a lot of work is needed to improve it
2
2
 
3
3
 
4
- def clean_output
5
- root=$root_fixture_path+'/output'
6
- root=Pathname root
7
- if root.exist?
8
- root.rmtree
9
- root.mkpath
10
- else
11
- root.mkpath
12
- end
13
- end
14
4
 
15
5
  describe "A simple markdown blogger" do
16
6
 
17
7
  context "Publishing" do
18
- before(:each) do
19
- clean_output
20
- end
21
8
  let(:publisher){ Blogdown::Publisher.new $root_fixture_path}
22
9
 
23
10
  describe "composer" do
24
11
  it{
25
- expect{publisher.compose}.to_not raise_error
12
+ outcome={"hello"=>'<h1>hello world</h1>'}
13
+ cmp=publisher.compose
14
+ expect(cmp.first[0]).to eq(outcome.to_a[0][0])
26
15
  }
27
16
  end
28
17
  end
@@ -0,0 +1 @@
1
+ # hello world
@@ -14,10 +14,17 @@
14
14
  # users commonly want.
15
15
  #
16
16
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
+ require 'coveralls'
18
+
19
+ Coveralls.wear!
20
+
17
21
  $LOAD_PATH<<File.expand_path('../../../lib',__FILE__)
18
22
  $root_fixture_path=File.expand_path('../fixtures',__FILE__)
19
23
 
20
24
  require 'blogdown'
25
+
26
+
27
+
21
28
  RSpec.configure do |config|
22
29
  # The settings below are suggested to provide a good initial experience
23
30
  # with RSpec, but feel free to customize to your heart's content.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blogdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - gernest
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-04 00:00:00.000000000 Z
11
+ date: 2014-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -53,47 +53,47 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: 3.0.0
55
55
  - !ruby/object:Gem::Dependency
56
- name: cucumber
56
+ name: coveralls
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
- version: 1.3.15
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
- version: 1.3.15
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: kramdown
70
+ name: redcarpet
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - '>='
74
74
  - !ruby/object:Gem::Version
75
- version: 1.4.0
75
+ version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
- version: 1.4.0
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: coderay
84
+ name: github-markdown
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
- version: 1.1.0
89
+ version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
- version: 1.1.0
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: thor
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -122,7 +122,7 @@ dependencies:
122
122
  - - ~>
123
123
  - !ruby/object:Gem::Version
124
124
  version: 1.4.5
125
- description: ' A Simple Markdown Solution With synntax highlighing'
125
+ description: ' An offline github wiki viewer'
126
126
  email:
127
127
  - geofreyernest@live.com
128
128
  executables:
@@ -132,15 +132,15 @@ extra_rdoc_files: []
132
132
  files:
133
133
  - .gitignore
134
134
  - .rspec
135
+ - .travis.yml
136
+ - 1.PNG
137
+ - 2.PNG
135
138
  - Gemfile
136
139
  - LICENSE.txt
137
140
  - README.md
138
141
  - Rakefile
139
142
  - bin/blogdown
140
143
  - blogdown.gemspec
141
- - features/server.feature
142
- - features/step_definitions/blogdown_steps.rb
143
- - features/support/env.rb
144
144
  - lib/blogdown.rb
145
145
  - lib/blogdown/app.rb
146
146
  - lib/blogdown/cli.rb
@@ -148,21 +148,26 @@ files:
148
148
  - lib/blogdown/file_pipeline.rb
149
149
  - lib/blogdown/publisher.rb
150
150
  - lib/blogdown/version.rb
151
- - lib/public/images/body-bg.png
152
- - lib/public/images/highlight-bg.jpg
153
- - lib/public/images/hr.png
154
- - lib/public/images/octocat-icon.png
155
- - lib/public/images/tar-gz-icon.png
156
- - lib/public/images/zip-icon.png
157
- - lib/public/javascripts/main.js
158
- - lib/public/stylesheets/print.css
159
- - lib/public/stylesheets/pygment_trac.css
160
- - lib/public/stylesheets/stylesheet.css
161
- - lib/views/base.erb
162
- - lib/views/home.erb
163
- - lib/views/post.erb
151
+ - lib/public/css/blogdown.css
152
+ - lib/public/css/bootstrap-theme.css
153
+ - lib/public/css/bootstrap-theme.css.map
154
+ - lib/public/css/bootstrap-theme.min.css
155
+ - lib/public/css/bootstrap.css
156
+ - lib/public/css/bootstrap.css.map
157
+ - lib/public/css/bootstrap.min.css
158
+ - lib/public/css/prettify.css
159
+ - lib/public/fonts/glyphicons-halflings-regular.eot
160
+ - lib/public/fonts/glyphicons-halflings-regular.svg
161
+ - lib/public/fonts/glyphicons-halflings-regular.ttf
162
+ - lib/public/fonts/glyphicons-halflings-regular.woff
163
+ - lib/public/js/blogdown.js
164
+ - lib/public/js/bootstrap.js
165
+ - lib/public/js/bootstrap.min.js
166
+ - lib/public/js/jquery.js
167
+ - lib/views/index.erb
168
+ - lib/views/layout.erb
164
169
  - spec/blogdown/blogdown_spec.rb
165
- - spec/fixtures/posts/hello.md
170
+ - spec/fixtures/hello.md
166
171
  - spec/spec_helper.rb
167
172
  homepage: https://github.com/gernest/blogdown
168
173
  licenses:
@@ -187,12 +192,9 @@ rubyforge_project:
187
192
  rubygems_version: 2.3.0
188
193
  signing_key:
189
194
  specification_version: 4
190
- summary: Write in markdown for your web based rich text editor
195
+ summary: Turning your github wiki to a nice looking offline webpage
191
196
  test_files:
192
- - features/server.feature
193
- - features/step_definitions/blogdown_steps.rb
194
- - features/support/env.rb
195
197
  - spec/blogdown/blogdown_spec.rb
196
- - spec/fixtures/posts/hello.md
198
+ - spec/fixtures/hello.md
197
199
  - spec/spec_helper.rb
198
200
  has_rdoc:
@@ -1,8 +0,0 @@
1
- Feature: Serving The Files
2
- I need to preview my posts in the browser
3
-
4
- Scenario: The index page
5
- When I run command "server"
6
- When I visit "/"
7
- Then I should see an Index Page
8
-
@@ -1,15 +0,0 @@
1
- require 'aruba/cucumber'
2
-
3
- When(/^I run command "(.*?)"$/) do |cmd|
4
- args=Array.new
5
- args<<cmd
6
- Blogdown::Cli::CommandLine.start args
7
- end
8
-
9
-
10
- When(/^I visit "(.*?)"$/) do |arg1|
11
- end
12
-
13
- Then(/^I should see an Index Page$/) do
14
- pending # express the regexp above with the code you wish you had
15
- end
@@ -1,2 +0,0 @@
1
- $LOAD_PATH<<File.expand_path('../../../lib',__FILE__)
2
- require 'blogdown'
Binary file
File without changes
@@ -1,226 +0,0 @@
1
- html, body, div, span, applet, object, iframe,
2
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3
- a, abbr, acronym, address, big, cite, code,
4
- del, dfn, em, img, ins, kbd, q, s, samp,
5
- small, strike, strong, sub, sup, tt, var,
6
- b, u, i, center,
7
- dl, dt, dd, ol, ul, li,
8
- fieldset, form, label, legend,
9
- table, caption, tbody, tfoot, thead, tr, th, td,
10
- article, aside, canvas, details, embed,
11
- figure, figcaption, footer, header, hgroup,
12
- menu, nav, output, ruby, section, summary,
13
- time, mark, audio, video {
14
- margin: 0;
15
- padding: 0;
16
- border: 0;
17
- font-size: 100%;
18
- font: inherit;
19
- vertical-align: baseline;
20
- }
21
- /* HTML5 display-role reset for older browsers */
22
- article, aside, details, figcaption, figure,
23
- footer, header, hgroup, menu, nav, section {
24
- display: block;
25
- }
26
- body {
27
- line-height: 1;
28
- }
29
- ol, ul {
30
- list-style: none;
31
- }
32
- blockquote, q {
33
- quotes: none;
34
- }
35
- blockquote:before, blockquote:after,
36
- q:before, q:after {
37
- content: '';
38
- content: none;
39
- }
40
- table {
41
- border-collapse: collapse;
42
- border-spacing: 0;
43
- }
44
- body {
45
- font-size: 13px;
46
- line-height: 1.5;
47
- font-family: 'Helvetica Neue', Helvetica, Arial, serif;
48
- color: #000;
49
- }
50
-
51
- a {
52
- color: #d5000d;
53
- font-weight: bold;
54
- }
55
-
56
- header {
57
- padding-top: 35px;
58
- padding-bottom: 10px;
59
- }
60
-
61
- header h1 {
62
- font-weight: bold;
63
- letter-spacing: -1px;
64
- font-size: 48px;
65
- color: #303030;
66
- line-height: 1.2;
67
- }
68
-
69
- header h2 {
70
- letter-spacing: -1px;
71
- font-size: 24px;
72
- color: #aaa;
73
- font-weight: normal;
74
- line-height: 1.3;
75
- }
76
- #downloads {
77
- display: none;
78
- }
79
- #main_content {
80
- padding-top: 20px;
81
- }
82
-
83
- code, pre {
84
- font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
85
- color: #222;
86
- margin-bottom: 30px;
87
- font-size: 12px;
88
- }
89
-
90
- code {
91
- padding: 0 3px;
92
- }
93
-
94
- pre {
95
- border: solid 1px #ddd;
96
- padding: 20px;
97
- overflow: auto;
98
- }
99
- pre code {
100
- padding: 0;
101
- }
102
-
103
- ul, ol, dl {
104
- margin-bottom: 20px;
105
- }
106
-
107
-
108
- /* COMMON STYLES */
109
-
110
- table {
111
- width: 100%;
112
- border: 1px solid #ebebeb;
113
- }
114
-
115
- th {
116
- font-weight: 500;
117
- }
118
-
119
- td {
120
- border: 1px solid #ebebeb;
121
- text-align: center;
122
- font-weight: 300;
123
- }
124
-
125
- form {
126
- background: #f2f2f2;
127
- padding: 20px;
128
-
129
- }
130
-
131
-
132
- /* GENERAL ELEMENT TYPE STYLES */
133
-
134
- h1 {
135
- font-size: 2.8em;
136
- }
137
-
138
- h2 {
139
- font-size: 22px;
140
- font-weight: bold;
141
- color: #303030;
142
- margin-bottom: 8px;
143
- }
144
-
145
- h3 {
146
- color: #d5000d;
147
- font-size: 18px;
148
- font-weight: bold;
149
- margin-bottom: 8px;
150
- }
151
-
152
- h4 {
153
- font-size: 16px;
154
- color: #303030;
155
- font-weight: bold;
156
- }
157
-
158
- h5 {
159
- font-size: 1em;
160
- color: #303030;
161
- }
162
-
163
- h6 {
164
- font-size: .8em;
165
- color: #303030;
166
- }
167
-
168
- p {
169
- font-weight: 300;
170
- margin-bottom: 20px;
171
- }
172
-
173
- a {
174
- text-decoration: none;
175
- }
176
-
177
- p a {
178
- font-weight: 400;
179
- }
180
-
181
- blockquote {
182
- font-size: 1.6em;
183
- border-left: 10px solid #e9e9e9;
184
- margin-bottom: 20px;
185
- padding: 0 0 0 30px;
186
- }
187
-
188
- ul li {
189
- list-style: disc inside;
190
- padding-left: 20px;
191
- }
192
-
193
- ol li {
194
- list-style: decimal inside;
195
- padding-left: 3px;
196
- }
197
-
198
- dl dd {
199
- font-style: italic;
200
- font-weight: 100;
201
- }
202
-
203
- footer {
204
- margin-top: 40px;
205
- padding-top: 20px;
206
- padding-bottom: 30px;
207
- font-size: 13px;
208
- color: #aaa;
209
- }
210
-
211
- footer a {
212
- color: #666;
213
- }
214
-
215
- /* MISC */
216
- .clearfix:after {
217
- clear: both;
218
- content: '.';
219
- display: block;
220
- visibility: hidden;
221
- height: 0;
222
- }
223
-
224
- .clearfix {display: inline-block;}
225
- * html .clearfix {height: 1%;}
226
- .clearfix {display: block;}