Skip to content

Commit 48af432

Browse files
committed
Revise circleci orb version.
1 parent 570807a commit 48af432

11 files changed

+14
-43
lines changed

.all-contributorsrc.txt

-8
This file was deleted.

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
version: 2.1
33
orbs:
4-
kitchen: sous-chefs/kitchen@2.0.2
4+
kitchen: sous-chefs/kitchen@1.0.1
55

66
workflows:
77
kitchen:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Installs jlenv to the system location, by default `/usr/local/jlenv`
140140
jlenv_system_install 'foo' do
141141
git_url # URL of the plugin repo you want to checkout
142142
git_ref # Optional: Git reference to checkout
143-
update_rbenv # Optional: Keeps the git repo up to date
143+
update_jlenv # Optional: Keeps the git repo up to date
144144
end
145145
```
146146

TESTING.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
Please refer to
2-
https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD
31
# Testing
42

53
Please refer to the [community cookbook documentation](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD).

libraries/helpers.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
# Library:: Chef::Jlenv::ShellHelpers
44
#
55
# Author:: Fletcher Nichol <[email protected]>
6+
# Author:: Mark Van de Vyver <[email protected]>
67
#
78
# Copyright:: 2011-2017, Fletcher Nichol
9+
# Copyright:: 2019, Mark Van de Vyver
810
#
911
# Licensed under the Apache License, Version 2.0 (the "License");
1012
# you may not use this file except in compliance with the License.
@@ -40,7 +42,7 @@ def root_path
4042
end
4143
end
4244

43-
def which_rbenv
45+
def which_jlenv
4446
"(#{new_resource.user || 'system'})"
4547
end
4648

libraries/package_deps.rb

+2-23
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,16 @@ module Jlenv
33
module PackageDeps
44
def install_julia_dependencies
55
case ::File.basename(new_resource.version)
6-
when /^jjulia-/
7-
package jjulia_package_deps
6+
when /^special-julia-/
7+
# call another package install method
88
else
99
package_deps.each do |deps|
1010
package deps
1111
end
1212
end
13-
1413
ensure_java_environment if new_resource.version =~ /^jjulia-/
1514
end
1615

17-
def ensure_java_environment
18-
resource_collection.find(
19-
'julia_block[update-java-alternatives]'
20-
).run_action(:create)
21-
rescue Chef::Exceptions::ResourceNotFound
22-
# have pity on my soul
23-
Chef::Log.info 'The java cookbook does not appear to in the run_list.'
24-
end
25-
26-
def jjulia_package_deps
27-
case node['platform_family']
28-
when 'rhel', 'fedora', 'amazon'
29-
%w(make gcc-c++)
30-
when 'debian'
31-
%w(make g++)
32-
when 'freebsd'
33-
%w(alsa-lib bash dejavu expat fixesproto fontconfig freetype2 gettext-runtime giflib indexinfo inputproto java-zoneinfo javavmwrapper kbproto libICE libSM libX11 libXau libXdmcp libXext libXfixes libXi libXrender libXt libXtst libfontenc libpthread-stubs libxcb libxml2 mkfontdir mkfontscale openjdk8 recordproto renderproto xextproto xproto)
34-
end
35-
end
36-
3716
def package_deps
3817
case node['platform_family']
3918
when 'mac_os_x'

resources/global.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
# e.g. "jlenv global" should return the version we set
4343

4444
action :create do
45-
jlenv_script "globals #{which_rbenv}" do
45+
jlenv_script "globals #{which_jlenv}" do
4646
code "jlenv global #{new_resource.jlenv_version}"
4747
user new_resource.user if new_resource.user
4848
action :run

resources/julia.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
command << " #{new_resource.version}"
5959
command << ' --verbose' if new_resource.verbose
6060

61-
jlenv_script "#{command} #{which_rbenv}" do
61+
jlenv_script "#{command} #{which_jlenv}" do
6262
code command
6363
user new_resource.user if new_resource.user
6464
environment new_resource.environment if new_resource.environment

resources/rehash.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
property :user, String
2828

2929
action :run do
30-
jlenv_script "jlenv rehash #{which_rbenv}" do
30+
jlenv_script "jlenv rehash #{which_jlenv}" do
3131
code %(jlenv rehash)
3232
user new_resource.user if new_resource.user
3333
action :run

resources/system_install.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
property :git_url, String, default: 'https://github.com/rbenv/rbenv.git'
2828
property :git_ref, String, default: 'master'
2929
property :global_prefix, String, default: '/usr/local/jlenv'
30-
property :update_rbenv, [true, false], default: true
30+
property :update_jlenv, [true, false], default: true
3131

3232
action :install do
3333
node.run_state['root_path'] ||= {}
@@ -51,7 +51,7 @@
5151
git new_resource.global_prefix do
5252
repository new_resource.git_url
5353
reference new_resource.git_ref
54-
action :checkout if new_resource.update_rbenv == false
54+
action :checkout if new_resource.update_jlenv == false
5555
notifies :run, 'julia_block[Add jlenv to PATH]', :immediately
5656
notifies :run, 'bash[Initialize system jlenv]', :immediately
5757
end

resources/user_install.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
property :group, String, default: lazy { user }
3131
property :home_dir, String, default: lazy { ::File.expand_path("~#{user}") }
3232
property :user_prefix, String, default: lazy { ::File.join(home_dir, '.jlenv') }
33-
property :update_rbenv, [true, false], default: true
33+
property :update_jlenv, [true, false], default: true
3434

3535
action :install do
3636
package package_prerequisites
@@ -51,7 +51,7 @@
5151
git new_resource.user_prefix do
5252
repository new_resource.git_url
5353
reference new_resource.git_ref
54-
action :checkout if new_resource.update_rbenv == false
54+
action :checkout if new_resource.update_jlenv == false
5555
user new_resource.user
5656
group new_resource.group
5757
notifies :run, 'julia_block[Add jlenv to PATH]', :immediately

0 commit comments

Comments
 (0)