octopress 3.0.0.alpha1 → 3.0.0.alpha2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (172) hide show
  1. checksums.yaml +8 -8
  2. data/lib/octopress.rb +3 -2
  3. data/lib/octopress/commands/build_jekyll.rb +17 -0
  4. data/lib/octopress/commands/build_stylesheets.rb +1 -1
  5. data/lib/octopress/commands/install.rb +2 -3
  6. data/lib/octopress/commands/new.rb +1 -1
  7. data/lib/octopress/commands/scaffold.rb +3 -2
  8. data/lib/octopress/commands/serve.rb +1 -1
  9. data/lib/octopress/configuration.rb +7 -1
  10. data/lib/octopress/installer.rb +15 -11
  11. data/lib/octopress/{js_asset_manager.rb → js_assets_manager.rb} +0 -1
  12. data/lib/octopress/scaffold/site/config.ru +25 -0
  13. data/lib/octopress/version.rb +1 -1
  14. data/octopress.gemspec +1 -1
  15. metadata +5 -161
  16. data/.themes/classic/.editorconfig +0 -44
  17. data/.themes/classic/_config/adn-timeline.yml +0 -10
  18. data/.themes/classic/_config/delicious-feed.yml +0 -4
  19. data/.themes/classic/_config/deploy/gh_pages.yml +0 -9
  20. data/.themes/classic/_config/deploy/rsync.yml +0 -14
  21. data/.themes/classic/_config/disqus.yml +0 -11
  22. data/.themes/classic/_config/facebook-like.yml +0 -2
  23. data/.themes/classic/_config/gauges-analytics.yml +0 -6
  24. data/.themes/classic/_config/github-repos.yml +0 -24
  25. data/.themes/classic/_config/google-analytics.yml +0 -6
  26. data/.themes/classic/_config/google-plus.yml +0 -13
  27. data/.themes/classic/_config/jekyll.yml +0 -37
  28. data/.themes/classic/_config/pinboard-feed.yml +0 -4
  29. data/.themes/classic/_config/require-js.yml +0 -19
  30. data/.themes/classic/_config/theme.yml +0 -54
  31. data/.themes/classic/_config/twitter-timeline.yml +0 -9
  32. data/.themes/classic/assets/javascripts/lib/ios-rotate-scaling-fix.js +0 -18
  33. data/.themes/classic/assets/javascripts/lib/jquery.cookie.js +0 -92
  34. data/.themes/classic/assets/javascripts/lib/modernizr.js +0 -447
  35. data/.themes/classic/assets/javascripts/lib/octopress.js +0 -83
  36. data/.themes/classic/assets/javascripts/modules/adn-timeline.coffee +0 -68
  37. data/.themes/classic/assets/javascripts/modules/delicious-feed.coffee +0 -38
  38. data/.themes/classic/assets/javascripts/modules/github-repos.coffee +0 -60
  39. data/.themes/classic/assets/javascripts/modules/github.coffee +0 -60
  40. data/.themes/classic/assets/javascripts/modules/helpers.coffee +0 -96
  41. data/.themes/classic/assets/javascripts/modules/pinboard-feed.coffee +0 -42
  42. data/.themes/classic/assets/javascripts/modules/site.coffee +0 -11
  43. data/.themes/classic/assets/stylesheets/_base.scss +0 -5
  44. data/.themes/classic/assets/stylesheets/_partials.scss +0 -8
  45. data/.themes/classic/assets/stylesheets/base/_layout.scss +0 -191
  46. data/.themes/classic/assets/stylesheets/base/_solarized.scss +0 -75
  47. data/.themes/classic/assets/stylesheets/base/_theme.scss +0 -92
  48. data/.themes/classic/assets/stylesheets/base/_typography.scss +0 -168
  49. data/.themes/classic/assets/stylesheets/base/_utilities.scss +0 -27
  50. data/.themes/classic/assets/stylesheets/custom/_colors.scss +0 -49
  51. data/.themes/classic/assets/stylesheets/custom/_fonts.scss +0 -10
  52. data/.themes/classic/assets/stylesheets/custom/_layout.scss +0 -17
  53. data/.themes/classic/assets/stylesheets/custom/_styles.scss +0 -2
  54. data/.themes/classic/assets/stylesheets/partials/_archive.scss +0 -77
  55. data/.themes/classic/assets/stylesheets/partials/_blog.scss +0 -165
  56. data/.themes/classic/assets/stylesheets/partials/_footer.scss +0 -19
  57. data/.themes/classic/assets/stylesheets/partials/_header.scss +0 -18
  58. data/.themes/classic/assets/stylesheets/partials/_navigation.scss +0 -136
  59. data/.themes/classic/assets/stylesheets/partials/_sharing.scss +0 -73
  60. data/.themes/classic/assets/stylesheets/partials/_sidebar.scss +0 -4
  61. data/.themes/classic/assets/stylesheets/partials/_syntax.scss +0 -234
  62. data/.themes/classic/assets/stylesheets/partials/sidebar/_base.scss +0 -106
  63. data/.themes/classic/assets/stylesheets/partials/sidebar/_delicious.scss +0 -4
  64. data/.themes/classic/assets/stylesheets/partials/sidebar/_googleplus.scss +0 -26
  65. data/.themes/classic/assets/stylesheets/partials/sidebar/_pinboard.scss +0 -12
  66. data/.themes/classic/assets/stylesheets/plugins/_plugins.scss +0 -5
  67. data/.themes/classic/assets/stylesheets/screen.scss +0 -11
  68. data/.themes/classic/source/404.markdown +0 -9
  69. data/.themes/classic/source/_includes/after_footer.html +0 -7
  70. data/.themes/classic/source/_includes/archive_post.html +0 -12
  71. data/.themes/classic/source/_includes/article.html +0 -23
  72. data/.themes/classic/source/_includes/comments.html +0 -9
  73. data/.themes/classic/source/_includes/custom/after_footer.html +0 -3
  74. data/.themes/classic/source/_includes/custom/after_page.html +0 -1
  75. data/.themes/classic/source/_includes/custom/after_post.html +0 -0
  76. data/.themes/classic/source/_includes/custom/comments.html +0 -5
  77. data/.themes/classic/source/_includes/custom/footer.html +0 -4
  78. data/.themes/classic/source/_includes/custom/head.html +0 -7
  79. data/.themes/classic/source/_includes/custom/header.html +0 -6
  80. data/.themes/classic/source/_includes/custom/navigation.html +0 -4
  81. data/.themes/classic/source/_includes/custom/page_meta.html +0 -1
  82. data/.themes/classic/source/_includes/custom/post_meta.html +0 -1
  83. data/.themes/classic/source/_includes/custom/sharing.html +0 -3
  84. data/.themes/classic/source/_includes/disqus.html +0 -22
  85. data/.themes/classic/source/_includes/facebook_like.html +0 -10
  86. data/.themes/classic/source/_includes/feed_entry.xml +0 -10
  87. data/.themes/classic/source/_includes/footer.html +0 -1
  88. data/.themes/classic/source/_includes/gauges_analytics.html +0 -15
  89. data/.themes/classic/source/_includes/google_analytics.html +0 -13
  90. data/.themes/classic/source/_includes/google_plus_one.html +0 -9
  91. data/.themes/classic/source/_includes/head.html +0 -33
  92. data/.themes/classic/source/_includes/header.html +0 -1
  93. data/.themes/classic/source/_includes/navigation.html +0 -15
  94. data/.themes/classic/source/_includes/post/author.html +0 -8
  95. data/.themes/classic/source/_includes/post/categories.html +0 -10
  96. data/.themes/classic/source/_includes/post/date.html +0 -15
  97. data/.themes/classic/source/_includes/post/disqus_thread.html +0 -1
  98. data/.themes/classic/source/_includes/post/meta.html +0 -3
  99. data/.themes/classic/source/_includes/post/sharing.html +0 -36
  100. data/.themes/classic/source/_includes/post/title.html +0 -5
  101. data/.themes/classic/source/_includes/post/variables.html +0 -14
  102. data/.themes/classic/source/_includes/sidebars/blog_index_default.html +0 -3
  103. data/.themes/classic/source/_includes/sidebars/page_default.html +0 -4
  104. data/.themes/classic/source/_includes/sidebars/post_default.html +0 -4
  105. data/.themes/classic/source/_includes/sidebars/sections/delicious.html +0 -8
  106. data/.themes/classic/source/_includes/sidebars/sections/github.html +0 -9
  107. data/.themes/classic/source/_includes/sidebars/sections/google_plus.html +0 -5
  108. data/.themes/classic/source/_includes/sidebars/sections/pinboard.html +0 -17
  109. data/.themes/classic/source/_includes/sidebars/sections/recent_posts.html +0 -10
  110. data/.themes/classic/source/_includes/twitter_sharing.html +0 -11
  111. data/.themes/classic/source/_layouts/category_feed.xml +0 -24
  112. data/.themes/classic/source/_layouts/category_index.html +0 -19
  113. data/.themes/classic/source/_layouts/default.html +0 -14
  114. data/.themes/classic/source/_layouts/page.html +0 -34
  115. data/.themes/classic/source/_layouts/post.html +0 -39
  116. data/.themes/classic/source/archives/index.html +0 -20
  117. data/.themes/classic/source/assets/jwplayer/glow/controlbar/background.png +0 -0
  118. data/.themes/classic/source/assets/jwplayer/glow/controlbar/blankButton.png +0 -0
  119. data/.themes/classic/source/assets/jwplayer/glow/controlbar/divider.png +0 -0
  120. data/.themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButton.png +0 -0
  121. data/.themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png +0 -0
  122. data/.themes/classic/source/assets/jwplayer/glow/controlbar/muteButton.png +0 -0
  123. data/.themes/classic/source/assets/jwplayer/glow/controlbar/muteButtonOver.png +0 -0
  124. data/.themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButton.png +0 -0
  125. data/.themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png +0 -0
  126. data/.themes/classic/source/assets/jwplayer/glow/controlbar/pauseButton.png +0 -0
  127. data/.themes/classic/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png +0 -0
  128. data/.themes/classic/source/assets/jwplayer/glow/controlbar/playButton.png +0 -0
  129. data/.themes/classic/source/assets/jwplayer/glow/controlbar/playButtonOver.png +0 -0
  130. data/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png +0 -0
  131. data/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png +0 -0
  132. data/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png +0 -0
  133. data/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png +0 -0
  134. data/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderRail.png +0 -0
  135. data/.themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButton.png +0 -0
  136. data/.themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png +0 -0
  137. data/.themes/classic/source/assets/jwplayer/glow/display/background.png +0 -0
  138. data/.themes/classic/source/assets/jwplayer/glow/display/bufferIcon.png +0 -0
  139. data/.themes/classic/source/assets/jwplayer/glow/display/muteIcon.png +0 -0
  140. data/.themes/classic/source/assets/jwplayer/glow/display/playIcon.png +0 -0
  141. data/.themes/classic/source/assets/jwplayer/glow/dock/button.png +0 -0
  142. data/.themes/classic/source/assets/jwplayer/glow/glow.xml +0 -115
  143. data/.themes/classic/source/assets/jwplayer/glow/playlist/item.png +0 -0
  144. data/.themes/classic/source/assets/jwplayer/glow/playlist/itemOver.png +0 -0
  145. data/.themes/classic/source/assets/jwplayer/glow/playlist/sliderCapBottom.png +0 -0
  146. data/.themes/classic/source/assets/jwplayer/glow/playlist/sliderCapTop.png +0 -0
  147. data/.themes/classic/source/assets/jwplayer/glow/playlist/sliderRail.png +0 -0
  148. data/.themes/classic/source/assets/jwplayer/glow/playlist/sliderThumb.png +0 -0
  149. data/.themes/classic/source/assets/jwplayer/glow/sharing/embedIcon.png +0 -0
  150. data/.themes/classic/source/assets/jwplayer/glow/sharing/embedScreen.png +0 -0
  151. data/.themes/classic/source/assets/jwplayer/glow/sharing/shareIcon.png +0 -0
  152. data/.themes/classic/source/assets/jwplayer/glow/sharing/shareScreen.png +0 -0
  153. data/.themes/classic/source/assets/jwplayer/player.swf +0 -0
  154. data/.themes/classic/source/atom.xml +0 -23
  155. data/.themes/classic/source/images/bird_32_gray.png +0 -0
  156. data/.themes/classic/source/images/bird_32_gray_fail.png +0 -0
  157. data/.themes/classic/source/images/code_bg.png +0 -0
  158. data/.themes/classic/source/images/dotted-border.png +0 -0
  159. data/.themes/classic/source/images/email.png +0 -0
  160. data/.themes/classic/source/images/icon/facebook.png +0 -0
  161. data/.themes/classic/source/images/icon/github.png +0 -0
  162. data/.themes/classic/source/images/icon/googleplus.png +0 -0
  163. data/.themes/classic/source/images/icon/twitter-bird.png +0 -0
  164. data/.themes/classic/source/images/icon/twitter.png +0 -0
  165. data/.themes/classic/source/images/line-tile.png +0 -0
  166. data/.themes/classic/source/images/noise.png +0 -0
  167. data/.themes/classic/source/images/rss.png +0 -0
  168. data/.themes/classic/source/images/search.png +0 -0
  169. data/.themes/classic/source/index.html +0 -30
  170. data/.themes/classic/source/javascripts/jquery.min.js +0 -5
  171. data/.themes/classic/source/octopress-favicon.png +0 -0
  172. data/.themes/classic/source/robots.txt +0 -7
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGU3YzUxN2ZkMjk0ZDU5N2VhMWNiNzQ1MDE2OGQ2ZDhiYmZiOTBlNQ==
4
+ MzIyMmUzODkxNzk0ODFlYjlhZmVhYTUzMjE2ZmNlNjVmYTdiMGMwZA==
5
5
  data.tar.gz: !binary |-
