majek 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjgwM2QwZTU3OGQyNjFhNmYwMzgxOWY1NDc0YzZkOWEyNjQyYjllMw==
4
+ NDQ3Nzk2MmIwNGMxYjJkZmZkMmJhMjkxMTI4YjJiYmQ5YzQwMTgwZA==
5
5
  data.tar.gz: !binary |-
6
- OWEzZDI3NmVhM2NkZGNkMWZjMmYxYmQ3YzdmYzgyNmRiZGY5ODk4OA==
6
+ ZDYxOWE1ZDEzNDMxOTA0N2FiZWU2ODg3YjY0ODUzYWU0ZThiZTFiOA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ODBlZmJjNWE2NGE2ODg2NzBlNDQ2MGZhZDdkZmQ1YzMwM2EyNzlhYmQyOTE0
10
- MDgyMGVjNTY4YzIzNmQ3YjhlNjM5NDgyMzEzODU2MDFjNDI1NmYyOTlmZGRl
11
- ZGNmZGIzODk0OWM4YThkZDlhNzY2NDJkMjZiNzg2Mjk4N2IyYzA=
9
+ YjUyN2UzN2U3NTJjNzc3NWJkYTczZTk0YjM5OWI1MDlkNTlmNzdkNGU0YWIw
10
+ ODU5NmJiZWFkZTczYjU1MmJkYTc3NTI3YTRhMmI4M2FjYWEwMDBkMjcwNzBk
11
+ ZTMyMzZjMjE4ZDk1ZmIxNDJmOWJiZTU1NTJlNzFmYTEwMGI0YmY=
12
12
  data.tar.gz: !binary |-
13
- MWY0N2E5ODhjNTc1MTgxMjA0MmE2YTJmNTZmMGVhNjVhYzc1NjVhYTc5ODE5
14
- YmI0OTBhM2RlMTdmODkxYThlOGExMTJhMDE0ZjVlMDhkYzFkZjU3Zjk3NzBh
15
- ZjAxZDY1MDg5YjdkNmMyOWRmMzcyNWU1ZmQ3OWI5NmQwYWU1YzU=
13
+ MDc0MzdhMjY1YTNhOTI4YTRhMTNlZTUzYWQ5NTZmZjk4N2EyZmIxMGFjMmNk
14
+ M2Q5YjRlOGEwNjUxOTE5NjY3OWZmYjUzNjllNjMxZDdiNTUwNDZmNmVmOTVl
15
+ NjJiOGZiNzg1NzE0Mjc0ODZjMTU0YjQzM2UyZDg4NzhkM2M1Njc=
@@ -1,3 +1,8 @@
1
+ v0.1.4 (Mar 16 2013)
2
+ --------------------
3
+
4
+ * Update to md_inc v0.3.1 and pin that version.
5
+
1
6
  v0.1.3 (Mar 11 2013)
2
7
  --------------------
