scrum_planner 0.0.2 → 0.1.0
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/lib/scrum_planner.rb +1 -7
- metadata +9 -151
- data/.codeclimate.yml +0 -25
- data/.gitignore +0 -3
- data/.rspec +0 -3
- data/.rubocop.yml +0 -11
- data/.ruby-version +0 -1
- data/.travis.yml +0 -4
- data/Gemfile +0 -17
- data/Gemfile.lock +0 -90
- data/README.md +0 -9
- data/lib/scrum_planner/iteration.rb +0 -83
- data/lib/scrum_planner/version.rb +0 -6
- data/scrum_planner.gemspec +0 -33
- data/spec/scrum_planner/iteration_spec.rb +0 -185
- data/spec/spec_helper.rb +0 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 78a0c85c1c60839a4f258c7fd0d3b08f9171cea5
|
|
4
|
+
data.tar.gz: ad241d369af035aceadbf8f1d0f7f4c1e0d64761
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e288a6ab40300bca97314ed4b511167a24bb852ccce8e89a5e90e836a627f88348ca3f0fd79b42829ebdf6aec4c9333823fe147a9cf60132af333f4cd2fe50ec
|
|
7
|
+
data.tar.gz: a0979331a98df2297f1f699e22af0a36ce0e6daffedcade5a580e8d232ee907de0512072bc6bc1f0c7e5b9ee4df8f01cb31982c62fe466084b4ec4e8cb8c3a6b
|
data/lib/scrum_planner.rb
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
module ScrumPlanner
|
|
1
|
+
class ScrumPlanner
|
|
3
2
|
end
|
|
4
|
-
|
|
5
|
-
scrum_planner_as_path = File.join(File.expand_path('..', __FILE__),
|
|
6
|
-
'**',
|
|
7
|
-
'*.rb')
|
|
8
|
-
Dir[scrum_planner_as_path].each { |f| require f }
|
metadata
CHANGED
|
@@ -1,166 +1,24 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: scrum_planner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mario Carrion
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-02-
|
|
12
|
-
dependencies:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0.19'
|
|
20
|
-
type: :runtime
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - "~>"
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0.19'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: coveralls
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - "~>"
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0.8'
|
|
34
|
-
type: :development
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - "~>"
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0.8'
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: pry
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - "~>"
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '0.10'
|
|
48
|
-
type: :development
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - "~>"
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '0.10'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: pry-nav
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - "~>"
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0.2'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - "~>"
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0.2'
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: rspec
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - "~>"
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '3.3'
|
|
76
|
-
type: :development
|
|
77
|
-
prerelease: false
|
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
-
requirements:
|
|
80
|
-
- - "~>"
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: '3.3'
|
|
83
|
-
- !ruby/object:Gem::Dependency
|
|
84
|
-
name: rubocop
|
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
|
86
|
-
requirements:
|
|
87
|
-
- - "~>"
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
version: '0.37'
|
|
90
|
-
type: :development
|
|
91
|
-
prerelease: false
|
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
-
requirements:
|
|
94
|
-
- - "~>"
|
|
95
|
-
- !ruby/object:Gem::Version
|
|
96
|
-
version: '0.37'
|
|
97
|
-
- !ruby/object:Gem::Dependency
|
|
98
|
-
name: rubocop-checkstyle_formatter
|
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
|
100
|
-
requirements:
|
|
101
|
-
- - "~>"
|
|
102
|
-
- !ruby/object:Gem::Version
|
|
103
|
-
version: '0.2'
|
|
104
|
-
type: :development
|
|
105
|
-
prerelease: false
|
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
-
requirements:
|
|
108
|
-
- - "~>"
|
|
109
|
-
- !ruby/object:Gem::Version
|
|
110
|
-
version: '0.2'
|
|
111
|
-
- !ruby/object:Gem::Dependency
|
|
112
|
-
name: rubocop-rspec
|
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
|
114
|
-
requirements:
|
|
115
|
-
- - "~>"
|
|
116
|
-
- !ruby/object:Gem::Version
|
|
117
|
-
version: '1.4'
|
|
118
|
-
type: :development
|
|
119
|
-
prerelease: false
|
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
-
requirements:
|
|
122
|
-
- - "~>"
|
|
123
|
-
- !ruby/object:Gem::Version
|
|
124
|
-
version: '1.4'
|
|
125
|
-
- !ruby/object:Gem::Dependency
|
|
126
|
-
name: timecop
|
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
|
128
|
-
requirements:
|
|
129
|
-
- - "~>"
|
|
130
|
-
- !ruby/object:Gem::Version
|
|
131
|
-
version: '0.8'
|
|
132
|
-
type: :development
|
|
133
|
-
prerelease: false
|
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
-
requirements:
|
|
136
|
-
- - "~>"
|
|
137
|
-
- !ruby/object:Gem::Version
|
|
138
|
-
version: '0.8'
|
|
139
|
-
description: Scrum Planner is a collection of programs for helping you planning your
|
|
140
|
-
Scrum iterations.
|
|
141
|
-
email: info@carrion.ws
|
|
11
|
+
date: 2016-02-16 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: ''
|
|
14
|
+
email: ''
|
|
142
15
|
executables: []
|
|
143
16
|
extensions: []
|
|
144
17
|
extra_rdoc_files: []
|
|
145
18
|
files:
|
|
146
|
-
- ".codeclimate.yml"
|
|
147
|
-
- ".gitignore"
|
|
148
|
-
- ".rspec"
|
|
149
|
-
- ".rubocop.yml"
|
|
150
|
-
- ".ruby-version"
|
|
151
|
-
- ".travis.yml"
|
|
152
|
-
- Gemfile
|
|
153
|
-
- Gemfile.lock
|
|
154
|
-
- README.md
|
|
155
19
|
- lib/scrum_planner.rb
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
- scrum_planner.gemspec
|
|
159
|
-
- spec/scrum_planner/iteration_spec.rb
|
|
160
|
-
- spec/spec_helper.rb
|
|
161
|
-
homepage: https://github.com/mariocarrion/scrum-planner
|
|
162
|
-
licenses:
|
|
163
|
-
- MIT
|
|
20
|
+
homepage: ''
|
|
21
|
+
licenses: []
|
|
164
22
|
metadata: {}
|
|
165
23
|
post_install_message:
|
|
166
24
|
rdoc_options: []
|
|
@@ -178,9 +36,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
178
36
|
version: '0'
|
|
179
37
|
requirements: []
|
|
180
38
|
rubyforge_project:
|
|
181
|
-
rubygems_version: 2.4.
|
|
39
|
+
rubygems_version: 2.4.8
|
|
182
40
|
signing_key:
|
|
183
41
|
specification_version: 4
|
|
184
|
-
summary:
|
|
42
|
+
summary: ''
|
|
185
43
|
test_files: []
|
|
186
44
|
has_rdoc:
|
data/.codeclimate.yml
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
engines:
|
|
3
|
-
bundler-audit:
|
|
4
|
-
enabled: true
|
|
5
|
-
duplication:
|
|
6
|
-
enabled: true
|
|
7
|
-
config:
|
|
8
|
-
languages:
|
|
9
|
-
- ruby
|
|
10
|
-
fixme:
|
|
11
|
-
enabled: true
|
|
12
|
-
rubocop:
|
|
13
|
-
enabled: true
|
|
14
|
-
ratings:
|
|
15
|
-
paths:
|
|
16
|
-
- Gemfile.lock
|
|
17
|
-
- "**.inc"
|
|
18
|
-
- "**.js"
|
|
19
|
-
- "**.jsx"
|
|
20
|
-
- "**.module"
|
|
21
|
-
- "**.php"
|
|
22
|
-
- "**.py"
|
|
23
|
-
- "**.rb"
|
|
24
|
-
exclude_paths:
|
|
25
|
-
- spec/
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
data/.ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.2.0
|
data/.travis.yml
DELETED
data/Gemfile
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
source 'https://rubygems.org'
|
|
2
|
-
|
|
3
|
-
ruby '2.2.0'
|
|
4
|
-
|
|
5
|
-
group :development, :test do
|
|
6
|
-
gem 'pry'
|
|
7
|
-
gem 'pry-nav'
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
group :test do
|
|
11
|
-
gem 'coveralls', require: false
|
|
12
|
-
gem 'rspec'
|
|
13
|
-
gem 'rubocop', require: false
|
|
14
|
-
gem 'rubocop-checkstyle_formatter', require: false
|
|
15
|
-
gem 'rubocop-rspec', require: false
|
|
16
|
-
gem 'timecop'
|
|
17
|
-
end
|
data/Gemfile.lock
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
GEM
|
|
2
|
-
remote: https://rubygems.org/
|
|
3
|
-
specs:
|
|
4
|
-
ast (2.2.0)
|
|
5
|
-
coderay (1.1.0)
|
|
6
|
-
coveralls (0.8.10)
|
|
7
|
-
json (~> 1.8)
|
|
8
|
-
rest-client (>= 1.6.8, < 2)
|
|
9
|
-
simplecov (~> 0.11.0)
|
|
10
|
-
term-ansicolor (~> 1.3)
|
|
11
|
-
thor (~> 0.19.1)
|
|
12
|
-
tins (~> 1.6.0)
|
|
13
|
-
diff-lcs (1.2.5)
|
|
14
|
-
docile (1.1.5)
|
|
15
|
-
domain_name (0.5.20160128)
|
|
16
|
-
unf (>= 0.0.5, < 1.0.0)
|
|
17
|
-
http-cookie (1.0.2)
|
|
18
|
-
domain_name (~> 0.5)
|
|
19
|
-
json (1.8.3)
|
|
20
|
-
method_source (0.8.2)
|
|
21
|
-
mime-types (2.99)
|
|
22
|
-
netrc (0.11.0)
|
|
23
|
-
parser (2.3.0.6)
|
|
24
|
-
ast (~> 2.2)
|
|
25
|
-
powerpack (0.1.1)
|
|
26
|
-
pry (0.10.3)
|
|
27
|
-
coderay (~> 1.1.0)
|
|
28
|
-
method_source (~> 0.8.1)
|
|
29
|
-
slop (~> 3.4)
|
|
30
|
-
pry-nav (0.2.4)
|
|
31
|
-
pry (>= 0.9.10, < 0.11.0)
|
|
32
|
-
rainbow (2.1.0)
|
|
33
|
-
rest-client (1.8.0)
|
|
34
|
-
http-cookie (>= 1.0.2, < 2.0)
|
|
35
|
-
mime-types (>= 1.16, < 3.0)
|
|
36
|
-
netrc (~> 0.7)
|
|
37
|
-
rspec (3.3.0)
|
|
38
|
-
rspec-core (~> 3.3.0)
|
|
39
|
-
rspec-expectations (~> 3.3.0)
|
|
40
|
-
rspec-mocks (~> 3.3.0)
|
|
41
|
-
rspec-core (3.3.2)
|
|
42
|
-
rspec-support (~> 3.3.0)
|
|
43
|
-
rspec-expectations (3.3.1)
|
|
44
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
45
|
-
rspec-support (~> 3.3.0)
|
|
46
|
-
rspec-mocks (3.3.2)
|
|
47
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
48
|
-
rspec-support (~> 3.3.0)
|
|
49
|
-
rspec-support (3.3.0)
|
|
50
|
-
rubocop (0.37.2)
|
|
51
|
-
parser (>= 2.3.0.4, < 3.0)
|
|
52
|
-
powerpack (~> 0.1)
|
|
53
|
-
rainbow (>= 1.99.1, < 3.0)
|
|
54
|
-
ruby-progressbar (~> 1.7)
|
|
55
|
-
unicode-display_width (~> 0.3)
|
|
56
|
-
rubocop-checkstyle_formatter (0.2.0)
|
|
57
|
-
rubocop (>= 0.20.1)
|
|
58
|
-
rubocop-rspec (1.4.0)
|
|
59
|
-
ruby-progressbar (1.7.5)
|
|
60
|
-
simplecov (0.11.2)
|
|
61
|
-
docile (~> 1.1.0)
|
|
62
|
-
json (~> 1.8)
|
|
63
|
-
simplecov-html (~> 0.10.0)
|
|
64
|
-
simplecov-html (0.10.0)
|
|
65
|
-
slop (3.6.0)
|
|
66
|
-
term-ansicolor (1.3.2)
|
|
67
|
-
tins (~> 1.0)
|
|
68
|
-
thor (0.19.1)
|
|
69
|
-
timecop (0.8.0)
|
|
70
|
-
tins (1.6.0)
|
|
71
|
-
unf (0.1.4)
|
|
72
|
-
unf_ext
|
|
73
|
-
unf_ext (0.0.7.2)
|
|
74
|
-
unicode-display_width (0.3.1)
|
|
75
|
-
|
|
76
|
-
PLATFORMS
|
|
77
|
-
ruby
|
|
78
|
-
|
|
79
|
-
DEPENDENCIES
|
|
80
|
-
coveralls
|
|
81
|
-
pry
|
|
82
|
-
pry-nav
|
|
83
|
-
rspec
|
|
84
|
-
rubocop
|
|
85
|
-
rubocop-checkstyle_formatter
|
|
86
|
-
rubocop-rspec
|
|
87
|
-
timecop
|
|
88
|
-
|
|
89
|
-
BUNDLED WITH
|
|
90
|
-
1.10.6
|
data/README.md
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
[](https://coveralls.io/github/mariocarrion/scrum-planner?branch=master) [](https://travis-ci.org/mariocarrion/scrum-planner) [](https://codeclimate.com/github/mariocarrion/scrum-planner)
|
|
2
|
-
|
|
3
|
-
# What is Scrum Planner?
|
|
4
|
-
|
|
5
|
-
**Scrum Planner** is a ruby gem that contains a collection of programs for helping you planning scrum *iterations*, it includes:
|
|
6
|
-
|
|
7
|
-
* **config**: generates a default configuration
|
|
8
|
-
* **schedule**: prints out the schedule
|
|
9
|
-
* **bother**: *"bothers"* the team members of a Gitlab group when code reviewing has taken too long.
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
module ScrumPlanner
|
|
2
|
-
# Class in charge of representing one single Scrum +Iteration+, the iteration
|
|
3
|
-
# length is specified in weeks and it requires the *real* start date to
|
|
4
|
-
# properly identify the beginning of the iteration as well as the last day
|
|
5
|
-
# of that said iteration. The first day is always a Monday and the last day
|
|
6
|
-
# is always a Friday. The iteration name is determined by the First Monday
|
|
7
|
-
# of the next iteration.
|
|
8
|
-
#
|
|
9
|
-
# For example, assuming today is "February 15 2016" with a project that
|
|
10
|
-
# originally started on +February 1 2016+ that has a length of 2 weeks.
|
|
11
|
-
# Today "Monday February 15 2016" would be the second sprint of the
|
|
12
|
-
# project, it would be also the beginning of that second sprint and it
|
|
13
|
-
# will end on "February 26 2016", the name of this sprint would be
|
|
14
|
-
# "2016-02-29"
|
|
15
|
-
class Iteration
|
|
16
|
-
attr_accessor :start
|
|
17
|
-
|
|
18
|
-
attr_accessor :today
|
|
19
|
-
|
|
20
|
-
attr_accessor :length
|
|
21
|
-
|
|
22
|
-
SECONDS_IN_DAY = 86_400
|
|
23
|
-
|
|
24
|
-
def initialize(start:, length:, today:)
|
|
25
|
-
@length = length.to_i
|
|
26
|
-
raise ArgumentError, ':length must be positive value' if @length == 0
|
|
27
|
-
raise ArgumentError, ':start must be a Monday' unless start.monday?
|
|
28
|
-
raise ArgumentError, ':start must be in the past' if start > today
|
|
29
|
-
|
|
30
|
-
@start = build_time(start)
|
|
31
|
-
@today = build_time(today)
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def end_week?
|
|
35
|
-
(week_number % length) == 0
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
def friday?
|
|
39
|
-
today.friday?
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def humanized_name
|
|
43
|
-
v = start + ((iteration_number - 1) * length * SECONDS_IN_DAY * 7)
|
|
44
|
-
v.strftime('%Y-%m-%d')
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def iteration_number
|
|
48
|
-
@iteration_number ||= (week_number / length.to_f).ceil
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
def monday?
|
|
52
|
-
today.monday?
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
def start_week?
|
|
56
|
-
(week_number % length) == 1
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
def week_number
|
|
60
|
-
@week_number ||= (dates_difference_in_days / 7.to_f).ceil
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
private
|
|
64
|
-
|
|
65
|
-
def build_time(time)
|
|
66
|
-
Time.new(time.year,
|
|
67
|
-
time.month,
|
|
68
|
-
time.day,
|
|
69
|
-
0,
|
|
70
|
-
0,
|
|
71
|
-
0,
|
|
72
|
-
time.utc_offset)
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
def dates_difference_in_days
|
|
76
|
-
@ddid ||= ((today - start).to_i / SECONDS_IN_DAY) + 1
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
def today_as_numeric_day
|
|
80
|
-
@today_as_numeric_day ||= today.strftime('%u').to_i
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
end
|
data/scrum_planner.gemspec
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
require_relative 'lib/scrum_planner/version'
|
|
2
|
-
|
|
3
|
-
Gem::Specification.new do |s|
|
|
4
|
-
s.name = 'scrum_planner'
|
|
5
|
-
s.licenses = ['MIT']
|
|
6
|
-
s.version = ScrumPlanner::Version::VERSION
|
|
7
|
-
s.date = ScrumPlanner::Version::DATE
|
|
8
|
-
|
|
9
|
-
s.authors = ['Mario Carrion']
|
|
10
|
-
s.email = 'info@carrion.ws'
|
|
11
|
-
s.homepage = 'https://github.com/mariocarrion/scrum-planner'
|
|
12
|
-
|
|
13
|
-
s.summary = 'Scrum Planner helps you plan your iterations'
|
|
14
|
-
s.description = 'Scrum Planner is a collection of programs for '\
|
|
15
|
-
'helping you planning your Scrum iterations.'
|
|
16
|
-
|
|
17
|
-
s.files = `git ls-files`.split("\n")
|
|
18
|
-
s.test_files = `git ls-files -- {spec}`.split("\n")
|
|
19
|
-
s.require_path = 'lib'
|
|
20
|
-
|
|
21
|
-
s.required_ruby_version = '~> 2.2'
|
|
22
|
-
|
|
23
|
-
s.add_runtime_dependency 'thor', '~> 0.19'
|
|
24
|
-
|
|
25
|
-
s.add_development_dependency 'coveralls', '~> 0.8'
|
|
26
|
-
s.add_development_dependency 'pry', '~> 0.10'
|
|
27
|
-
s.add_development_dependency 'pry-nav', '~> 0.2'
|
|
28
|
-
s.add_development_dependency 'rspec', '~> 3.3'
|
|
29
|
-
s.add_development_dependency 'rubocop', '~> 0.37'
|
|
30
|
-
s.add_development_dependency 'rubocop-checkstyle_formatter', '~> 0.2'
|
|
31
|
-
s.add_development_dependency 'rubocop-rspec', '~> 1.4'
|
|
32
|
-
s.add_development_dependency 'timecop', '~> 0.8'
|
|
33
|
-
end
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
describe ScrumPlanner::Iteration, type: :model do
|
|
4
|
-
after(:each) { Timecop.return }
|
|
5
|
-
|
|
6
|
-
let(:start) { Time.new(2016, 2, 1, 9, 00, 0, '-04:00') }
|
|
7
|
-
|
|
8
|
-
describe 'all attr_accesors' do
|
|
9
|
-
describe '#start' do
|
|
10
|
-
subject {
|
|
11
|
-
described_class.new(start: start,
|
|
12
|
-
length: 2,
|
|
13
|
-
today: Time.now)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
it 'returns the start parameter' do
|
|
17
|
-
expect(subject.start)
|
|
18
|
-
.to eql Time.new(2016, 2, 1, 0, 00, 0, '-04:00')
|
|
19
|
-
end
|
|
20
|
-
end # describe '#start'
|
|
21
|
-
|
|
22
|
-
describe '#today' do
|
|
23
|
-
subject {
|
|
24
|
-
described_class.new(start: start,
|
|
25
|
-
length: 2,
|
|
26
|
-
today: today)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
let(:today) { Time.new(2016, 2, 12, 9, 00, 0, '-04:00') }
|
|
30
|
-
|
|
31
|
-
it 'returns the today parameter' do
|
|
32
|
-
expect(subject.today)
|
|
33
|
-
.to eql Time.new(2016, 2, 12, 0, 00, 0, '-04:00')
|
|
34
|
-
end
|
|
35
|
-
end # describe '#today'
|
|
36
|
-
|
|
37
|
-
describe '#length' do
|
|
38
|
-
subject {
|
|
39
|
-
described_class.new(start: start,
|
|
40
|
-
length: '2',
|
|
41
|
-
today: Time.now)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
it 'returns the length parameter' do
|
|
45
|
-
expect(subject.length).to eql 2
|
|
46
|
-
end
|
|
47
|
-
end # describe '#length'
|
|
48
|
-
end # describe 'all attr_accesors'
|
|
49
|
-
|
|
50
|
-
describe 'instance methods' do
|
|
51
|
-
describe '#initialize' do
|
|
52
|
-
context 'when :length is invalid' do
|
|
53
|
-
it 'raises an exception' do
|
|
54
|
-
expect {
|
|
55
|
-
described_class.new(start: Time.now,
|
|
56
|
-
length: 'hi',
|
|
57
|
-
today: Time.now)
|
|
58
|
-
}.to raise_error(ArgumentError, ':length must be positive value')
|
|
59
|
-
end
|
|
60
|
-
end # context 'when :length is invalid'
|
|
61
|
-
|
|
62
|
-
context 'when :start is not Monday' do
|
|
63
|
-
let(:not_monday) { Time.new(2016, 2, 2, 0, 00, 0, '-04:00') }
|
|
64
|
-
|
|
65
|
-
it 'raises an exception' do
|
|
66
|
-
expect {
|
|
67
|
-
described_class.new(start: not_monday,
|
|
68
|
-
length: 2,
|
|
69
|
-
today: start)
|
|
70
|
-
}.to raise_error(ArgumentError, ':start must be a Monday')
|
|
71
|
-
end
|
|
72
|
-
end # context 'when :start is not Monday'
|
|
73
|
-
|
|
74
|
-
context ':start must be in the past' do
|
|
75
|
-
let(:before_start) { Time.new(2016, 1, 1, 9, 00, 0, '-04:00') }
|
|
76
|
-
|
|
77
|
-
it 'raises an exception' do
|
|
78
|
-
expect {
|
|
79
|
-
described_class.new(start: start,
|
|
80
|
-
length: 2,
|
|
81
|
-
today: before_start)
|
|
82
|
-
}.to raise_error(ArgumentError, ':start must be in the past')
|
|
83
|
-
end
|
|
84
|
-
end # context ':start must be in the past'
|
|
85
|
-
end # describe '#initialize'
|
|
86
|
-
|
|
87
|
-
describe '#end_week?' do
|
|
88
|
-
let(:today) { Time.new(2016, 2, 15, 0, 00, 0, '-04:00') }
|
|
89
|
-
|
|
90
|
-
subject {
|
|
91
|
-
described_class.new(start: start,
|
|
92
|
-
length: 3,
|
|
93
|
-
today: today)
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
it 'returns true' do
|
|
97
|
-
expect(subject).to be_end_week
|
|
98
|
-
end
|
|
99
|
-
end # describe '#end_week?'
|
|
100
|
-
|
|
101
|
-
describe '#friday?' do
|
|
102
|
-
before(:each) { Timecop.travel Time.new(2016, 2, 12, 9, 0, 0, '-04:00') }
|
|
103
|
-
|
|
104
|
-
subject {
|
|
105
|
-
described_class.new(start: start,
|
|
106
|
-
length: 2,
|
|
107
|
-
today: Time.now)
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
it 'returns true when today is Friday' do
|
|
111
|
-
expect(subject).to be_friday
|
|
112
|
-
end
|
|
113
|
-
end # describe '#friday?'
|
|
114
|
-
|
|
115
|
-
describe '#humanized_name' do
|
|
116
|
-
let(:today) { Time.new(2016, 3, 28, 0, 00, 0, '-04:00') }
|
|
117
|
-
|
|
118
|
-
subject {
|
|
119
|
-
described_class.new(start: start,
|
|
120
|
-
length: 4,
|
|
121
|
-
today: today)
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
it 'returns this iteration\'s humanized name' do
|
|
125
|
-
expect(subject.humanized_name).to eql '2016-03-28'
|
|
126
|
-
end
|
|
127
|
-
end # describe '#humanized_name'
|
|
128
|
-
|
|
129
|
-
describe '#iteration_number' do
|
|
130
|
-
let(:today) { Time.new(2016, 2, 20, 0, 00, 0, '-04:00') }
|
|
131
|
-
|
|
132
|
-
subject {
|
|
133
|
-
described_class.new(start: start,
|
|
134
|
-
length: 2,
|
|
135
|
-
today: today)
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
it 'returns this iteration number' do
|
|
139
|
-
expect(subject.iteration_number).to eql 2
|
|
140
|
-
end
|
|
141
|
-
end # describe '#humanized_name'
|
|
142
|
-
|
|
143
|
-
describe '#monday?' do
|
|
144
|
-
before(:each) { Timecop.travel Time.new(2016, 2, 8, 9, 0, 0, '-04:00') }
|
|
145
|
-
|
|
146
|
-
subject {
|
|
147
|
-
described_class.new(start: start,
|
|
148
|
-
length: 2,
|
|
149
|
-
today: Time.now)
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
it 'returns true when today is Monday' do
|
|
153
|
-
expect(subject).to be_monday
|
|
154
|
-
end
|
|
155
|
-
end # describe '#monday?'
|
|
156
|
-
|
|
157
|
-
describe '#start_week?' do
|
|
158
|
-
let(:today) { Time.new(2016, 2, 22, 0, 00, 0, '-04:00') }
|
|
159
|
-
|
|
160
|
-
subject {
|
|
161
|
-
described_class.new(start: start,
|
|
162
|
-
length: 3,
|
|
163
|
-
today: today)
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
it 'returns true' do
|
|
167
|
-
expect(subject).to be_start_week
|
|
168
|
-
end
|
|
169
|
-
end # describe '#start_week?'
|
|
170
|
-
|
|
171
|
-
describe '#week_number' do
|
|
172
|
-
before(:each) { Timecop.travel Time.new(2016, 2, 17, 9, 0, 0, '-04:00') }
|
|
173
|
-
|
|
174
|
-
subject {
|
|
175
|
-
described_class.new(start: start,
|
|
176
|
-
length: 2,
|
|
177
|
-
today: Time.now)
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
it 'returns the project\'s week number' do
|
|
181
|
-
expect(subject.week_number).to eql 3
|
|
182
|
-
end
|
|
183
|
-
end # describe '#week_number'
|
|
184
|
-
end # describe 'instance methods'
|
|
185
|
-
end
|
data/spec/spec_helper.rb
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
require 'bundler'
|
|
2
|
-
|
|
3
|
-
Bundler.require(:default, :test)
|
|
4
|
-
|
|
5
|
-
require 'coveralls'
|
|
6
|
-
|
|
7
|
-
Coveralls.wear!
|
|
8
|
-
|
|
9
|
-
require 'scrum_planner'
|
|
10
|
-
|
|
11
|
-
RSpec.configure do |config|
|
|
12
|
-
config.expect_with :rspec do |expectations|
|
|
13
|
-
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
config.mock_with :rspec do |mocks|
|
|
17
|
-
mocks.verify_partial_doubles = true
|
|
18
|
-
end
|
|
19
|
-
end
|