TicGit-ng 1.0.2.1 → 1.0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,7 @@ module TicGitNG
27
27
  elsif file
28
28
  tic.ticket_comment(File.read(file), tid)
29
29
  else
30
- return unless message = get_editor_message(tic)
30
+ return unless message = get_editor_message
31
31
  tic.ticket_comment(message.join(''), tid)
32
32
  end
33
33
  end
@@ -0,0 +1,44 @@
1
+ require 'octokit'
2
+
3
+ module TicGitNG
4
+ module Sync
5
+ module Github_Issues
6
+ #list all tickets
7
+ #called from lib/ticgit-ng/sync.rb, used to get all tickets
8
+ def index
9
+ end
10
+
11
+ #get all info for one ticket
12
+ #
13
+ def show
14
+ end
15
+
16
+ #create new ticket
17
+ def create
18
+ end
19
+
20
+ #alter an existing ticket
21
+ def update
22
+ end
23
+
24
+ #delete existing ticket
25
+ #this should not need to be called very often, if at all
26
+ def destroy
27
+ end
28
+ end
29
+ #Class used to interface with Octokit (Github Issues)
30
+ class Github_Bugtracker
31
+ def initialize(options={})
32
+ raise "Gitub_Bugtracker.new requires {:username=>'' and either :token or :password}" unless
33
+ options.include? :username and (options.include? :token || options.include? :password)
34
+
35
+ if options.include? :token
36
+ @client=Octokit::Client.new( {:login=>options[:username], :token=>options[:token]} )
37
+ else
38
+ @client=Octokit::Client.new( {:login=>options[:username], :password=>options[:password]} )
39
+ end
40
+ end
41
+
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,5 @@
1
+ module TicGitNG
2
+ module Sync
3
+
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module TicGitNG
2
- VERSION = '1.0.2.1'
2
+ VERSION = '1.0.2.2'
3
3
  end
data/lib/ticgit-ng.rb CHANGED
@@ -39,6 +39,7 @@ module TicGitNG
39
39
  autoload :VERSION, 'ticgit-ng/version'
40
40
  autoload :Comment, 'ticgit-ng/comment'
41
41
  autoload :Ticket, 'ticgit-ng/ticket'
42
+ autoload :Sync, 'ticgit-ng/sync'
42
43
 
43
44
  # options
44
45
  # :logger => Logger.new(STDOUT)
data/lib/ticgit-ng.rb_ ADDED
@@ -0,0 +1,35 @@
1
+ require 'fileutils'
2
+ require 'logger'
3
+ require 'optparse'
4
+ require 'ostruct'
5
+ require 'set'
6
+ require 'yaml'
7
+
8
+ # Add the directory containing this file to the start of the load path if it
9
+ # isn't there already.
10
+ $:.unshift(File.dirname(__FILE__)) unless
11
+ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
12
+
13
+ require 'rubygems'
14
+ # requires git >= 1.0.5
15
+ require 'git'
16
+ require 'ticgit-ng/base'
17
+ require 'ticgit-ng/cli'
18
+
19
+ module TicGitNG
20
+ autoload :VERSION, 'ticgit-ng/version'
21
+ autoload :Comment, 'ticgit-ng/comment'
22
+ autoload :Ticket, 'ticgit-ng/ticket'
23
+
24
+ # options
25
+ # :logger => Logger.new(STDOUT)
26
+ def self.open(git_dir, options = {})
27
+ Base.new(git_dir, options)
28
+ end
29
+
30
+ class OpenStruct < ::OpenStruct
31
+ def to_hash
32
+ @table.dup
33
+ end
34
+ end
35
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: TicGit-ng
3
3
  version: !ruby/object:Gem::Version
4
- hash: 85
4
+ hash: 83
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
9
  - 2
10
- - 1
11
- version: 1.0.2.1
10
+ - 2
11
+ version: 1.0.2.2
12
12
  platform: ruby
13
13
  authors:
14
14
  - Scott Chacon
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-04-03 00:00:00 -04:00
20
+ date: 2011-04-05 00:00:00 -04:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -61,11 +61,14 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - bin/ti
63
63
  - bin/ticgitweb
64
+ - lib/ticgit-ng.rb_
64
65
  - lib/ticgit-ng.rb
65
66
  - lib/ticgit-ng/base.rb
66
67
  - lib/ticgit-ng/ticket.rb
67
68
  - lib/ticgit-ng/cli.rb
69
+ - lib/ticgit-ng/sync/github_issues.rb
68
70
  - lib/ticgit-ng/version.rb
71
+ - lib/ticgit-ng/sync.rb
69
72
  - lib/ticgit-ng/command/assign.rb
70
73
  - lib/ticgit-ng/command/state.rb
71
74
  - lib/ticgit-ng/command/new.rb