moft 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,7 +32,9 @@ module Moft
32
32
  # Returns nothing.
33
33
  def self.watch(site, options)
34
34
  require 'directory_watcher'
35
-
35
+ Moft::Logger.info "Move to Source:", options['source']
36
+ Dir.chdir(options['source'])
37
+
36
38
  source = options['source']
37
39
  destination = options['destination']
38
40
 
@@ -27,12 +27,10 @@ module Moft
27
27
  #
28
28
  # Returns nothing.
29
29
  def read_yaml(base, name)
30
-
31
30
  begin
32
31
  self.content = File.read(File.join(base, name))
33
-
34
32
  if self.content =~ /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m
35
- self.content = $POSTMATCH
33
+ self.content = $'
36
34
  self.data = YAML.safe_load($1)
37
35
  end
38
36
  rescue SyntaxError => e
@@ -40,6 +38,7 @@ module Moft
40
38
  rescue Exception => e
41
39
  puts "Error reading file #{File.join(base, name)}: #{e.message}"
42
40
  end
41
+
43
42
  self.data ||= {}
44
43
  end
45
44
 
@@ -122,8 +121,6 @@ module Moft
122
121
  info = { :filters => [Moft::Filters], :registers => { :site => self.site, :page => payload['page'] } }
123
122
 
124
123
  # render and transform content (this becomes the final content of the object)
125
- payload["pygments_prefix"] = converter.pygments_prefix
126
- payload["pygments_suffix"] = converter.pygments_suffix
127
124
 
128
125
  self.content = self.render_liquid(self.content,
129
126
  payload.merge({:file => self.name}),
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
 
6
6
  s.name = 'moft'
7
- s.version = '1.0.3'
7
+ s.version = '1.0.4'
8
8
  s.license = 'MIT'
9
9
  s.date = '2013-05-08'
10
10
  s.rubyforge_project = 'moft'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moft
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: