mdify 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -35,6 +35,17 @@ Then create a new hook for the Markdown mode:
35
35
 
36
36
  Now you can press F5 inside any Markdown document to automatically preview it in your browser.
37
37
 
38
+ If you are using RVM to manage your rubies then you will need to instruct Emacs to play nice with
39
+ it. To do this:
40
+
41
+ 1. Download [rvm.el](https://github.com/senny/rvm.el) and save it in your Emacs load path.
42
+ 2. Require it and set your Ruby version:
43
+
44
+ (require 'rvm)
45
+ (rvm-use-default)
46
+
47
+ 3. You should now be able to use the hook mentioned above.
48
+
38
49
  Stylesheet
39
50
  ----
40
51
  The pretty styles are provided by Twitter's [Bootstrap](http://twitter.github.com/bootstrap/)
data/lib/mdify.rb CHANGED
@@ -1,11 +1,12 @@
1
1
  require 'rubygems'
2
2
  require 'tempfile'
3
3
  require 'redcarpet'
4
+ require 'launchy'
4
5
 
5
6
  require 'mdify/renderer'
6
7
 
7
8
  module Mdify
8
- VERSION = "0.1"
9
+ VERSION = "0.2"
9
10
 
10
11
  def self.preview(filename)
11
12
  Renderer.new(filename).render
@@ -13,7 +13,7 @@ module Mdify
13
13
  html = Redcarpet.new(@content).to_html
14
14
  document = render_html(@title, html)
15
15
  temp_file = create_temp_file(document)
16
- exec "open #{temp_file}"
16
+ exec "launchy #{temp_file}"
17
17
  end
18
18
 
19
19
  def render_html(title, html)
data/mdify.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  ## If your rubyforge_project name is different, then edit it and comment out
8
8
  ## the sub! line in the Rakefile
9
9
  s.name = 'mdify'
10
- s.version = '0.1'
10
+ s.version = '0.2'
11
11
  s.date = '2011-11-28'
12
12
  s.rubyforge_project = 'mdify'
13
13
 
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  ## better to set the email to an email list or something. If you don't have
21
21
  ## a custom homepage, consider using your GitHub URL or the like.
22
22
  s.authors = ["Federico Builes"]
23
- s.email = 'federico@mheroin.com'
23
+ s.email = 'federico.builes@gmail.com'
24
24
  s.homepage = 'http://github.com/febuiles/mdify'
25
25
 
26
26
  ## This gets added to the $LOAD_PATH so that 'lib/NAME.rb' can be required as
@@ -33,10 +33,11 @@ Gem::Specification.new do |s|
33
33
  ## List your runtime dependencies here. Runtime dependencies are those
34
34
  ## that are needed for an end user to actually USE your code.
35
35
  s.add_dependency("redcarpet")
36
+ s.add_dependency("launchy")
36
37
 
37
38
  ## List your development dependencies here. Development dependencies are
38
39
  ## those that are only needed during development
39
- # s.add_development_dependency('DEVDEPNAME', [">= 1.1.0", "< 2.0.0"])
40
+
40
41
 
41
42
  ## Leave this section as-is. It will be automatically generated from the
42
43
  ## contents of your Git repository via the gemspec task. DO NOT REMOVE
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdify
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- version: "0.1"
8
+ - 2
9
+ version: "0.2"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Federico Builes
@@ -30,8 +30,22 @@ dependencies:
30
30
  version: "0"
31
31
  type: :runtime
32
32
  version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
34
+ name: launchy
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ hash: 3
42
+ segments:
43
+ - 0
44
+ version: "0"
45
+ type: :runtime
46
+ version_requirements: *id002
33
47
  description: mdify is a tool for previewing Markdown documents right in your browser, with a nice stylesheet.
34
- email: federico@mheroin.com
48
+ email: federico.builes@gmail.com
35
49
  executables:
36
50
  - mdify
37
51
  extensions: []