Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for newer Vagrant versions that bundle with newer Ruby versions #17

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/release-gem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release Ruby Gem

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true

- name: Build gem
run: |
gem build *.gemspec

- name: Upload gem to release
run: |
gem_file=$(ls *.gem | head -n 1)
gh release upload ${{ github.event.release.tag_name }} $gem_file
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@
*.a
mkmf.log
.vagrant
.envrc
.direnv
.idea
*.gem
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in vagrant-env.gemspec
gemspec


group :development do
gem "vagrant", git: "https://github.com/mitchellh/vagrant.git"
gem 'rake', '~> 10.0'
gem 'rake', '= 13.0.6'
end

group :plugins do
gem "vagrant-env", path: "."
gemspec
end
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ $ vagrant plugin install vagrant-env

To install an older version of the plugin use `vagrant plugin install vagrant-env --plugin-version VERSION`

## Building and installing from source
```sh
git clone https://github.com/Meantub/vagrant-env.git
cd ./vagrant-env
gem build vagrant-env.gemspec
vagrant plugin install ./vagrant-env-{VERSION}.gem
```

## Usage

After installing, add your application configuration to your .env file in the root of your project
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-env/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module VagrantPlugins
module Env
VERSION = "0.0.3"
VERSION = "0.0.5"
end
end
4 changes: 2 additions & 2 deletions vagrant-env.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Gem::Specification.new do |spec|
lib/vagrant-env/config.rb
lib/vagrant-env/plugin.rb)
spec.require_paths = ["lib"]
spec.add_runtime_dependency "dotenv", "~> 0.9"
spec.add_development_dependency "bundler", "~> 1.6"
spec.add_runtime_dependency "dotenv", "= 2.8.1"
spec.add_development_dependency "bundler", "= 2.4.19"
end