pivo 0.0.7 → 0.0.8
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.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/pivo/commands.rb +9 -20
- data/lib/pivo/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff5d30da7dfd3e887faa0f74ded3ed88356f8287
|
4
|
+
data.tar.gz: 3fbc2bbfb7200e98343c4298db6be4781f2b7ee7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c6bede3c5168d12821ce1ea67d308e5dd0db5bb4afa0cbc879c57dc88f00b9a5711d7a216897c30a836af7246b451ee3b94bd2e628a505c1fea3c9b7a1b477a
|
7
|
+
data.tar.gz: 775bc81a520f0b401f0f743ced4bea3e0629432ccc6082d20744005331b4e205dc9bf51e50103a78a6db4ce0d4f7fdbb4bd18f3f8035ea863a69ae47b3d536c1
|
data/README.md
CHANGED
@@ -40,15 +40,15 @@ $ pivo stories all PROJECT_NAME --status unstarted # filtering by status
|
|
40
40
|
|
41
41
|
|
42
42
|
```shell
|
43
|
-
$ pivo stories
|
44
|
-
$ pivo stories
|
43
|
+
$ pivo stories all PROJECT_NAME --mywork ukstudio
|
44
|
+
$ pivo stories all PROJECT_NAME --mywork ukstudio --status unstarted # filtering by status
|
45
45
|
```
|
46
46
|
|
47
47
|
#### with peco
|
48
48
|
|
49
49
|
```zsh
|
50
50
|
function pivo-open() {
|
51
|
-
local url="$(pivo stories
|
51
|
+
local url="$(pivo stories all PROJECT_NAME --mywork ukstudio $1 | peco --query "$LBUFFER" | awk '{print $NF}')"
|
52
52
|
open ${url}
|
53
53
|
}
|
54
54
|
```
|
data/lib/pivo/commands.rb
CHANGED
@@ -10,16 +10,21 @@ module Pivo
|
|
10
10
|
class Stories < Thor
|
11
11
|
desc "all PROJECT_NAME", "listing all stories"
|
12
12
|
option :status, type: 'string', desc: "unscheduled, unstarted, planned, rejected, started, finished, delivered, accepted"
|
13
|
+
option :mywork, type: 'string', desc: "listing mywork storeis of the specified user"
|
13
14
|
option :format, type: 'string', desc: "default, md"
|
14
15
|
def all(project_name)
|
15
16
|
project = Resource::Project.find_by_name(project_name)
|
16
|
-
filtering_options =
|
17
|
-
filtering_options
|
17
|
+
filtering_options = []
|
18
|
+
filtering_options << "state:#{options[:status]}" if options[:status]
|
19
|
+
if options[:mywork]
|
20
|
+
filtering_options << "mywork:#{options[:mywork]}" if options[:mywork]
|
21
|
+
end
|
22
|
+
options = filtering_options.empty? ? {} : {filter: filtering_options.join(" ")}
|
18
23
|
case options[:format]
|
19
24
|
when 'md'
|
20
|
-
say Formatters::Stories::Markdown.new(project.stories(
|
25
|
+
say Formatters::Stories::Markdown.new(project.stories(options)).to_s
|
21
26
|
else
|
22
|
-
say Formatters::Stories::Default.new(project.stories(
|
27
|
+
say Formatters::Stories::Default.new(project.stories(options)).to_s
|
23
28
|
end
|
24
29
|
end
|
25
30
|
|
@@ -38,22 +43,6 @@ module Pivo
|
|
38
43
|
say Formatters::Stories::Default.new(iteration.stories).to_s
|
39
44
|
end
|
40
45
|
end
|
41
|
-
|
42
|
-
desc "me PROJECT_NAME", "listing my stories"
|
43
|
-
option :status, type: 'string', desc: "unscheduled, unstarted, planned, rejected, started, finished, delivered, accepted"
|
44
|
-
option :format, type: 'string', desc: "default, md"
|
45
|
-
def me(project_name)
|
46
|
-
me = Resource::Me.new
|
47
|
-
project = Resource::Project.find_by_name(project_name)
|
48
|
-
filtering_options = {}
|
49
|
-
filtering_options.merge!(filter: "state:#{options[:status]} owner:\"#{me.name}\"")
|
50
|
-
case options[:format]
|
51
|
-
when 'md'
|
52
|
-
say Formatters::Stories::Markdown.new(project.stories(filtering_options)).to_s
|
53
|
-
else
|
54
|
-
say Formatters::Stories::Default.new(project.stories(filtering_options)).to_s
|
55
|
-
end
|
56
|
-
end
|
57
46
|
end
|
58
47
|
|
59
48
|
class CLI < Thor
|
data/lib/pivo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pivo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AKAMATSU Yuki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.2.
|
111
|
+
rubygems_version: 2.2.3
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: for pivotal tracker
|