rantly 1.0.0 → 1.1.0

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: 9f2c8ec7d03b419778a6671029bf86bf946d4e06
4
- data.tar.gz: 3363b988ec1f4a7ee3a03f22f99f41b3783c20eb
3
+ metadata.gz: 5d5909494bebecbd6f94ce3c8e9de705072d5811
4
+ data.tar.gz: e04f4f9530d3dce1361cbe01cf318995c1f67399
5
5
  SHA512:
6
- metadata.gz: aa41245990c513af23ca3830db8403d4fb7e3108ef2216aa562399e6c590baafc11d3be1970b0c9fdc8c785366535c67901bd4cd6e61a39b135e887a3da60ae5
7
- data.tar.gz: 593f20b00e41d467c213372b031578921fdbd4bb6bd5295ae85ffb389c1c62c9b8a7e981034fb9b52b1c356dc552acbb38aaa6af3d5c9d629eaf487617d5ecbf
6
+ metadata.gz: '00709b69bbccfe71a42295cf0551616281cd318c0704e5f53f48d90c93423271fc472f3ccca82ca2f77f45eb5f6cd7d5954254e727b24592e004fda69c1f6d0f'
7
+ data.tar.gz: 19491d969d644a1be5675582427ac75eee88bb0762cda4d38608d03bba9a0f12dc9c75c646e02130f7bb9db5774c47e939f4945080a1471ec283fb7aab5095c7
@@ -1,8 +1,19 @@
1
1
  language: ruby
2
+ sudo: false
3
+ cache: bundler
4
+ after_success:
5
+ - coveralls
2
6
  rvm:
3
- - 1.9.3
4
7
  - 2.0.0