6
- MTAyMjQxMmQ4NWJlZDU2MDlkYTEzODkyYWI1OGZmOThjZGM4ODZlMg==
6
+ NTIwYzkxODI5ZTI5Y2M5MTliZTBkNTJlODE1ODI0YWEyOWFjZTdjNA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZjkzYjgyZDUyZmVkZDk1OGIxMTJkOTE4ZGMwMDc4NDAzYmMzYzI1MGJhYWU5
10
- OGNlNzVkMzFjMzIwNmMxYTFmZTc4YWZmNDJkMDM3ODQwNzBiNmEwZDA4ODY3
11
- ZTU5ZWU3YTM4MDI4MzA2OTE2MDU2NDUwNDE5MTMxMjI3NDNiZjc=
9
+ Nzg4YTgwYWZkMmNlYWZmYTZiN2VhNmJjNzQzZGM2MDFkNWZkN2Q2YjI0ZDFi
10
+ NjNmZjQ4YzcyZWY3NGNhNWMwMWNmZGE0NThkOTNjYjgxOTg2NmYyZjA5MDM0
11
+ YWE4MTJkNDc3Y2E0YzI0NjVjMGNjOWVjY2FhNzQ1NDdiY2VjODA=
12
12
  data.tar.gz: !binary |-
13
- MWFjMWFhZWMxNzQwNGFlNzZmYzM5MTU3ZGFlMGFiZDliMDU0MzU3YTg5OTI4
14
- NzZmMjk2NTRiNTY4MzlmYWFlZWY1OWRlNDM2NjYyMDUzMjdhMmE0ZjhhZjgw
15
- YTU2YTE2NzNhZTdkNzU2NWQxODBiNTQ3MDQwMWZlNDUwNzYwNDM=
13
+ OTE5YzI3NzYwOTg4YTdlMjczNWRkZGE1NWZhNmY1MjIzODVmZTU0OTQ2ZjAw
14
+ NDkyMThmOWNhMDEyMmY0MDE2M2E1NDJhY2U2MGY5MDQ3YWMyMWExZGViZTMy
15
+ MjU5NzU1ZjBiZjllMjE5YTkyOWI0NjA1NWI3YWViMWM0NjJhZWM=
data/lib/octopress.rb CHANGED
@@ -22,10 +22,11 @@ require "octopress/helpers/titlecase"
22
22
  module Octopress
23
23
  autoload :Configuration, 'octopress/configuration'
24
24
  autoload :Ink, 'octopress/ink'
25
+ autoload :Installer, 'octopress/installer'
25
26
  autoload :Formatters, 'octopress/formatters'
26
27
  autoload :InquirableString, 'octopress/inquirable_string'
27
28
  autoload :DependencyInstaller, 'octopress/dependency_installer'
28
- autoload :JsAssetManager, 'octopress/js_asset_manager'
29
+ autoload :JSAssetsManager, 'octopress/js_assets_manager'
29
30
  autoload :Command, 'octopress/command'
30
31
  autoload :Commands, 'octopress/commands'
31
32
  autoload :Rake, 'octopress/rake'
@@ -42,7 +43,7 @@ module Octopress
42
43
  #
43
44
  # Returns the absolute path of the main octopress installation
44
45
  def self.root
45
- File.dirname(lib_root)
46
+ Dir.pwd
46
47
  end
47
48
 
48
49
  # Static: Fetches the Octopress environment
@@ -19,6 +19,23 @@ module Octopress
19
19
  def jekyll_flags
20
20
  Octopress.env.production? ? "" : "--drafts --trace"
21
21
  end
22
+
23
+ def get_unpublished(posts, options = {})
24
+ result = ""
25
+ message = options[:message] || "These Posts will not be published:"
26
+ posts.sort.each do |post|
27
+ file = File.read(post)
28
+ data = YAML.load file.match(/(^-{3}\n)(.+?)(\n-{3})/m)[2]
29
+
30
+ if options[:env] == 'production'
31
+ future = Time.now < Time.parse(data['date'].to_s) ? "future date: #{data['date']}" : false
32
+ end
33
+ draft = data['published'] == false ? 'published: false' : false
34
+ result << "- #{data['title']} (#{draft or future})\n" if draft or future
35
+ end
36
+ result = "#{message}\n" + result unless result.empty?
37
+ result
38
+ end
22
39
  end
