From 395f6632c5986dfe5ef1b2407eef303f422b42db Mon Sep 17 00:00:00 2001 From: Marat Khusnetdinov Date: Fri, 29 Dec 2017 22:10:23 +0300 Subject: [PATCH 1/3] ruby-2.5.0 --- .ruby-version | 2 +- .travis.yml | 2 +- lib/kazan/version.rb | 2 +- templates/Gemfile.api.erb | 2 +- templates/Gemfile.erb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.ruby-version b/.ruby-version index 2bf1c1c..437459c 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.3.1 +2.5.0 diff --git a/.travis.yml b/.travis.yml index cc98d70..a37f912 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ sudo: false language: ruby rvm: - - 2.3.1 + - 2.5.0 gemfile: - Gemfile before_install: diff --git a/lib/kazan/version.rb b/lib/kazan/version.rb index e651966..14a5398 100644 --- a/lib/kazan/version.rb +++ b/lib/kazan/version.rb @@ -1,5 +1,5 @@ module Kazan - VERSION = '0.4.0'.freeze + VERSION = '0.4.1'.freeze RAILS_VERSION = '~> 5.0.0'.freeze RUBY_PROJECT_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip.freeze end diff --git a/templates/Gemfile.api.erb b/templates/Gemfile.api.erb index a8d4c09..c08605e 100644 --- a/templates/Gemfile.api.erb +++ b/templates/Gemfile.api.erb @@ -2,7 +2,7 @@ source "https://rubygems.org" ruby "<%= Kazan::RUBY_PROJECT_VERSION %>" gem 'rails', "<%= Kazan::RAILS_VERSION %>" -gem 'rails-i18n' +gem 'rails-i18n', '~> 5.0.0' gem 'dotenv-rails' gem 'config' diff --git a/templates/Gemfile.erb b/templates/Gemfile.erb index 2069791..a332efc 100644 --- a/templates/Gemfile.erb +++ b/templates/Gemfile.erb @@ -2,7 +2,7 @@ source 'https://rubygems.org' ruby "<%= Kazan::RUBY_PROJECT_VERSION %>" gem 'rails', "<%= Kazan::RAILS_VERSION %>" -gem 'rails-i18n' +gem 'rails-i18n', '~> 5.0.0' gem 'dotenv-rails' gem 'config' From ca65b7fd1fa2dbbfc64c17809992f78ebb1ce497 Mon Sep 17 00:00:00 2001 From: Marat Khusnetdinov Date: Fri, 29 Dec 2017 22:21:01 +0300 Subject: [PATCH 2/3] Factory bot --- README.md | 2 +- lib/kazan/app_builder.rb | 4 ++-- lib/kazan/generators/app_generator.rb | 2 +- spec/project_spec.rb | 2 +- templates/Gemfile.api.erb | 4 ++-- templates/Gemfile.erb | 2 +- templates/factory_bot.rb | 3 +++ templates/factory_girl.rb | 3 --- 8 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 templates/factory_bot.rb delete mode 100644 templates/factory_girl.rb diff --git a/README.md b/README.md index 8684b1b..0eeaaad 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ It includes development gems: It includes tests gems: - [Capybara](https://github.com/jnicklas/capybara) [API EXCLUDED] helps you test web applications by simulating how a real user would interact with your app. - [Database Cleaner](https://github.com/DatabaseCleaner/database_cleaner) is a set of strategies for cleaning your database in Ruby. - - [Factory Girl](https://github.com/thoughtbot/factory_girl) is a fixtures replacement with a straightforward definition syntax. + - [Factory Bot](https://github.com/thoughtbot/factory_bot) is a fixtures replacement with a straightforward definition syntax. - [Faker](https://github.com/stympy/faker) a port of Perl's Data::Faker library that generates fake data. - [Formulaic](https://github.com/thoughtbot/formulaic) [API EXCLUDED] the tedium of formulaic form filling with Capybara. - [I18n-Tasks](https://github.com/glebm/i18n-tasks) [API EXCLUDED] Gem that helps manage locales and test if are there problems. diff --git a/lib/kazan/app_builder.rb b/lib/kazan/app_builder.rb index 5b3620e..d8febe8 100644 --- a/lib/kazan/app_builder.rb +++ b/lib/kazan/app_builder.rb @@ -208,8 +208,8 @@ def spec_shoulda_matchers_config copy_file 'shoulda_matchers.rb', 'spec/support/shoulda_matchers.rb' end - def spec_factory_girl_config - copy_file 'factory_girl.rb', 'spec/support/factory_girl.rb' + def spec_factory_bot_config + copy_file 'factory_bot.rb', 'spec/support/factory_bot.rb' end def rspec_config diff --git a/lib/kazan/generators/app_generator.rb b/lib/kazan/generators/app_generator.rb index f25ecdf..e2eb510 100644 --- a/lib/kazan/generators/app_generator.rb +++ b/lib/kazan/generators/app_generator.rb @@ -1,6 +1,6 @@ require 'rails/generators' -require 'rails/generators/rails/app/app_generator' +require 'rails/generators/rails/app/app_generator' module Kazan class AppGenerator < Rails::Generators::AppGenerator hide! diff --git a/spec/project_spec.rb b/spec/project_spec.rb index a8de62c..4d2428e 100644 --- a/spec/project_spec.rb +++ b/spec/project_spec.rb @@ -50,7 +50,7 @@ 'config', 'database_cleaner', 'dotenv', - 'factory_girl_rails', + 'factory_bot_rails', 'faker', 'flutie', 'foreman', diff --git a/templates/Gemfile.api.erb b/templates/Gemfile.api.erb index c08605e..9cccaad 100644 --- a/templates/Gemfile.api.erb +++ b/templates/Gemfile.api.erb @@ -5,9 +5,9 @@ gem 'rails', "<%= Kazan::RAILS_VERSION %>" gem 'rails-i18n', '~> 5.0.0' gem 'dotenv-rails' gem 'config' - gem 'pg' + gem 'rollbar' gem 'puma' @@ -28,7 +28,7 @@ group :development, :test do gem 'bullet' gem 'bundler-audit', '>= 0.5.0', require: false gem 'faker' - gem 'factory_girl_rails' + gem 'factory_bot_rails' gem 'pry-byebug' gem 'pry-rails' gem 'rspec-rails', '~> 3.5.0.beta4' diff --git a/templates/Gemfile.erb b/templates/Gemfile.erb index a332efc..ae3afd6 100644 --- a/templates/Gemfile.erb +++ b/templates/Gemfile.erb @@ -41,7 +41,7 @@ group :development, :test do gem 'bullet' gem 'bundler-audit', '>= 0.5.0', require: false gem 'faker' - gem 'factory_girl_rails' + gem 'factory_bot_rails' gem 'pry-byebug' gem 'pry-rails' gem 'rspec-rails', '~> 3.5.0.beta4' diff --git a/templates/factory_bot.rb b/templates/factory_bot.rb new file mode 100644 index 0000000..c7890e4 --- /dev/null +++ b/templates/factory_bot.rb @@ -0,0 +1,3 @@ +RSpec.configure do |config| + config.include FactoryBot::Syntax::Methods +end diff --git a/templates/factory_girl.rb b/templates/factory_girl.rb deleted file mode 100644 index eec437f..0000000 --- a/templates/factory_girl.rb +++ /dev/null @@ -1,3 +0,0 @@ -RSpec.configure do |config| - config.include FactoryGirl::Syntax::Methods -end From b4840183fcd2bc061eb5215a16b5d29401517d3a Mon Sep 17 00:00:00 2001 From: Marat Khusnetdinov Date: Fri, 29 Dec 2017 22:28:27 +0300 Subject: [PATCH 3/3] release 0.5.0 --- lib/kazan/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kazan/version.rb b/lib/kazan/version.rb index 14a5398..aebb5ec 100644 --- a/lib/kazan/version.rb +++ b/lib/kazan/version.rb @@ -1,5 +1,5 @@ module Kazan - VERSION = '0.4.1'.freeze + VERSION = '0.5.0'.freeze RAILS_VERSION = '~> 5.0.0'.freeze RUBY_PROJECT_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip.freeze end