pdd 0.17.4 → 0.17.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e3a86ea459f81e85300aca8db83ac75fa4900ef
4
- data.tar.gz: 0e0b0382904a578a64e43066bb06ae8b8be78b56
3
+ metadata.gz: 2eac010a46d3fffb281c25ee03c0ae420253b8b0
4
+ data.tar.gz: 1fca8687f26d3b19a0e943cace0fcfdd1301bc1b
5
5
  SHA512:
6
- metadata.gz: fb8ed0d9236f69ad90bfb6f81ae7d8439c9982e004351ea18a10ee4236eadd3d7272d532c1cb0976a28edd10f238ee3121a37ac8e00ab7560be7b9c8bee2e601
7
- data.tar.gz: c0aad26728527b0f345932dbcdb0c022e6693e91c076e8f81280b7db5243285dfead016ebfdcf191d8f7ea1201ddb19af8d5a315c7c9d88a4e1b24c578e9eabf
6
+ metadata.gz: 3f4036a2e93cad1448131b21994a5919054c30b0afec8c4f7321913f4fced512fed20b786d37589a7e51148c39fd42894615742e9f8be059acee023fb970df62
7
+ data.tar.gz: 872dfa74d5f2d53f8b68ffd537d0117d56aa32262a0cd1fb4cffd82815b2e5b5b69011fbbf47fe992c692c2c4d974ac6ba5324f7dc8216964557cbdcd8ff7e76
data/.rultor.yml CHANGED
@@ -7,7 +7,8 @@ install: |
7
7
  sudo gem install pdd
8
8
  release:
9
9
  script: |-
10
- sudo bundle install
10
+ env
11
+ bundle install
11
12
  rake
12
13
  rm -rf *.gem
13
14
  sed -i "s/1\.0\.snapshot/${tag}/g" lib/pdd/version.rb
@@ -8,6 +8,9 @@ Feature: Catches Broken Puzzles
8
8
  """
9
9
  public class Main {
10
10
  /**
11
+ * Some other documentation
12
+ * text that is not relevant to
13
+ * the puzzle below.
11
14
  * @todo #13 This puzzle has an incorrect format
12
15
  * because it doesn't start with a space on
13
16
  * the second and the third lines
@@ -18,6 +21,7 @@ Feature: Catches Broken Puzzles
18
21
  }
19
22
  """
20
23
  When I run pdd it fails with "Space expected"
24
+ When I run pdd it fails with "in line #6"
21
25
 
22
26
  Scenario: Throwing exception on another broken puzzle
23
27
  Given I have a "Sample.java" file with content:
data/lib/pdd/source.rb CHANGED
@@ -47,8 +47,10 @@ module PDD
47
47
  re.match(line) do |match|
48
48
  puzzles << puzzle(lines.drop(idx + 1), match, idx)
49
49
  end
50
+ rescue Error => ex
51
+ raise Error, ["in line ##{idx + 1}", ex]
50
52
  rescue ArgumentError => ex
51
- raise Error, ["in line ##{idx}", ex]
53
+ raise Error, ["in line ##{idx + 1}", ex]
52
54
  end
53
55
  end
54
56
  lines.each_with_index do |line, idx|
@@ -77,7 +79,7 @@ module PDD
77
79
 
78
80
  # Parse a marker.
79
81
  def marker(text)
80
- re = %r{([\w\d\-\.]+)(?::(\d+)(?:(m|h)[a-z]*)?)?(?:/([A-Z]+))?}
82
+ re = %r{([\w\-\.]+)(?::(\d+)(?:(m|h)[a-z]*)?)?(?:/([A-Z]+))?}
81
83
  match = re.match(text)
82
84
  raise "invalid puzzle marker: #{text}" if match.nil?
83
85
  {
data/lib/pdd/version.rb CHANGED
@@ -25,5 +25,5 @@
25
25
  # Copyright:: Copyright (c) 2014-2017 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module PDD
28
- VERSION = '0.17.4'.freeze
28
+ VERSION = '0.17.5'.freeze
29
29
  end
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.17.4
4
+ version: 0.17.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-17 00:00:00.000000000 Z
11
+ date: 2017-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  version: '0'
234
234
  requirements: []
235
235
  rubyforge_project:
236
- rubygems_version: 2.4.5.2
236
+ rubygems_version: 2.6.8
237
237
  signing_key:
238
238
  specification_version: 2
239
239
  summary: Puzzle Driven Development collector