rumr 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rumr.rb +3 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cc0b8f0c9e587897666b872e52bfd3bf3f90d6c
4
- data.tar.gz: 8e8cc8887df6e13007aeb52fb975b8cc511d5c1f
3
+ metadata.gz: 084d38dab391c9c3a4ee904bce78266818c64571
4
+ data.tar.gz: 03788355356bb7506064ffbbf9ff7f0da9ef56c6
5
5
  SHA512:
6
- metadata.gz: 0b14d857463aba12ea25617101e7c8594df3cf6be4129e30e431fca330f25cfa7356703fbc00d3dcd4d44ecf433523f0b29ec47ba89a789dc2654274bbbc27d5
7
- data.tar.gz: 3bc8348be948cc31362c00ebc7b5c4e0ccea3493f6cf6f439e52c83cdea6b9e759657b3104c4fdeba06eddeea974e4785f16e4b3465bf06e2250cba5a11a2359
6
+ metadata.gz: 864e27a2626875de67287e37add706fcb54ba55f46951bd479ab60a7057af0fe41211f0836da0417425e0ee3bc7978580724ef842872ccaab8662ef33d8dc1dc
7
+ data.tar.gz: 77993a183b9e2f2685d37320d402ac6b9b8d0ce9b4bcb4ea10a88e2d6f9039d019c00ba079eed77642c7c0dc610e724ce59bb842c1c1d810c1ea82c3a5e46efb
data/lib/rumr.rb CHANGED
@@ -22,10 +22,9 @@ class Rumr < Thor
22
22
  new_tags = options[:tag]
23
23
  rumr_file = File.join(options[:directory], '.rumr')
24
24
  if options[:append] && File.exist?(rumr_file)
25
- cur_tags = YAML.load_file(rumr_file)
26
- new_tags = (new_tags + cur_tags).uniq
25
+ new_tags |= YAML.load_file(rumr_file)
27
26
  end
28
- File.open(rumr_file, 'w') { |f| f.write new_tags.to_yaml }
27
+ IO.write(rumr_file, new_tags.to_yaml)
29
28
  end
30
29
 
31
30
  desc 'exec COMMAND', 'Execute (run) a given command on registered directories'
@@ -49,8 +48,7 @@ class Rumr < Thor
49
48
  if options['dryrun']
50
49
  puts "Would execute #{command} in #{path}"
51
50
  else
52
- base_path = File.dirname(path)
53
- puts `bash -c "cd #{base_path} && #{command}"`
51
+ Dir.chdir(File.dirname(path)) { puts `#{command}` }
54
52
  end
55
53
  end
56
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rumr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle W. Purdon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-29 00:00:00.000000000 Z
11
+ date: 2015-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor