pdd 0.19.4 → 0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.simplecov +1 -1
- data/Gemfile +1 -1
- data/LICENSE.txt +1 -1
- data/README.md +39 -1
- data/Rakefile +1 -1
- data/assets/puzzles.xsd +1 -1
- data/assets/puzzles.xsl +1 -1
- data/bin/pdd +1 -1
- data/features/applies_rules.feature +1 -1
- data/features/cli.feature +1 -1
- data/features/parsing.feature +1 -1
- data/features/step_definitions/steps.rb +1 -1
- data/features/support/env.rb +1 -1
- data/lib/pdd.rb +2 -2
- data/lib/pdd/puzzle.rb +1 -1
- data/lib/pdd/rule/duplicates.rb +1 -1
- data/lib/pdd/rule/estimates.rb +1 -1
- data/lib/pdd/rule/roles.rb +1 -1
- data/lib/pdd/rule/text.rb +1 -1
- data/lib/pdd/source.rb +2 -2
- data/lib/pdd/sources.rb +1 -1
- data/lib/pdd/version.rb +3 -3
- data/pdd.gemspec +1 -1
- data/test/test__helper.rb +1 -1
- data/test/test_duplicates.rb +2 -2
- data/test/test_estimates.rb +2 -2
- data/test/test_pdd.rb +2 -2
- data/test/test_roles.rb +2 -2
- data/test/test_source.rb +2 -2
- data/test/test_sources.rb +2 -2
- data/test/test_text.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bdf6ed0c2a67acd7edda53140b2ac3041139eb2
|
4
|
+
data.tar.gz: ab9778aa76779698c8c529cff6d9c3f5b1947425
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 757c100e86ccf0bde5e5687c726758fbc381f063900b8260f0e28a072f93a74ffac8add757419201cbeed43799248550ae9413a73615e8918b73a0245c10a0dc
|
7
|
+
data.tar.gz: cf18864d0e2dc512b56e1c57b9307ea894316a33eba19ffffdeac4521c93d0763a6b20ccef6299a367c79d0c0dc22b36fd706eaebb045c9f8f74d5b6ed1597ba
|
data/.simplecov
CHANGED
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -128,6 +128,44 @@ You can put all command line options into `.pdd` file. The options from the
|
|
128
128
|
file will be used first. Command line options may be added on top of them.
|
129
129
|
See, how it is done in [yegor256/0pdd](https://github.com/yegor256/0pdd/blob/master/.pdd).
|
130
130
|
|
131
|
+
## How to read XML
|
132
|
+
|
133
|
+
The XML produced will look approximately like this (here is a
|
134
|
+
[real example](http://www.0pdd.com/snapshot?name=yegor256/takes)):
|
135
|
+
|
136
|
+
```xml
|
137
|
+
<puzzles>
|
138
|
+
<puzzle>
|
139
|
+
<ticket>516</ticket>
|
140
|
+
<estimate>15</estimate>
|
141
|
+
<role>DEV</role>
|
142
|
+
<id>516-ffc97ad1</id>
|
143
|
+
<lines>61-63</lines>
|
144
|
+
<body>This has to be fixed later...</body>
|
145
|
+
<file>src/test/java/org/takes/SomeTest.java</file>
|
146
|
+
<author>Yegor Bugayenko</author>
|
147
|
+
<email>yegor256@gmail.com</email>
|
148
|
+
<time>2018-01-01T21:09:03Z</time>
|
149
|
+
</puzzle>
|
150
|
+
</puzzles>
|
151
|
+
```
|
152
|
+
|
153
|
+
[XSD Schema](http://pdd-xsd.teamed.io/0.19.4.xsd) is here.
|
154
|
+
The most interesting parts of each puzzle are:
|
155
|
+
|
156
|
+
* `ticket` is a ticket name puzzle marker starts from, in most
|
157
|
+
cases it will be the number of GitHub issue.
|
158
|
+
|
159
|
+
* `estimate` is the amount of minutes the puzzle is supposed to take.
|
160
|
+
|
161
|
+
* `id` is a unique ID of the puzzle. It is calculated by the
|
162
|
+
internal algorithm that takes into account only the text of the puzzle.
|
163
|
+
Thus, if you move the puzzle from one file to another, the ID won't
|
164
|
+
change. Also, changing the location of a puzzle inside a file
|
165
|
+
won't change its ID.
|
166
|
+
|
167
|
+
* `lines` is where the puzzle is found, inside the file.
|
168
|
+
|
131
169
|
## How to contribute?
|
132
170
|
|
133
171
|
Just submit a pull request. Make sure `rake` passes.
|
@@ -142,7 +180,7 @@ $ ./bin/pdd --help
|
|
142
180
|
|
143
181
|
(The MIT License)
|
144
182
|
|
145
|
-
Copyright (c) 2016-
|
183
|
+
Copyright (c) 2016-2018 Yegor Bugayenko
|
146
184
|
|
147
185
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
148
186
|
of this software and associated documentation files (the 'Software'), to deal
|
data/Rakefile
CHANGED
data/assets/puzzles.xsd
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<!--
|
3
3
|
(The MIT License)
|
4
4
|
|
5
|
-
Copyright (c) 2014-
|
5
|
+
Copyright (c) 2014-2018 Yegor Bugayenko
|
6
6
|
|
7
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
of this software and associated documentation files (the 'Software'), to deal
|
data/assets/puzzles.xsl
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<!--
|
3
3
|
(The MIT License)
|
4
4
|
|
5
|
-
Copyright (c) 2014-
|
5
|
+
Copyright (c) 2014-2018 Yegor Bugayenko
|
6
6
|
|
7
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
of this software and associated documentation files (the 'Software'), to deal
|
data/bin/pdd
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# Copyright (c) 2014-
|
2
|
+
# Copyright (c) 2014-2018 Yegor Bugayenko
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -36,7 +36,7 @@ Feature: Applies Post-Parsing Rules
|
|
36
36
|
@todo #13/DEV:15min Some text first
|
37
37
|
@todo #13/TEST:15min The text second
|
38
38
|
"""
|
39
|
-
When I run bin/pdd with "--rule=available-roles:DEV,
|
39
|
+
When I run bin/pdd with "--rule=available-roles:DEV,ARC"
|
40
40
|
Then Exit code is not zero
|
41
41
|
Then Stdout contains "defines role TEST"
|
42
42
|
|
data/features/cli.feature
CHANGED
@@ -35,7 +35,7 @@ Feature: Command Line Processing
|
|
35
35
|
"""
|
36
36
|
Nothing
|
37
37
|
"""
|
38
|
-
When I run bin/pdd with "-v -s . -f out.xml --rule min-words:20 --rule=available-roles:DEV,
|
38
|
+
When I run bin/pdd with "-v -s . -f out.xml --rule min-words:20 --rule=available-roles:DEV,ARC,PO"
|
39
39
|
Then Exit code is zero
|
40
40
|
|
41
41
|
Scenario: Simple puzzles collecting into stdout
|
data/features/parsing.feature
CHANGED
@@ -22,7 +22,7 @@ Feature: Parsing
|
|
22
22
|
And XML matches "//puzzle[ticket='13']"
|
23
23
|
And XML matches "//puzzle[lines='3-4']"
|
24
24
|
And XML matches "//puzzle[starts-with(body,'Let')]"
|
25
|
-
And XML matches "//puzzle[role='
|
25
|
+
And XML matches "//puzzle[role='DEV']"
|
26
26
|
And XML matches "//puzzle[estimate='0']"
|
27
27
|
|
28
28
|
Scenario: Multiple puzzles in one file
|
data/features/support/env.rb
CHANGED
data/lib/pdd.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2014-
|
1
|
+
# Copyright (c) 2014-2018 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -30,7 +30,7 @@ require_relative 'pdd/rule/roles'
|
|
30
30
|
|
31
31
|
# PDD main module.
|
32
32
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
33
|
-
# Copyright:: Copyright (c) 2014-
|
33
|
+
# Copyright:: Copyright (c) 2014-2018 Yegor Bugayenko
|
34
34
|
# License:: MIT
|
35
35
|
module PDD
|
36
36
|
# If it breaks.
|
data/lib/pdd/puzzle.rb
CHANGED
data/lib/pdd/rule/duplicates.rb
CHANGED
data/lib/pdd/rule/estimates.rb
CHANGED
data/lib/pdd/rule/roles.rb
CHANGED
data/lib/pdd/rule/text.rb
CHANGED
data/lib/pdd/source.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2014-
|
1
|
+
# Copyright (c) 2014-2018 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -88,7 +88,7 @@ against the rules explained here: https://github.com/yegor256/pdd#how-to-format"
|
|
88
88
|
{
|
89
89
|
ticket: match[1],
|
90
90
|
estimate: minutes(match[2], match[3]),
|
91
|
-
role: match[4].nil? ? '
|
91
|
+
role: match[4].nil? ? 'DEV' : match[4]
|
92
92
|
}
|
93
93
|
end
|
94
94
|
|
data/lib/pdd/sources.rb
CHANGED
data/lib/pdd/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2014-
|
1
|
+
# Copyright (c) 2014-2018 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -20,8 +20,8 @@
|
|
20
20
|
|
21
21
|
# PDD main module.
|
22
22
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
23
|
-
# Copyright:: Copyright (c) 2014-
|
23
|
+
# Copyright:: Copyright (c) 2014-2018 Yegor Bugayenko
|
24
24
|
# License:: MIT
|
25
25
|
module PDD
|
26
|
-
VERSION = '0.
|
26
|
+
VERSION = '0.20'.freeze
|
27
27
|
end
|
data/pdd.gemspec
CHANGED
data/test/test__helper.rb
CHANGED
data/test/test_duplicates.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2014-
|
1
|
+
# Copyright (c) 2014-2018 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -24,7 +24,7 @@ require_relative '../lib/pdd/rule/duplicates'
|
|
24
24
|
|
25
25
|
# PDD::Rule::MaxDuplicates class test.
|
26
26
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
27
|
-
# Copyright:: Copyright (c) 2014-
|
27
|
+
# Copyright:: Copyright (c) 2014-2018 Yegor Bugayenko
|
28
28
|
# License:: MIT
|
29
29
|
class TestMaxDuplicates < Minitest::Test
|
30
30
|
def test_max_duplicates
|
data/test/test_estimates.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2014-
|
1
|
+
# Copyright (c) 2014-2018 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -24,7 +24,7 @@ require_relative '../lib/pdd/rule/estimates'
|
|
24
24
|
|
25
25
|
# PDD::Rule::Estimate module tests.
|
26
26
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
27
|
-
# Copyright:: Copyright (c) 2014-
|
27
|
+
# Copyright:: Copyright (c) 2014-2018 Yegor Bugayenko
|
28
28
|
# License:: MIT
|
29
29
|
class TestEstimates < Minitest::Test
|
30
30
|
def test_min
|
data/test/test_pdd.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2014-
|
1
|
+
# Copyright (c) 2014-2018 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -26,7 +26,7 @@ require_relative '../lib/pdd'
|
|
26
26
|
|
27
27
|
# PDD main module test.
|
28
28
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
29
|
-
# Copyright:: Copyright (c) 2014-
|
29
|
+
# Copyright:: Copyright (c) 2014-2018 Yegor Bugayenko
|
30
30
|
# License:: MIT
|
31
31
|
class TestPDD < Minitest::Test
|
32
32
|
def test_basic
|
data/test/test_roles.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2014-
|
1
|
+
# Copyright (c) 2014-2018 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -24,7 +24,7 @@ require_relative '../lib/pdd/rule/roles'
|
|
24
24
|
|
25
25
|
# PDD::Rule::Role module tests.
|
26
26
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
27
|
-
# Copyright:: Copyright (c) 2014-
|
27
|
+
# Copyright:: Copyright (c) 2014-2018 Yegor Bugayenko
|
28
28
|
# License:: MIT
|
29
29
|
class TestRoles < Minitest::Test
|
30
30
|
def test_incorrect_role
|
data/test/test_source.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2014-
|
1
|
+
# Copyright (c) 2014-2018 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -25,7 +25,7 @@ require_relative '../lib/pdd/sources'
|
|
25
25
|
|
26
26
|
# Source test.
|
27
27
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
28
|
-
# Copyright:: Copyright (c) 2014-
|
28
|
+
# Copyright:: Copyright (c) 2014-2018 Yegor Bugayenko
|
29
29
|
# License:: MIT
|
30
30
|
class TestSource < Minitest::Test
|
31
31
|
def test_parsing
|
data/test/test_sources.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2014-
|
1
|
+
# Copyright (c) 2014-2018 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -26,7 +26,7 @@ require_relative '../lib/pdd/sources'
|
|
26
26
|
|
27
27
|
# Sources test.
|
28
28
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
29
|
-
# Copyright:: Copyright (c) 2014-
|
29
|
+
# Copyright:: Copyright (c) 2014-2018 Yegor Bugayenko
|
30
30
|
# License:: MIT
|
31
31
|
class TestSources < Minitest::Test
|
32
32
|
def test_iterator
|
data/test/test_text.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2014-
|
1
|
+
# Copyright (c) 2014-2018 Yegor Bugayenko
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -24,7 +24,7 @@ require_relative '../lib/pdd/rule/text'
|
|
24
24
|
|
25
25
|
# PDD::Rule::Text module tests.
|
26
26
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
27
|
-
# Copyright:: Copyright (c) 2014-
|
27
|
+
# Copyright:: Copyright (c) 2014-2018 Yegor Bugayenko
|
28
28
|
# License:: MIT
|
29
29
|
class TestText < Minitest::Test
|
30
30
|
def test_min_words
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.20'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|