From bdbe0bee47c559121ac0a5826ca319f1d91de9b9 Mon Sep 17 00:00:00 2001 From: Brian Dominick Date: Tue, 21 Sep 2021 20:20:34 -0400 Subject: [PATCH] Changes to fix versioning --- asciidocsy.gemspec | 3 +-- lib/asciidocsy/data/releases.yml | 3 ++- lib/asciidocsy/version.rb | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/asciidocsy.gemspec b/asciidocsy.gemspec index c299f79..2cfbe5f 100644 --- a/asciidocsy.gemspec +++ b/asciidocsy.gemspec @@ -1,6 +1,6 @@ # frozen_string_literal: true # coding: utf-8 -lib = File.expand_path("../lib", __FILE__) +lib = File.expand_path("lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "asciidocsy/version" @@ -19,7 +19,6 @@ Gem::Specification.new do |spec| spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r!^(lib|_docs|_data|assets|_sass|LICENSE|_config\.yml|_layouts|_includes)!i) } - spec.add_runtime_dependency "jekyll", "~> 4.2" spec.add_runtime_dependency "jekyll-asciidoc", "~> 3.0" spec.add_runtime_dependency "jekyll-liquify", "=0.0.2" spec.add_runtime_dependency "jekyll-data", "=1.1.1" diff --git a/lib/asciidocsy/data/releases.yml b/lib/asciidocsy/data/releases.yml index ea9af66..61cb09b 100644 --- a/lib/asciidocsy/data/releases.yml +++ b/lib/asciidocsy/data/releases.yml @@ -2,7 +2,8 @@ # LATEST TO OLDEST revisions: - - code: 0.3.0 date: 2021-09-21 + - code: 0.3.0 + date: 2021-09-21 hash: 050b33f239a0756db37de2dcb7e4219684dc7a44 memo: | The third minor release of AsciiDocsy refactors the entire theme as a proper Ruby gem! diff --git a/lib/asciidocsy/version.rb b/lib/asciidocsy/version.rb index cfe630a..141a7f3 100644 --- a/lib/asciidocsy/version.rb +++ b/lib/asciidocsy/version.rb @@ -4,7 +4,9 @@ SafeYAML::OPTIONS[:default_mode] = :safe module AsciiDocsy - releases = YAML.load_file('lib/asciidocsy/data/releases.yml') + spec = Gem::Specification.find_by_name("asciidocsy") + gem_root = spec.gem_dir + releases = YAML.load_file(gem_root + '/lib/asciidocsy/data/releases.yml') if releases['revisions'][0]['patches'] VERSION = releases['revisions'][0]['patches'][0]['code'] else