23
40
  end
24
41
  end
@@ -1,6 +1,6 @@
1
1
  module Octopress
2
2
  module Commands
3
- class Build < Command
3
+ class BuildStylesheets < Command
4
4
  class << self
5
5
  def process(args, options)
6
6
  if Dir.exists?("stylesheets")
@@ -6,10 +6,9 @@ module Octopress
6
6
  raise "Please specify at least one plugin to install." if args.nil? || args.empty?
7
7
 
8
8
  plugin_name = args[0]
9
- require_plugin(plugin_name)
9
+ require_plugin(rubyify(plugin_name))
10
10
 
11
- # Essentially doing: 'Adn::Installer.new.install':
12
- Object.const_get(classify(plugin_name))::Installer.new.install
11
+ Octopress::Installer.new(rubyify(plugin_name)).install
13
12
  end
14
13
 
15
14
  def require_plugin(plugin_name)
@@ -3,7 +3,7 @@ module Octopress
3
3
  class New < Command
4
4
  class << self
5
5
  def process(args = nil, options = nil)
6
- source = File.join(Octopress.root, 'lib/octopress/scaffold/site')
6
+ source = File.join(Octopress.lib_root, 'octopress/scaffold/site')
7
7
  destination = process_args(args)
8
8
  FileUtils.cp_r "#{source}/.", "#{destination}/"
9
9
  end
@@ -36,7 +36,7 @@ module Octopress
36
36
  FileUtils.mkdir("lib/#{ruby_name(plugin_name)}")
37
37
  FileUtils.cp(scaffold_file("Rakefile"), "Rakefile")
