welcome_application_record 1.0.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
+ SHA1:
3
+ metadata.gz: 1e8f4430b6243bf1b564493e1047249c996a2bee
4
+ data.tar.gz: 717e0f3be0d70b08da6ed5b9552d7d76ac98f1b7
5
+ SHA512:
6
+ metadata.gz: a17de5fbdfafbabaf519dcaa046e06aaebb6b481e8af5b08acbaf7369dbdc4588bac308d7042f955690bd933890f619d3484b0cc706122cdba08d09a1a57e10b
7
+ data.tar.gz: def55628c6a85782065993e7b408bb2c863273f8cff2f41060542ec498eb77d2b0ee64573eb28fd400e567ba2c7fda91550350623f530bc95534d604f8213f95
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "welcome_application_record"
4
+
5
+ WelcomeApplicationRecord.perform
@@ -0,0 +1,14 @@
1
+ class WelcomeApplicationRecord
2
+ def self.perform
3
+ current_project = `pwd`
4
+ current_project = current_project.delete("\n")
5
+ File.open("#{current_project}/app/models/application_record.rb", "w") do |f|
6
+ f << "class ApplicationRecord < ActiveRecord::Base\n"
7
+ f << " self.abstract_class = true\n"
8
+ f << "end"
9
+ end
10
+ system "echo", "-e", "\e[92mYour ApplicationRecord was successfully created!"
11
+ rescue Exception => e
12
+ system "echo", "-e", "\e[91m#{e.message}"
13
+ end
14
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: welcome_application_record
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Tai Tri Vo
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-08-07 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A simple gem which convert to extend ApplicationRecord instead to directly
14
+ extend ActiveRecord::Base
15
+ email:
16
+ - votaitri.hust@gmail.com
17
+ executables:
18
+ - welcome_application_record
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - bin/welcome_application_record
23
+ - lib/welcome_application_record.rb
24
+ homepage: https://rubygems.org/gems/welcome_application_record
25
+ licenses:
26
+ - MIT
27
+ metadata: {}
28
+ post_install_message:
29
+ rdoc_options: []
30
+ require_paths:
31
+ - lib
32
+ required_ruby_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ required_rubygems_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ requirements: []
43
+ rubyforge_project:
44
+ rubygems_version: 2.6.14
45
+ signing_key:
46
+ specification_version: 4
47
+ summary: Welcome ApplicationRecord
48
+ test_files: []