flux 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.7
1
+ 0.0.8
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "flux"
8
- s.version = "0.0.7"
8
+ s.version = "0.0.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David Leal"]
12
- s.date = "2012-02-22"
12
+ s.date = "2012-05-23"
13
13
  s.email = "david@mojotech.com"
14
14
  s.executables = ["flux"]
15
15
  s.extra_rdoc_files = [
@@ -38,11 +38,34 @@ module Flux
38
38
 
39
39
  login if Flux::PT.config
40
40
 
41
- desc "list", "list stories, excluding icebox by default"
41
+ desc "list", "list my stories, or all, excluding icebox"
42
+ method_option :owner, :type => :string,
43
+ :default => 'me',
44
+ :aliases => '-o'
42
45
  def list
43
- table =
46
+ stories = begin
47
+ if %w(none n).include?(options[:owner])
48
+ current_project.stories.unassigned
49
+ elsif %w(all a).include?(options[:owner])
50
+ current_project.stories.scheduled
51
+ else
52
+ m = if options[:owner] == 'me'
53
+ current_project.members.me
54
+ else
55
+ current_project.members.find { |e|
56
+ e.name == options[:member]
57
+ }
58
+ end
59
+
60
+ current_project.stories.owned_by(m)
61
+ end
62
+ end
63
+
64
+ stories.reject! { |s| s.state == 'accepted' }
65
+
66
+ table =
44
67
  [STORY_LIST_HEADERS] +
45
- current_project.stories.scheduled.map { |s|
68
+ stories.map { |s|
46
69
  [s.id, s.state, s.owned_by, s.est, s.name]
47
70
  }
48
71
 
@@ -54,6 +54,15 @@ module Flux
54
54
  map(&:stories).
55
55
  flatten.map { |s| Story.new(s) }
56
56
  end
57
+
58
+ def owned_by(member)
59
+ ::PivotalTracker::Story.all(@project, :mywork => member.name).
60
+ map { |s| Story.new(s) }
61
+ end
62
+
63
+ def unassigned
64
+ scheduled.reject(&:owned_by)
65
+ end
57
66
  end
58
67
 
59
68
  def_delegators :@story, :id, :name, :owned_by, :current_state, :url
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flux
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-22 00:00:00.000000000 Z
12
+ date: 2012-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &86582250 !ruby/object:Gem::Requirement
16
+ requirement: &80757470 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.14.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *86582250
24
+ version_requirements: *80757470
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: pivotal-tracker
27
- requirement: &86581640 !ruby/object:Gem::Requirement
27
+ requirement: &80757150 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.4.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *86581640
35
+ version_requirements: *80757150
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: grit
38
- requirement: &86581140 !ruby/object:Gem::Requirement
38
+ requirement: &80756890 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 2.4.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *86581140
46
+ version_requirements: *80756890
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: github_api
49
- requirement: &86580730 !ruby/object:Gem::Requirement
49
+ requirement: &80773660 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *86580730
57
+ version_requirements: *80773660
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rspec
60
- requirement: &86580390 !ruby/object:Gem::Requirement
60
+ requirement: &80774570 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '2.0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *86580390
68
+ version_requirements: *80774570
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
- requirement: &86579740 !ruby/object:Gem::Requirement
71
+ requirement: &80775440 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 1.0.0
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *86579740
79
+ version_requirements: *80775440
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: jeweler
82
- requirement: &86577840 !ruby/object:Gem::Requirement
82
+ requirement: &80776690 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 1.6.2
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *86577840
90
+ version_requirements: *80776690
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rcov
93
- requirement: &86577180 !ruby/object:Gem::Requirement
93
+ requirement: &80777570 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *86577180
101
+ version_requirements: *80777570
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: rr
104
- requirement: &86602150 !ruby/object:Gem::Requirement
104
+ requirement: &80781790 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,7 +109,7 @@ dependencies:
109
109
  version: 1.0.0
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *86602150
112
+ version_requirements: *80781790
113
113
  description:
114
114
  email: david@mojotech.com
115
115
  executables:
@@ -163,7 +163,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
163
163
  version: '0'
164
164
  segments:
165
165
  - 0
166
- hash: -283853007
166
+ hash: -209353887
167
167
  required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  none: false
169
169
  requirements: