spott_gem 0.0.1

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/spott_gem.rb +18 -0
  3. metadata +43 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 949ae1fa7597376b5ba049c836a92ea1f4fa340911e77e85d67878ad043c392b
4
+ data.tar.gz: defcae17896922da63ff0fc5f7b2a532516b5d44ffd663618a321c04276aaaa1
5
+ SHA512:
6
+ metadata.gz: e3f1fad7bc95a61b413a2db3bf834224bb2ef60b82903e6c385bd166ac8fc6c52f20c4ed24f96e2cb15224795490a43dbc6dcc5596ed62dc2835ff5d3da15ee6
7
+ data.tar.gz: 97bfba78a08de0b2776497153273ae617655d875a5b7efb83011c85d5b24a550d921549a5fc3571238f9d77af67c0c73d683d1f45f7e7f1187ed487fbbea3e2a
data/lib/spott_gem.rb ADDED
@@ -0,0 +1,18 @@
1
+ class SpottGem
2
+ def self.process
3
+ current_project = 'pwd'
4
+ current_project = current_project.gsub(/\n/,"")
5
+ content = File.read(current_project + "/Gemfile")
6
+ content = content.gsub(/\#\s.*\s*/,"")
7
+ content = content.gsub(/'/, '"')
8
+ content = content.gsub(/\s*^group/, "\n\ngroup")
9
+ content = content.gsub(/\s*^\s+^gem/, "\n\ngem")
10
+ File.open(current_project + "/Gemfile", "w") do |file|
11
+ file.puts content
12
+ end
13
+ system "echo", "-e", "\e[92mYour Gemfile was successfully beautified!"
14
+ rescue Exception => e
15
+ system "echo", "-e", "\e[91m#{e.message}"
16
+ system "echo", "-e", "\e[91mMake sure you're in the right place!"
17
+ end
18
+ end
metadata ADDED
@@ -0,0 +1,43 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spott_gem
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Spot
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-09-03 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/spott_gem.rb
20
+ homepage:
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubygems_version: 3.1.4
40
+ signing_key:
41
+ specification_version: 4
42
+ summary: first simple gem
43
+ test_files: []