truong_beauty 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 33f9426a0d5af780d1e1b0851da19cc3f9f0d809d6e62cfb500b6258df7c14b3
4
+ data.tar.gz: f4827d554749bb1189bf0f390898342b34dd33fcaaa2bef464171d2df814c1b7
5
+ SHA512:
6
+ metadata.gz: 6058cb12c6759c21bf7c861a7a430521429971ff8730a80e545a722ce09f853f6dbd2cbccba04444a61db6aeacdaab4fdf3c91561fc72a14fe2f408f7114b501
7
+ data.tar.gz: a258f3532a50b0a0663290a72b946f2f8bcc956ba47f2f1f56810702db0a966dfa1a0c1188cc3377636ea857b1aae0f34be5fe0f52b68eeafbe3546ba1ce4f07
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in truong_beauty.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
data/Gemfile.lock ADDED
@@ -0,0 +1,19 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ truong_beauty (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ rake (13.0.6)
10
+
11
+ PLATFORMS
12
+ x86_64-darwin-20
13
+
14
+ DEPENDENCIES
15
+ rake (~> 13.0)
16
+ truong_beauty!
17
+
18
+ BUNDLED WITH
19
+ 2.3.11
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # TruongBeauty
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/truong_beauty`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Install the gem and add to the application's Gemfile by executing:
10
+
11
+ $ bundle add truong_beauty
12
+
13
+ If bundler is not being used to manage dependencies, install the gem by executing:
14
+
15
+ $ gem install truong_beauty
16
+
17
+ ## Usage
18
+
19
+ TODO: Write usage instructions here
20
+
21
+ ## Development
22
+
23
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
24
+
25
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
26
+
27
+ ## Contributing
28
+
29
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/truong_beauty.
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ task default: %i[]
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TruongBeauty
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "truong_beauty/version"
4
+
5
+ module TruongBeauty
6
+ class Error < StandardError; end
7
+ def self.process
8
+ current_project = `pwd`
9
+ current_project = current_project.gsub(/\n/,"")
10
+ content = File.read(current_project + "/Gemfile")
11
+ content = content.gsub(/\#\s.*\s*/,"") # Xóa các dòng comment
12
+ content = content.gsub(/'/, '"') # Thay thế dấu ' bằng "
13
+ content = content.gsub(/\s*^group/, "\n\ngroup") # Remove các dòng trống
14
+ content = content.gsub(/\s*^\s+^gem/, "\n\ngem")
15
+ File.open(current_project + "/Gemfile", "w") do |file|
16
+ file.puts content
17
+ end
18
+ system "echo", "-e", "\e[92mYour Gemfile was successfully beautified!"
19
+ rescue Exception => e
20
+ system "echo", "-e", "\e[91m#{e.message}"
21
+ system "echo", "-e", "\e[91mMake sure you're in the right place!"
22
+ end
23
+ end
@@ -0,0 +1,4 @@
1
+ module TruongBeauty
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/truong_beauty/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "truong_beauty"
7
+ spec.version = TruongBeauty::VERSION
8
+ spec.authors = ["David"]
9
+ spec.email = ["truong.dohuy0501@gmail.com"]
10
+
11
+ spec.summary = "Gemfile Beautify"
12
+ spec.description = "A simple gem which will beautify your Gemfile"
13
+ spec.homepage = "https://github.com/truongdohuy0501/david"
14
+ spec.required_ruby_version = ">= 2.6.0"
15
+ spec.license = "MIT"
16
+
17
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
18
+ spec.metadata["homepage_uri"] = spec.homepage
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(__dir__) do
23
+ `git ls-files -z`.split("\x0").reject do |f|
24
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
25
+ end
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ # Uncomment to register a new dependency of your gem
32
+ # spec.add_dependency "example-gem", "~> 1.0"
33
+
34
+ # For more information and examples about making a new gem, check out our
35
+ # guide at: https://bundler.io/guides/creating_gem.html
36
+ end
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: truong_beauty
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - David
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-04-25 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A simple gem which will beautify your Gemfile
14
+ email:
15
+ - truong.dohuy0501@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - Gemfile
21
+ - Gemfile.lock
22
+ - README.md
23
+ - Rakefile
24
+ - lib/truong_beauty.rb
25
+ - lib/truong_beauty/version.rb
26
+ - sig/truong_beauty.rbs
27
+ - truong_beauty.gemspec
28
+ homepage: https://github.com/truongdohuy0501/david
29
+ licenses:
30
+ - MIT
31
+ metadata:
32
+ allowed_push_host: https://rubygems.org
33
+ homepage_uri: https://github.com/truongdohuy0501/david
34
+ post_install_message:
35
+ rdoc_options: []
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 2.6.0
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ requirements: []
49
+ rubygems_version: 3.2.3
50
+ signing_key:
51
+ specification_version: 4
52
+ summary: Gemfile Beautify
53
+ test_files: []