From cfb280149dfd8ccb4c649415c34f498ccfe25a9a Mon Sep 17 00:00:00 2001 From: Dominic Sayers Date: Wed, 17 May 2017 09:13:24 +0100 Subject: [PATCH 01/12] Rename gem so I can publish it --- .codeclimate.yml | 2 +- README.md | 37 +++++++++++++------------------------ machinist.gemspec | 6 +++--- 3 files changed, 17 insertions(+), 28 deletions(-) diff --git a/.codeclimate.yml b/.codeclimate.yml index 5199e46..7897fff 100755 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -11,7 +11,7 @@ engines: enabled: true ratings: paths: - - "**.rb" + - '**.rb' exclude_paths: - script/ - spec/ diff --git a/README.md b/README.md index 3d7a059..10dbc76 100755 --- a/README.md +++ b/README.md @@ -10,16 +10,22 @@ [![Dependency Status](https://gemnasium.com/badges/github.com/dominicsayers/machinist.svg)](https://gemnasium.com/github.com/dominicsayers/machinist) [![Security](https://hakiri.io/github/dominicsayers/machinist/master.svg)](https://hakiri.io/github/dominicsayers/machinist/master) -- [Home page](http://github.com/dominicsayers/machinist) -- [Google group](http://groups.google.com/group/machinist-users), for support -- [Bug tracker](http://github.com/dominicsayers/machinist/issues), for reporting Machinist bugs +- [Home page](https://github.com/dominicsayers/machinist) +- [Google group](https://groups.google.com/group/machinist-users), for support +- [Bug tracker](https://github.com/dominicsayers/machinist/issues), for reporting Machinist bugs -If you want Machinist 1, [go here](http://github.com/notahat/machinist/tree/1.0-maintenance). +If you want Machinist 1, [go here](https://github.com/notahat/machinist/tree/1.0-maintenance). +If you want support for Rails 3 or Rubies prior to 2.2, [go here](https://github.com/attilagyorffy/machinist). -## Introduction -This is a fork of [Pete Yandell's Machinist](http://github.com/notahat/machinist). Unfortunately the original gem seems to be abandoned, regardless of the numerous pull requests that are waiting for approval and to be merged in. The purpose of this fork is to keep Machinist under maintenance and add additional features and support for multiple Ruby implementations, including Rubinius or JRuby. +## Status + +This is a fork of [Pete Yandell's Machinist](http://github.com/notahat/machinist). The original gem was abandoned for the reasons given below, as are most of its forks. The purpose of this fork is to keep Machinist under maintenance for legacy projects that have upgraded to Ruby 2.2 or later and Rails 4.2 or later, but still have Machinist factories in the test environment. + +Pete Yandell's reason for abandoning Machinist is that he found himself with less and less need for factories in tests. He recommends Bo Jeanes' [excellent article on the topic](http://bjeanes.com/2012/02/factories-breed-complexity). + +## Introduction Machinist makes it easy to create objects for use in tests. It generates data for the attributes you don't care about, and constructs any necessary @@ -63,7 +69,7 @@ You tell Machinist how to do this with blueprints: See [the wiki](http://wiki.github.com/notahat/machinist/machinist-2). -### Rails 3 +### Rails 4 and 5 In your app's `Gemfile`, in the `group :test` section, add: @@ -82,11 +88,6 @@ inside the Application class: g.fixture_replacement :machinist end -### Rails 2 - -See [the wiki](http://wiki.github.com/notahat/machinist/rails-2). - - ## Usage ### Blueprints @@ -259,18 +260,6 @@ If you want to submit a patch: (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) - Send me a pull request. Bonus points for topic branches. - -## Status - -In active use in a number of large Rails 2 and 3 apps. - -Development is sporadic at best, as I find myself with less and less need for -factories in tests. See Bo Jeanes' -[excellent article on the topic](http://bjeanes.com/2012/02/factories-breed-complexity). - -If anybody wants to take over maintenance, let me know. - - ## Contributors Machinist was maintained by Pete Yandell ([pete@notahat.com](mailto:pete@notahat.com), [@notahat](http://twitter.com/notahat)) diff --git a/machinist.gemspec b/machinist.gemspec index 77bd979..979dd40 100755 --- a/machinist.gemspec +++ b/machinist.gemspec @@ -5,15 +5,15 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'machinist/version' Gem::Specification.new do |gem| - gem.name = 'machinist' + gem.name = 'machinist_redux' gem.version = Machinist::VERSION gem.authors = ['Pete Yandell', 'Attila Györffy', 'Dominic Sayers'] gem.email = ['dominic@sayers.cc'] gem.description = 'Machinist makes it easy to create objects for use in tests. It generates data for the ' \ "attributes you don't care about, and constructs any necessary associated objects, leaving you "\ 'to specify only the fields you care about in your test.' - gem.summary = "Fixtures aren't fun. Machinist is." - gem.homepage = 'http://github.com/liquid/machinist' + gem.summary = "Fixtures aren't fun. Machinist was." + gem.homepage = 'http://github.com/dominicsayers/machinist' gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR) gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) } From 835e67878228b159e38ae446c1f788ebec4329ef Mon Sep 17 00:00:00 2001 From: Dominic Sayers Date: Wed, 17 May 2017 09:16:39 +0100 Subject: [PATCH 02/12] Fix errors in README --- README.md | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 10dbc76..a378cdd 100755 --- a/README.md +++ b/README.md @@ -227,23 +227,7 @@ You can refer to already assigned attributes when constructing a new attribute: Read the code! No, really. I wrote this code to be read. -Check out [the specs](https://github.com/dominicsayers/machinist/tree/master/spec), -starting with [the spec for -Machinable](https://github.com/dominicsayers/machinist/blob/master/spec/machinable_spec.rb). - - -## Compatibility - -Please have a look at the Travis Build Status. [![Travis Build Status](https://travis-ci.org/dominicsayers/machinist.png?branch=master)](https://travis-ci.org/dominicsayers/machinist) - -I've tested this with: - -Ruby versions: 1.8.7, 1.9.2, 1.9.3, 2.0.0 -Rails versions: 2.3, 3.0, 3.2 - -It may well be happy with other versions too, but I'm not promising anything. -Compatibility patches are welcome. - +Check out [the specs](https://github.com/dominicsayers/machinist/tree/master/spec), starting with [the spec for Machinable](https://github.com/dominicsayers/machinist/blob/master/spec/machinable_spec.rb). ## Developing @@ -286,7 +270,7 @@ Other contributors include: [Roland Swingler](http://github.com/knaveofdiamonds), [Gareth Townsend](http://github.com/quamen), [Matt Wastrodowski](http://github.com/towski), -[Ian White](http://github.com/ianwhite) +[Ian White](http://github.com/ianwhite), [Dominic Sayers](https://github.com/dominicsayers) Thanks to Thoughtbot's [Factory From b7185b7799ec828eadfebd915e8d1835569828cc Mon Sep 17 00:00:00 2001 From: Dominic Sayers Date: Wed, 17 May 2017 09:21:22 +0100 Subject: [PATCH 03/12] Additional dev environment tooling --- Gemfile | 6 ++ gemfiles/rails_4.2.gemfile | 12 ++- gemfiles/rails_4.2.gemfile.lock | 125 ++++++++++++++++++++++++++++++- gemfiles/rails_5.0.gemfile | 12 ++- gemfiles/rails_5.0.gemfile.lock | 125 ++++++++++++++++++++++++++++++- gemfiles/rails_5.1.gemfile | 16 ++-- gemfiles/rails_5.1.gemfile.lock | 126 +++++++++++++++++++++++++++++++- 7 files changed, 399 insertions(+), 23 deletions(-) diff --git a/Gemfile b/Gemfile index 72682e0..9e5dbc5 100755 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,12 @@ ruby RUBY_VERSION group :development do gem 'appraisal', require: false + gem 'gem-release', require: false + gem 'github_changelog_generator', require: false + gem 'guard', require: false + gem 'guard-rspec', require: false + gem 'guard-rubocop', require: false + gem 'guard-rubycritic', require: false gem 'rdoc', require: false gem 'rubocop-rspec', require: false end diff --git a/gemfiles/rails_4.2.gemfile b/gemfiles/rails_4.2.gemfile index 51a17fe..70ec7c5 100755 --- a/gemfiles/rails_4.2.gemfile +++ b/gemfiles/rails_4.2.gemfile @@ -7,9 +7,15 @@ ruby RUBY_VERSION gem "activerecord", "~> 4.2.8", group: :test, require: false group :development do - gem "appraisal", require: false - gem "rdoc", require: false - gem "rubocop-rspec", require: false + gem 'appraisal', require: false + gem 'gem-release', require: false + gem 'github_changelog_generator', require: false + gem 'guard', require: false + gem 'guard-rspec', require: false + gem 'guard-rubocop', require: false + gem 'guard-rubycritic', require: false + gem 'rdoc', require: false + gem 'rubocop-rspec', require: false end group :test do diff --git a/gemfiles/rails_4.2.gemfile.lock b/gemfiles/rails_4.2.gemfile.lock index ffee889..e3448ca 100644 --- a/gemfiles/rails_4.2.gemfile.lock +++ b/gemfiles/rails_4.2.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - machinist (2.0) + machinist_redux (2.0) GEM remote: http://rubygems.org/ @@ -18,36 +18,126 @@ GEM minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) + addressable (2.5.1) + public_suffix (~> 2.0, >= 2.0.2) appraisal (2.2.0) bundler rake thor (>= 0.14.0) arel (6.0.4) ast (2.3.0) + axiom-types (0.1.1) + descendants_tracker (~> 0.0.4) + ice_nine (~> 0.11.0) + thread_safe (~> 0.3, >= 0.3.1) builder (3.2.3) + codeclimate-engine-rb (0.4.0) + virtus (~> 1.0) codeclimate-test-reporter (1.0.7) simplecov + coderay (1.1.1) + coercible (1.0.0) + descendants_tracker (~> 0.0.1) coveralls (0.8.21) json (>= 1.8, < 3) simplecov (~> 0.14.1) term-ansicolor (~> 1.3) thor (~> 0.19.4) tins (~> 1.6) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) diff-lcs (1.3) docile (1.1.5) + equalizer (0.0.11) + erubis (2.7.0) + faraday (0.12.1) + multipart-post (>= 1.2, < 3) + faraday-http-cache (2.0.0) + faraday (~> 0.8) + ffi (1.9.18) + flay (2.9.0) + erubis (~> 2.7.0) + path_expander (~> 1.0) + ruby_parser (~> 3.0) + sexp_processor (~> 4.0) + flog (4.6.1) + path_expander (~> 1.0) + ruby_parser (~> 3.1, > 3.1.0) + sexp_processor (~> 4.8) + formatador (0.2.5) fuubar (2.2.0) rspec-core (~> 3.0) ruby-progressbar (~> 1.4) + gem-release (1.0.0) + github_changelog_generator (1.14.3) + activesupport + faraday-http-cache + multi_json + octokit (~> 4.6) + rainbow (>= 2.1) + rake (>= 10.0) + retriable (~> 2.1) + guard (2.14.1) + formatador (>= 0.2.4) + listen (>= 2.7, < 4.0) + lumberjack (~> 1.0) + nenv (~> 0.1) + notiffany (~> 0.0) + pry (>= 0.9.12) + shellany (~> 0.0) + thor (>= 0.18.1) + guard-compat (1.2.1) + guard-rspec (4.7.3) + guard (~> 2.1) + guard-compat (~> 1.1) + rspec (>= 2.99.0, < 4.0) + guard-rubocop (1.2.0) + guard (~> 2.0) + rubocop (~> 0.20) + guard-rubycritic (2.9.3) + guard (~> 2.6) + rubycritic (>= 2.9.3) i18n (0.8.1) + ice_nine (0.11.2) json (2.1.0) + launchy (2.4.3) + addressable (~> 2.3) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + lumberjack (1.0.12) + method_source (0.8.2) minitest (5.10.2) + multi_json (1.12.1) + multipart-post (2.0.0) + nenv (0.3.0) + notiffany (0.1.1) + nenv (~> 0.1) + shellany (~> 0.0) + octokit (4.7.0) + sawyer (~> 0.8.0, >= 0.5.3) parser (2.4.0.0) ast (~> 2.2) + path_expander (1.0.2) powerpack (0.1.1) + pry (0.10.4) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + public_suffix (2.0.5) rainbow (2.2.2) rake rake (12.0.0) + rb-fsevent (0.9.8) + rb-inotify (0.9.8) + ffi (>= 0.5.0) rdoc (5.1.0) + reek (4.6.2) + codeclimate-engine-rb (~> 0.4.0) + parser (>= 2.4.0.0, < 2.5) + rainbow (~> 2.0) + retriable (2.1.0) rspec (3.6.0) rspec-core (~> 3.6.0) rspec-expectations (~> 3.6.0) @@ -73,20 +163,43 @@ GEM rubocop-rspec (1.15.1) rubocop (>= 0.42.0) ruby-progressbar (1.8.1) + ruby_dep (1.5.0) + ruby_parser (3.9.0) + sexp_processor (~> 4.1) + rubycritic (3.2.1) + flay (~> 2.8) + flog (~> 4.4) + launchy (= 2.4.3) + parser (= 2.4.0) + rainbow (~> 2.1) + reek (~> 4.4) + ruby_parser (~> 3.8) + virtus (~> 1.0) + sawyer (0.8.1) + addressable (>= 2.3.5, < 2.6) + faraday (~> 0.8, < 1.0) + sexp_processor (4.9.0) + shellany (0.0.1) simplecov (0.14.1) docile (~> 1.1.0) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.0) + slop (3.6.0) sqlite3 (1.3.13) term-ansicolor (1.6.0) tins (~> 1.0) thor (0.19.4) thread_safe (0.3.6) - tins (1.13.3) + tins (1.14.0) tzinfo (1.2.3) thread_safe (~> 0.1) unicode-display_width (1.2.1) + virtus (1.0.5) + axiom-types (~> 0.1) + coercible (~> 1.0) + descendants_tracker (~> 0.0, >= 0.0.3) + equalizer (~> 0.0, >= 0.0.9) PLATFORMS ruby @@ -98,7 +211,13 @@ DEPENDENCIES codeclimate-test-reporter coveralls fuubar - machinist! + gem-release + github_changelog_generator + guard + guard-rspec + guard-rubocop + guard-rubycritic + machinist_redux! rdoc rspec rspec_junit_formatter diff --git a/gemfiles/rails_5.0.gemfile b/gemfiles/rails_5.0.gemfile index 82059d3..bda4439 100755 --- a/gemfiles/rails_5.0.gemfile +++ b/gemfiles/rails_5.0.gemfile @@ -7,9 +7,15 @@ ruby RUBY_VERSION gem "activerecord", "~> 5.0.3", group: :test, require: false group :development do - gem "appraisal", require: false - gem "rdoc", require: false - gem "rubocop-rspec", require: false + gem 'appraisal', require: false + gem 'gem-release', require: false + gem 'github_changelog_generator', require: false + gem 'guard', require: false + gem 'guard-rspec', require: false + gem 'guard-rubocop', require: false + gem 'guard-rubycritic', require: false + gem 'rdoc', require: false + gem 'rubocop-rspec', require: false end group :test do diff --git a/gemfiles/rails_5.0.gemfile.lock b/gemfiles/rails_5.0.gemfile.lock index 2f36786..5ed5f29 100644 --- a/gemfiles/rails_5.0.gemfile.lock +++ b/gemfiles/rails_5.0.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - machinist (2.0) + machinist_redux (2.0) GEM remote: http://rubygems.org/ @@ -17,15 +17,26 @@ GEM i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) + addressable (2.5.1) + public_suffix (~> 2.0, >= 2.0.2) appraisal (2.2.0) bundler rake thor (>= 0.14.0) arel (7.1.4) ast (2.3.0) + axiom-types (0.1.1) + descendants_tracker (~> 0.0.4) + ice_nine (~> 0.11.0) + thread_safe (~> 0.3, >= 0.3.1) builder (3.2.3) + codeclimate-engine-rb (0.4.0) + virtus (~> 1.0) codeclimate-test-reporter (1.0.7) simplecov + coderay (1.1.1) + coercible (1.0.0) + descendants_tracker (~> 0.0.1) concurrent-ruby (1.0.5) coveralls (0.8.21) json (>= 1.8, < 3) @@ -33,21 +44,100 @@ GEM term-ansicolor (~> 1.3) thor (~> 0.19.4) tins (~> 1.6) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) diff-lcs (1.3) docile (1.1.5) + equalizer (0.0.11) + erubis (2.7.0) + faraday (0.12.1) + multipart-post (>= 1.2, < 3) + faraday-http-cache (2.0.0) + faraday (~> 0.8) + ffi (1.9.18) + flay (2.9.0) + erubis (~> 2.7.0) + path_expander (~> 1.0) + ruby_parser (~> 3.0) + sexp_processor (~> 4.0) + flog (4.6.1) + path_expander (~> 1.0) + ruby_parser (~> 3.1, > 3.1.0) + sexp_processor (~> 4.8) + formatador (0.2.5) fuubar (2.2.0) rspec-core (~> 3.0) ruby-progressbar (~> 1.4) + gem-release (1.0.0) + github_changelog_generator (1.14.3) + activesupport + faraday-http-cache + multi_json + octokit (~> 4.6) + rainbow (>= 2.1) + rake (>= 10.0) + retriable (~> 2.1) + guard (2.14.1) + formatador (>= 0.2.4) + listen (>= 2.7, < 4.0) + lumberjack (~> 1.0) + nenv (~> 0.1) + notiffany (~> 0.0) + pry (>= 0.9.12) + shellany (~> 0.0) + thor (>= 0.18.1) + guard-compat (1.2.1) + guard-rspec (4.7.3) + guard (~> 2.1) + guard-compat (~> 1.1) + rspec (>= 2.99.0, < 4.0) + guard-rubocop (1.2.0) + guard (~> 2.0) + rubocop (~> 0.20) + guard-rubycritic (2.9.3) + guard (~> 2.6) + rubycritic (>= 2.9.3) i18n (0.8.1) + ice_nine (0.11.2) json (2.1.0) + launchy (2.4.3) + addressable (~> 2.3) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + lumberjack (1.0.12) + method_source (0.8.2) minitest (5.10.2) + multi_json (1.12.1) + multipart-post (2.0.0) + nenv (0.3.0) + notiffany (0.1.1) + nenv (~> 0.1) + shellany (~> 0.0) + octokit (4.7.0) + sawyer (~> 0.8.0, >= 0.5.3) parser (2.4.0.0) ast (~> 2.2) + path_expander (1.0.2) powerpack (0.1.1) + pry (0.10.4) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + public_suffix (2.0.5) rainbow (2.2.2) rake rake (12.0.0) + rb-fsevent (0.9.8) + rb-inotify (0.9.8) + ffi (>= 0.5.0) rdoc (5.1.0) + reek (4.6.2) + codeclimate-engine-rb (~> 0.4.0) + parser (>= 2.4.0.0, < 2.5) + rainbow (~> 2.0) + retriable (2.1.0) rspec (3.6.0) rspec-core (~> 3.6.0) rspec-expectations (~> 3.6.0) @@ -73,20 +163,43 @@ GEM rubocop-rspec (1.15.1) rubocop (>= 0.42.0) ruby-progressbar (1.8.1) + ruby_dep (1.5.0) + ruby_parser (3.9.0) + sexp_processor (~> 4.1) + rubycritic (3.2.1) + flay (~> 2.8) + flog (~> 4.4) + launchy (= 2.4.3) + parser (= 2.4.0) + rainbow (~> 2.1) + reek (~> 4.4) + ruby_parser (~> 3.8) + virtus (~> 1.0) + sawyer (0.8.1) + addressable (>= 2.3.5, < 2.6) + faraday (~> 0.8, < 1.0) + sexp_processor (4.9.0) + shellany (0.0.1) simplecov (0.14.1) docile (~> 1.1.0) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.0) + slop (3.6.0) sqlite3 (1.3.13) term-ansicolor (1.6.0) tins (~> 1.0) thor (0.19.4) thread_safe (0.3.6) - tins (1.13.3) + tins (1.14.0) tzinfo (1.2.3) thread_safe (~> 0.1) unicode-display_width (1.2.1) + virtus (1.0.5) + axiom-types (~> 0.1) + coercible (~> 1.0) + descendants_tracker (~> 0.0, >= 0.0.3) + equalizer (~> 0.0, >= 0.0.9) PLATFORMS ruby @@ -98,7 +211,13 @@ DEPENDENCIES codeclimate-test-reporter coveralls fuubar - machinist! + gem-release + github_changelog_generator + guard + guard-rspec + guard-rubocop + guard-rubycritic + machinist_redux! rdoc rspec rspec_junit_formatter diff --git a/gemfiles/rails_5.1.gemfile b/gemfiles/rails_5.1.gemfile index a4a49e9..8326325 100755 --- a/gemfiles/rails_5.1.gemfile +++ b/gemfiles/rails_5.1.gemfile @@ -7,9 +7,15 @@ ruby RUBY_VERSION gem "activerecord", "~> 5.1.1", group: :test, require: false group :development do - gem "appraisal", require: false - gem "rdoc", require: false - gem "rubocop-rspec", require: false + gem 'appraisal', require: false + gem 'gem-release', require: false + gem 'github_changelog_generator', require: false + gem 'guard', require: false + gem 'guard-rspec', require: false + gem 'guard-rubocop', require: false + gem 'guard-rubycritic', require: false + gem 'rdoc', require: false + gem 'rubocop-rspec', require: false end group :test do @@ -25,8 +31,4 @@ platforms :ruby do gem "sqlite3" end -platforms :jruby do - gem "activerecord-jdbcsqlite3-adapter" -end - gemspec path: "../" diff --git a/gemfiles/rails_5.1.gemfile.lock b/gemfiles/rails_5.1.gemfile.lock index b39ad5b..6941789 100644 --- a/gemfiles/rails_5.1.gemfile.lock +++ b/gemfiles/rails_5.1.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - machinist (2.0) + machinist_redux (2.0) GEM remote: http://rubygems.org/ @@ -17,15 +17,26 @@ GEM i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) + addressable (2.5.1) + public_suffix (~> 2.0, >= 2.0.2) appraisal (2.2.0) bundler rake thor (>= 0.14.0) arel (8.0.0) ast (2.3.0) + axiom-types (0.1.1) + descendants_tracker (~> 0.0.4) + ice_nine (~> 0.11.0) + thread_safe (~> 0.3, >= 0.3.1) builder (3.2.3) + codeclimate-engine-rb (0.4.0) + virtus (~> 1.0) codeclimate-test-reporter (1.0.7) simplecov + coderay (1.1.1) + coercible (1.0.0) + descendants_tracker (~> 0.0.1) concurrent-ruby (1.0.5) coveralls (0.8.21) json (>= 1.8, < 3) @@ -33,21 +44,100 @@ GEM term-ansicolor (~> 1.3) thor (~> 0.19.4) tins (~> 1.6) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) diff-lcs (1.3) docile (1.1.5) + equalizer (0.0.11) + erubis (2.7.0) + faraday (0.12.1) + multipart-post (>= 1.2, < 3) + faraday-http-cache (2.0.0) + faraday (~> 0.8) + ffi (1.9.18) + flay (2.9.0) + erubis (~> 2.7.0) + path_expander (~> 1.0) + ruby_parser (~> 3.0) + sexp_processor (~> 4.0) + flog (4.6.1) + path_expander (~> 1.0) + ruby_parser (~> 3.1, > 3.1.0) + sexp_processor (~> 4.8) + formatador (0.2.5) fuubar (2.2.0) rspec-core (~> 3.0) ruby-progressbar (~> 1.4) + gem-release (1.0.0) + github_changelog_generator (1.14.3) + activesupport + faraday-http-cache + multi_json + octokit (~> 4.6) + rainbow (>= 2.1) + rake (>= 10.0) + retriable (~> 2.1) + guard (2.14.1) + formatador (>= 0.2.4) + listen (>= 2.7, < 4.0) + lumberjack (~> 1.0) + nenv (~> 0.1) + notiffany (~> 0.0) + pry (>= 0.9.12) + shellany (~> 0.0) + thor (>= 0.18.1) + guard-compat (1.2.1) + guard-rspec (4.7.3) + guard (~> 2.1) + guard-compat (~> 1.1) + rspec (>= 2.99.0, < 4.0) + guard-rubocop (1.2.0) + guard (~> 2.0) + rubocop (~> 0.20) + guard-rubycritic (2.9.3) + guard (~> 2.6) + rubycritic (>= 2.9.3) i18n (0.8.1) + ice_nine (0.11.2) json (2.1.0) + launchy (2.4.3) + addressable (~> 2.3) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + lumberjack (1.0.12) + method_source (0.8.2) minitest (5.10.2) + multi_json (1.12.1) + multipart-post (2.0.0) + nenv (0.3.0) + notiffany (0.1.1) + nenv (~> 0.1) + shellany (~> 0.0) + octokit (4.7.0) + sawyer (~> 0.8.0, >= 0.5.3) parser (2.4.0.0) ast (~> 2.2) + path_expander (1.0.2) powerpack (0.1.1) + pry (0.10.4) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + public_suffix (2.0.5) rainbow (2.2.2) rake rake (12.0.0) + rb-fsevent (0.9.8) + rb-inotify (0.9.8) + ffi (>= 0.5.0) rdoc (5.1.0) + reek (4.6.2) + codeclimate-engine-rb (~> 0.4.0) + parser (>= 2.4.0.0, < 2.5) + rainbow (~> 2.0) + retriable (2.1.0) rspec (3.6.0) rspec-core (~> 3.6.0) rspec-expectations (~> 3.6.0) @@ -73,32 +163,60 @@ GEM rubocop-rspec (1.15.1) rubocop (>= 0.42.0) ruby-progressbar (1.8.1) + ruby_dep (1.5.0) + ruby_parser (3.9.0) + sexp_processor (~> 4.1) + rubycritic (3.2.1) + flay (~> 2.8) + flog (~> 4.4) + launchy (= 2.4.3) + parser (= 2.4.0) + rainbow (~> 2.1) + reek (~> 4.4) + ruby_parser (~> 3.8) + virtus (~> 1.0) + sawyer (0.8.1) + addressable (>= 2.3.5, < 2.6) + faraday (~> 0.8, < 1.0) + sexp_processor (4.9.0) + shellany (0.0.1) simplecov (0.14.1) docile (~> 1.1.0) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.0) + slop (3.6.0) sqlite3 (1.3.13) term-ansicolor (1.6.0) tins (~> 1.0) thor (0.19.4) thread_safe (0.3.6) - tins (1.13.3) + tins (1.14.0) tzinfo (1.2.3) thread_safe (~> 0.1) unicode-display_width (1.2.1) + virtus (1.0.5) + axiom-types (~> 0.1) + coercible (~> 1.0) + descendants_tracker (~> 0.0, >= 0.0.3) + equalizer (~> 0.0, >= 0.0.9) PLATFORMS ruby DEPENDENCIES activerecord (~> 5.1.1) - activerecord-jdbcsqlite3-adapter appraisal codeclimate-test-reporter coveralls fuubar - machinist! + gem-release + github_changelog_generator + guard + guard-rspec + guard-rubocop + guard-rubycritic + machinist_redux! rdoc rspec rspec_junit_formatter From 7f5ef8d634edca96907811d119b327ae52d40685 Mon Sep 17 00:00:00 2001 From: Dominic Sayers Date: Wed, 17 May 2017 09:23:47 +0100 Subject: [PATCH 04/12] Bump major version because we're removing backwards compatibility --- lib/machinist/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 lib/machinist/version.rb diff --git a/lib/machinist/version.rb b/lib/machinist/version.rb old mode 100644 new mode 100755 index ce22243..125306b --- a/lib/machinist/version.rb +++ b/lib/machinist/version.rb @@ -1,3 +1,3 @@ module Machinist - VERSION = '2.0'.freeze + VERSION = '3.0.0'.freeze end From 8f09cff31cce7e57585550ed36b709248cba42fb Mon Sep 17 00:00:00 2001 From: Dominic Sayers Date: Wed, 17 May 2017 09:30:59 +0100 Subject: [PATCH 05/12] Update derived Gemfiles --- gemfiles/rails_4.2.gemfile.lock | 2 +- gemfiles/rails_5.0.gemfile.lock | 2 +- gemfiles/rails_5.1.gemfile.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gemfiles/rails_4.2.gemfile.lock b/gemfiles/rails_4.2.gemfile.lock index e3448ca..d21c204 100644 --- a/gemfiles/rails_4.2.gemfile.lock +++ b/gemfiles/rails_4.2.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - machinist_redux (2.0) + machinist_redux (3.0.0) GEM remote: http://rubygems.org/ diff --git a/gemfiles/rails_5.0.gemfile.lock b/gemfiles/rails_5.0.gemfile.lock index 5ed5f29..a81bfc0 100644 --- a/gemfiles/rails_5.0.gemfile.lock +++ b/gemfiles/rails_5.0.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - machinist_redux (2.0) + machinist_redux (3.0.0) GEM remote: http://rubygems.org/ diff --git a/gemfiles/rails_5.1.gemfile.lock b/gemfiles/rails_5.1.gemfile.lock index 6941789..498edf1 100644 --- a/gemfiles/rails_5.1.gemfile.lock +++ b/gemfiles/rails_5.1.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - machinist_redux (2.0) + machinist_redux (3.0.0) GEM remote: http://rubygems.org/ From caa6b7cb6ae79bee5945776deae338f97007f73f Mon Sep 17 00:00:00 2001 From: Dominic Sayers Date: Wed, 17 May 2017 09:37:25 +0100 Subject: [PATCH 06/12] Rename gem in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a378cdd..f140a76 100755 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ See [the wiki](http://wiki.github.com/notahat/machinist/machinist-2). In your app's `Gemfile`, in the `group :test` section, add: - gem 'machinist', '>= 2.0.0' + gem 'machinist_redux' Then run: From 481645b63d3a244276369310dce186f95fc6ba66 Mon Sep 17 00:00:00 2001 From: Dominic Sayers Date: Wed, 17 May 2017 12:17:56 +0100 Subject: [PATCH 07/12] Ruby 2.1 is no longer supported --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3462fde..b90ec3a 100755 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,6 @@ rvm: - 2.4.1 - 2.3.4 - 2.2.6 - - 2.1.10 gemfile: - gemfiles/rails_4.2.gemfile @@ -15,10 +14,6 @@ gemfile: matrix: allow_failures: - - gemfile: gemfiles/rails_5.0.gemfile - rvm: 2.1.10 - - gemfile: gemfiles/rails_5.1.gemfile - rvm: 2.1.10 - rvm: ruby-head before_install: From 40d624aeea527c35ca22555df1be9b44afe52125 Mon Sep 17 00:00:00 2001 From: Dominic Sayers Date: Wed, 17 May 2017 13:11:02 +0100 Subject: [PATCH 08/12] Clarify licensing --- LICENSE.txt | 34 +++++++++++++++++----------------- machinist.gemspec | 1 + 2 files changed, 18 insertions(+), 17 deletions(-) mode change 100644 => 100755 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt old mode 100644 new mode 100755 index 5289851..a3dbd15 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,21 +1,21 @@ -Copyright (c) 2008-2010 Peter Yandell +MIT License -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +Copyright (c) 2008-2017 Pete Yandell, Attila Györffy, Dominic Sayers -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/machinist.gemspec b/machinist.gemspec index 979dd40..fb5634d 100755 --- a/machinist.gemspec +++ b/machinist.gemspec @@ -14,6 +14,7 @@ Gem::Specification.new do |gem| 'to specify only the fields you care about in your test.' gem.summary = "Fixtures aren't fun. Machinist was." gem.homepage = 'http://github.com/dominicsayers/machinist' + gem.license = 'MIT' gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR) gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) } From b4a271b910b52c812259b9f5ccc6ab3aff18fad6 Mon Sep 17 00:00:00 2001 From: Dominic Sayers Date: Wed, 17 May 2017 13:17:37 +0100 Subject: [PATCH 09/12] Syntax highlighting --- README.md | 188 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 108 insertions(+), 80 deletions(-) diff --git a/README.md b/README.md index f140a76..683ccf7 100755 --- a/README.md +++ b/README.md @@ -32,36 +32,39 @@ for the attributes you don't care about, and constructs any necessary associated objects, leaving you to specify only the fields you care about in your test. For example: - describe Comment, "without_spam scope" do - it "doesn't include spam" do - # This will make a Comment, a Post, and a User (the author of the - # Post), generate values for all their attributes, and save them: - spam = Comment.make!(:spam => true) - - Comment.without_spam.should_not include(spam) - end - end +```ruby +describe Comment, "without_spam scope" do + it "doesn't include spam" do + # This will make a Comment, a Post, and a User (the author of the + # Post), generate values for all their attributes, and save them: + spam = Comment.make!(:spam => true) + + Comment.without_spam.should_not include(spam) + end +end +``` You tell Machinist how to do this with blueprints: - require 'machinist/active_record' - - User.blueprint do - username { "user#{sn}" } # Each user gets a unique serial number. - end +```ruby +require 'machinist/active_record' - Post.blueprint do - author - title { "Post #{sn}" } - body { "Lorem ipsum..." } - end +User.blueprint do + username { "user#{sn}" } # Each user gets a unique serial number. +end - Comment.blueprint do - post - email { "commenter#{sn}@example.com" } - body { "Lorem ipsum..." } - end +Post.blueprint do + author + title { "Post #{sn}" } + body { "Lorem ipsum..." } +end +Comment.blueprint do + post + email { "commenter#{sn}@example.com" } + body { "Lorem ipsum..." } +end +``` ## Installation @@ -73,20 +76,25 @@ See [the wiki](http://wiki.github.com/notahat/machinist/machinist-2). In your app's `Gemfile`, in the `group :test` section, add: - gem 'machinist_redux' +```ruby +gem 'machinist_redux' +``` Then run: - bundle install - rails generate machinist:install +```ruby +bundle install +rails generate machinist:install +``` If you want Machinist to automatically add a blueprint to your blueprints file -whenever you generate a model, add the following to your `config/application.rb` -inside the Application class: +whenever you generate a model, add the following to your `config/application.rb` inside the Application class: - config.generators do |g| - g.fixture_replacement :machinist - end +```ruby +config.generators do |g| + g.fixture_replacement :machinist +end +``` ## Usage @@ -98,14 +106,18 @@ just the attributes that are important for the test. A simple blueprint might look like this: - Post.blueprint do - title { "A Post" } - body { "Lorem ipsum..." } - end +```ruby +Post.blueprint do + title { "A Post" } + body { "Lorem ipsum..." } +end +``` You can then construct a Post from this blueprint with: - Post.make! +```ruby +Post.make! +``` When you call `make!`, Machinist calls `Post.new`, then runs through the attributes in your blueprint, calling the block for each attribute to generate @@ -114,29 +126,33 @@ Post can't be saved.) You can override values defined in the blueprint by passing a hash to make: - Post.make!(:title => "A Specific Title") +```ruby +Post.make!(:title => "A Specific Title") +``` If you want to generate an object without saving it to the database, replace `make!` with `make`. - ### Unique Attributes For attributes that need to be unique, you can call the `sn` method from within the attribute block to get a unique serial number for the object. - User.blueprint do - username { "user-#{sn}" } - end - +```ruby +User.blueprint do + username { "user-#{sn}" } +end +``` ### Associations If your object needs associated objects, you can generate them like this: - Comment.blueprint do - post { Post.make } - end +```ruby +Comment.blueprint do + post { Post.make } +end +``` Calling `Comment.make!` will construct a Comment and its associated Post, and save both. @@ -144,43 +160,51 @@ save both. Machinist is smart enough to look at the association and work out what sort of object it needs to create, so you can shorten the above blueprint to: - Comment.blueprint do - post - end +```ruby +Comment.blueprint do + post +end +``` If you want to override the value for post when constructing the comment, you can do this: - post = Post.make(:title => "A particular title) - comment = Comment.make(:post => post) - +```ruby +post = Post.make(:title => "A particular title") +comment = Comment.make(:post => post) +``` For `has_many` and `has_and_belongs_to_many` associations, you can create multiple associated objects like this: - Post.blueprint do - comments(3) # Makes 3 comments. - end - +```ruby +Post.blueprint do + comments(3) # Makes 3 comments. +end +``` ### Named Blueprints Named blueprints let you define variations on an object. For example, suppose some of your Users are administrators: - User.blueprint do - name { "User #{sn}" } - email { "user-#{sn}@example.com" } - end +```ruby +User.blueprint do + name { "User #{sn}" } + email { "user-#{sn}@example.com" } +end - User.blueprint(:admin) do - name { "Admin User #{sn}" } - admin { true } - end +User.blueprint(:admin) do + name { "Admin User #{sn}" } + admin { true } +end +``` Calling: - User.make!(:admin) +```ruby +User.make!(:admin) +``` will use the `:admin` blueprint. @@ -196,19 +220,23 @@ even if the default blueprint is empty. Machinist also works with plain old Ruby objects. Let's say you have a class like: - class Post - extend Machinist::Machinable +```ruby +class Post + extend Machinist::Machinable - attr_accessor :title - attr_accessor :body - end + attr_accessor :title + attr_accessor :body +end +``` You can blueprint the Post class just like anything else: - Post.blueprint do - title { "A title!" } - body { "A body!" } - end +```ruby +Post.blueprint do + title { "A title!" } + body { "A body!" } +end +``` And `Post.make` will construct a new Post. @@ -217,11 +245,12 @@ And `Post.make` will construct a new Post. You can refer to already assigned attributes when constructing a new attribute: - Post.blueprint do - author { "Author #{sn}" } - body { "Post by #{object.author}" } - end - +```ruby +Post.blueprint do + author { "Author #{sn}" } + body { "Post by #{object.author}" } +end +``` ### More Details @@ -277,4 +306,3 @@ Thanks to Thoughtbot's [Factory Girl](http://github.com/thoughtbot/factory_girl/tree/master). Machinist was written because I loved the idea behind Factory Girl, but I thought the philosophy wasn't quite right, and I hated the syntax. - From 59e904300a181cf8ae1aa4d5f10b6a5b78b8d8e8 Mon Sep 17 00:00:00 2001 From: Dominic Sayers Date: Wed, 17 May 2017 13:19:04 +0100 Subject: [PATCH 10/12] Correct text and markup --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 683ccf7..a9f6b43 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Machinist 2 +# Machinist 3 *Fixtures aren't fun. Machinist was.* @@ -18,7 +18,6 @@ If you want Machinist 1, [go here](https://github.com/notahat/machinist/tree/1.0 If you want support for Rails 3 or Rubies prior to 2.2, [go here](https://github.com/attilagyorffy/machinist). - ## Status This is a fork of [Pete Yandell's Machinist](http://github.com/notahat/machinist). The original gem was abandoned for the reasons given below, as are most of its forks. The purpose of this fork is to keep Machinist under maintenance for legacy projects that have upgraded to Ruby 2.2 or later and Rails 4.2 or later, but still have Machinist factories in the test environment. @@ -215,7 +214,6 @@ generated even for an admin user. You must define a default blueprint for any class that has a named blueprint, even if the default blueprint is empty. - ### Blueprints on Plain Old Ruby Objects Machinist also works with plain old Ruby objects. Let's say you have a class like: @@ -240,7 +238,6 @@ end And `Post.make` will construct a new Post. - ### Other Tricks You can refer to already assigned attributes when constructing a new attribute: From bd15e963db8f009a05e0ccebc28a1fbfb57f7d0f Mon Sep 17 00:00:00 2001 From: Dominic Sayers Date: Wed, 17 May 2017 16:51:23 +0100 Subject: [PATCH 11/12] Few if any manual code changes - statement --- README.md | 24 +++++++++++++----------- lib/machinist/active_record/blueprint.rb | 0 2 files changed, 13 insertions(+), 11 deletions(-) mode change 100644 => 100755 lib/machinist/active_record/blueprint.rb diff --git a/README.md b/README.md index a9f6b43..28bf1fd 100755 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ If you want support for Rails 3 or Rubies prior to 2.2, [go here](https://github This is a fork of [Pete Yandell's Machinist](http://github.com/notahat/machinist). The original gem was abandoned for the reasons given below, as are most of its forks. The purpose of this fork is to keep Machinist under maintenance for legacy projects that have upgraded to Ruby 2.2 or later and Rails 4.2 or later, but still have Machinist factories in the test environment. +I'm pleased to say that Pete's code runs fine under Ruby 2.2, 2.3 & 2.4 and Rails 4.2, 5.0 and 5.1. I have allowed [RuboCop](https://github.com/bbatsov/rubocop) and [RuboCop RSpec](https://github.com/backus/rubocop-rspec) to suggest some changes, and I have converted to the more up-to-date RSpec syntax using [Transpec](https://github.com/yujinakayama/transpec). Few if any manual changes were needed. + Pete Yandell's reason for abandoning Machinist is that he found himself with less and less need for factories in tests. He recommends Bo Jeanes' [excellent article on the topic](http://bjeanes.com/2012/02/factories-breed-complexity). ## Introduction @@ -32,11 +34,11 @@ associated objects, leaving you to specify only the fields you care about in your test. For example: ```ruby -describe Comment, "without_spam scope" do +describe Comment, 'without_spam scope' do it "doesn't include spam" do # This will make a Comment, a Post, and a User (the author of the # Post), generate values for all their attributes, and save them: - spam = Comment.make!(:spam => true) + spam = Comment.make!(spam: true) Comment.without_spam.should_not include(spam) end @@ -55,13 +57,13 @@ end Post.blueprint do author title { "Post #{sn}" } - body { "Lorem ipsum..." } + body { 'Lorem ipsum...' } end Comment.blueprint do post email { "commenter#{sn}@example.com" } - body { "Lorem ipsum..." } + body { 'Lorem ipsum...' } end ``` @@ -107,8 +109,8 @@ A simple blueprint might look like this: ```ruby Post.blueprint do - title { "A Post" } - body { "Lorem ipsum..." } + title { 'A Post' } + body { 'Lorem ipsum...' } end ``` @@ -126,7 +128,7 @@ Post can't be saved.) You can override values defined in the blueprint by passing a hash to make: ```ruby -Post.make!(:title => "A Specific Title") +Post.make!(title: 'A Specific Title') ``` If you want to generate an object without saving it to the database, replace @@ -169,8 +171,8 @@ If you want to override the value for post when constructing the comment, you can do this: ```ruby -post = Post.make(:title => "A particular title") -comment = Comment.make(:post => post) +post = Post.make(title: 'A particular title') +comment = Comment.make(post: post) ``` For `has_many` and `has_and_belongs_to_many` associations, you can create @@ -231,8 +233,8 @@ You can blueprint the Post class just like anything else: ```ruby Post.blueprint do - title { "A title!" } - body { "A body!" } + title { 'A title!' } + body { 'A body!' } end ``` diff --git a/lib/machinist/active_record/blueprint.rb b/lib/machinist/active_record/blueprint.rb old mode 100644 new mode 100755 From 0544fbf395801805e8da33ddfbb809d81fd58145 Mon Sep 17 00:00:00 2001 From: Dominic Sayers Date: Wed, 17 May 2017 16:53:09 +0100 Subject: [PATCH 12/12] Update gem name in badges --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 28bf1fd..59b7149 100755 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ *Fixtures aren't fun. Machinist was.* -[![Gem version](https://badge.fury.io/rb/machinist.svg)](https://rubygems.org/gems/machinist) -[![Gem downloads](https://img.shields.io/gem/dt/machinist.svg)](https://rubygems.org/gems/machinist) +[![Gem version](https://badge.fury.io/rb/machinist_redux.svg)](https://rubygems.org/gems/machinist_redux) +[![Gem downloads](https://img.shields.io/gem/dt/machinist_redux.svg)](https://rubygems.org/gems/machinist_redux) [![Build Status](https://travis-ci.org/dominicsayers/machinist.svg?branch=master)](https://travis-ci.org/dominicsayers/machinist) [![Code Climate](https://codeclimate.com/github/dominicsayers/machinist/badges/gpa.svg)](https://codeclimate.com/github/dominicsayers/machinist) [![Test Coverage](https://codeclimate.com/github/dominicsayers/machinist/badges/coverage.svg)](https://codeclimate.com/github/dominicsayers/machinist/coverage)