5
- - 2.1.6
6
- - 2.2.2
7
- - rbx-2
8
- - jruby
8
+ - 2.1.9
9
+ - 2.2.6
10
+ - 2.3.3
11
+ - 2.4.0
12
+ - rbx-2.5.8
13
+ - rbx-3.70
14
+ - jruby-1.7.26
15
+ - jruby-9.1.7.0
16
+ matrix:
17
+ allow_failures:
18
+ - rvm: rbx-2.5.8
19
+ - rvm: rbx-3.70
@@ -3,12 +3,24 @@ All notable changes to rantly will be documented in this file. The curated log b
3
3
 
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [1.1.0][1.1.0] - 2017-04-18
7
+ ### Improved
8
+ - Include failed example and number of example run in failure message.
9
+ - [Issue #21][21]
10
+ - thanks [Ana María Martínez Gómez][Ana María Martínez Gómez]
11
+ - Improve run-time for generation of strings.
12
+ - [Issue #19][19]
13
+
6
14
  ## [1.0.0][1.0.0] - 2016-07-06
7
15
  ### Added
8
- - Trying harder to shrink collections instead of giving up on first success of property (thanks [Eric Bischoff][Eric Bischoff]).
9
- - Added convenience classes Deflating and Tuple for more control on shrinking (thanks [Eric Bischoff][Eric Bischoff]).
10
- - Added usage examples for Deflating and Tuple shrinking strategies (thanks [Oleksii Fedorov][Oleksii Fedorov]).
11
- - `Property#check` will now use the `RANTLY_COUNT` environment variable to control the number of values generated (thanks [Jamie English][Jamie English]).
16
+ - Trying harder to shrink collections instead of giving up on first success of property.
17
+ - thanks [Eric Bischoff][Eric Bischoff]
18
+ - Added convenience classes Deflating and Tuple for more control on shrinking.
19
+ - thanks [Eric Bischoff][Eric Bischoff]
20
+ - Added usage examples for Deflating and Tuple shrinking strategies.
21
+ - thanks [Oleksii Fedorov][Oleksii Fedorov]
22
+ - `Property#check` will now use the `RANTLY_COUNT` environment variable to control the number of values generated.
23
+ - thanks [Jamie English][Jamie English]
12
24
 
13
25
  ### Major changes
14
26
  - Array shrink was removed in favor of Tuple and Deflating.
@@ -19,12 +31,16 @@ This project adheres to [Semantic Versioning](http://semver.org/).
19
31
 
20
32
  ### Changed
21
33
  - Improved RSpec and Minitest test extensions.
22
- - Improved readability and execution of test suite ([Issue #4][4]).
34
+ - Improved readability and execution of test suite.
35
+ - [Issue #4][4]
23
36
  - Updates to documentation.
24
37
 
25
- [1.0.0]: https://github.com/abargnesi/rantly/compare/0.3.2...1.0.0
26
- [0.3.2]: https://github.com/abargnesi/rantly/compare/0.3.1...0.3.2
27
- [4]: https://github.com/abargnesi/rantly/issues/13
28
- [Eric Bischoff]: https://github.com/Bischoff
29
- [Jamie English]: https://github.com/english
30
- [Oleksii Fedorov]: https://github.com/waterlink
38
+ [1.0.0]: https://github.com/abargnesi/rantly/compare/0.3.2...1.0.0
39
+ [0.3.2]: https://github.com/abargnesi/rantly/compare/0.3.1...0.3.2
40
+ [4]: https://github.com/abargnesi/rantly/issues/4
41
+ [19]: https://github.com/abargnesi/rantly/issues/19
42
+ [21]: https://github.com/abargnesi/rantly/issues/21
43
+ [Eric Bischoff]: https://github.com/Bischoff
44
+ [Jamie English]: https://github.com/english
45
+ [Oleksii Fedorov]: https://github.com/waterlink
46
+ [Ana María Martínez Gómez]: https://github.com/Ana06
data/Gemfile CHANGED
@@ -1,8 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  group :development, :test do
4
- gem 'minitest', "~> 5.7.0"
5
- gem 'jeweler'
6
- gem 'simplecov'
7
- gem 'coveralls', :require => false
4
+ gem 'rake', '~> 12.0.0'
5
+ gem 'minitest', '~> 5.10.0'
6
+ gem 'simplecov', '>= 0'
7
+ gem 'coveralls', '>= 0', :require => false
8
8
  end
data/LICENSE CHANGED
@@ -1,3 +1,6 @@
1
+
2
+ The MIT License (MIT)
3
+
1
4
  Copyright (c) 2009 Howard Yeh
2
5
 
3
6
  Permission is hereby granted, free of charge, to any person obtaining
@@ -396,6 +396,6 @@ property_of {
396
396
  Normal arrays or hashes are not shrinked.
397
397
 
398
398
 
399
- h1. Copyright
399
+ h1. License
400
400
 
401
- Copyright (c) 2009 Howard Yeh. See LICENSE for details.
401
+ Code published under MIT License, Copyright (c) 2009 Howard Yeh. See "LICENSE":https://github.com/abargnesi/rantly/LICENSE
data/Rakefile CHANGED
@@ -1,21 +1,5 @@
1
- require 'rubygems'
2
1
  require 'rake'
3
2
 
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "rantly"
8
- gem.summary = %Q{Ruby Imperative Random Data Generator and Quickcheck}
9
- gem.email = ["hayeah@gmail.com", "abargnesi@gmail.com", "ebischoff@nerim.net"]
10
- gem.homepage = "https://github.com/abargnesi/rantly"
11
- gem.authors = ["Howard Yeh", "Anthony Bargnesi", "Eric Bischoff"]
12
-
13
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
14
- end
15
- rescue LoadError
16
- puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
17
- end
18
-
19
3
  require 'rake/testtask'
20
4
  Rake::TestTask.new(:test) do |test|
21
5
  test.libs << 'lib' << 'test'
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :build:
3
3
  :major: 1
4
- :minor: 0
4
+ :minor: 1
5
5
  :patch: 0
@@ -271,10 +271,14 @@ class Rantly
271
271
  Chars::CLASSES[char_class]
272
272
  end
273
273
  raise "bad arg" unless chars
274
- str = ""
275
- size.times do
276
- str << choose(*chars)
274
+
275
+ char_strings = chars.map { |c| c.chr }
276
+ str = Array.new(size)
277
+ current_index = 0
278
+ while current_index < size
279
+ str[current_index] = char_strings.sample
280
+ current_index += 1
277
281
  end
278
- str
282
+ str.join
279
283
  end
280
284
  end
@@ -51,7 +51,7 @@ class Rantly::Property
51
51
  io.puts "minimal failed data (depth #{@depth}) is:"
52
52
  pretty_print @shrunk_failed_data
53
53
  end
54
- raise boom
54
+ raise $!, "failure: #{i} tests, on:\n#{test_data}\n\n#{boom}\n", $@
55
55
  end
56
56
  end
57
57
 
@@ -1,24 +1,17 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
- # stub: rantly 1.0.0 ruby lib
6
-
7
1
  Gem::Specification.new do |s|
8
- s.name = "rantly"
9
- s.version = "1.0.0"
10
-
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib"]
13
- s.authors = ["Howard Yeh", "Anthony Bargnesi", "Eric Bischoff"]
14
- s.date = "2016-07-06"
15
- s.email = ["hayeah@gmail.com", "abargnesi@gmail.com", "ebischoff@nerim.net"]
2
+ s.name = "rantly"
3
+ s.summary = "Ruby Imperative Random Data Generator and Quickcheck"
4
+ s.homepage = "https://github.com/abargnesi/rantly"
5
+ s.version = "1.1.0"
6
+ s.require_paths = ["lib"]
7
+ s.authors = ["Howard Yeh", "Anthony Bargnesi", "Eric Bischoff"]
8
+ s.email = ["hayeah@gmail.com", "abargnesi@gmail.com", "ebischoff@nerim.net"]
16
9
  s.extra_rdoc_files = [
17
10
  "LICENSE",
18
11
  "README.textile",
19
12
  "CHANGELOG.md"
20
13
  ]
21
- s.files = [
14
+ s.files = [
22
15
  ".document",
23
16
  ".travis.yml",
24
17
  "Gemfile",
@@ -44,29 +37,10 @@ Gem::Specification.new do |s|
44
37
  "test/shrinks_test.rb",
45
38
  "test/test_helper.rb"
46
39
  ]
47
- s.homepage = "https://github.com/abargnesi/rantly"
48
- s.rubygems_version = "2.4.5.1"
49
- s.summary = "Ruby Imperative Random Data Generator and Quickcheck"
50
-
51
- if s.respond_to? :specification_version then
52
- s.specification_version = 4
53
40
 
54
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
55
- s.add_development_dependency(%q<minitest>, ["~> 5.7.0"])
56
- s.add_development_dependency(%q<jeweler>, [">= 0"])
57
- s.add_development_dependency(%q<simplecov>, [">= 0"])
58
- s.add_development_dependency(%q<coveralls>, [">= 0"])
59
- else
60
- s.add_dependency(%q<minitest>, ["~> 5.7.0"])
61
- s.add_dependency(%q<jeweler>, [">= 0"])
62
- s.add_dependency(%q<simplecov>, [">= 0"])
63
- s.add_dependency(%q<coveralls>, [">= 0"])
64
- end
65
- else
66
- s.add_dependency(%q<minitest>, ["~> 5.7.0"])
67
- s.add_dependency(%q<jeweler>, [">= 0"])
68
- s.add_dependency(%q<simplecov>, [">= 0"])
69
- s.add_dependency(%q<coveralls>, [">= 0"])
70
- end
41
+ s.add_development_dependency('rake', '~> 12.0.0')
42
+ s.add_development_dependency('minitest', '~> 5.10.0')
43
+ s.add_development_dependency('simplecov', '>= 0')
44
+ s.add_development_dependency('coveralls', '>= 0')
71
45
  end
72
46
 
@@ -1,9 +1,4 @@
1
- require 'rubygems'
2
- require 'minitest/autorun'
3
-
4
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
5
- $LOAD_PATH.unshift(File.dirname(__FILE__))
6
-
1
+ # Require simplecov and coveralls before rantly application code.
7
2
  require 'simplecov'
8
3
  SimpleCov.start
9
4
 
@@ -15,4 +10,6 @@ begin
15
10
  rescue LoadError
16
11
  end
17
12
 
13
+ # Require rantly.
14
+ require 'minitest/autorun'
18
15
  require 'rantly'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rantly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Howard Yeh
@@ -10,36 +10,36 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-07-06 00:00:00.000000000 Z
13
+ date: 2017-04-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: minitest
16
+ name: rake
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 5.7.0
21
+ version: 12.0.0
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 5.7.0
28
+ version: 12.0.0
29
29
  - !ruby/object:Gem::Dependency
30
- name: jeweler
30
+ name: minitest
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - ">="
33
+ - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: '0'
35
+ version: 5.10.0
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - ">="
40
+ - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: '0'
42
+ version: 5.10.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: simplecov
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -123,9 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
- rubygems_version: 2.5.1
126
+ rubygems_version: 2.6.8
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Ruby Imperative Random Data Generator and Quickcheck
130
130
  test_files: []
131
- has_rdoc: