Skip to content

Commit f42abd6

Browse files
author
Ricardo Quiñones
committed
Changes the name of the gem
1 parent a22e4af commit f42abd6

9 files changed

+23
-23
lines changed

Diff for: README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# DotenvSafe
1+
# `dotenv-rails-safe`
22

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/dotenv_safe`. To experiment with that code, run `bin/console` for an interactive prompt.
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/dotenv-rails-safe`. To experiment with that code, run `bin/console` for an interactive prompt.
44

55
TODO: Delete this and the text above, and describe your gem
66

@@ -9,7 +9,7 @@ TODO: Delete this and the text above, and describe your gem
99
Add this line to your application's Gemfile:
1010

1111
```ruby
12-
gem 'dotenv_safe'
12+
gem 'dotenv-rails-safe'
1313
```
1414

1515
And then execute:
@@ -18,7 +18,7 @@ And then execute:
1818

1919
Or install it yourself as:
2020

21-
$ gem install dotenv_safe
21+
$ gem install dotenv-rails-safe
2222

2323
## Usage
2424

@@ -32,7 +32,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
3232

3333
## Contributing
3434

35-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/dotenv_safe. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
35+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/dotenv-rails-safe. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
3636

3737

3838
## License

Diff for: bin/console

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env ruby
22

33
require "bundler/setup"
4-
require "dotenv_safe"
4+
require "dotenv-rails-safe"
55

66
# You can add fixtures and/or initialization code here to make experimenting
77
# with your gem easier. You can also use a different console, if you like.

Diff for: dotenv_safe.gemspec renamed to dotenv-rails-safe.gemspec

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# coding: utf-8
22
lib = File.expand_path('../lib', __FILE__)
33
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4-
require 'dotenv_safe/version'
4+
require 'dotenv/version'
55

66
Gem::Specification.new do |spec|
7-
spec.name = "dotenv_safe"
8-
spec.version = DotenvSafe::VERSION
7+
spec.name = "dotenv-rails-safe"
8+
spec.version = Dotenv::VERSION
99
spec.authors = ["Ricardo Quiñones"]
1010
spec.email = ["[email protected]"]
1111

@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
1414
Allows for specifying an .env.example file to check against for required environment variables
1515
in a rails app.
1616
}
17-
spec.homepage = "https://github/wework/dotenv_safe"
17+
spec.homepage = "https://github/wework/dotenv-safe"
1818
spec.license = "MIT"
1919
spec.required_ruby_version = '>= 2.2.2'
2020

Diff for: lib/dotenv-rails-safe.rb

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
require 'dotenv/version'
2+
require 'dotenv/railtie' if defined?(Rails)
3+
4+
module Dotenv
5+
end

Diff for: lib/dotenv_safe/railtie.rb renamed to lib/dotenv/railtie.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'dotenv-rails'
22

3-
module DotenvSafe
3+
module Dotenv
44
class MissingEnvVarError < StandardError; end
55

66
class Railtie < Rails::Railtie
@@ -46,8 +46,8 @@ def aggregate_missing_env_vars
4646
#
4747
# @return [Hash]
4848
def example_env_vars
49-
Dotenv::Parser.call(read)
50-
rescue Errno::ENOENT, Dotenv::FormatError
49+
Parser.call(read)
50+
rescue Errno::ENOENT, FormatError
5151
{}
5252
end
5353

Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module DotenvSafe
1+
module Dotenv
22
VERSION = "0.1.12"
33
end

Diff for: lib/dotenv_safe.rb

-5
This file was deleted.

Diff for: spec/dotenv_safe_spec.rb renamed to spec/dotenv_spec.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require "spec_helper"
22

3-
describe DotenvSafe do
4-
let(:rail_tie) { DotenvSafe::Railtie.send(:new) }
3+
describe Dotenv do
4+
let(:rail_tie) { Dotenv::Railtie.send(:new) }
55

66
describe '#check_env_vars' do
77
let(:valid_env_file_contents) do
@@ -40,7 +40,7 @@
4040
allow(rail_tie).to receive(:read).and_return(invalid_env_file_contents)
4141
expect {
4242
rail_tie.check_env_vars
43-
}.to raise_error(DotenvSafe::MissingEnvVarError)
43+
}.to raise_error(Dotenv::MissingEnvVarError)
4444
end
4545
end
4646
end

Diff for: spec/spec_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
22
require 'pry'
33
require 'rails'
4-
require 'dotenv_safe'
4+
require 'dotenv-rails-safe'

0 commit comments

Comments
 (0)