flamerb 0.1.1 → 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: 27b827963415a5a78744f0ee9188375a86f7fb12ea2af70b7de692e69d005879
4
- data.tar.gz: 2d6fc4655d6fbd865e9f65024eb10c92a12a90b924c5d9617b90424f9595c6dd
3
+ metadata.gz: 1649d57c33dc5f16e5ef291b8667c5061ea524de38170c0949864f97ee9ec8d0
4
+ data.tar.gz: a1d6e5cb6b97963bf9990120fa9f095cadc2ba73d3119de6540646b254721086
5
5
  SHA512:
6
- metadata.gz: 88d0abbb6d5773d5c4c36143e290c2a83ed9d2af9c97d524306fd50a7f9362eb805f7144beb996915b4d2bbdc7c2fbefa91113c4814474480f076aaa293fe8be
7
- data.tar.gz: 1ec41342b515ae8727d60be8146d4534c25532d86e901641957ad3baaf31faeb7a370b4319b34b7015d5388e9ebf7b28324b5677516125b4c63e8e65fcdea8c2
6
+ metadata.gz: b35746c51415642ea98f89ddf4f1576f8933d1e65018fde8aff009d6dacfd1165546b6194a3de8ee84b2e893352334a45af322460c033ece5c45afac4ed0191f
7
+ data.tar.gz: 80116c4c8b08cbfe6f85ef527de91ed9f3e8ea62421a752e791ea12e5fee1866df31b161c37170b59c36333c9534118e75415209efeb5fc43506e9ed7e0dbcba
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## v0.1.3 (2023-07-12)
2
+
3
+ ### Fix
4
+
5
+ - add missing templates for testing_generator
6
+
7
+ ## v0.1.2 (2023-07-10)
8
+
9
+ ### Fix
10
+
11
+ - modify gem name to flamerb
12
+
1
13
  ## v0.1.1 (2023-07-10)
2
14
 
3
15
  ### Fix
data/README.md CHANGED
@@ -7,8 +7,8 @@ Flame is rails app generator inspired in [Suspenders](https://github.com/thought
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
 
10
- $ gem install flame
11
- $ flame <app_name>
10
+ $ gem install flamerb
11
+ $ flamerb <app_name>
12
12
 
13
13
  ## Gemfile
14
14
 
@@ -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.
@@ -12,7 +12,7 @@ if ARGV.empty?
12
12
  puts "See --help for more info"
13
13
  exit 0
14
14
  elsif ["-v", "--version"].include? ARGV[0]
15
- puts Suspenders::VERSION
15
+ puts Flame::VERSION
16
16
  exit 0
17
17
  end
18
18
 
@@ -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.1"
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.1
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
@@ -57,14 +57,14 @@ description: Flame is a powerful Ruby gem designed to simplify and streamline ap
57
57
  email:
58
58
  - wilber.garcia@outlook.es
59
59
  executables:
60
- - flame
60
+ - flamerb
61
61
  extensions: []
62
62
  extra_rdoc_files: []
63
63
  files:
64
64
  - ".ruby-version"
65
65
  - CHANGELOG.md
66
66
  - README.md
67
- - bin/flame
67
+ - bin/flamerb
68
68
  - lib/flame.rb
69
69
  - lib/flame/app_builder.rb
70
70
  - lib/flame/generators/app.rb
@@ -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
  - - ">="