sv 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sv/job.rb +8 -0
  3. data/lib/sv/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98895966d58bab7a98a0762cd691c080df548937
4
- data.tar.gz: ca6fd6a38c167242e6eb92acd01406d2432b41cc
3
+ metadata.gz: 688fd8f608ba054337a3f0d862be9c45e72fd397
4
+ data.tar.gz: d9a03d2436784ef037f9d8d93c454836903049b8
5
5
  SHA512:
6
- metadata.gz: ad1ee3d44b1542d930e51b0f089cf926ae11e451957f031c6a796a6383e84ddc6a2b52aaeeb9f10ad5da1522d28db6ee0bde91395d76745ca2583aabe0ad8777
7
- data.tar.gz: 0d33e28f23ef539b72ae831e398d3e58c13e0afe570901b01457216b2379e4ff5203b51a1524d3c6bb23191cb3bc499e303587fe7c1e5b9ade277018f93f4ff9
6
+ metadata.gz: ba53a4da83961ac2c7bb599da21afb97b8c0dbcfb754e98fac0dfaaae8224814c2fd704d3acda43cf2655553c2ddfc9124fe1e5e45aa66f0eb32682f13b4a5a3
7
+ data.tar.gz: 057c65a8ddf54e196735e64562907481afd519430c80f97fed71ec75f7130ab7370a72abe56adbc27558814388730e2f1eef0ae0007f07f96c77c176e3705b35
data/lib/sv/job.rb CHANGED
@@ -145,6 +145,7 @@ module Sv
145
145
  attrs = OpenStruct.new(attributes)
146
146
  attrs.group = group
147
147
  transform_paths attrs
148
+ transform_command attrs
148
149
  attrs.instance_eval { binding }
149
150
  end
150
151
 
@@ -161,6 +162,13 @@ module Sv
161
162
  attrs.send "#{key}=".to_sym, new_value
162
163
  end
163
164
  end
165
+
166
+ def transform_command(attrs)
167
+ command = attrs.command.strip
168
+ return if not command =~ /\A\.\//
169
+ command.gsub! /\A\.\//, "#{attrs.working_dir}/"
170
+ attrs.command = command
171
+ end
164
172
 
165
173
  end
166
174
  end
data/lib/sv/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sv
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neeraj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-27 00:00:00.000000000 Z
11
+ date: 2015-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler