sly 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/bin/sly +1 -1
- data/lib/sly/item.rb +2 -1
- data/lib/sly/project.rb +29 -12
- data/lib/sly/version.rb +1 -1
- metadata +32 -32
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MjBhNWYzNGNjNmY4Zjc0MDhmZDQ0OWJhMDI1MWMwZjZkNDlhZDQyMA==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b2e2f16b06663e3be5f64182e128f20933a591e4
|
4
|
+
data.tar.gz: 37cc1c1cf35a2e53f29c4b9bbd394143c43b2d51
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
OGU0NmYzYTE2YTQ3YmNjODRhNDRhMTAyZTg1MzIwODFjZjlkMjUzMzM5YTk2
|
11
|
-
ZTc4OTM0YmM3NWM0NjEyNjk0ZjM3MzljMzAwYjJlYmFjNjNiNWY=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NGNkNDRhOTllYzA4ODViMDIzMGQwM2NlZmUwMzBmOTI5ZTlmN2EzY2IwZjll
|
14
|
-
ZWRjOTg2ZjBmZjRlMTdmYmNjMmNjYjQ3NWM0MzNiY2VjODQ5ZmRkMzAzYjM5
|
15
|
-
MTBmNGEyMjllZWM1M2ZjNmQ0YzllOTI3OGMwZDlkMjlkNTc0ZDg=
|
6
|
+
metadata.gz: 84c9c10ec8e3df5d6432757b098ea86bd9951f899720170aeedf2b59661cc8030c6d619438e31eccfc184d815b757c07d8a76a93aa6debcb0e065e0440c507c6
|
7
|
+
data.tar.gz: ffa074f2eda10208fd446a0e20d569e16709c0d64b83a39796934588bc825f19e6a1cd45e40eac040a252d111cb5923534d632be030f313442f088bb5c2a022a
|
data/bin/sly
CHANGED
data/lib/sly/item.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'rainbow'
|
2
|
+
require 'rainbow/ext/string'
|
2
3
|
|
3
4
|
class Sly::Item
|
4
5
|
|
@@ -15,7 +16,7 @@ class Sly::Item
|
|
15
16
|
end
|
16
17
|
|
17
18
|
if items
|
18
|
-
items.select { |i| i.number.to_s == number.to_s }.first
|
19
|
+
items.values.flatten.select { |i| i.number.to_s == number.to_s }.first
|
19
20
|
else
|
20
21
|
nil
|
21
22
|
end
|
data/lib/sly/project.rb
CHANGED
@@ -13,7 +13,9 @@ class Sly::Project
|
|
13
13
|
@name = project_attributes["name"]
|
14
14
|
@archived = project_attributes["archived"]
|
15
15
|
@admin = project_attributes["admin"]
|
16
|
-
@items =
|
16
|
+
@items = {
|
17
|
+
'backlog' => [], 'in-progress' => [], 'completed' => [], 'accepted' => []
|
18
|
+
}
|
17
19
|
end
|
18
20
|
|
19
21
|
def save!
|
@@ -33,43 +35,58 @@ class Sly::Project
|
|
33
35
|
end
|
34
36
|
|
35
37
|
def update(status = nil)
|
38
|
+
load_state rescue nil
|
36
39
|
begin
|
37
40
|
download_child_items(status)
|
38
|
-
|
41
|
+
save_state
|
39
42
|
rescue Exception => e
|
40
|
-
puts e
|
43
|
+
puts e.message
|
44
|
+
puts e.backtrace
|
41
45
|
puts " Failed to connect to the Sprint.ly service, using last known values. ".colour(:white).background(:red)
|
42
|
-
|
46
|
+
load_state
|
43
47
|
end
|
44
48
|
end
|
45
49
|
|
46
50
|
def backlog
|
47
|
-
@items
|
51
|
+
@items['backlog']
|
48
52
|
end
|
49
53
|
|
50
54
|
def current
|
51
|
-
@items
|
55
|
+
@items['in-progress']
|
52
56
|
end
|
53
57
|
|
54
58
|
def complete
|
55
|
-
@items
|
59
|
+
@items['completed']
|
56
60
|
end
|
57
61
|
|
58
62
|
private
|
59
63
|
|
60
64
|
def download_child_items(status)
|
61
65
|
items = Sly::Connector.connect_with_defaults.items_for_product(@id, status)
|
62
|
-
|
66
|
+
|
67
|
+
clear_existing_items(status)
|
68
|
+
|
69
|
+
items.each do |item|
|
70
|
+
@items[item['status']] << Sly::Item.new(item)
|
71
|
+
end
|
63
72
|
end
|
64
73
|
|
65
|
-
def
|
66
|
-
target_file = File.join(pwd, '.sly',
|
74
|
+
def save_state
|
75
|
+
target_file = File.join(pwd, '.sly', 'items')
|
67
76
|
File.open(target_file, 'w') { |file| file.write @items.to_yaml }
|
68
77
|
end
|
69
78
|
|
70
|
-
def
|
71
|
-
target_file = File.join(pwd, '.sly',
|
79
|
+
def load_state
|
80
|
+
target_file = File.join(pwd, '.sly', 'items')
|
72
81
|
@items = YAML::load(File.open(target_file))
|
73
82
|
end
|
74
83
|
|
84
|
+
def clear_existing_items(status)
|
85
|
+
if status.nil?
|
86
|
+
@items.keys.each { |key| @items[key] = [] }
|
87
|
+
else
|
88
|
+
@items[status] = []
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
75
92
|
end
|
data/lib/sly/version.rb
CHANGED
metadata
CHANGED
@@ -1,153 +1,153 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert White
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curb
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.8'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.4'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rainbow
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '2.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
54
|
+
version: '2.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: gli
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 2.5.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 2.5.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rdoc
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: aruba
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: webmock
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: cucumber
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rspec
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
description: A small set of tools for working with Sprint.ly without leaving the command
|
@@ -160,8 +160,8 @@ extra_rdoc_files:
|
|
160
160
|
- README.rdoc
|
161
161
|
- sly.rdoc
|
162
162
|
files:
|
163
|
+
- README.rdoc
|
163
164
|
- bin/sly
|
164
|
-
- lib/sly/version.rb
|
165
165
|
- lib/sly.rb
|
166
166
|
- lib/sly/branch.rb
|
167
167
|
- lib/sly/connector.rb
|
@@ -170,7 +170,7 @@ files:
|
|
170
170
|
- lib/sly/item.rb
|
171
171
|
- lib/sly/project.rb
|
172
172
|
- lib/sly/project_manager.rb
|
173
|
-
-
|
173
|
+
- lib/sly/version.rb
|
174
174
|
- sly.rdoc
|
175
175
|
homepage: http://www.terracoding.com/sprintly
|
176
176
|
licenses:
|
@@ -178,27 +178,27 @@ licenses:
|
|
178
178
|
metadata: {}
|
179
179
|
post_install_message:
|
180
180
|
rdoc_options:
|
181
|
-
- --title
|
181
|
+
- "--title"
|
182
182
|
- sly
|
183
|
-
- --main
|
183
|
+
- "--main"
|
184
184
|
- README.rdoc
|
185
|
-
- -ri
|
185
|
+
- "-ri"
|
186
186
|
require_paths:
|
187
187
|
- lib
|
188
188
|
- lib
|
189
189
|
required_ruby_version: !ruby/object:Gem::Requirement
|
190
190
|
requirements:
|
191
|
-
- -
|
191
|
+
- - ">="
|
192
192
|
- !ruby/object:Gem::Version
|
193
193
|
version: 1.9.2
|
194
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
195
|
requirements:
|
196
|
-
- -
|
196
|
+
- - ">="
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: '0'
|
199
199
|
requirements: []
|
200
200
|
rubyforge_project:
|
201
|
-
rubygems_version: 2.
|
201
|
+
rubygems_version: 2.2.2
|
202
202
|
signing_key:
|
203
203
|
specification_version: 4
|
204
204
|
summary: A small set of tools for working with Sprint.ly without leaving the command
|