flamerb 0.1.2 → 0.1.3

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: fef2ae9622e02fdcd6c84cb58db406dbb9b3ec4cb72a001150795b66282b8a88
4
- data.tar.gz: cf76e462eae220699cddb2707b5431177df1946fac410c822db21ac5413bce90
3
+ metadata.gz: 1649d57c33dc5f16e5ef291b8667c5061ea524de38170c0949864f97ee9ec8d0
4
+ data.tar.gz: a1d6e5cb6b97963bf9990120fa9f095cadc2ba73d3119de6540646b254721086
5
5
  SHA512:
6
- metadata.gz: d680b856bcebfb8ef7e80bfeb6af0ab00bc508d5afc218dbf4f2cd3ebb31cf361496502364430aaab2ca20a72557a07320e40f0378c682ac88f9c8c9c3da6e24
7
- data.tar.gz: e38c9aaf8a1912650c5cb4bae992804f4cedb8fffcf6b1a7e20a64cb4afa34f2f3d42ceedae54b8a979a2a77248714b66a83655edc7289c99567d24f30040f5c
6
+ metadata.gz: b35746c51415642ea98f89ddf4f1576f8933d1e65018fde8aff009d6dacfd1165546b6194a3de8ee84b2e893352334a45af322460c033ece5c45afac4ed0191f
7
+ data.tar.gz: 80116c4c8b08cbfe6f85ef527de91ed9f3e8ea62421a752e791ea12e5fee1866df31b161c37170b59c36333c9534118e75415209efeb5fc43506e9ed7e0dbcba
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v0.1.3 (2023-07-12)
2
+
3
+ ### Fix
4
+
5
+ - add missing templates for testing_generator
6
+
1
7
  ## v0.1.2 (2023-07-10)
2
8
 
3
9
  ### Fix
data/README.md CHANGED
@@ -48,6 +48,12 @@ for dev dependencies
48
48
 
49
49
  Projects created with Flame come with [Standard](https://github.com/standardrb/standard)
50
50
 
51
+ ## To Do
52
+ - [ ] Add [rubocop-rspec](https://github.com/rubocop/rubocop-rspec)
53
+ - [ ] Add [strong_migrations](https://github.com/ankane/strong_migrations)
54
+ - [ ] Add [bullet](https://github.com/flyerhzm/bullet)
55
+ - [ ] Add [vite-eslint-plugin](https://github.com/gxmari007/vite-plugin-eslint)
56
+
51
57
  ## Contributing
52
58
 
53
59
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/Flame.
@@ -4,8 +4,6 @@ require "rails/generators/base"
4
4
  module Flame
5
5
  module Generators
6
6
  class Base < Rails::Generators::Base
7
- source_root File.expand_path("../../../templates", __dir__)
8
-
9
7
  private
10
8
 
11
9
  # @param [Array] packages
@@ -23,6 +21,12 @@ module Flame
23
21
  def yarn_install_dev(packages)
24
22
  run("yarn add -D #{packages.join(" ")} --silent")
25
23
  end
24
+
25
+ class << self
26
+ def source_root
27
+ File.expand_path("../../../templates", __dir__)
28
+ end
29
+ end
26
30
  end
27
31
  end
28
32
  end
@@ -6,7 +6,18 @@ module Flame
6
6
  generate("rspec:install")
7
7
  end
8
8
 
9
- def install_gems
9
+ def import_spec_support
10
+ inject_into_file(
11
+ "spec/rails_helper.rb",
12
+ "Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }\n",
13
+ before: "RSpec.configure do |config|\n"
14
+ )
15
+ end
16
+
17
+ def support_template
18
+ template("spec/support/shoulda_matchers.rb")
19
+ template("spec/support/factory_bot.rb")
20
+ template("spec/support/database_cleaner.rb")
10
21
  end
11
22
  end
12
23
  end
@@ -2,8 +2,6 @@ require_relative "base"
2
2
 
3
3
  module Flame
4
4
  class ViteGenerator < Generators::Base
5
- source_root File.expand_path("../../../templates", __dir__)
6
-
7
5
  def install
8
6
  run("rm -rf ./package.lock")
9
7
  run("yarn init -y")
data/lib/flame/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Flame
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  RUBY_VERSION = "3.2.2"
4
4
  RAILS_VERSION = "6.1.7"
5
5
  end
@@ -0,0 +1,12 @@
1
+ RSpec.configure do |config|
2
+ config.before(:suite) do
3
+ DatabaseCleaner.strategy = :transaction
4
+ DatabaseCleaner.clean_with(:truncation)
5
+ end
6
+
7
+ config.around(:each) do |example|
8
+ DatabaseCleaner.cleaning do
9
+ example.run
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ RSpec.configure do |config|
2
+ config.include FactoryBot::Syntax::Methods
3
+ end
@@ -0,0 +1,6 @@
1
+ Shoulda::Matchers.configure do |config|
2
+ config.integrate do |with|
3
+ with.test_framework :rspec
4
+ with.library :rails
5
+ end
6
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flamerb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - n0tbot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-10 00:00:00.000000000 Z
11
+ date: 2023-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -102,6 +102,9 @@ files:
102
102
  - templates/frontend/store/slices/userSlice.js
103
103
  - templates/frontend/theme/index.js
104
104
  - templates/jsconfig.json
105
+ - templates/spec/support/database_cleaner.rb
106
+ - templates/spec/support/factory_bot.rb
107
+ - templates/spec/support/shoulda_matchers.rb
105
108
  - templates/vite.config.js
106
109
  homepage: https://github.com/notb0t/flame
107
110
  licenses:
@@ -115,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
118
  requirements:
116
119
  - - ">="
117
120
  - !ruby/object:Gem::Version
118
- version: 3.2.2
121
+ version: '0'
119
122
  required_rubygems_version: !ruby/object:Gem::Requirement
120
123
  requirements:
121
124
  - - ">="