env_list 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/env_gem.rb +23 -0
  3. metadata +42 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 57dbb02f9eecc432688f6fb31fc48fcdf6ce956287a81e22c98de2b788dffc61
4
+ data.tar.gz: 4e34229813e7eb41adeaadf28f8848ec718f96c5b32db7d1026a349ccbb7484d
5
+ SHA512:
6
+ metadata.gz: 63a61e07015179ff3ece21b0cc32f15b304042c059ece4608a11eb05f19d57215eef170c75f2cce690c235d0d03713a537625880fcbbb6e8c54c887810291cd9
7
+ data.tar.gz: ceaf99ff97d83687153f5d748f6a2d5bf6b15c1909a7764cf422884e62e2ce118cc8a09ebeae9dcb1d3c0fc558c12ee59b8366344a9517a1f5f1b4b7b9e2aa9f
data/lib/env_gem.rb ADDED
@@ -0,0 +1,23 @@
1
+ def load_env(file_path)
2
+ keys=[]
3
+ File.foreach(file_path) do |line|
4
+ next if line.strip.empty? || line.start_with?('#')
5
+
6
+ key,value=line.strip.split("=",2)
7
+ ENV[key]=value if key && value
8
+
9
+ keys.push(key)
10
+ end
11
+ # puts ENV.class
12
+ # puts key.class
13
+ # puts value.class
14
+ keys.each do |k|
15
+ puts "#{k}="+ENV[k]
16
+ end
17
+ end
18
+
19
+ load_env('.env')
20
+ # puts ENV['Email']
21
+ # ENV.each do |one|
22
+ # ENV[one]
23
+ # end
metadata ADDED
@@ -0,0 +1,42 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: env_list
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Habi Pyatha
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-12-09 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/env_gem.rb
20
+ homepage:
21
+ licenses: []
22
+ metadata: {}
23
+ post_install_message:
24
+ rdoc_options: []
25
+ require_paths:
26
+ - lib
27
+ required_ruby_version: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: '0'
32
+ required_rubygems_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ requirements: []
38
+ rubygems_version: 3.5.20
39
+ signing_key:
40
+ specification_version: 4
41
+ summary: Lists the gem variables
42
+ test_files: []