gitme_time 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,6 +30,7 @@ module GitmeTime
30
30
  :hours => args[:hours] || 0,
31
31
  :description => message
32
32
  })
33
+ binding.pry
33
34
  entry.save!
34
35
  puts <<-eos
35
36
  Created TimeEntry on #{Config.domain} - #{entry.project.name}:
@@ -28,14 +28,15 @@ module GitmeTime
28
28
  while project_id.nil?
29
29
  puts
30
30
  print "\tProject (e.g. 1): "
31
- project_id = STDIN.gets.chomp
32
- if project_id.empty?
31
+ project_index = STDIN.gets.chomp
32
+ if project_index.empty?
33
33
  puts "\t\tProject is required!"
34
- project_id = nil
35
- elsif project_id.to_i < 1 || project_id.to_i > projects.length
34
+ project_index = nil
35
+ elsif project_index.to_i < 1 || project_index.to_i > projects.length
36
36
  puts "\t\tA project index between 1 and #{projects.count} is required!"
37
- project_id = nil
37
+ project_index = nil
38
38
  end
39
+ project_id = projects[project_index.to_i].id if project_index.present?
39
40
  end
40
41
  project_id.to_i
41
42
  end
@@ -1,3 +1,3 @@
1
1
  module GitmeTime
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitme_time
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -163,7 +163,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
163
163
  version: '0'
164
164
  segments:
165
165
  - 0
166
- hash: 4519848684894690162
166
+ hash: 1435816836151959823
167
167
  required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  none: false
169
169
  requirements:
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  version: '0'
173
173
  segments:
174
174
  - 0
175
- hash: 4519848684894690162
175
+ hash: 1435816836151959823
176
176
  requirements: []
177
177
  rubyforge_project:
178
178
  rubygems_version: 1.8.24