mdify 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.md +3 -2
  2. data/bin/mdify +17 -1
  3. data/lib/mdify.rb +1 -1
  4. data/mdify.gemspec +2 -2
  5. metadata +4 -4
data/README.md CHANGED
@@ -41,8 +41,9 @@ it. To do this:
41
41
  1. Download [rvm.el](https://github.com/senny/rvm.el) and save it in your Emacs load path.
42
42
  2. Require it and set your Ruby version:
43
43
 
44
- (require 'rvm)
45
- (rvm-use-default)
44
+ `(require 'rvm)`
45
+
46
+ `(rvm-use-default)`
46
47
 
47
48
  3. You should now be able to use the hook mentioned above.
48
49
 
data/bin/mdify CHANGED
@@ -4,4 +4,20 @@ lib_dir = File.join(File.dirname(__FILE__), '..', 'lib')
4
4
  $LOAD_PATH.unshift lib_dir if File.directory?(lib_dir)
5
5
 
6
6
  require 'mdify'
7
- Mdify.preview(ARGV.first)
7
+
8
+ def print_usage
9
+ puts "usage: mdify file"
10
+ exit(-1)
11
+ end
12
+
13
+ print_usage if ARGV.empty?
14
+
15
+ file = ARGV.first
16
+
17
+ if File.exists?(file)
18
+ Mdify.preview(file)
19
+ else
20
+ puts "mdify: #{file}: No such file or directory"
21
+ end
22
+
23
+
data/lib/mdify.rb CHANGED
@@ -6,7 +6,7 @@ require 'launchy'
6
6
  require 'mdify/renderer'
7
7
 
8
8
  module Mdify
9
- VERSION = "0.2"
9
+ VERSION = "0.3"
10
10
 
11
11
  def self.preview(filename)
12
12
  Renderer.new(filename).render
data/mdify.gemspec CHANGED
@@ -7,8 +7,8 @@ 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.2'
11
- s.date = '2011-11-28'
10
+ s.version = '0.3'
11
+ s.date = '2011-11-29'
12
12
  s.rubyforge_project = 'mdify'
13
13
 
14
14
  ## Make sure your summary is short. The description may be as long
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: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
9
- version: "0.2"
8
+ - 3
9
+ version: "0.3"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Federico Builes
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-11-28 00:00:00 Z
17
+ date: 2011-11-29 00:00:00 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: redcarpet