38
38
  FileUtils.cp(scaffold_file("plugin-name.gemspec"), "#{plugin_name}.gemspec")
39
- File.open("MANIFEST.yml", "w") { |f| f.write(plugin_yaml(plugin_name)) }
39
+ File.open("MANIFEST.yml", "w") { |f| f.write(plugin_yaml(plugin_name, type)) }
40
40
  File.open("lib/#{ruby_name(plugin_name)}.rb", "w") do |f|
41
41
  f.puts "require 'octopress'"
42
42
  f.puts
@@ -56,10 +56,11 @@ module Octopress
56
56
  plugin_name.gsub(/-/, '_')
57
57
  end
58
58
 
59
- def plugin_yaml(plugin_name)
59
+ def plugin_yaml(plugin_name, type)
60
60
  plugin_data = {
61
61
  "name" => plugin_name,
62
62
  "slug" => plugin_name,
63
+ "type" => type,
63
64
  "version" => "0.0.1",
64
65
  "description" => "TODO- Add your description",
65
66
  "summary" => "TODO- Add your summary",
@@ -8,7 +8,7 @@ module Octopress
8
8
  end
9
9
 
10
10
  def serve(args, options)
11
- guardPid = Process.spawn("guard --guardfile #{Octopress.root}/lib/octopress/guardfile")
11
+ guardPid = Process.spawn("guard --guardfile #{Octopress.lib_root}/octopress/guardfile")
12
12
  puts "Starting Rack, serving to http://#{Octopress.configuration[:server_host]}:#{Octopress.configuration[:port]}"
13
13
  rackupPid = Process.spawn("rackup --host #{Octopress.configuration[:server_host]} --port #{Octopress.configuration[:port]}")
14
14
 
@@ -149,7 +149,13 @@ module Octopress
149
149
  permalink: '/:year/:month/:day/:title/',
150
150
  source: 'source', # source file directory
151
151
  destination: 'public', # compiled site directory
152
- plugins: ['lib/octopress/liquid_helpers', 'lib/octopress/filters', 'lib/octopress/tags', 'lib/octopress/generators', 'plugins'],
152
+ plugins: [
153
+ "#{Octopress.lib_root}/octopress/liquid_helpers",
154
+ "#{Octopress.lib_root}/octopress/filters",
155
+ "#{Octopress.lib_root}/octopress/tags",
156
+ "#{Octopress.lib_root}/octopress/generators",
157
+ "plugins"
158
+ ],
153
159
  code_dir: 'downloads/code',
154
160
  category_dir: 'categories',
155
161
  include: ['.htaccess'],
@@ -3,16 +3,16 @@ module Octopress
3
3
 
4
4
  OCTO_DIRS = {
5
5
  "configs" => "config",
6
- "includes" => "source/_includes",
7
- "layouts" => "source/_layouts",
8
6
  "javascripts/lib" => "javascripts/lib",
9
7
  "javascripts/modules" => "javascripts/modules",
10
8
  "source" => "source",
9
+ "includes" => "source/_includes",
10
+ "layouts" => "source/_layouts",
11
11
  "stylesheets" => "stylesheets",
12
12
  "plugins" => "plugins"
13
13
  }
14
14
 
15
- def initalize(plugin_name)
15
+ def initialize(plugin_name)
16
16
  begin
17
17
  require "#{plugin_name}"
18
18
  rescue LoadError
@@ -29,7 +29,7 @@ module Octopress
29
29
  end
30
30
 
31
31
  def type
32
- manifest_yml.fetch('type') || "plugin"
32
+ manifest_yml.fetch('type', 'plugin')
33
33
  end
34
34
 
35
35
  def theme?
@@ -49,7 +49,11 @@ module Octopress
49
49
  ####################
50
50
 
51
51
  def namespace?(subdir)
52
- plugin? && !%w[javascripts/lib source].include?(subdir)
52
+ !%w[javascripts/lib source].include?(subdir)
53
+ end
54
+
55
+ def stylesheets?(subdir)
56
+ "stylesheets" == subdir
53
57
  end
54
58
 
55
59
  def source(*subdirs)
@@ -58,9 +62,9 @@ module Octopress
58
62
 
59
63
  def local(subdir)
60
64
  dir = File.join(Octopress.root, subdir)
61
- dir = File.join(dir, "plugins") if subdir == "stylesheets" && plugin?
62
- dir = File.join(dir, "theme") if subdir == "stylesheets" && theme?
63
- dir = File.join(dir, plugin_slug) if namespace?
65
+ dir = File.join(dir, "plugins") if stylesheets?(subdir) && plugin?
66
+ dir = File.join(dir, "theme") if stylesheets?(subdir) && theme?
67
+ dir = File.join(dir, plugin_slug) if namespace?(subdir)
64
68
  dir
65
69
  end
66
70
 
@@ -70,11 +74,11 @@ module Octopress
70
74
 
71
75
  def install
72
76
  OCTO_DIRS.each do |source_dir, local_dir|
73
- install(source_dir, local_dir)
77
+ _install(source_dir, local_dir)
74
78
  end
75
79
  end
76
80
 
77
- def install(source_dir, local_dir)
81
+ def _install(source_dir, local_dir)
78
82
  FileUtils.mkdir_p local(local_dir), verbose: @verbose
79
83
  FileUtils.cp_r source(source_dir), local(local_dir), verbose: @verbose
80
84
  end
@@ -85,7 +89,7 @@ module Octopress
85
89
  rescue Errno::ENOENT
86
90
  Octopress.logger.error "The plugin '#{@plugin_name}' doesn't seem to have a " +
87
91
  "MANIFEST.yml file and thus isn't a valid Octopress plugin."
88
- raise StandardError
92
+ raise LoadError
89
93
  end
90
94
 
91
95
  end
@@ -1,4 +1,3 @@
1
- $:.unshift File.expand_path(File.dirname(__FILE__)) # For use/testing when no gem is installed
2
1
  require 'digest/md5'
3
2
  require 'stitch-rb'
4
3
  require 'uglifier'
@@ -0,0 +1,25 @@
1
+ require 'bundler/setup'
2
+ require 'sinatra/base'
3
+
4
+ # The project root directory
5
+ $root = ::File.dirname(__FILE__)
6
+
7
+ class SinatraStaticServer < Sinatra::Base
8
+
9
+ get(/.+/) do
10
+ send_sinatra_file(request.path) {404}
11
+ end
12
+
13
+ not_found do
14
+ send_file(File.join(File.dirname(__FILE__), 'public', '404.html'), {:status => 404})
15
+ end
16
+
17
+ def send_sinatra_file(path, &missing_file_block)
18
+ file_path = File.join(File.dirname(__FILE__), 'public', path)
19
+ file_path = File.join(file_path, 'index.html') unless file_path =~ /\.[a-z]+$/i
20
+ File.exist?(file_path) ? send_file(file_path) : missing_file_block.call
21
+ end
22
+
23
+ end
24
+
25
+ run SinatraStaticServer
@@ -1,3 +1,3 @@
1
1
  module Octopress
2
- VERSION = '3.0.0.alpha1'
2
+ VERSION = '3.0.0.alpha2'
3
3
  end
data/octopress.gemspec CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.add_runtime_dependency('RedCloth', '~> 4.2.9')
29
29
  spec.add_runtime_dependency('haml', '~> 3.1.7')
30
30
  spec.add_runtime_dependency('compass', '~> 0.12.2')
31
- spec.add_runtime_dependency('sass-globbing', '~> 1.0.0')
31
+ spec.add_runtime_dependency('sass-globbing', '~> 1.1.0')
32
32
  spec.add_runtime_dependency('rubypants', '~> 0.2.0')
33
33
  spec.add_runtime_dependency('stringex', '~> 1.4.0')
34
34
  spec.add_runtime_dependency('liquid', '~> 2.3.0')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.alpha1
4
+ version: 3.0.0.alpha2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
@@ -115,14 +115,14 @@ dependencies:
115
115
  requirements:
116
116
  - - ~>
117
117
  - !ruby/object:Gem::Version
118
- version: 1.0.0
118
+ version: 1.1.0
119
119
  type: :runtime
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - ~>
124
124
  - !ruby/object:Gem::Version
125
- version: 1.0.0
125
+ version: 1.1.0
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: rubypants
128
128
  requirement: !ruby/object:Gem::Requirement
@@ -408,163 +408,6 @@ files:
408
408
  - .rspec
409
409
  - .rubocop.yml
410
410
  - .slugignore
411
- - .themes/classic/.editorconfig
412
- - .themes/classic/_config/adn-timeline.yml
413
- - .themes/classic/_config/delicious-feed.yml
414
- - .themes/classic/_config/deploy/gh_pages.yml
415
- - .themes/classic/_config/deploy/rsync.yml
416
- - .themes/classic/_config/disqus.yml
417
- - .themes/classic/_config/facebook-like.yml
418
- - .themes/classic/_config/gauges-analytics.yml
419
- - .themes/classic/_config/github-repos.yml
420
- - .themes/classic/_config/google-analytics.yml
421
- - .themes/classic/_config/google-plus.yml
422
- - .themes/classic/_config/jekyll.yml
423
- - .themes/classic/_config/pinboard-feed.yml
424
- - .themes/classic/_config/require-js.yml
425
- - .themes/classic/_config/theme.yml
426
- - .themes/classic/_config/twitter-timeline.yml
427
- - .themes/classic/assets/javascripts/lib/ios-rotate-scaling-fix.js
428
- - .themes/classic/assets/javascripts/lib/jquery.cookie.js
429
- - .themes/classic/assets/javascripts/lib/modernizr.js
430
- - .themes/classic/assets/javascripts/lib/octopress.js
431
- - .themes/classic/assets/javascripts/modules/adn-timeline.coffee
432
- - .themes/classic/assets/javascripts/modules/delicious-feed.coffee
433
- - .themes/classic/assets/javascripts/modules/github-repos.coffee
434
- - .themes/classic/assets/javascripts/modules/github.coffee
435
- - .themes/classic/assets/javascripts/modules/helpers.coffee
436
- - .themes/classic/assets/javascripts/modules/pinboard-feed.coffee
437
- - .themes/classic/assets/javascripts/modules/site.coffee
438
- - .themes/classic/assets/stylesheets/_base.scss
439
- - .themes/classic/assets/stylesheets/_partials.scss
440
- - .themes/classic/assets/stylesheets/base/_layout.scss
441
- - .themes/classic/assets/stylesheets/base/_solarized.scss
442
- - .themes/classic/assets/stylesheets/base/_theme.scss
443
- - .themes/classic/assets/stylesheets/base/_typography.scss
444
- - .themes/classic/assets/stylesheets/base/_utilities.scss
445
- - .themes/classic/assets/stylesheets/custom/_colors.scss
446
- - .themes/classic/assets/stylesheets/custom/_fonts.scss
447
- - .themes/classic/assets/stylesheets/custom/_layout.scss
448
- - .themes/classic/assets/stylesheets/custom/_styles.scss
449
- - .themes/classic/assets/stylesheets/partials/_archive.scss
450
- - .themes/classic/assets/stylesheets/partials/_blog.scss
451
- - .themes/classic/assets/stylesheets/partials/_footer.scss
452
- - .themes/classic/assets/stylesheets/partials/_header.scss
453
- - .themes/classic/assets/stylesheets/partials/_navigation.scss
454
- - .themes/classic/assets/stylesheets/partials/_sharing.scss
455
- - .themes/classic/assets/stylesheets/partials/_sidebar.scss
456
- - .themes/classic/assets/stylesheets/partials/_syntax.scss
457
- - .themes/classic/assets/stylesheets/partials/sidebar/_base.scss
458
- - .themes/classic/assets/stylesheets/partials/sidebar/_delicious.scss
459
- - .themes/classic/assets/stylesheets/partials/sidebar/_googleplus.scss
460
- - .themes/classic/assets/stylesheets/partials/sidebar/_pinboard.scss
461
- - .themes/classic/assets/stylesheets/plugins/_plugins.scss
462
- - .themes/classic/assets/stylesheets/screen.scss
463
- - .themes/classic/source/404.markdown
464
- - .themes/classic/source/_includes/after_footer.html
465
- - .themes/classic/source/_includes/archive_post.html
466
- - .themes/classic/source/_includes/article.html
467
- - .themes/classic/source/_includes/comments.html
468
- - .themes/classic/source/_includes/custom/after_footer.html
469
- - .themes/classic/source/_includes/custom/after_page.html
470
- - .themes/classic/source/_includes/custom/after_post.html
471
- - .themes/classic/source/_includes/custom/comments.html
472
- - .themes/classic/source/_includes/custom/footer.html
473
- - .themes/classic/source/_includes/custom/head.html
474
- - .themes/classic/source/_includes/custom/header.html
475
- - .themes/classic/source/_includes/custom/navigation.html
476
- - .themes/classic/source/_includes/custom/page_meta.html
477
- - .themes/classic/source/_includes/custom/post_meta.html
478
- - .themes/classic/source/_includes/custom/sharing.html
479
- - .themes/classic/source/_includes/disqus.html
480
- - .themes/classic/source/_includes/facebook_like.html
481
- - .themes/classic/source/_includes/feed_entry.xml
482
- - .themes/classic/source/_includes/footer.html
483
- - .themes/classic/source/_includes/gauges_analytics.html
484
- - .themes/classic/source/_includes/google_analytics.html
485
- - .themes/classic/source/_includes/google_plus_one.html
486
- - .themes/classic/source/_includes/head.html
487
- - .themes/classic/source/_includes/header.html
488
- - .themes/classic/source/_includes/navigation.html
489
- - .themes/classic/source/_includes/post/author.html
490
- - .themes/classic/source/_includes/post/categories.html
491
- - .themes/classic/source/_includes/post/date.html
492
- - .themes/classic/source/_includes/post/disqus_thread.html
493
- - .themes/classic/source/_includes/post/meta.html
494
- - .themes/classic/source/_includes/post/sharing.html
495
- - .themes/classic/source/_includes/post/title.html
496
- - .themes/classic/source/_includes/post/variables.html
497
- - .themes/classic/source/_includes/sidebars/blog_index_default.html
498
- - .themes/classic/source/_includes/sidebars/page_default.html
499
- - .themes/classic/source/_includes/sidebars/post_default.html
500
- - .themes/classic/source/_includes/sidebars/sections/delicious.html
501
- - .themes/classic/source/_includes/sidebars/sections/github.html
502
- - .themes/classic/source/_includes/sidebars/sections/google_plus.html
503
- - .themes/classic/source/_includes/sidebars/sections/pinboard.html
504
- - .themes/classic/source/_includes/sidebars/sections/recent_posts.html
505
- - .themes/classic/source/_includes/twitter_sharing.html
506
- - .themes/classic/source/_layouts/category_feed.xml
507
- - .themes/classic/source/_layouts/category_index.html
508
- - .themes/classic/source/_layouts/default.html
509
- - .themes/classic/source/_layouts/page.html
510
- - .themes/classic/source/_layouts/post.html
511
- - .themes/classic/source/archives/index.html
512
- - .themes/classic/source/assets/jwplayer/glow/controlbar/background.png
513
- - .themes/classic/source/assets/jwplayer/glow/controlbar/blankButton.png
514
- - .themes/classic/source/assets/jwplayer/glow/controlbar/divider.png
515
- - .themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButton.png
516
- - .themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png
517
- - .themes/classic/source/assets/jwplayer/glow/controlbar/muteButton.png
518
- - .themes/classic/source/assets/jwplayer/glow/controlbar/muteButtonOver.png
519
- - .themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButton.png
520
- - .themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png
521
- - .themes/classic/source/assets/jwplayer/glow/controlbar/pauseButton.png
522
- - .themes/classic/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png
523
- - .themes/classic/source/assets/jwplayer/glow/controlbar/playButton.png
524
- - .themes/classic/source/assets/jwplayer/glow/controlbar/playButtonOver.png
525
- - .themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png
526
- - .themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png
527
- - .themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png
528
- - .themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png
529
- - .themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderRail.png
530
- - .themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButton.png
531
- - .themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png
532
- - .themes/classic/source/assets/jwplayer/glow/display/background.png
533
- - .themes/classic/source/assets/jwplayer/glow/display/bufferIcon.png
534
- - .themes/classic/source/assets/jwplayer/glow/display/muteIcon.png
535
- - .themes/classic/source/assets/jwplayer/glow/display/playIcon.png
536
- - .themes/classic/source/assets/jwplayer/glow/dock/button.png
537
- - .themes/classic/source/assets/jwplayer/glow/glow.xml
538
- - .themes/classic/source/assets/jwplayer/glow/playlist/item.png
539
- - .themes/classic/source/assets/jwplayer/glow/playlist/itemOver.png
540
- - .themes/classic/source/assets/jwplayer/glow/playlist/sliderCapBottom.png
541
- - .themes/classic/source/assets/jwplayer/glow/playlist/sliderCapTop.png
542
- - .themes/classic/source/assets/jwplayer/glow/playlist/sliderRail.png
543
- - .themes/classic/source/assets/jwplayer/glow/playlist/sliderThumb.png
544
- - .themes/classic/source/assets/jwplayer/glow/sharing/embedIcon.png
545
- - .themes/classic/source/assets/jwplayer/glow/sharing/embedScreen.png
546
- - .themes/classic/source/assets/jwplayer/glow/sharing/shareIcon.png
547
- - .themes/classic/source/assets/jwplayer/glow/sharing/shareScreen.png
548
- - .themes/classic/source/assets/jwplayer/player.swf
549
- - .themes/classic/source/atom.xml
550
- - .themes/classic/source/images/bird_32_gray.png
551
- - .themes/classic/source/images/bird_32_gray_fail.png
552
- - .themes/classic/source/images/code_bg.png
553
- - .themes/classic/source/images/dotted-border.png
554
- - .themes/classic/source/images/email.png
555
- - .themes/classic/source/images/icon/facebook.png
556
- - .themes/classic/source/images/icon/github.png
557
- - .themes/classic/source/images/icon/googleplus.png
558
- - .themes/classic/source/images/icon/twitter-bird.png
559
- - .themes/classic/source/images/icon/twitter.png
560
- - .themes/classic/source/images/line-tile.png
561
- - .themes/classic/source/images/noise.png
562
- - .themes/classic/source/images/rss.png
563
- - .themes/classic/source/images/search.png
564
- - .themes/classic/source/index.html
565
- - .themes/classic/source/javascripts/jquery.min.js
566
- - .themes/classic/source/octopress-favicon.png
567
- - .themes/classic/source/robots.txt
568
411
  - .travis.yml
569
412
  - CHANGELOG.markdown
570
413
  - CONTRIBUTING.markdown
@@ -604,7 +447,7 @@ files:
604
447
  - lib/octopress/ink.rb
605
448
  - lib/octopress/inquirable_string.rb
606
449
  - lib/octopress/installer.rb
607
- - lib/octopress/js_asset_manager.rb
450
+ - lib/octopress/js_assets_manager.rb
608
451
  - lib/octopress/liquid_helpers/conditional.rb
609
452
  - lib/octopress/liquid_helpers/config.rb
610
453
  - lib/octopress/liquid_helpers/include.rb
@@ -614,6 +457,7 @@ files:
614
457
  - lib/octopress/rake.rb
615
458
  - lib/octopress/scaffold/.gitignore
616
459
  - lib/octopress/scaffold/site/Gemfile
460
+ - lib/octopress/scaffold/site/config.ru
617
461
  - lib/octopress/scaffold/site/config/compass.rb
618
462
  - lib/octopress/scaffold/site/config/rack.rb
619
463
  - lib/octopress/scaffold/site/config/site.yml