marsh_grass 0.1.3 → 0.1.4

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
- SHA1:
3
- metadata.gz: 75c25a9fd71d7bc9e868b9d82a590e6c98ec1d3b
4
- data.tar.gz: 73e7f8bac791254293a91121b7f63850f438e440
2
+ SHA256:
3
+ metadata.gz: facd8238aebfd67c9c49832abce8fa371d9bba3c09d24361a952ad6398b3fd26
4
+ data.tar.gz: f2a81322cc5170eb3d51f417fc0875aa797bf3bcf3f5da9bc8294ba078b97d91
5
5
  SHA512:
6
- metadata.gz: 746ab6c822be5085e6bde4152d27974ba55b9981ec8aee2fd24feef188b8f9744efdd6e7d290f888506c80f86a6b397ad62df49916bf5fcde19c81469dd1455a
7
- data.tar.gz: a6ee7aae1fef25f098f76319047185c8760403c159500ff1496e0834eae2a3d681eae4786e59e8bb0d95a4094ff365d6cbedee1187aafc1812ec12b32de47105
6
+ metadata.gz: 41744d41b0dbc7c89ca2389ffff88767fbe7b366f8a48f17d609d41aa152296e6b00e41e1a77e883e62360a682f24f18bd797f3f9531cc4621a7c872893b90e5
7
+ data.tar.gz: '08bac1ca41f2889ae804faac20da4982fedfa8337c0e795ef996ff3e74c9a0ea1fe6c79928c36019fa03b0c3f519b15bd4c360edd765d60513fb91622978de88'
data/.travis.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.3.4
5
- before_install: gem install bundler -v 1.15.3
4
+ - 2.3.6
5
+ before_install: gem install bundler -v 1.16.1
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 Wes Rich
3
+ Copyright (c) 2017 RoleModel Software
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,8 +1,28 @@
1
1
  # MarshGrass
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/marsh_grass`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Finally! A way to examine the behavior of intermittent failures in RSpec.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ This gem allows you to subject an intermittently failing test to a variety of circumstances in an attempt to discern what combination of events leads to failure.
6
+
7
+ ## Background
8
+
9
+ Intermittent failures are challenging because the failure conditions are more difficult to pinpoint than with tests that fail 100% of the time.
10
+
11
+ Intermittent failures are also more likely to make it into production. They often pass during CI testing and code review and then crop up days or weeks later.
12
+
13
+ In programming, there is no such thing as a "random" failure. Every intermittent failure actually fails consistently, every single time... under the right set of circumstances. Perhaps your test only fails on Friday afternoons. Or, 10% of the time under race conditions. We once had a test that failed on every power of 2 run: on the 2nd, 4th, 8th, 16th run, etc. The more we ran it, the more elusive it became.
14
+
15
+ Often, the first step in fixing such a failure is to make it fail consistently. That way, as you change your code, you can use the test to confirm when you've fixed the root cause. After all, that is the purpose of the test!
16
+
17
+ ## Features
18
+ This gem subjects a given test to the following circumstances:
19
+ - repetitions
20
+ - range of speeds in execution
21
+ - execution at all times of day
22
+ - execution in all time zones
23
+ - execution at all the milliseconds surrounding a particular time of day
24
+
25
+ In our experience, repetitions is the option we use the most often. It gives the broadest feedback and is very effective at uncovering race conditions.
6
26
 
7
27
  ## Installation
8
28
 
@@ -21,18 +41,31 @@ Or install it yourself as:
21
41
  $ gem install marsh_grass
22
42
 
23
43
  ## Usage
44
+ Feature use:
45
+ - N repetitions (default: 1000, or specify integer)
46
+ - Times of day (default: all hours, minutes, seconds or specify :hours, :minutes, :seconds)
47
+ - Time zones (executes against all hour and half-hour time zones)
48
+ - Elapsed time during test execution (default: (1..10) execution slow-down multipliers or specify range)
49
+ - Surrounding time, i.e., clock change over during the test (must specify hour: <integer>, minute: <integer>, second: <integer>)
24
50
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
51
+ Surrounding time runs test at every millisecond from 1 sec before to 1 sec after specified time. This is particularly useful for discerning rate of failure near and at midnight.
28
52
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
53
+ ### Examples
54
+ Simple example:
55
+ ```ruby
56
+ it 'uses default repetitions', :repetitions do
57
+ ...
58
+ end
30
59
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
60
+ it 'uses specific repetitions', repetitions: 20 do
61
+ ...
62
+ end
63
+ ```
64
+ [Full Examples](./spec/marsh_grass_spec.rb) of tests using each feature.
32
65
 
33
66
  ## Contributing
34
67
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/wesrich/marsh_grass.
68
+ Bug reports and pull requests are welcome on GitHub at https://github.com/RoleModel/marsh_grass.
36
69
 
37
70
  ## License
38
71
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MarshGrass
4
- VERSION = '0.1.3'
4
+ VERSION = '0.1.4'
5
5
  end
data/marsh_grass.gemspec CHANGED
@@ -10,11 +10,11 @@ Gem::Specification.new do |spec|
10
10
  spec.version = MarshGrass::VERSION
11
11
  spec.authors = [
12
12
  'Wes Rich',
13
- 'Amanda Simon'
13
+ 'Amanda Pouget'
14
14
  ]
15
15
  spec.email = [
16
16
  'wes.rich@rolemodelsoftware.com',
17
- 'amanda.simon@rolemodelsoftware.com'
17
+ 'amanda.pouget@rolemodelsoftware.com'
18
18
  ]
19
19
 
20
20
  spec.summary = %q{A set of tools to help diagnose random test failures.}
@@ -30,9 +30,9 @@ Gem::Specification.new do |spec|
30
30
  spec.require_paths = ['lib']
31
31
 
32
32
  spec.add_development_dependency 'bundler', '~> 1.15'
33
- spec.add_development_dependency 'rake', '~> 10.0'
34
33
  spec.add_development_dependency 'pry-byebug', '~> 3'
35
34
  spec.add_development_dependency 'pry-doc', '~> 0'
35
+ spec.add_development_dependency 'rake', '~> 10.0'
36
36
  spec.add_dependency 'rspec', '~> 3.6'
37
37
  spec.add_dependency 'timecop', '~> 0'
38
38
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marsh_grass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wes Rich
8
- - Amanda Simon
8
+ - Amanda Pouget
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-10-20 00:00:00.000000000 Z
12
+ date: 2018-12-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -26,47 +26,47 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.15'
28
28
  - !ruby/object:Gem::Dependency
29
- name: rake
29
+ name: pry-byebug
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '10.0'
34
+ version: '3'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '10.0'
41
+ version: '3'
42
42
  - !ruby/object:Gem::Dependency
43
- name: pry-byebug
43
+ name: pry-doc
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '3'
48
+ version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '3'
55
+ version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
- name: pry-doc
57
+ name: rake
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '0'
62
+ version: '10.0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '0'
69
+ version: '10.0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rspec
72
72
  requirement: !ruby/object:Gem::Requirement
@@ -99,7 +99,7 @@ description: Currently works with RSpec tags to run against possible test failur
99
99
  scenarios.
100
100
  email:
101
101
  - wes.rich@rolemodelsoftware.com
102
- - amanda.simon@rolemodelsoftware.com
102
+ - amanda.pouget@rolemodelsoftware.com
103
103
  executables: []
104
104
  extensions: []
105
105
  extra_rdoc_files: []
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  requirements: []
137
137
  rubyforge_project:
138
- rubygems_version: 2.6.13
138
+ rubygems_version: 2.7.7
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: A set of tools to help diagnose random test failures.