trackinator 0.0.12 → 0.0.13

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/Gemfile CHANGED
@@ -2,3 +2,6 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in trackinator.gemspec
4
4
  gemspec
5
+
6
+ gem 'rspec'
7
+ gem 'simplecov'
data/Rakefile CHANGED
@@ -1,2 +1,3 @@
1
1
  #!/usr/bin/env rake
2
- require "bundler/gem_tasks"
2
+
3
+ require "bundler/gem_tasks"
data/lib/trackinator.rb CHANGED
@@ -3,7 +3,6 @@ require 'trackinator/google'
3
3
  require 'trackinator/you_track'
4
4
  require 'trackinator/importer'
5
5
 
6
-
7
6
  module Trackinator
8
7
 
9
8
  ID = /^(?:\d+\.?)+$/
@@ -1,3 +1,3 @@
1
1
  module Trackinator
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
@@ -118,8 +118,6 @@ module Trackinator
118
118
  end
119
119
 
120
120
  def set_summary_and_description issue_id, summary, description, outcome
121
- return true if summary.nil? || description.nil?
122
-
123
121
  response = @connection.post("#{@path_prefix}rest/issue/#{issue_id}/?summary=#{url_encode(summary)}&description=#{url_encode(construct_description(description, outcome))}&disableNotifications=true", nil, { 'Cookie' => @cookie })
124
122
  response.header.msg.eql? "OK"
125
123
  end
@@ -153,9 +151,11 @@ module Trackinator
153
151
  end
154
152
 
155
153
  def construct_description description, outcome
154
+ return if description.nil?
155
+
156
156
  template = ERB.new <<-EOF
157
157
  <% unless outcome.nil? %>'''Steps'''<% end %>
158
- <% if description.split(';').length > 1 %><% description.split(';').each do |step| %>
158
+ <% if !description.nil? && description.split(';').length > 1 %><% description.split(';').each do |step| %>
159
159
  *<%= step.strip %><% end %>
160
160
  <% else %>
161
161
  <%= description %>
@@ -0,0 +1,15 @@
1
+ require 'simplecov'
2
+ SimpleCov.start do
3
+ add_filter "/spec/"
4
+ end
5
+
6
+ require 'rspec'
7
+ require 'rubygems'
8
+ require 'bundler/setup'
9
+
10
+ require 'trackinator'
11
+
12
+ RSpec.configure do |config|
13
+ # some (optional) config here
14
+ end
15
+
@@ -0,0 +1,7 @@
1
+ require File.expand_path(File.dirname(__FILE__)) + '/../spec_helper'
2
+
3
+ module Trackinator
4
+ describe Google do
5
+ pending "write it"
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require File.expand_path(File.dirname(__FILE__)) + '/../spec_helper'
2
+
3
+ module Trackinator
4
+ describe Importer do
5
+ pending "write it"
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require File.expand_path(File.dirname(__FILE__)) + '/../spec_helper'
2
+
3
+ module Trackinator
4
+ describe YouTrack do
5
+ pending "write it"
6
+ end
7
+ end
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.12
4
+ version: 0.0.13
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-13 00:00:00.000000000 Z
12
+ date: 2012-08-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gdata_19
@@ -66,6 +66,10 @@ files:
66
66
  - lib/trackinator/importer.rb
67
67
  - lib/trackinator/version.rb
68
68
  - lib/trackinator/you_track.rb
69
+ - spec/spec_helper.rb
70
+ - spec/trackinator/google_spec.rb
71
+ - spec/trackinator/importer_spec.rb
72
+ - spec/trackinator/you_track_spec.rb
69
73
  - trackinator.gemspec
70
74
  homepage: https://github.com/justincbeck/trackinator
71
75
  licenses: []
@@ -91,4 +95,8 @@ rubygems_version: 1.8.24
91
95
  signing_key:
92
96
  specification_version: 3
93
97
  summary: Imports a spreadsheet in to YouTrack
94
- test_files: []
98
+ test_files:
99
+ - spec/spec_helper.rb
100
+ - spec/trackinator/google_spec.rb
101
+ - spec/trackinator/importer_spec.rb
102
+ - spec/trackinator/you_track_spec.rb