railg 0.3.1 → 0.4.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0dd1287cbb8f73a5ba200900716057d62457c22f771e1655bbf1a669a02cf3f
|
4
|
+
data.tar.gz: 6498273be07e05ff8e59ff0c1df52e5d62491c6dd8ea91f336e410efdcaad9be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a13155c03559a89dd28f52899f4233aeda70b10f9538c99e5f605fc78f9fa0cc35384a31abb44b1b8b47a9f15863df0133b01cbdee57df602c2ddfd530fdc7c
|
7
|
+
data.tar.gz: 4e7cc1cf641dc479f384bab67f1263baeff333efdc1b34d9a0c17f5a90a868da49dde1a1dba4de1cce67162d4bea6e2c3f448d523b594bf74f7bd99e531d8656
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Railg
|
2
|
+
class FbotGenerator < ::Rails::Generators::Base
|
3
|
+
def gem_add
|
4
|
+
gem 'factory_bot_rails', group: %i[development test]
|
5
|
+
end
|
6
|
+
|
7
|
+
def exec_bundle
|
8
|
+
run 'bundle'
|
9
|
+
end
|
10
|
+
|
11
|
+
def after_bundle_do
|
12
|
+
insert_into_file 'spec/support/factory_bot.rb', <<~CODE
|
13
|
+
# frozen_string_literal: true
|
14
|
+
RSpec.configure do |config|
|
15
|
+
config.include FactoryBot::Syntax::Methods
|
16
|
+
end
|
17
|
+
CODE
|
18
|
+
|
19
|
+
insert_into_file 'spec/rails_helper.rb', <<~EOT, after: "# Add additional requires below this line. Rails is not loaded until this point!\n"
|
20
|
+
require_relative 'support/factory_bot.rb'
|
21
|
+
EOT
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/railg/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nishisuke
|
@@ -71,10 +71,11 @@ files:
|
|
71
71
|
- bin/setup
|
72
72
|
- lib/generators/railg/bulma/bulma_generator.rb
|
73
73
|
- lib/generators/railg/default/default_generator.rb
|
74
|
+
- lib/generators/railg/fbot/fbot_generator.rb
|
74
75
|
- lib/generators/railg/login/login_generator.rb
|
75
76
|
- lib/generators/railg/pry/pry_generator.rb
|
77
|
+
- lib/generators/railg/rspec/rspec_generator.rb
|
76
78
|
- lib/generators/railg/slim/slim_generator.rb
|
77
|
-
- lib/generators/railg/test_gen.txt
|
78
79
|
- lib/railg.rb
|
79
80
|
- lib/railg/version.rb
|
80
81
|
- railg.gemspec
|
@@ -1,17 +0,0 @@
|
|
1
|
-
gem_group :development, :test do
|
2
|
-
gem 'rspec-rails'
|
3
|
-
gem 'factory_bot_rails'
|
4
|
-
end
|
5
|
-
|
6
|
-
after_bundle do
|
7
|
-
generate(:'rspec:install')
|
8
|
-
file 'spec/support/factory_bot.rb', <<~CODE
|
9
|
-
# frozen_string_literal: true
|
10
|
-
RSpec.configure do |config|
|
11
|
-
config.include FactoryBot::Syntax::Methods
|
12
|
-
end
|
13
|
-
CODE
|
14
|
-
insert_into_file 'spec/rails_helper.rb', <<~EOT, after: "# Add additional requires below this line. Rails is not loaded until this point!\n"
|
15
|
-
require_relative 'support/factory_bot.rb'
|
16
|
-
EOT
|
17
|
-
end
|