org-converge 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd70719da7320b3897953946f0a2963b7357af63
4
- data.tar.gz: 7132c1734caa2456114f35c029dad12615188073
3
+ metadata.gz: 80a71a84d944ea98cb325e2480e14143b116f475
4
+ data.tar.gz: 76039b9b0128a1234831a9c72f790d28ac4a0cf8
5
5
  SHA512:
6
- metadata.gz: a11513f0b8d6395a12cf9372d8ebc5fcbf7afeb45ff2dffae3bb6230b3137c4c163b3eea5282ff895793d4d00854345a2d7352d28d3a7ab5ba5987ca2ac7f329
7
- data.tar.gz: 50ef8e63011189ffd2f02dacbb4f32357b2b4d8c2ad410611a2b79eb4873ed282a95877e1f5a6b5e748bf6d538a99d7f95b9998ce9d7e9ef4b819056983b6045
6
+ metadata.gz: 3f5742da864b2ace8cd17435ee42e07262996fc19c4c60e42a06fb6165336449d8bd8c1f754e21a96fb5ca092ed147852a541e5afab4184e9e572a745d423669
7
+ data.tar.gz: 3159fa01c575fe5bff5ff51ea1837cfd44f54879cdca9207fcc3f61c7ef8b5dce25f8521163f991d7f3ff82ed0665839581b68d9c92cc094e99a1f3f95b883df
@@ -67,7 +67,8 @@ module Orgmode
67
67
  :after => line.block_header_arguments[':after'],
68
68
  :procs => line.block_header_arguments[':procs'],
69
69
  }
70
- @scripts[@scripts_counter][:lang] = line.block_lang
70
+ @scripts[@scripts_counter][:lang] = normalize_lang(line.block_lang)
71
+
71
72
  # TODO: have a way to specify which are the default binaries to be used per language
72
73
  # when binary_detected?(@block_lang)
73
74
  else
@@ -126,5 +127,19 @@ module Orgmode
126
127
  "#{$1}#{$3}#{$4}"
127
128
  end
128
129
  end
130
+
131
+ # TODO: This should be done with something which inspects the system for binaries
132
+ # or by parsing the path to the binary from the :shebang
133
+ private
134
+ def normalize_lang(lang)
135
+ case lang
136
+ when 'js'
137
+ 'node'
138
+ when 'sh'
139
+ 'bash'
140
+ else
141
+ lang
142
+ end
143
+ end
129
144
  end
130
145
  end
@@ -1,3 +1,3 @@
1
1
  module OrgConverge
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -6,7 +6,7 @@ with all output being flushed to the screen.
6
6
  - Count some numbers with bash
7
7
 
8
8
  #+name: bash_counter
9
- #+begin_src bash :shebang #!/bin/bash
9
+ #+begin_src sh :shebang #!/bin/bash
10
10
  echo '' > out.log
11
11
  for i in `seq 1 5`; do
12
12
  echo "Writing! $i"
@@ -9,7 +9,7 @@ With ~:after first~, the ~second~ block becomes
9
9
  a prerequisite of the ~first~ block.
10
10
 
11
11
  #+name: second
12
- #+begin_src bash :after first
12
+ #+begin_src sh :after first
13
13
  for i in `seq 5 10`; do
14
14
  echo $i >> out.log
15
15
  done
@@ -35,7 +35,7 @@ The same with ~:before all~, this would be executed
35
35
  at the beginning.
36
36
 
37
37
  #+name: prologue
38
- #+begin_src bash :before first :results output
38
+ #+begin_src sh :before first :results output
39
39
  echo "init" > out.log
40
40
  #+end_src
41
41
 
@@ -5,7 +5,7 @@
5
5
  In this example, we will have scripts being chained one after another.
6
6
 
7
7
  #+name: first
8
- #+begin_src bash :shebang #!/bin/bash
8
+ #+begin_src sh :shebang #!/bin/bash
9
9
  sleep 5
10
10
  echo "first" > out.log
11
11
  #+end_src
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: org-converge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Waldemar Quevedo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-26 00:00:00.000000000 Z
11
+ date: 2014-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt