dotenv-mh 0.1.0 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c64db36b38a42c0b310070c9e089850b181b686e7655643a8488ca0f418b32c
4
- data.tar.gz: 39ae918b5420ba32e390e22fb59d151e31074c96dc5949484dd8a987757c2826
3
+ metadata.gz: 3eeee2160f24cc1bae27ee11c8b5231f97f1760206a8a2d743c1aeadf2087828
4
+ data.tar.gz: 311006f24935bc21ec7094d5e04dbc858ebbdc2b193b05884864a87b564605f1
5
5
  SHA512:
6
- metadata.gz: 83b5e884f34099874f9da4c481d19a636c9b58cfcc4bd910660a75e249c050f468a6ffc84ed5dcd0555e8fbe6a98c648ce16d6a11a2e86f8cd6781e00876a9cd
7
- data.tar.gz: 2dc85bde05a1b874f54d6e6caad4902886984d000529aec3b9f023539dd8474fed4602436a0da9053c6e31f84b89a5e19f0f830e0657f0602e114aaa39d44556
6
+ metadata.gz: c463e86ad601da0d557be939f9e79f356c70b9fef51e7a26dae09a6a039c891fba05a4a5183c9f919be1d3126055ae83634ae04a1296e12809e7dfa69ebc0bb8
7
+ data.tar.gz: c2ae5f6f85d506a80fbe2e66ae8b7d772c1b1f140030dff611f3d00db310b89ee6d2e778aec064667be370538cf72bab21a783c13a54d5162967ad366a6f0997
data/.env ADDED
File without changes
data/.gitignore ADDED
@@ -0,0 +1,7 @@
1
+ .bundle
2
+ .ruby-version
3
+ /Gemfile.lock
4
+ /gemfiles/*.gemfile.lock
5
+ /pkg
6
+ /tmp
7
+ .env
data/Gemfile CHANGED
@@ -6,3 +6,4 @@ source "https://rubygems.org"
6
6
  gemspec
7
7
 
8
8
  gem "rake", "~> 13.0"
9
+ gem "rails", ">= 5.2.0", "< 6.1"
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "dotenv/mh"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
@@ -0,0 +1,19 @@
1
+
2
+ puts ("installing...")
3
+
4
+ if(!File.file?('.env')) then
5
+ puts "creating .env file"
6
+ File.new(".env", "w")
7
+
8
+ if(File.file?('.gitignore')) then
9
+ puts "adding .env into your .gitignore"
10
+
11
+ fileContent = File.read(".gitignore")
12
+ File.write(".gitignore", fileContent + "\n.env")
13
+ else
14
+ puts(".gitignore does not exists, skipping...")
15
+ end
16
+ else
17
+ puts ".env file already exists, skipping..."
18
+ end
19
+
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/dotenv-mh.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["herreramaxi@gmail.com"]
10
10
 
11
11
  spec.summary = "dotenv gem for loading environment variables"
12
- spec.description = "dotenv gem for loading environment variables from .env file"
12
+ spec.description = "dotenv gem for loading environment variables from .env file. This is a WIP, I would like to add a Rails initializer so that env variables can be loaded from .env file."
13
13
  # spec.homepage = "Put your gem's website or public repo URL here."
14
14
  spec.required_ruby_version = ">= 2.6.0"
15
15
 
@@ -21,13 +21,15 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  # Specify which files should be added to the gem when it is released.
23
23
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
- spec.files = Dir.chdir(__dir__) do
25
- `git ls-files -z`.split("\x0").reject do |f|
26
- (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
27
- end
28
- end
29
- spec.bindir = "exe"
30
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
24
+ # spec.files = Dir.chdir(__dir__) do
25
+ # `git ls-files -z`.split("\x0").reject do |f|
26
+ # (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
27
+ # end
28
+ # end
29
+ spec.files = `git ls-files`.split($\)
30
+ # spec.bindir = "exe"
31
+ # spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
+ spec.executables << "dotenvInstaller"
31
33
  spec.require_paths = ["lib"]
32
34
 
33
35
  # Uncomment to register a new dependency of your gem
@@ -35,4 +37,4 @@ Gem::Specification.new do |spec|
35
37
 
36
38
  # For more information and examples about making a new gem, check out our
37
39
  # guide at: https://bundler.io/guides/creating_gem.html
38
- end
40
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dotenv
4
4
  module Mh
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.3"
6
6
  end
7
7
  end
@@ -0,0 +1,10 @@
1
+ module Dotenv
2
+ class Railtie < Rails::Railtie
3
+ config.before_configuration do
4
+ puts "doing something..."
5
+ end
6
+ end
7
+ end
8
+
9
+ # lib/my_gem.rb
10
+ require "Dotenv/railtie" if defined?(Rails::Railtie)
metadata CHANGED
@@ -1,28 +1,37 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotenv-mh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Herrera Maxi
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-12 00:00:00.000000000 Z
11
+ date: 2022-10-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: dotenv gem for loading environment variables from .env file
13
+ description: dotenv gem for loading environment variables from .env file. This is
14
+ a WIP, I would like to add a Rails initializer so that env variables can be loaded
15
+ from .env file.
14
16
  email:
15
17
  - herreramaxi@gmail.com
16
- executables: []
18
+ executables:
19
+ - dotenvInstaller
17
20
  extensions: []
18
21
  extra_rdoc_files: []
19
22
  files:
23
+ - ".env"
24
+ - ".gitignore"
20
25
  - Gemfile
21
26
  - README.md
22
27
  - Rakefile
28
+ - bin/console
29
+ - bin/dotenvInstaller
30
+ - bin/setup
23
31
  - dotenv-mh.gemspec
24
32
  - lib/dotenv/mh.rb
25
33
  - lib/dotenv/mh/version.rb
34
+ - lib/dotenv/railtie.rb
26
35
  - sig/dotenv/mh.rbs
27
36
  homepage:
28
37
  licenses: []