senju 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/senju/command.rb +13 -0
- data/lib/senju/projects.rb +2 -2
- data/lib/senju/track.rb +27 -0
- data/lib/senju/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2c61b3069b6be1900b39531219ddf8a4324c7dca50dd8e1ab793481be7f8b23
|
4
|
+
data.tar.gz: 7fd263fcd1964f526b29a83e2cc6756f381832de4064db594784068da46dd073
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b646ff7efefc62f3c065203ccd0fbe6009b9adc1895276879afa53e7de103bb972029a0c872c2bc92a68c871c3abdc549c467422b527a06947e6b9164ef0a36f
|
7
|
+
data.tar.gz: 2674eb4504449f90c874dadae1deead6a87bc038b180ee697dfc231b07306969714108c5a3265969dc207a4743d6fd4e1065d8db85fdb0905d86d6da195269f1
|
data/lib/senju/command.rb
CHANGED
@@ -4,6 +4,7 @@ require "tty-markdown"
|
|
4
4
|
require "rumoji"
|
5
5
|
require "senju/diff"
|
6
6
|
require "senju/init"
|
7
|
+
require "senju/track"
|
7
8
|
|
8
9
|
COLORS = %w{green blue light_blue}
|
9
10
|
|
@@ -88,6 +89,18 @@ if ARGV[0] == "init"
|
|
88
89
|
Senju.init
|
89
90
|
elsif ARGV[0] == "add"
|
90
91
|
Senju::Projects.add_interactive(ARGV[1])
|
92
|
+
elsif ARGV[0] == "track" or ARGV[0] == "t"
|
93
|
+
Senju::Track.add(ARGV[1], ARGV[2])
|
94
|
+
print "Track issue successfly.\n".colorize(:green)
|
95
|
+
|
96
|
+
elsif ARGV[0] == "tracks"
|
97
|
+
Senju::Track.all.each do |project, issues|
|
98
|
+
repo = Senju::Repository.find(project)
|
99
|
+
issues.each do |issue, data|
|
100
|
+
exec(repo, issue, "-v")
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
91
104
|
elsif repo
|
92
105
|
exec(Senju::Repository.find(repo), command, option)
|
93
106
|
else
|
data/lib/senju/projects.rb
CHANGED
data/lib/senju/track.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
class Senju::Track
|
3
|
+
PATH = Dir.home + '/.senju/tracks'
|
4
|
+
|
5
|
+
def self.load
|
6
|
+
if File.exist? PATH
|
7
|
+
@data = YAML.load_file(PATH)
|
8
|
+
else
|
9
|
+
@data = {}
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.save
|
14
|
+
YAML.dump(@data, File.open(PATH, 'w'))
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.all
|
18
|
+
self.load
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.add(project, issue_no)
|
22
|
+
load
|
23
|
+
@data[project] = {} unless @data[project]
|
24
|
+
@data[project][issue_no.to_i] = nil
|
25
|
+
save
|
26
|
+
end
|
27
|
+
end
|
data/lib/senju/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: senju
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akira SUENAMI
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -179,6 +179,7 @@ files:
|
|
179
179
|
- lib/senju/issue.rb
|
180
180
|
- lib/senju/projects.rb
|
181
181
|
- lib/senju/repository.rb
|
182
|
+
- lib/senju/track.rb
|
182
183
|
- lib/senju/trello.rb
|
183
184
|
- lib/senju/version.rb
|
184
185
|
- senju.gemspec
|
@@ -202,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
203
|
version: '0'
|
203
204
|
requirements: []
|
204
205
|
rubyforge_project:
|
205
|
-
rubygems_version: 2.7.
|
206
|
+
rubygems_version: 2.7.6
|
206
207
|
signing_key:
|
207
208
|
specification_version: 4
|
208
209
|
summary: Transparent wrapper of some task management and collabolation tools.
|