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,98 @@
1
+ module Octopress
2
+ module Date
3
+
4
+ # Returns a datetime if the input is a string
5
+ def datetime(date)
6
+ if date.class == String
7
+ date = Time.parse(date)
8
+ end
9
+ date
10
+ end
11
+
12
+ # Returns an ordidinal date eg July 22 2007 -> July 22nd 2007
13
+ def ordinalize(date)
14
+ date = datetime(date)
15
+ "#{date.strftime('%b')} #{ordinal(date.strftime('%e').to_i)}, #{date.strftime('%Y')}"
16
+ end
17
+
18
+ # Returns an ordinal number. 13 -> 13th, 21 -> 21st etc.
19
+ def ordinal(number)
20
+ if (11..13).include?(number.to_i % 100)
21
+ "#{number}<span>th</span>"
22
+ else
23
+ case number.to_i % 10
24
+ when 1; "#{number}<span>st</span>"
25
+ when 2; "#{number}<span>nd</span>"
26
+ when 3; "#{number}<span>rd</span>"
27
+ else "#{number}<span>th</span>"
28
+ end
29
+ end
30
+ end
31
+
32
+ # Formats date either as ordinal or by given date format
33
+ # Adds %o as ordinal representation of the day
34
+ def format_date(date, format)
35
+ date = datetime(date)
36
+ if format.nil? || format.empty? || format == "ordinal"
37
+ date_formatted = ordinalize(date)
38
+ else
39
+ date_formatted = date.strftime(format)
40
+ date_formatted.gsub!(/%o/, ordinal(date.strftime('%e').to_i))
41
+ end
42
+ date_formatted
43
+ end
44
+
45
+ end
46
+ end
47
+
48
+
49
+ module Jekyll
50
+
51
+ class Post
52
+ include Octopress::Date
53
+
54
+ # Convert this post into a Hash for use in Liquid templates.
55
+ #
56
+ # Returns <Hash>
57
+ def to_liquid
58
+ date_format = self.site.config['date_format']
59
+ self.data.deep_merge({
60
+ "title" => self.data['title'] || self.slug.split('-').select {|w| w.capitalize! || w }.join(' '),
61
+ "url" => self.url,
62
+ "date" => self.date,
63
+ # Monkey patch
64
+ "date_formatted" => format_date(self.date, date_format),
65
+ "updated_formatted" => self.data.has_key?('updated') ? format_date(self.data['updated'], date_format) : nil,
66
+ "id" => self.id,
67
+ "categories" => self.categories,
68
+ "next" => self.next,
69
+ "previous" => self.previous,
70
+ "tags" => self.tags,
71
+ "content" => self.content })
72
+ end
73
+ end
74
+
75
+ class Page
76
+ include Octopress::Date
77
+
78
+ # Initialize a new Page.
79
+ #
80
+ # site - The Site object.
81
+ # base - The String path to the source.
82
+ # dir - The String path between the source and the file.
83
+ # name - The String filename of the file.
84
+ def initialize(site, base, dir, name)
85
+ @site = site
86
+ @base = base
87
+ @dir = dir
88
+ @name = name
89
+
90
+ self.process(name)
91
+ self.read_yaml(File.join(base, dir), name)
92
+ # Monkey patch
93
+ date_format = self.site.config['date_format']
94
+ self.data['date_formatted'] = format_date(self.data['date'], date_format) if self.data.has_key?('date')
95
+ self.data['updated_formatted'] = format_date(self.data['updated'], date_format) if self.data.has_key?('updated')
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,100 @@
1
+ # A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers.
2
+ # by: Brandon Tilly
3
+ # Source URL: https://gist.github.com/1027674
4
+ # Post http://brandontilley.com/2011/01/31/gist-tag-for-jekyll.html
5
+ #
6
+ # Example usage: {% gist 1027674 gist_tag.rb %} //embeds a gist for this plugin
7
+
8
+ require 'cgi'
9
+ require 'digest/md5'
10
+ require 'net/https'
11
+ require 'uri'
12
+
13
+ module Jekyll
14
+ class GistTag < Liquid::Tag
15
+ def initialize(tag_name, text, token)
16
+ super
17
+ @text = text
18
+ @cache_disabled = false
19
+ @cache_folder = File.expand_path "../.gist-cache", File.dirname(__FILE__)
20
+ FileUtils.mkdir_p @cache_folder
21
+ end
22
+
23
+ def render(context)
24
+ if parts = @text.match(/([\d]*) (.*)/)
25
+ gist, file = parts[1].strip, parts[2].strip
26
+ script_url = script_url_for gist, file
27
+ code = get_cached_gist(gist, file) || get_gist_from_web(gist, file)
28
+ html_output_for script_url, code
29
+ else
30
+ ""
31
+ end
32
+ end
33
+
34
+ def html_output_for(script_url, code)
35
+ code = CGI.escapeHTML code
36
+ <<-HTML
37
+ <div><script src='#{script_url}'></script>
38
+ <noscript><pre><code>#{code}</code></pre></noscript></div>
39
+ HTML
40
+ end
41
+
42
+ def script_url_for(gist_id, filename)
43
+ "https://gist.github.com/#{gist_id}.js?file=#{filename}"
44
+ end
45
+
46
+ def get_gist_url_for(gist, file)
47
+ "https://raw.github.com/gist/#{gist}/#{file}"
48
+ end
49
+
50
+ def cache(gist, file, data)
51
+ cache_file = get_cache_file_for gist, file
52
+ File.open(cache_file, "w") do |io|
53
+ io.write data
54
+ end
55
+ end
56
+
57
+ def get_cached_gist(gist, file)
58
+ return nil if @cache_disabled
59
+ cache_file = get_cache_file_for gist, file
60
+ File.read cache_file if File.exist? cache_file
61
+ end
62
+
63
+ def get_cache_file_for(gist, file)
64
+ bad_chars = /[^a-zA-Z0-9\-_.]/
65
+ gist = gist.gsub bad_chars, ''
66
+ file = file.gsub bad_chars, ''
67
+ md5 = Digest::MD5.hexdigest "#{gist}-#{file}"
68
+ File.join @cache_folder, "#{gist}-#{file}-#{md5}.cache"
69
+ end
70
+
71
+ def get_gist_from_web(gist, file)
72
+ gist_url = get_gist_url_for gist, file
73
+ raw_uri = URI.parse gist_url
74
+ proxy = ENV['http_proxy']
75
+ if proxy
76
+ proxy_uri = URI.parse(proxy)
77
+ https = Net::HTTP::Proxy(proxy_uri.host, proxy_uri.port).new raw_uri.host, raw_uri.port
78
+ else
79
+ https = Net::HTTP.new raw_uri.host, raw_uri.port
80
+ end
81
+ https.use_ssl = true
82
+ https.verify_mode = OpenSSL::SSL::VERIFY_NONE
83
+ request = Net::HTTP::Get.new raw_uri.request_uri
84
+ data = https.request request
85
+ data = data.body
86
+ cache gist, file, data unless @cache_disabled
87
+ data
88
+ end
89
+ end
90
+
91
+ class GistTagNoCache < GistTag
92
+ def initialize(tag_name, text, token)
93
+ super
94
+ @cache_disabled = true
95
+ end
96
+ end
97
+ end
98
+
99
+ Liquid::Template.register_tag('gist', Jekyll::GistTag)
100
+ Liquid::Template.register_tag('gistnocache', Jekyll::GistTagNoCache)
@@ -0,0 +1,24 @@
1
+ module Jekyll
2
+ require 'haml'
3
+ class HamlConverter < Converter
4
+ safe true
5
+ priority :low
6
+
7
+ def matches(ext)
8
+ ext =~ /haml/i
9
+ end
10
+
11
+ def output_ext(ext)
12
+ ".html"
13
+ end
14
+
15
+ def convert(content)
16
+ begin
17
+ engine = Haml::Engine.new(content)
18
+ engine.render
19
+ rescue StandardError => e
20
+ puts "!!! HAML Error: " + e.message
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,50 @@
1
+ # Title: Simple Image tag for Jekyll
2
+ # Authors: Brandon Mathis http://brandonmathis.com
3
+ # Felix Schäfer, Frederic Hemberger
4
+ # Description: Easily output images with optional class names, width, height, title and alt attributes
5
+ #
6
+ # Syntax {% img [class name(s)] [http[s]:/]/path/to/image [width [height]] [title text | "title text" ["alt text"]] %}
7
+ #
8
+ # Examples:
9
+ # {% img /images/ninja.png Ninja Attack! %}
10
+ # {% img left half http://site.com/images/ninja.png Ninja Attack! %}
11
+ # {% img left half http://site.com/images/ninja.png 150 150 "Ninja Attack!" "Ninja in attack posture" %}
12
+ #
13
+ # Output:
14
+ # <img src="/images/ninja.png">
15
+ # <img class="left half" src="http://site.com/images/ninja.png" title="Ninja Attack!" alt="Ninja Attack!">
16
+ # <img class="left half" src="http://site.com/images/ninja.png" width="150" height="150" title="Ninja Attack!" alt="Ninja in attack posture">
17
+ #
18
+
19
+ module Jekyll
20
+
21
+ class ImageTag < Liquid::Tag
22
+ @img = nil
23
+
24
+ def initialize(tag_name, markup, tokens)
25
+ attributes = ['class', 'src', 'width', 'height', 'title']
26
+
27
+ if markup =~ /(?<class>\S.*\s+)?(?<src>(?:https?:\/\/|\/|\S+\/)\S+)(?:\s+(?<width>\d+))?(?:\s+(?<height>\d+))?(?<title>\s+.+)?/i
28
+ @img = attributes.reduce({}) { |img, attr| img[attr] = $~[attr].strip if $~[attr]; img }
29
+ if /(?:"|')(?<title>[^"']+)?(?:"|')\s+(?:"|')(?<alt>[^"']+)?(?:"|')/ =~ @img['title']
30
+ @img['title'] = title
31
+ @img['alt'] = alt
32
+ else
33
+ @img['alt'] = @img['title'].gsub!(/"/, '&#34;') if @img['title']
34
+ end
35
+ @img['class'].gsub!(/"/, '') if @img['class']
36
+ end
37
+ super
38
+ end
39
+
40
+ def render(context)
41
+ if @img
42
+ "<img #{@img.collect {|k,v| "#{k}=\"#{v}\"" if v}.join(" ")}>"
43
+ else
44
+ "Error processing input, expected syntax: {% img [class name(s)] [http[s]:/]/path/to/image [width [height]] [title text | \"title text\" [\"alt text\"]] %}"
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ Liquid::Template.register_tag('img', Jekyll::ImageTag)
@@ -0,0 +1,58 @@
1
+ # Title: Include Array Tag for Jekyll
2
+ # Author: Jason Woodward http://www.woodwardjd.com
3
+ # Description: Import files on your filesystem as specified in a configuration variable in _config.yml. Mostly cribbed from Jekyll's include tag.
4
+ # Syntax: {% include_array variable_name_from_config.yml %}
5
+ #
6
+ # Example 1:
7
+ # {% include_array asides %}
8
+ #
9
+ # _config.yml snippet:
10
+ # asides: [asides/twitter.html, asides/custom/my_picture.html]
11
+ #
12
+ module Jekyll
13
+
14
+ class IncludeArrayTag < Liquid::Tag
15
+ Syntax = /(#{Liquid::QuotedFragment}+)/
16
+ def initialize(tag_name, markup, tokens)
17
+ if markup =~ Syntax
18
+ @array_name = $1
19
+ else
20
+ raise SyntaxError.new("Error in tag 'include_array' - Valid syntax: include_array [array from _config.yml]")
21
+ end
22
+
23
+ super
24
+ end
25
+
26
+ def render(context)
27
+ includes_dir = File.join(context.registers[:site].source, '_includes')
28
+
29
+ if File.symlink?(includes_dir)
30
+ return "Includes directory '#{includes_dir}' cannot be a symlink"
31
+ end
32
+
33
+ rtn = ''
34
+ (context.environments.first['site'][@array_name] || []).each do |file|
35
+ if file !~ /^[a-zA-Z0-9_\/\.-]+$/ || file =~ /\.\// || file =~ /\/\./
36
+ rtn = rtn + "Include file '#{file}' contains invalid characters or sequences"
37
+ end
38
+
39
+ Dir.chdir(includes_dir) do
40
+ choices = Dir['**/*'].reject { |x| File.symlink?(x) }
41
+ if choices.include?(file)
42
+ source = File.read(file)
43
+ partial = Liquid::Template.parse(source)
44
+ context.stack do
45
+ rtn = rtn + partial.render(context)
46
+ end
47
+ else
48
+ rtn = rtn + "Included file '#{file}' not found in _includes directory"
49
+ end
50
+ end
51
+ end
52
+ rtn
53
+ end
54
+ end
55
+
56
+ end
57
+
58
+ Liquid::Template.register_tag('include_array', Jekyll::IncludeArrayTag)
@@ -0,0 +1,73 @@
1
+ # Title: Include Code Tag for Jekyll
2
+ # Author: Brandon Mathis http://brandonmathis.com
3
+ # Description: Import files on your filesystem into any blog post as embedded code snippets with syntax highlighting and a download link.
4
+ # Configuration: You can set default import path in _config.yml (defaults to code_dir: downloads/code)
5
+ #
6
+ # Syntax {% include_code path/to/file %}
7
+ #
8
+ # Example 1:
9
+ # {% include_code javascripts/test.js %}
10
+ #
11
+ # This will import test.js from source/downloads/code/javascripts/test.js
12
+ # and output the contents in a syntax highlighted code block inside a figure,
13
+ # with a figcaption listing the file name and download link
14
+ #
15
+ # Example 2:
16
+ # You can also include an optional title for the <figcaption>
17
+ #
18
+ # {% include_code Example 2 javascripts/test.js %}
19
+ #
20
+ # will output a figcaption with the title: Example 2 (test.js)
21
+ #
22
+
23
+ require './plugins/pygments_code'
24
+ require './plugins/raw'
25
+ require 'pathname'
26
+
27
+ module Jekyll
28
+
29
+ class IncludeCodeTag < Liquid::Tag
30
+ include HighlightCode
31
+ include TemplateWrapper
32
+ def initialize(tag_name, markup, tokens)
33
+ @title = nil
34
+ @file = nil
35
+ if markup.strip =~ /\s*lang:(\w+)/i
36
+ @filetype = $1
37
+ markup = markup.strip.sub(/lang:\w+/i,'')
38
+ end
39
+ if markup.strip =~ /(.*)?(\s+|^)(\/*\S+)/i
40
+ @title = $1 || nil
41
+ @file = $3
42
+ end
43
+ super
44
+ end
45
+
46
+ def render(context)
47
+ code_dir = (context.registers[:site].config['code_dir'].sub(/^\//,'') || 'downloads/code')
48
+ code_path = (Pathname.new(context.registers[:site].source) + code_dir).expand_path
49
+ file = code_path + @file
50
+
51
+ if File.symlink?(code_path)
52
+ return "Code directory '#{code_path}' cannot be a symlink"
53
+ end
54
+
55
+ unless file.file?
56
+ return "File #{file} could not be found"
57
+ end
58
+
59
+ Dir.chdir(code_path) do
60
+ code = file.read
61
+ @filetype = file.extname.sub('.','') if @filetype.nil?
62
+ title = @title ? "#{@title} (#{file.basename})" : file.basename
63
+ url = "/#{code_dir}/#{@file}"
64
+ source = "<figure class='code'><figcaption><span>#{title}</span> <a href='#{url}'>download</a></figcaption>\n"
65
+ source += " #{highlight(code, @filetype)}</figure>"
66
+ safe_wrap(source)
67
+ end
68
+ end
69
+ end
70
+
71
+ end
72
+
73
+ Liquid::Template.register_tag('include_code', Jekyll::IncludeCodeTag)
@@ -0,0 +1,40 @@
1
+ # Title: jsFiddle tag for Jekyll
2
+ # Author: Brian Arnold (@brianarn)
3
+ # Description:
4
+ # Given a jsFiddle shortcode, outputs the jsFiddle iframe code.
5
+ # Using 'default' will preserve defaults as specified by jsFiddle.
6
+ #
7
+ # Syntax: {% jsfiddle shorttag [tabs] [skin] [height] [width] %}
8
+ #
9
+ # Examples:
10
+ #
11
+ # Input: {% jsfiddle ccWP7 %}
12
+ # Output: <iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/ccWP7/embedded/js,resources,html,css,result/light/"></iframe>
13
+ #
14
+ # Input: {% jsfiddle ccWP7 js,html,result %}
15
+ # Output: <iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/ccWP7/embedded/js,html,result/light/"></iframe>
16
+ #
17
+
18
+ module Jekyll
19
+ class JsFiddle < Liquid::Tag
20
+ def initialize(tag_name, markup, tokens)
21
+ if /(?<fiddle>\w+)(?:\s+(?<sequence>[\w,]+))?(?:\s+(?<skin>\w+))?(?:\s+(?<height>\w+))?(?:\s+(?<width>\w+))?/ =~ markup
22
+ @fiddle = fiddle
23
+ @sequence = (sequence unless sequence == 'default') || 'js,resources,html,css,result'
24
+ @skin = (skin unless skin == 'default') || 'light'
25
+ @width = width || '100%'
26
+ @height = height || '300px'
27
+ end
28
+ end
29
+
30
+ def render(context)
31
+ if @fiddle
32
+ "<iframe style=\"width: #{@width}; height: #{@height}\" src=\"http://jsfiddle.net/#{@fiddle}/embedded/#{@sequence}/#{@skin}/\"></iframe>"
33
+ else
34
+ "Error processing input, expected syntax: {% jsfiddle shorttag [tabs] [skin] [height] [width] %}"
35
+ end
36
+ end
37
+ end
38
+ end
39
+
40
+ Liquid::Template.register_tag('jsfiddle', Jekyll::JsFiddle)