trackinator 0.0.9 → 0.0.10
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.
- data/bin/trackinate +14 -12
- data/lib/trackinator/version.rb +1 -1
- data/lib/trackinator/you_track.rb +1 -1
- data/lib/trackinator.rb +1 -0
- metadata +2 -2
data/bin/trackinate
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
2
|
|
3
|
-
require 'trackinator
|
4
|
-
require 'trackinator/you_track'
|
5
|
-
require 'trackinator/google'
|
3
|
+
require 'trackinator'
|
6
4
|
require 'trollop'
|
7
5
|
require 'etc'
|
8
6
|
|
@@ -45,16 +43,20 @@ Trollop::die "Check your Google credentials and try again" unless google.is_logg
|
|
45
43
|
Trollop::die "You must supply a Google doc filename to import" if ARGV.empty? && !opts[:create_rc]
|
46
44
|
|
47
45
|
if opts[:create_rc]
|
48
|
-
|
49
|
-
file = File.new("#{Etc.getpwuid.dir}/.trackinatorrc", "w")
|
50
|
-
opts.keys.each do |key|
|
51
|
-
key_string = key.to_s
|
52
|
-
if TRACKINATOR_RC.include?(key_string) && !key_string.include?("given")
|
53
|
-
value_string = opts[key]
|
46
|
+
trackinator_rc_count = Dir.entries(Etc.getpwuid.dir).collect { |entry| /trackinatorrc/.match(entry) }.compact.length
|
54
47
|
|
55
|
-
|
56
|
-
|
57
|
-
|
48
|
+
if trackinator_rc_count > 0 && File.exist?("#{Etc.getpwuid.dir}/.trackinatorrc")
|
49
|
+
File.rename("#{Etc.getpwuid.dir}/.trackinatorrc", "#{Etc.getpwuid.dir}/.trackinatorrc.#{trackinator_rc_count.to_s}")
|
50
|
+
end
|
51
|
+
|
52
|
+
file = File.new("#{Etc.getpwuid.dir}/.trackinatorrc", "w")
|
53
|
+
opts.keys.each do |key|
|
54
|
+
key_string = key.to_s
|
55
|
+
if Trackinator::TRACKINATOR_RC.include?(key_string) && !key_string.include?("given")
|
56
|
+
value_string = opts[key]
|
57
|
+
|
58
|
+
value = key_string.include?("password") ? Base64.encode64(value_string) : value_string
|
59
|
+
file.puts "#{key_string}=#{value}"
|
58
60
|
end
|
59
61
|
end
|
60
62
|
end
|
data/lib/trackinator/version.rb
CHANGED
@@ -32,7 +32,7 @@ module Trackinator
|
|
32
32
|
|
33
33
|
def update_ticket issue_id, data
|
34
34
|
success = set_platform(issue_id, data['platform'])
|
35
|
-
|
35
|
+
success ? (success = set_summary_and_description(issue_id, data['summary'], data['description'])) : (return success)
|
36
36
|
success ? (success = set_type(issue_id, data['type'])) : (return success)
|
37
37
|
success ? (success = set_import_identifier(issue_id, "#{data['project']}-#{data['id']}")) : (return success)
|
38
38
|
success ? (success = set_design_reference(issue_id, "#{data['references']}")) : (return success) unless data['references'].nil?
|
data/lib/trackinator.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trackinator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gdata_19
|