summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2021-01-20 14:18:51 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2021-01-20 14:18:51 -0800
commit3cafe4bc64f18e8903e92ab67338f9d4fac4328c (patch)
treeea3f6836b433836cecec60e2d4a82bc5ee58ab7f
parentabce41159a2adfbf5d97baee1b0b96b2d2720ce9 (diff)
downloadchef-3cafe4bc64f18e8903e92ab67338f9d4fac4328c.tar.gz
Don't ship dev gems in the shipping artifact
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--chef.gemspec9
-rw-r--r--lib/chef/version_string.rb2
-rw-r--r--omnibus/Gemfile2
-rw-r--r--omnibus/Gemfile.lock16
4 files changed, 18 insertions, 11 deletions
diff --git a/chef.gemspec b/chef.gemspec
index 11dedca7ff..92277325db 100644
--- a/chef.gemspec
+++ b/chef.gemspec
@@ -1,4 +1,13 @@
$:.unshift(File.dirname(__FILE__) + "/lib")
+vs_path = File.expand_path("chef-utils/lib/chef-utils/version_string.rb", __dir__)
+
+if File.exist?(vs_path)
+ # this is the moral equivalent of a require_relative since bundler makes require_relative here fail hard
+ eval(IO.read(vs_path))
+else
+ # if the path doesn't exist then we're just in the wild gem and not in the git repo
+ require "chef-utils/version_string"
+end
require "chef/version"
Gem::Specification.new do |s|
diff --git a/lib/chef/version_string.rb b/lib/chef/version_string.rb
index 8da5df570a..c98d4c9a75 100644
--- a/lib/chef/version_string.rb
+++ b/lib/chef/version_string.rb
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-require "chef-utils/version_string"
+require "chef-utils/version_string" unless defined?(ChefUtils::VersionString)
class Chef
VersionString = ChefUtils::VersionString
diff --git a/omnibus/Gemfile b/omnibus/Gemfile
index a4db0b69a5..19fc7a054d 100644
--- a/omnibus/Gemfile
+++ b/omnibus/Gemfile
@@ -1,7 +1,7 @@
source "https://rubygems.org"
gem "omnibus", git: "https://github.com/chef/omnibus", branch: "master"
-gem "omnibus-software", git: "https://github.com/chef/omnibus-software", branch: "lcg/dont-ship-chef-dev-gems"
+gem "omnibus-software", path: "../../omnibus-software"
gem "artifactory"
gem "pedump"
diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock
index 1ae13e8652..b5281eb600 100644
--- a/omnibus/Gemfile.lock
+++ b/omnibus/Gemfile.lock
@@ -16,10 +16,8 @@ GIT
ruby-progressbar (~> 1.7)
thor (>= 0.18, < 2.0)
-GIT
- remote: https://github.com/chef/omnibus-software
- revision: 1cff56e31219e2851d2651e9b92fffd15e42bd00
- branch: master
+PATH
+ remote: ../../omnibus-software
specs:
omnibus-software (4.0.0)
omnibus (>= 8.0.0)
@@ -173,7 +171,7 @@ GEM
citrus (3.0.2)
cleanroom (1.0.0)
coderay (1.1.3)
- concurrent-ruby (1.1.7)
+ concurrent-ruby (1.1.8)
diff-lcs (1.3)
ed25519 (1.2.4)
erubi (1.10.0)
@@ -201,7 +199,7 @@ GEM
highline (2.0.3)
httpclient (2.8.3)
iniparse (1.5.0)
- inspec-core (4.24.32)
+ inspec-core (4.25.1)
addressable (~> 2.4)
chef-telemetry (~> 1.0)
faraday (>= 0.9.0, < 1.4)
@@ -213,7 +211,7 @@ GEM
parallel (~> 1.9)
parslet (>= 1.5, < 3.0)
pry (~> 0.13)
- rspec (~> 3.10)
+ rspec (>= 3.9, < 3.11)
rspec-its (~> 1.2)
rubyzip (>= 1.2.2, < 3.0)
semverse (~> 3.0)
@@ -333,7 +331,7 @@ GEM
rspec-support (~> 3.10.0)
rspec-support (3.10.1)
ruby-progressbar (1.11.0)
- ruby2_keywords (0.0.2)
+ ruby2_keywords (0.0.4)
rubyntlm (0.6.2)
rubyzip (2.3.0)
sawyer (0.8.2)
@@ -364,7 +362,7 @@ GEM
winrm (~> 2.0)
winrm-elevated (~> 1.0)
winrm-fs (~> 1.1)
- thor (1.0.1)
+ thor (1.1.0)
toml-rb (2.0.1)
citrus (~> 3.0, > 3.0)
tomlrb (1.3.0)