do_stuff 0.3.0 → 0.3.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 +7 -0
  2. data/lib/do_stuff/runner.rb +9 -2
  3. metadata +11 -11
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 85af10253b4970cc931c5cd870e5e922e2480df0
4
+ data.tar.gz: a538411c071a7c98cf0922ae983828a6b1818ce9
5
+ SHA512:
6
+ metadata.gz: 2336514b9aef27392c46c6cd7910522af37cf46a37a336c40f8064433bfd9b58ee6ea39df42ce1b0443790a638c8c1a6ccedfff83fcaf3c40b64c4cf055ce4cb
7
+ data.tar.gz: 068df5a79c1e51e87cbc33f4baa8f237d0831266befc9a0b65a599ac23b9912a858af3165e64f4c8ff57b7858a5b1346bd8d69e826e46502b7f0aa633f3dfbe8
@@ -152,15 +152,22 @@ module DoStuff
152
152
  end
153
153
 
154
154
  def self.run_editor(file, task_num=nil)
155
+ editor = ENV['EDITOR']
156
+
157
+ unless editor
158
+ $stderr.puts "The EDITOR environment variable isn't set (defaulting to vim)."
159
+ editor = 'vim'
160
+ end
161
+
155
162
  if task_num
156
163
  target = File.readlines(file).find_index do |line|
157
164
  line.start_with?("#{task_num}. ")
158
165
  end
159
166
 
160
167
  abort "Could not find task ##{task_num}." unless target
161
- system(ENV['EDITOR'], file, "+#{target + 1}")
168
+ system(editor, file, "+#{target + 1}")
162
169
  else
163
- system(ENV['EDITOR'], file)
170
+ system(editor, file)
164
171
  end
165
172
  end
166
173
 
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: do_stuff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
5
- prerelease:
4
+ version: 0.3.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Scott Olson
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-03-27 00:00:00.000000000 Z
11
+ date: 2013-06-13 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: A minimalistic command-line todo list
15
14
  email: scott@scott-olson.org
@@ -18,35 +17,36 @@ executables:
18
17
  extensions: []
19
18
  extra_rdoc_files: []
20
19
  files:
21
- - lib/do_stuff/standalone.rb
22
20
  - lib/do_stuff/runner.rb
21
+ - lib/do_stuff/standalone.rb
23
22
  - lib/do_stuff/tasklist.rb
24
23
  - lib/do_stuff.rb
25
24
  - bin/do_stuff
26
25
  - README.md
27
26
  - LICENSE
28
27
  homepage: https://github.com/tsion/do_stuff
29
- licenses: []
28
+ licenses:
29
+ - ISC
30
+ metadata: {}
30
31
  post_install_message:
31
32
  rdoc_options: []
32
33
  require_paths:
33
34
  - lib
34
35
  required_ruby_version: !ruby/object:Gem::Requirement
35
- none: false
36
36
  requirements:
37
- - - ! '>='
37
+ - - '>='
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  required_rubygems_version: !ruby/object:Gem::Requirement
41
- none: false
42
41
  requirements:
43
- - - ! '>='
42
+ - - '>='
44
43
  - !ruby/object:Gem::Version
45
44
  version: '0'
46
45
  requirements: []
47
46
  rubyforge_project:
48
- rubygems_version: 1.8.17
47
+ rubygems_version: 2.0.2
49
48
  signing_key:
50
- specification_version: 3
49
+ specification_version: 4
51
50
  summary: A minimalistic command-line todo list
52
51
  test_files: []
52
+ has_rdoc: