link-checker 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (348) hide show
  1. data/.rvmrc +81 -0
  2. data/Gemfile +12 -0
  3. data/Gemfile.lock +56 -0
  4. data/LICENSE.txt +20 -0
  5. data/README.md +15 -0
  6. data/Rakefile +29 -0
  7. data/VERSION +1 -0
  8. data/bin/check-links +8 -0
  9. data/lib/link_checker.rb +80 -0
  10. data/link-checker.gemspec +404 -0
  11. data/spec/link-checker_spec.rb +92 -0
  12. data/spec/spec_helper.rb +4 -0
  13. data/spec/test-site/.gitignore +12 -0
  14. data/spec/test-site/.powrc +5 -0
  15. data/spec/test-site/.rbenv-version +1 -0
  16. data/spec/test-site/.rvmrc +1 -0
  17. data/spec/test-site/.slugignore +3 -0
  18. data/spec/test-site/.themes/classic/sass/_base.scss +5 -0
  19. data/spec/test-site/.themes/classic/sass/_partials.scss +8 -0
  20. data/spec/test-site/.themes/classic/sass/base/_layout.scss +192 -0
  21. data/spec/test-site/.themes/classic/sass/base/_solarized.scss +46 -0
  22. data/spec/test-site/.themes/classic/sass/base/_theme.scss +86 -0
  23. data/spec/test-site/.themes/classic/sass/base/_typography.scss +161 -0
  24. data/spec/test-site/.themes/classic/sass/base/_utilities.scss +28 -0
  25. data/spec/test-site/.themes/classic/sass/custom/_colors.scss +43 -0
  26. data/spec/test-site/.themes/classic/sass/custom/_fonts.scss +10 -0
  27. data/spec/test-site/.themes/classic/sass/custom/_layout.scss +21 -0
  28. data/spec/test-site/.themes/classic/sass/custom/_styles.scss +2 -0
  29. data/spec/test-site/.themes/classic/sass/partials/_archive.scss +72 -0
  30. data/spec/test-site/.themes/classic/sass/partials/_blog.scss +141 -0
  31. data/spec/test-site/.themes/classic/sass/partials/_footer.scss +19 -0
  32. data/spec/test-site/.themes/classic/sass/partials/_header.scss +18 -0
  33. data/spec/test-site/.themes/classic/sass/partials/_navigation.scss +137 -0
  34. data/spec/test-site/.themes/classic/sass/partials/_sharing.scss +8 -0
  35. data/spec/test-site/.themes/classic/sass/partials/_sidebar.scss +5 -0
  36. data/spec/test-site/.themes/classic/sass/partials/_syntax.scss +253 -0
  37. data/spec/test-site/.themes/classic/sass/partials/sidebar/_base.scss +106 -0
  38. data/spec/test-site/.themes/classic/sass/partials/sidebar/_delicious.scss +4 -0
  39. data/spec/test-site/.themes/classic/sass/partials/sidebar/_googleplus.scss +26 -0
  40. data/spec/test-site/.themes/classic/sass/partials/sidebar/_pinboard.scss +12 -0
  41. data/spec/test-site/.themes/classic/sass/partials/sidebar/_twitter.scss +34 -0
  42. data/spec/test-site/.themes/classic/sass/screen.scss +10 -0
  43. data/spec/test-site/.themes/classic/source/_includes/after_footer.html +5 -0
  44. data/spec/test-site/.themes/classic/source/_includes/archive_post.html +8 -0
  45. data/spec/test-site/.themes/classic/source/_includes/article.html +28 -0
  46. data/spec/test-site/.themes/classic/source/_includes/asides/delicious.html +8 -0
  47. data/spec/test-site/.themes/classic/source/_includes/asides/github.html +30 -0
  48. data/spec/test-site/.themes/classic/source/_includes/asides/googleplus.html +11 -0
  49. data/spec/test-site/.themes/classic/source/_includes/asides/pinboard.html +19 -0
  50. data/spec/test-site/.themes/classic/source/_includes/asides/recent_posts.html +10 -0
  51. data/spec/test-site/.themes/classic/source/_includes/asides/twitter.html +19 -0
  52. data/spec/test-site/.themes/classic/source/_includes/custom/after_footer.html +3 -0
  53. data/spec/test-site/.themes/classic/source/_includes/custom/asides/about.html +4 -0
  54. data/spec/test-site/.themes/classic/source/_includes/custom/category_feed.xml +27 -0
  55. data/spec/test-site/.themes/classic/source/_includes/custom/footer.html +4 -0
  56. data/spec/test-site/.themes/classic/source/_includes/custom/head.html +3 -0
  57. data/spec/test-site/.themes/classic/source/_includes/custom/header.html +6 -0
  58. data/spec/test-site/.themes/classic/source/_includes/custom/navigation.html +4 -0
  59. data/spec/test-site/.themes/classic/source/_includes/disqus.html +21 -0
  60. data/spec/test-site/.themes/classic/source/_includes/facebook_like.html +10 -0
  61. data/spec/test-site/.themes/classic/source/_includes/footer.html +1 -0
  62. data/spec/test-site/.themes/classic/source/_includes/google_analytics.html +13 -0
  63. data/spec/test-site/.themes/classic/source/_includes/google_plus_one.html +9 -0
  64. data/spec/test-site/.themes/classic/source/_includes/head.html +29 -0
  65. data/spec/test-site/.themes/classic/source/_includes/header.html +1 -0
  66. data/spec/test-site/.themes/classic/source/_includes/navigation.html +15 -0
  67. data/spec/test-site/.themes/classic/source/_includes/post/author.html +8 -0
  68. data/spec/test-site/.themes/classic/source/_includes/post/categories.html +10 -0
  69. data/spec/test-site/.themes/classic/source/_includes/post/date.html +15 -0
  70. data/spec/test-site/.themes/classic/source/_includes/post/disqus_thread.html +1 -0
  71. data/spec/test-site/.themes/classic/source/_includes/post/sharing.html +11 -0
  72. data/spec/test-site/.themes/classic/source/_includes/twitter_sharing.html +11 -0
  73. data/spec/test-site/.themes/classic/source/_layouts/category_index.html +17 -0
  74. data/spec/test-site/.themes/classic/source/_layouts/default.html +14 -0
  75. data/spec/test-site/.themes/classic/source/_layouts/page.html +42 -0
  76. data/spec/test-site/.themes/classic/source/_layouts/post.html +43 -0
  77. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/background.png +0 -0
  78. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/blankButton.png +0 -0
  79. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/divider.png +0 -0
  80. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButton.png +0 -0
  81. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png +0 -0
  82. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/muteButton.png +0 -0
  83. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/muteButtonOver.png +0 -0
  84. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButton.png +0 -0
  85. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png +0 -0
  86. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/pauseButton.png +0 -0
  87. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png +0 -0
  88. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/playButton.png +0 -0
  89. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/playButtonOver.png +0 -0
  90. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png +0 -0
  91. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png +0 -0
  92. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png +0 -0
  93. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png +0 -0
  94. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderRail.png +0 -0
  95. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButton.png +0 -0
  96. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png +0 -0
  97. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/display/background.png +0 -0
  98. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/display/bufferIcon.png +0 -0
  99. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/display/muteIcon.png +0 -0
  100. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/display/playIcon.png +0 -0
  101. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/dock/button.png +0 -0
  102. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/glow.xml +115 -0
  103. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/playlist/item.png +0 -0
  104. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/playlist/itemOver.png +0 -0
  105. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/playlist/sliderCapBottom.png +0 -0
  106. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/playlist/sliderCapTop.png +0 -0
  107. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/playlist/sliderRail.png +0 -0
  108. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/playlist/sliderThumb.png +0 -0
  109. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/sharing/embedIcon.png +0 -0
  110. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/sharing/embedScreen.png +0 -0
  111. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/sharing/shareIcon.png +0 -0
  112. data/spec/test-site/.themes/classic/source/assets/jwplayer/glow/sharing/shareScreen.png +0 -0
  113. data/spec/test-site/.themes/classic/source/assets/jwplayer/player.swf +0 -0
  114. data/spec/test-site/.themes/classic/source/atom.xml +27 -0
  115. data/spec/test-site/.themes/classic/source/blog/archives/index.html +18 -0
  116. data/spec/test-site/.themes/classic/source/favicon.png +0 -0
  117. data/spec/test-site/.themes/classic/source/images/bird_32_gray.png +0 -0
  118. data/spec/test-site/.themes/classic/source/images/bird_32_gray_fail.png +0 -0
  119. data/spec/test-site/.themes/classic/source/images/code_bg.png +0 -0
  120. data/spec/test-site/.themes/classic/source/images/dotted-border.png +0 -0
  121. data/spec/test-site/.themes/classic/source/images/email.png +0 -0
  122. data/spec/test-site/.themes/classic/source/images/line-tile.png +0 -0
  123. data/spec/test-site/.themes/classic/source/images/noise.png +0 -0
  124. data/spec/test-site/.themes/classic/source/images/rss.png +0 -0
  125. data/spec/test-site/.themes/classic/source/images/search.png +0 -0
  126. data/spec/test-site/.themes/classic/source/index.html +29 -0
  127. data/spec/test-site/.themes/classic/source/javascripts/ender.js +45 -0
  128. data/spec/test-site/.themes/classic/source/javascripts/github.js +37 -0
  129. data/spec/test-site/.themes/classic/source/javascripts/libs/ender.js +1497 -0
  130. data/spec/test-site/.themes/classic/source/javascripts/libs/jXHR.js +85 -0
  131. data/spec/test-site/.themes/classic/source/javascripts/libs/swfobject-dynamic.js +298 -0
  132. data/spec/test-site/.themes/classic/source/javascripts/modernizr-2.0.js +5 -0
  133. data/spec/test-site/.themes/classic/source/javascripts/octopress.js +161 -0
  134. data/spec/test-site/.themes/classic/source/javascripts/pinboard.js +56 -0
  135. data/spec/test-site/.themes/classic/source/javascripts/twitter.js +78 -0
  136. data/spec/test-site/CHANGELOG.markdown +29 -0
  137. data/spec/test-site/Gemfile +18 -0
  138. data/spec/test-site/Gemfile.lock +69 -0
  139. data/spec/test-site/README.markdown +36 -0
  140. data/spec/test-site/Rakefile +379 -0
  141. data/spec/test-site/_config.yml +99 -0
  142. data/spec/test-site/config.rb +16 -0
  143. data/spec/test-site/config.ru +25 -0
  144. data/spec/test-site/plugins/backtick_code_block.rb +43 -0
  145. data/spec/test-site/plugins/blockquote.rb +83 -0
  146. data/spec/test-site/plugins/category_generator.rb +174 -0
  147. data/spec/test-site/plugins/code_block.rb +98 -0
  148. data/spec/test-site/plugins/date.rb +98 -0
  149. data/spec/test-site/plugins/gist_tag.rb +100 -0
  150. data/spec/test-site/plugins/haml.rb +24 -0
  151. data/spec/test-site/plugins/image_tag.rb +50 -0
  152. data/spec/test-site/plugins/include_array.rb +58 -0
  153. data/spec/test-site/plugins/include_code.rb +73 -0
  154. data/spec/test-site/plugins/jsfiddle.rb +40 -0
  155. data/spec/test-site/plugins/octopress_filters.rb +135 -0
  156. data/spec/test-site/plugins/pagination.rb +121 -0
  157. data/spec/test-site/plugins/post_filters.rb +176 -0
  158. data/spec/test-site/plugins/preview_unpublished.rb +48 -0
  159. data/spec/test-site/plugins/pullquote.rb +45 -0
  160. data/spec/test-site/plugins/pygments_code.rb +41 -0
  161. data/spec/test-site/plugins/raw.rb +40 -0
  162. data/spec/test-site/plugins/render_partial.rb +69 -0
  163. data/spec/test-site/plugins/rubypants.rb +489 -0
  164. data/spec/test-site/plugins/sitemap_generator.rb +312 -0
  165. data/spec/test-site/plugins/titlecase.rb +36 -0
  166. data/spec/test-site/plugins/video_tag.rb +47 -0
  167. data/spec/test-site/public/assets/jwplayer/glow/controlbar/background.png +0 -0
  168. data/spec/test-site/public/assets/jwplayer/glow/controlbar/blankButton.png +0 -0
  169. data/spec/test-site/public/assets/jwplayer/glow/controlbar/divider.png +0 -0
  170. data/spec/test-site/public/assets/jwplayer/glow/controlbar/fullscreenButton.png +0 -0
  171. data/spec/test-site/public/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png +0 -0
  172. data/spec/test-site/public/assets/jwplayer/glow/controlbar/muteButton.png +0 -0
  173. data/spec/test-site/public/assets/jwplayer/glow/controlbar/muteButtonOver.png +0 -0
  174. data/spec/test-site/public/assets/jwplayer/glow/controlbar/normalscreenButton.png +0 -0
  175. data/spec/test-site/public/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png +0 -0
  176. data/spec/test-site/public/assets/jwplayer/glow/controlbar/pauseButton.png +0 -0
  177. data/spec/test-site/public/assets/jwplayer/glow/controlbar/pauseButtonOver.png +0 -0
  178. data/spec/test-site/public/assets/jwplayer/glow/controlbar/playButton.png +0 -0
  179. data/spec/test-site/public/assets/jwplayer/glow/controlbar/playButtonOver.png +0 -0
  180. data/spec/test-site/public/assets/jwplayer/glow/controlbar/timeSliderBuffer.png +0 -0
  181. data/spec/test-site/public/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png +0 -0
  182. data/spec/test-site/public/assets/jwplayer/glow/controlbar/timeSliderCapRight.png +0 -0
  183. data/spec/test-site/public/assets/jwplayer/glow/controlbar/timeSliderProgress.png +0 -0
  184. data/spec/test-site/public/assets/jwplayer/glow/controlbar/timeSliderRail.png +0 -0
  185. data/spec/test-site/public/assets/jwplayer/glow/controlbar/unmuteButton.png +0 -0
  186. data/spec/test-site/public/assets/jwplayer/glow/controlbar/unmuteButtonOver.png +0 -0
  187. data/spec/test-site/public/assets/jwplayer/glow/display/background.png +0 -0
  188. data/spec/test-site/public/assets/jwplayer/glow/display/bufferIcon.png +0 -0
  189. data/spec/test-site/public/assets/jwplayer/glow/display/muteIcon.png +0 -0
  190. data/spec/test-site/public/assets/jwplayer/glow/display/playIcon.png +0 -0
  191. data/spec/test-site/public/assets/jwplayer/glow/dock/button.png +0 -0
  192. data/spec/test-site/public/assets/jwplayer/glow/glow.xml +115 -0
  193. data/spec/test-site/public/assets/jwplayer/glow/playlist/item.png +0 -0
  194. data/spec/test-site/public/assets/jwplayer/glow/playlist/itemOver.png +0 -0
  195. data/spec/test-site/public/assets/jwplayer/glow/playlist/sliderCapBottom.png +0 -0
  196. data/spec/test-site/public/assets/jwplayer/glow/playlist/sliderCapTop.png +0 -0
  197. data/spec/test-site/public/assets/jwplayer/glow/playlist/sliderRail.png +0 -0
  198. data/spec/test-site/public/assets/jwplayer/glow/playlist/sliderThumb.png +0 -0
  199. data/spec/test-site/public/assets/jwplayer/glow/sharing/embedIcon.png +0 -0
  200. data/spec/test-site/public/assets/jwplayer/glow/sharing/embedScreen.png +0 -0
  201. data/spec/test-site/public/assets/jwplayer/glow/sharing/shareIcon.png +0 -0
  202. data/spec/test-site/public/assets/jwplayer/glow/sharing/shareScreen.png +0 -0
  203. data/spec/test-site/public/assets/jwplayer/player.swf +0 -0
  204. data/spec/test-site/public/atom.xml +27 -0
  205. data/spec/test-site/public/blog/2012/10/02/a-list-of-links/index.html +196 -0
  206. data/spec/test-site/public/blog/archives/index.html +149 -0
  207. data/spec/test-site/public/favicon.png +0 -0
  208. data/spec/test-site/public/images/bird_32_gray.png +0 -0
  209. data/spec/test-site/public/images/bird_32_gray_fail.png +0 -0
  210. data/spec/test-site/public/images/code_bg.png +0 -0
  211. data/spec/test-site/public/images/dotted-border.png +0 -0
  212. data/spec/test-site/public/images/email.png +0 -0
  213. data/spec/test-site/public/images/line-tile.png +0 -0
  214. data/spec/test-site/public/images/noise.png +0 -0
  215. data/spec/test-site/public/images/rss.png +0 -0
  216. data/spec/test-site/public/images/search.png +0 -0
  217. data/spec/test-site/public/index.html +165 -0
  218. data/spec/test-site/public/javascripts/ender.js +45 -0
  219. data/spec/test-site/public/javascripts/github.js +37 -0
  220. data/spec/test-site/public/javascripts/libs/ender.js +1497 -0
  221. data/spec/test-site/public/javascripts/libs/jXHR.js +85 -0
  222. data/spec/test-site/public/javascripts/libs/swfobject-dynamic.js +298 -0
  223. data/spec/test-site/public/javascripts/modernizr-2.0.js +5 -0
  224. data/spec/test-site/public/javascripts/octopress.js +161 -0
  225. data/spec/test-site/public/javascripts/pinboard.js +56 -0
  226. data/spec/test-site/public/javascripts/twitter.js +78 -0
  227. data/spec/test-site/public/sitemap.xml +15 -0
  228. data/spec/test-site/public/stylesheets/screen.css +1 -0
  229. data/spec/test-site/sass/_base.scss +5 -0
  230. data/spec/test-site/sass/_partials.scss +8 -0
  231. data/spec/test-site/sass/base/_layout.scss +192 -0
  232. data/spec/test-site/sass/base/_solarized.scss +46 -0
  233. data/spec/test-site/sass/base/_theme.scss +86 -0
  234. data/spec/test-site/sass/base/_typography.scss +161 -0
  235. data/spec/test-site/sass/base/_utilities.scss +28 -0
  236. data/spec/test-site/sass/custom/_colors.scss +43 -0
  237. data/spec/test-site/sass/custom/_fonts.scss +10 -0
  238. data/spec/test-site/sass/custom/_layout.scss +21 -0
  239. data/spec/test-site/sass/custom/_styles.scss +2 -0
  240. data/spec/test-site/sass/partials/_archive.scss +72 -0
  241. data/spec/test-site/sass/partials/_blog.scss +141 -0
  242. data/spec/test-site/sass/partials/_footer.scss +19 -0
  243. data/spec/test-site/sass/partials/_header.scss +18 -0
  244. data/spec/test-site/sass/partials/_navigation.scss +137 -0
  245. data/spec/test-site/sass/partials/_sharing.scss +8 -0
  246. data/spec/test-site/sass/partials/_sidebar.scss +5 -0
  247. data/spec/test-site/sass/partials/_syntax.scss +253 -0
  248. data/spec/test-site/sass/partials/sidebar/_base.scss +106 -0
  249. data/spec/test-site/sass/partials/sidebar/_delicious.scss +4 -0
  250. data/spec/test-site/sass/partials/sidebar/_googleplus.scss +26 -0
  251. data/spec/test-site/sass/partials/sidebar/_pinboard.scss +12 -0
  252. data/spec/test-site/sass/partials/sidebar/_twitter.scss +34 -0
  253. data/spec/test-site/sass/screen.scss +10 -0
  254. data/spec/test-site/source/_includes/after_footer.html +5 -0
  255. data/spec/test-site/source/_includes/archive_post.html +8 -0
  256. data/spec/test-site/source/_includes/article.html +28 -0
  257. data/spec/test-site/source/_includes/asides/delicious.html +8 -0
  258. data/spec/test-site/source/_includes/asides/github.html +30 -0
  259. data/spec/test-site/source/_includes/asides/googleplus.html +11 -0
  260. data/spec/test-site/source/_includes/asides/pinboard.html +19 -0
  261. data/spec/test-site/source/_includes/asides/recent_posts.html +10 -0
  262. data/spec/test-site/source/_includes/asides/twitter.html +19 -0
  263. data/spec/test-site/source/_includes/custom/after_footer.html +3 -0
  264. data/spec/test-site/source/_includes/custom/asides/about.html +4 -0
  265. data/spec/test-site/source/_includes/custom/category_feed.xml +27 -0
  266. data/spec/test-site/source/_includes/custom/footer.html +4 -0
  267. data/spec/test-site/source/_includes/custom/head.html +3 -0
  268. data/spec/test-site/source/_includes/custom/header.html +6 -0
  269. data/spec/test-site/source/_includes/custom/navigation.html +4 -0
  270. data/spec/test-site/source/_includes/disqus.html +21 -0
  271. data/spec/test-site/source/_includes/facebook_like.html +10 -0
  272. data/spec/test-site/source/_includes/footer.html +1 -0
  273. data/spec/test-site/source/_includes/google_analytics.html +13 -0
  274. data/spec/test-site/source/_includes/google_plus_one.html +9 -0
  275. data/spec/test-site/source/_includes/head.html +29 -0
  276. data/spec/test-site/source/_includes/header.html +1 -0
  277. data/spec/test-site/source/_includes/navigation.html +15 -0
  278. data/spec/test-site/source/_includes/post/author.html +8 -0
  279. data/spec/test-site/source/_includes/post/categories.html +10 -0
  280. data/spec/test-site/source/_includes/post/date.html +15 -0
  281. data/spec/test-site/source/_includes/post/disqus_thread.html +1 -0
  282. data/spec/test-site/source/_includes/post/sharing.html +11 -0
  283. data/spec/test-site/source/_includes/twitter_sharing.html +11 -0
  284. data/spec/test-site/source/_layouts/category_index.html +17 -0
  285. data/spec/test-site/source/_layouts/default.html +14 -0
  286. data/spec/test-site/source/_layouts/page.html +42 -0
  287. data/spec/test-site/source/_layouts/post.html +43 -0
  288. data/spec/test-site/source/_posts/2012-10-02-a-list-of-links.markdown +11 -0
  289. data/spec/test-site/source/assets/jwplayer/glow/controlbar/background.png +0 -0
  290. data/spec/test-site/source/assets/jwplayer/glow/controlbar/blankButton.png +0 -0
  291. data/spec/test-site/source/assets/jwplayer/glow/controlbar/divider.png +0 -0
  292. data/spec/test-site/source/assets/jwplayer/glow/controlbar/fullscreenButton.png +0 -0
  293. data/spec/test-site/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png +0 -0
  294. data/spec/test-site/source/assets/jwplayer/glow/controlbar/muteButton.png +0 -0
  295. data/spec/test-site/source/assets/jwplayer/glow/controlbar/muteButtonOver.png +0 -0
  296. data/spec/test-site/source/assets/jwplayer/glow/controlbar/normalscreenButton.png +0 -0
  297. data/spec/test-site/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png +0 -0
  298. data/spec/test-site/source/assets/jwplayer/glow/controlbar/pauseButton.png +0 -0
  299. data/spec/test-site/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png +0 -0
  300. data/spec/test-site/source/assets/jwplayer/glow/controlbar/playButton.png +0 -0
  301. data/spec/test-site/source/assets/jwplayer/glow/controlbar/playButtonOver.png +0 -0
  302. data/spec/test-site/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png +0 -0
  303. data/spec/test-site/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png +0 -0
  304. data/spec/test-site/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png +0 -0
  305. data/spec/test-site/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png +0 -0
  306. data/spec/test-site/source/assets/jwplayer/glow/controlbar/timeSliderRail.png +0 -0
  307. data/spec/test-site/source/assets/jwplayer/glow/controlbar/unmuteButton.png +0 -0
  308. data/spec/test-site/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png +0 -0
  309. data/spec/test-site/source/assets/jwplayer/glow/display/background.png +0 -0
  310. data/spec/test-site/source/assets/jwplayer/glow/display/bufferIcon.png +0 -0
  311. data/spec/test-site/source/assets/jwplayer/glow/display/muteIcon.png +0 -0
  312. data/spec/test-site/source/assets/jwplayer/glow/display/playIcon.png +0 -0
  313. data/spec/test-site/source/assets/jwplayer/glow/dock/button.png +0 -0
  314. data/spec/test-site/source/assets/jwplayer/glow/glow.xml +115 -0
  315. data/spec/test-site/source/assets/jwplayer/glow/playlist/item.png +0 -0
  316. data/spec/test-site/source/assets/jwplayer/glow/playlist/itemOver.png +0 -0
  317. data/spec/test-site/source/assets/jwplayer/glow/playlist/sliderCapBottom.png +0 -0
  318. data/spec/test-site/source/assets/jwplayer/glow/playlist/sliderCapTop.png +0 -0
  319. data/spec/test-site/source/assets/jwplayer/glow/playlist/sliderRail.png +0 -0
  320. data/spec/test-site/source/assets/jwplayer/glow/playlist/sliderThumb.png +0 -0
  321. data/spec/test-site/source/assets/jwplayer/glow/sharing/embedIcon.png +0 -0
  322. data/spec/test-site/source/assets/jwplayer/glow/sharing/embedScreen.png +0 -0
  323. data/spec/test-site/source/assets/jwplayer/glow/sharing/shareIcon.png +0 -0
  324. data/spec/test-site/source/assets/jwplayer/glow/sharing/shareScreen.png +0 -0
  325. data/spec/test-site/source/assets/jwplayer/player.swf +0 -0
  326. data/spec/test-site/source/atom.xml +27 -0
  327. data/spec/test-site/source/blog/archives/index.html +18 -0
  328. data/spec/test-site/source/favicon.png +0 -0
  329. data/spec/test-site/source/images/bird_32_gray.png +0 -0
  330. data/spec/test-site/source/images/bird_32_gray_fail.png +0 -0
  331. data/spec/test-site/source/images/code_bg.png +0 -0
  332. data/spec/test-site/source/images/dotted-border.png +0 -0
  333. data/spec/test-site/source/images/email.png +0 -0
  334. data/spec/test-site/source/images/line-tile.png +0 -0
  335. data/spec/test-site/source/images/noise.png +0 -0
  336. data/spec/test-site/source/images/rss.png +0 -0
  337. data/spec/test-site/source/images/search.png +0 -0
  338. data/spec/test-site/source/index.html +29 -0
  339. data/spec/test-site/source/javascripts/ender.js +45 -0
  340. data/spec/test-site/source/javascripts/github.js +37 -0
  341. data/spec/test-site/source/javascripts/libs/ender.js +1497 -0
  342. data/spec/test-site/source/javascripts/libs/jXHR.js +85 -0
  343. data/spec/test-site/source/javascripts/libs/swfobject-dynamic.js +298 -0
  344. data/spec/test-site/source/javascripts/modernizr-2.0.js +5 -0
  345. data/spec/test-site/source/javascripts/octopress.js +161 -0
  346. data/spec/test-site/source/javascripts/pinboard.js +56 -0
  347. data/spec/test-site/source/javascripts/twitter.js +78 -0
  348. metadata +475 -0
@@ -0,0 +1,135 @@
1
+ #custom filters for Octopress
2
+ require './plugins/backtick_code_block'
3
+ require './plugins/post_filters'
4
+ require './plugins/raw'
5
+ require './plugins/date'
6
+ require 'rubypants'
7
+
8
+ module OctopressFilters
9
+ include BacktickCodeBlock
10
+ include TemplateWrapper
11
+ def pre_filter(input)
12
+ input = render_code_block(input)
13
+ input.gsub /(<figure.+?>.+?<\/figure>)/m do
14
+ safe_wrap($1)
15
+ end
16
+ end
17
+ def post_filter(input)
18
+ input = unwrap(input)
19
+ RubyPants.new(input).to_html
20
+ end
21
+ end
22
+
23
+ module Jekyll
24
+ class ContentFilters < PostFilter
25
+ include OctopressFilters
26
+ def pre_render(post)
27
+ if post.ext.match('html|textile|markdown|md|haml|slim|xml')
28
+ post.content = pre_filter(post.content)
29
+ end
30
+ end
31
+ def post_render(post)
32
+ if post.ext.match('html|textile|markdown|md|haml|slim|xml')
33
+ post.content = post_filter(post.content)
34
+ end
35
+ end
36
+ end
37
+ end
38
+
39
+
40
+ module OctopressLiquidFilters
41
+ include Octopress::Date
42
+
43
+ # Used on the blog index to split posts on the <!--more--> marker
44
+ def excerpt(input)
45
+ if input.index(/<!--\s*more\s*-->/i)
46
+ input.split(/<!--\s*more\s*-->/i)[0]
47
+ else
48
+ input
49
+ end
50
+ end
51
+
52
+ # Checks for excerpts (helpful for template conditionals)
53
+ def has_excerpt(input)
54
+ input =~ /<!--\s*more\s*-->/i ? true : false
55
+ end
56
+
57
+ # Summary is used on the Archive pages to return the first block of content from a post.
58
+ def summary(input)
59
+ if input.index(/\n\n/)
60
+ input.split(/\n\n/)[0]
61
+ else
62
+ input
63
+ end
64
+ end
65
+
66
+ # Extracts raw content DIV from template, used for page description as {{ content }}
67
+ # contains complete sub-template code on main page level
68
+ def raw_content(input)
69
+ /<div class="entry-content">(?<content>[\s\S]*?)<\/div>\s*<(footer|\/article)>/ =~ input
70
+ return (content.nil?) ? input : content
71
+ end
72
+
73
+ # Escapes CDATA sections in post content
74
+ def cdata_escape(input)
75
+ input.gsub(/<!\[CDATA\[/, '&lt;![CDATA[').gsub(/\]\]>/, ']]&gt;')
76
+ end
77
+
78
+ # Replaces relative urls with full urls
79
+ def expand_urls(input, url='')
80
+ url ||= '/'
81
+ input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\"'>]*)/ do
82
+ $1+url+$3
83
+ end
84
+ end
85
+
86
+ # Improved version of Liquid's truncate:
87
+ # - Doesn't cut in the middle of a word.
88
+ # - Uses typographically correct ellipsis (…) insted of '...'
89
+ def truncate(input, length)
90
+ if input.length > length && input[0..(length-1)] =~ /(.+)\b.+$/im
91
+ $1.strip + ' &hellip;'
92
+ else
93
+ input
94
+ end
95
+ end
96
+
97
+ # Improved version of Liquid's truncatewords:
98
+ # - Uses typographically correct ellipsis (…) insted of '...'
99
+ def truncatewords(input, length)
100
+ truncate = input.split(' ')
101
+ if truncate.length > length
102
+ truncate[0..length-1].join(' ').strip + ' &hellip;'
103
+ else
104
+ input
105
+ end
106
+ end
107
+
108
+ # Condenses multiple spaces and tabs into a single space
109
+ def condense_spaces(input)
110
+ input.gsub(/\s{2,}/, ' ')
111
+ end
112
+
113
+ # Removes trailing forward slash from a string for easily appending url segments
114
+ def strip_slash(input)
115
+ if input =~ /(.+)\/$|^\/$/
116
+ input = $1
117
+ end
118
+ input
119
+ end
120
+
121
+ # Returns a url without the protocol (http://)
122
+ def shorthand_url(input)
123
+ input.gsub /(https?:\/\/)(\S+)/ do
124
+ $2
125
+ end
126
+ end
127
+
128
+ # Returns a title cased string based on John Gruber's title case http://daringfireball.net/2008/08/title_case_update
129
+ def titlecase(input)
130
+ input.titlecase
131
+ end
132
+
133
+ end
134
+ Liquid::Template.register_filter OctopressLiquidFilters
135
+
@@ -0,0 +1,121 @@
1
+ module Jekyll
2
+
3
+ class Pagination < Generator
4
+ # This generator is safe from arbitrary code execution.
5
+ safe true
6
+
7
+ # Generate paginated pages if necessary.
8
+ #
9
+ # site - The Site.
10
+ #
11
+ # Returns nothing.
12
+ def generate(site)
13
+ site.pages.dup.each do |page|
14
+ paginate(site, page) if Pager.pagination_enabled?(site.config, page)
15
+ end
16
+ end
17
+
18
+ # Paginates the blog's posts. Renders the index.html file into paginated
19
+ # directories, e.g.: page2/index.html, page3/index.html, etc and adds more
20
+ # site-wide data.
21
+ #
22
+ # site - The Site.
23
+ # page - The index.html Page that requires pagination.
24
+ #
25
+ # {"paginator" => { "page" => <Number>,
26
+ # "per_page" => <Number>,
27
+ # "posts" => [<Post>],
28
+ # "total_posts" => <Number>,
29
+ # "total_pages" => <Number>,
30
+ # "previous_page" => <Number>,
31
+ # "next_page" => <Number> }}
32
+ def paginate(site, page)
33
+ all_posts = site.site_payload['site']['posts']
34
+ pages = Pager.calculate_pages(all_posts, site.config['paginate'].to_i)
35
+ page_dir = page.destination('').sub(/\/[^\/]+$/, '')
36
+ page_dir_config = site.config['pagination_dir']
37
+ dir = ((page_dir_config || page_dir) + '/').sub(/^\/+/, '')
38
+
39
+ (1..pages).each do |num_page|
40
+ pager = Pager.new(site.config, num_page, all_posts, page_dir+'/', '/'+dir, pages)
41
+ if num_page > 1
42
+ newpage = Page.new(site, site.source, page_dir, page.name)
43
+ newpage.pager = pager
44
+ newpage.dir = File.join(page.dir, "#{dir}page/#{num_page}")
45
+ site.pages << newpage
46
+ else
47
+ page.pager = pager
48
+ end
49
+ end
50
+ end
51
+ end
52
+
53
+ class Pager
54
+ attr_reader :page, :per_page, :posts, :total_posts, :total_pages, :previous_page, :next_page
55
+
56
+ # Calculate the number of pages.
57
+ #
58
+ # all_posts - The Array of all Posts.
59
+ # per_page - The Integer of entries per page.
60
+ #
61
+ # Returns the Integer number of pages.
62
+ def self.calculate_pages(all_posts, per_page)
63
+ (all_posts.size.to_f / per_page.to_i).ceil
64
+ end
65
+
66
+ # Determine if pagination is enabled for a given file.
67
+ #
68
+ # config - The configuration Hash.
69
+ # file - The String filename of the file.
70
+ #
71
+ # Returns true if pagination is enabled, false otherwise.
72
+ def self.pagination_enabled?(config, file)
73
+ file.name == 'index.html' && !config['paginate'].nil? && file.content =~ /paginator\./
74
+ end
75
+
76
+ # Initialize a new Pager.
77
+ #
78
+ # config - The Hash configuration of the site.
79
+ # page - The Integer page number.
80
+ # all_posts - The Array of all the site's Posts.
81
+ # num_pages - The Integer number of pages or nil if you'd like the number
82
+ # of pages calculated.
83
+ def initialize(config, page, all_posts, index_dir, pagination_dir, num_pages = nil)
84
+ @page = page
85
+ @per_page = config['paginate'].to_i
86
+ @page_dir = pagination_dir + 'page/'
87
+ @total_pages = num_pages || Pager.calculate_pages(all_posts, @per_page)
88
+ @previous_page = nil
89
+
90
+ if @page > @total_pages
91
+ raise RuntimeError, "page number can't be greater than total pages: #{@page} > #{@total_pages}"
92
+ end
93
+
94
+ init = (@page - 1) * @per_page
95
+ offset = (init + @per_page - 1) >= all_posts.size ? all_posts.size : (init + @per_page - 1)
96
+
97
+ @total_posts = all_posts.size
98
+ @posts = all_posts[init..offset]
99
+ @previous_page = @page != 1 ? @page_dir + (@page - 1).to_s + '/' : nil
100
+ @previous_page = index_dir if @page - 1 == 1
101
+ @next_page = @page != @total_pages ? @page_dir + (@page + 1).to_s + '/' : nil
102
+ end
103
+
104
+ # Convert this Pager's data to a Hash suitable for use by Liquid.
105
+ #
106
+ # Returns the Hash representation of this Pager.
107
+ def to_liquid
108
+ {
109
+ 'page' => page,
110
+ 'per_page' => per_page,
111
+ 'posts' => posts,
112
+ 'total_posts' => total_posts,
113
+ 'total_pages' => total_pages,
114
+ 'previous_page' => previous_page,
115
+ 'next_page' => next_page
116
+ }
117
+ end
118
+ end
119
+
120
+ end
121
+
@@ -0,0 +1,176 @@
1
+ module Jekyll
2
+
3
+ # Extended plugin type that allows the plugin
4
+ # to be called on varous callback methods.
5
+ #
6
+ # Examples:
7
+ # https://github.com/tedkulp/octopress/blob/master/plugins/post_metaweblog.rb
8
+ # https://github.com/tedkulp/octopress/blob/master/plugins/post_twitter.rb
9
+ class PostFilter < Plugin
10
+
11
+ #Called before post is sent to the converter. Allows
12
+ #you to modify the post object before the converter
13
+ #does it's thing
14
+ def pre_render(post)
15
+ end
16
+
17
+ #Called after the post is rendered with the converter.
18
+ #Use the post object to modify it's contents before the
19
+ #post is inserted into the template.
20
+ def post_render(post)
21
+ end
22
+
23
+ #Called after the post is written to the disk.
24
+ #Use the post object to read it's contents to do something
25
+ #after the post is safely written.
26
+ def post_write(post)
27
+ end
28
+ end
29
+
30
+ # Monkey patch for the Jekyll Site class. For the original class,
31
+ # see: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/site.rb
32
+ class Site
33
+
34
+ # Instance variable to store the various post_filter
35
+ # plugins that are loaded.
36
+ attr_accessor :post_filters
37
+
38
+ # Instantiates all of the post_filter plugins. This is basically
39
+ # a duplication of the other loaders in Site#setup.
40
+ def load_post_filters
41
+ self.post_filters = Jekyll::PostFilter.subclasses.select do |c|
42
+ !self.safe || c.safe
43
+ end.map do |c|
44
+ c.new(self.config)
45
+ end
46
+ end
47
+ end
48
+
49
+ # Monkey patch for the Jekyll Post class. For the original class,
50
+ # see: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/post.rb
51
+ class Post
52
+
53
+ # Copy the #write method to #old_write, so we can redefine #write
54
+ # method.
55
+ alias_method :old_write, :write
56
+
57
+ # Write the generated post file to the destination directory. It
58
+ # then calls any post_write methods that may exist.
59
+ # +dest+ is the String path to the destination dir
60
+ #
61
+ # Returns nothing
62
+ def write(dest)
63
+ old_write(dest)
64
+ post_write if respond_to?(:post_write)
65
+ end
66
+ end
67
+
68
+ # Monkey patch for the Jekyll Page class. For the original class,
69
+ # see: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/page.rb
70
+ class Page
71
+
72
+ # Copy the #write method to #old_write, so we can redefine #write
73
+ # method.
74
+ alias_method :old_write, :write
75
+
76
+ # Write the generated post file to the destination directory. It
77
+ # then calls any post_write methods that may exist.
78
+ # +dest+ is the String path to the destination dir
79
+ #
80
+ # Returns nothing
81
+ def write(dest)
82
+ old_write(dest)
83
+ post_write if respond_to?(:post_write)
84
+ end
85
+ end
86
+
87
+ # Monkey patch for the Jekyll Convertible module. For the original class,
88
+ # see: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/convertible.rb
89
+ module Convertible
90
+
91
+ def is_post?
92
+ self.class.to_s == 'Jekyll::Post'
93
+ end
94
+
95
+ def is_page?
96
+ self.class.to_s == 'Jekyll::Page'
97
+ end
98
+
99
+ def is_filterable?
100
+ is_post? or is_page?
101
+ end
102
+
103
+ # Call the #pre_render methods on all of the loaded
104
+ # post_filter plugins.
105
+ #
106
+ # Returns nothing
107
+ def pre_render
108
+ self.site.load_post_filters unless self.site.post_filters
109
+
110
+ if self.site.post_filters and is_filterable?
111
+ self.site.post_filters.each do |filter|
112
+ filter.pre_render(self)
113
+ end
114
+ end
115
+ end
116
+
117
+ # Call the #post_render methods on all of the loaded
118
+ # post_filter plugins.
119
+ #
120
+ # Returns nothing
121
+ def post_render
122
+ if self.site.post_filters and is_filterable?
123
+ self.site.post_filters.each do |filter|
124
+ filter.post_render(self)
125
+ end
126
+ end
127
+ end
128
+
129
+ # Call the #post_write methods on all of the loaded
130
+ # post_filter plugins.
131
+ #
132
+ # Returns nothing
133
+ def post_write
134
+ if self.site.post_filters and is_filterable?
135
+ self.site.post_filters.each do |filter|
136
+ filter.post_write(self)
137
+ end
138
+ end
139
+ end
140
+
141
+ # Copy the #transform method to #old_transform, so we can
142
+ # redefine #transform method.
143
+ alias_method :old_transform, :transform
144
+
145
+ # Transform the contents based on the content type. Then calls the
146
+ # #post_render method if it exists
147
+ #
148
+ # Returns nothing.
149
+ def transform
150
+ old_transform
151
+ post_render if respond_to?(:post_render)
152
+ end
153
+
154
+ # Copy the #do_layout method to #old_do_layout, so we can
155
+ # redefine #do_layout method.
156
+ alias_method :old_do_layout, :do_layout
157
+
158
+ # Calls the pre_render method if it exists and then adds any necessary
159
+ # layouts to this convertible document.
160
+ #
161
+ # payload - The site payload Hash.
162
+ # layouts - A Hash of {"name" => "layout"}.
163
+ #
164
+ # Returns nothing.
165
+ def do_layout(payload, layouts)
166
+ pre_render if respond_to?(:pre_render)
167
+ old_do_layout(payload, layouts)
168
+ end
169
+
170
+ # Returns the full url of the post, including the
171
+ # configured url
172
+ def full_url
173
+ self.site.config['url'] + self.url
174
+ end
175
+ end
176
+ end
@@ -0,0 +1,48 @@
1
+ # Monkeypatch for Jekyll
2
+ # Introduce distinction between preview/productive site generation
3
+ # so posts with YAML attribute `published: false` can be previewed
4
+ # on localhost without being published to the productive environment.
5
+
6
+ module Jekyll
7
+
8
+ class Site
9
+ # Read all the files in <source>/<dir>/_posts and create a new Post
10
+ # object with each one.
11
+ #
12
+ # dir - The String relative path of the directory to read.
13
+ #
14
+ # Returns nothing.
15
+ def read_posts(dir)
16
+ base = File.join(self.source, dir, '_posts')
17
+ return unless File.exists?(base)
18
+ entries = Dir.chdir(base) { filter_entries(Dir['**/*']) }
19
+
20
+ # first pass processes, but does not yet render post content
21
+ entries.each do |f|
22
+ if Post.valid?(f)
23
+ post = Post.new(self, self.source, dir, f)
24
+
25
+ # Monkeypatch:
26
+ # On preview environment (localhost), publish all posts
27
+ if ENV.has_key?('OCTOPRESS_ENV') && ENV['OCTOPRESS_ENV'] == 'preview' && post.data.has_key?('published') && post.data['published'] == false
28
+ post.published = true
29
+ # Set preview mode flag (if necessary), `rake generate` will check for it
30
+ # to prevent pushing preview posts to productive environment
31
+ File.open(".preview-mode", "w") {}
32
+ end
33
+
34
+ if post.published && (self.future || post.date <= self.time)
35
+ self.posts << post
36
+ post.categories.each { |c| self.categories[c] << post }
37
+ post.tags.each { |c| self.tags[c] << post }
38
+ end
39
+ end
40
+ end
41
+
42
+ self.posts.sort!
43
+
44
+ # limit the posts if :limit_posts option is set
45
+ self.posts = self.posts[-limit_posts, limit_posts] if limit_posts
46
+ end
47
+ end
48
+ end