3
8
 
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- majek (0.1.3)
5
- md_inc (>= 0.2.9)
4
+ majek (0.1.4)
5
+ md_inc (= 0.3.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- md_inc (0.2.9)
10
+ md_inc (0.3.1)
11
11
  rake (10.0.3)
12
12
 
13
13
  PLATFORMS
@@ -18,8 +18,7 @@ module Majek
18
18
  title = match ? match[1] : 'New Post'
19
19
  content = @markdown.sub(MATCH_TITLE, '').sub(/\n*/, '')
20
20
 
21
- tp = MdInc::TextProcessor.new
22
- tp.root(@base_dir) unless @base_dir.nil?
21
+ tp = MdInc::TextProcessor.new(:base_dir => @base_dir)
23
22
  content = tp.process(content)
24
23
 
25
24
  # TODO make variables configurable
@@ -1,3 +1,3 @@
1
1
  module Majek
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
@@ -1,35 +1,33 @@
1
1
  # Add Jekyll commands to MdInc.
2
2
  module MdInc
3
3
  module Commands
4
- class << self
5
- def jekyll_tag(name, attrs=[], lines=[])
6
- output = []
7
- output << "{% #{([name] + attrs).join(" ")} %}"
8
- unless lines.empty?
9
- output += lines
10
- output << "{% end#{name} %}"
11
- end
12
- output
4
+ def jekyll_tag(name, attrs=[], lines=[])
5
+ output = []
6
+ output << "{% #{([name] + attrs).join(" ")} %}"
7
+ unless lines.empty?
8
+ output += lines
9
+ output << "{% end#{name} %}"
13
10
  end
11
+ output
12
+ end
14
13
 
15
- # Public: Jekyll command to include code that should be highlighted from
16
- # a file.
17
- #
18
- # path - Path to the file to be included.
19
- # language - Language identifier
20
- #
21
- # Examples
22
- #
23
- # .highlight 'snippets/stub-spec.rb', 'ruby'
24
- # # =>
25
- # # {% highlight ruby %}
26
- # # contents of snippets/stub-spec.rb
27
- # # {% endhighlight %}
28
- #
29
- # Returns the Jekyll tag as a String Array.
30
- def highlight(path, language)
31
- jekyll_tag(:highlight, [language], inc(path))
32
- end
14
+ # Public: Jekyll command to include code that should be highlighted from
15
+ # a file.
16
+ #
17
+ # path - Path to the file to be included.
18
+ # language - Language identifier
19
+ #
20
+ # Examples
21
+ #
22
+ # .highlight 'snippets/stub-spec.rb', 'ruby'
23
+ # # =>
24
+ # # {% highlight ruby %}
25
+ # # contents of snippets/stub-spec.rb
26
+ # # {% endhighlight %}
27
+ #
28
+ # Returns the Jekyll tag as a String Array.
29
+ def highlight(path, language)
30
+ jekyll_tag(:highlight, [language], inc(path))
33
31
  end
34
32
  end
35
33
  end
@@ -1,42 +1,40 @@
1
1
  # Add Octopress commands to MdInc.
2
2
  module MdInc
3
3
  module Commands
4
- class << self
5
- # Public: Octopress command to include other files.
6
- #
7
- # path - Path to the file to be included.
8
- # attrs - Array of attributes passed to the Octopress tag.
9
- #
10
- # Examples
11
- #
12
- # .codeblock 'snippets/stub-spec.rb', 'lang:ruby'
13
- # # =>
14
- # # {% codeblock lang:ruby %}
15
- # # contents of snippets/stub-spec.rb
16
- # # {% endcodeblock %}
17
- #
18
- # Returns the Octopress tag as a String Array.
19
- %w(blockquote codeblock pullquote).each do |meth|
20
- define_method(meth) { |path, *attrs| jekyll_tag(meth, attrs, inc(path)) }
21
- end
4
+ # Public: Octopress command to include other files.
5
+ #
6
+ # path - Path to the file to be included.
7
+ # attrs - Array of attributes passed to the Octopress tag.
8
+ #
9
+ # Examples
10
+ #
11
+ # .codeblock 'snippets/stub-spec.rb', 'lang:ruby'
12
+ # # =>
13
+ # # {% codeblock lang:ruby %}
14
+ # # contents of snippets/stub-spec.rb
15
+ # # {% endcodeblock %}
16
+ #
17
+ # Returns the Octopress tag as a String Array.
18
+ %w(blockquote codeblock pullquote).each do |meth|
19
+ define_method(meth) { |path, *attrs| jekyll_tag(meth, attrs, inc(path)) }
20
+ end
22
21
 
23
- # Public: Octopress command that doesn't include anything; only added for
24
- # consistency and convenience.
25
- #
26
- # attrs - Array of attributes passed to the Octopress tag.
27
- #
28
- # Examples
29
- #
30
- # .gist 1234
31
- # # => {% gist 1234 %}
32
- #
33
- # .img 'left', 'http://placekitten.com/320/250', 'Place Kitten #2'
34
- # # => {% img left http://placekitten.com/320/250 Place Kitten #2 %}
35
- #
36
- # Returns the Octopress tag as a String Array.
37
- %w(gist img include_code jsfiddle render_partial video).each do |meth|
38
- define_method(meth) { |*attrs| jekyll_tag(meth, attrs) }
39
- end
22
+ # Public: Octopress command that doesn't include anything; only added for
23
+ # consistency and convenience.
24
+ #
25
+ # attrs - Array of attributes passed to the Octopress tag.
26
+ #
27
+ # Examples
28
+ #
29
+ # .gist 1234
30
+ # # => {% gist 1234 %}
31
+ #
32
+ # .img 'left', 'http://placekitten.com/320/250', 'Place Kitten #2'
33
+ # # => {% img left http://placekitten.com/320/250 Place Kitten #2 %}
34
+ #
35
+ # Returns the Octopress tag as a String Array.
36
+ %w(gist img include_code jsfiddle render_partial video).each do |meth|
37
+ define_method(meth) { |*attrs| jekyll_tag(meth, attrs) }
40
38
  end
41
39
  end
42
40
  end
@@ -16,6 +16,6 @@ Gem::Specification.new do |s|
16
16
  s.require_paths = ['lib']
17
17
  s.version = Majek::VERSION
18
18
 
19
- s.add_dependency 'md_inc', '>= 0.2.9'
19
+ s.add_dependency 'md_inc', '= 0.3.1'
20
20
  s.add_development_dependency 'rake'
21
21
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: majek
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Lafeldt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-11 00:00:00.000000000 Z
11
+ date: 2013-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: md_inc
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.9
19
+ version: 0.3.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.9
26
+ version: 0.3.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  version: '0'
84
84
  requirements: []
85
85
  rubyforge_project:
86
- rubygems_version: 2.0.2
86
+ rubygems_version: 2.0.3
87
87
  signing_key:
88
88
  specification_version: 4
89
89
  summary: A preprocessor for Jekyll blog posts that helps you to concentrate on writing