Skip to content

Commit

Permalink
Merge pull request #10 from joevartuli/master
Browse files Browse the repository at this point in the history
Fixing compile vs converge bug
  • Loading branch information
michaelklishin committed Oct 31, 2015
2 parents 79321cd + 5d65156 commit 538e41e
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 60 deletions.
24 changes: 21 additions & 3 deletions .gitignore
@@ -1,4 +1,22 @@
*~
#~
.rbx
*.class
*#
.#*
\#*#
.*.sw[a-z]
*.un~
pkg/

# Berkshelf
.vagrant
/cookbooks
Berksfile.lock

# Bundler
Gemfile.lock
bin/*
.bundle/*

.berkshelf
.chef
.kitchen/
.kitchen.local.yml
25 changes: 25 additions & 0 deletions .kitchen.yml
@@ -0,0 +1,25 @@
---

driver:
name: vagrant

provisioner:
name: chef_zero
require_chef_omnibus: latest

platforms:
- name: centos-7.0
driver:
box: opscode-centos-7.0
box_url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.0_chef-provisionerless.box

suites:
- name: default
run_list:
- recipe[gradle::tarball]
- name: override
run_list:
- recipe[gradle::tarball]
attributes:
gradle:
version: '2.6'
5 changes: 5 additions & 0 deletions Berksfile
@@ -0,0 +1,5 @@
source 'https://api.berkshelf.com'

metadata

cookbook 'ark'
9 changes: 5 additions & 4 deletions attributes/default.rb
@@ -1,4 +1,5 @@
default[:gradle][:name] = "gradle"
default[:gradle][:version] = "2.8"
default[:gradle][:home_dir] = "/usr/local"
default[:gradle][:release_url] = "http://services.gradle.org/distributions/gradle-#{node[:gradle][:version]}-bin.zip"
default['gradle']['name'] = 'gradle'
default['gradle']['version'] = '2.8'
default['gradle']['home_dir'] = '/usr/local'
default['gradle']['release_url_prefix'] = 'http://services.gradle.org/distributions/gradle-'
default['gradle']['release_url_suffix'] = '-bin.zip'
33 changes: 0 additions & 33 deletions metadata.json

This file was deleted.

15 changes: 8 additions & 7 deletions metadata.rb
@@ -1,9 +1,10 @@
name "gradle"
maintainer "Michael S. Klishin"
maintainer_email "michael@clojurewerkz.org"
license "MIT"
name 'gradle'
maintainer 'Michael S. Klishin'
maintainer_email 'michael@clojurewerkz.org'
license 'MIT'
description 'Installs Gradle'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "1.0.0"
description "Installs Gradle"
recipe "gradle::tarball", "installs gradle from tarball"
recipe 'gradle::tarball', 'installs gradle from tarball'
version '1.0.0'

depends 'ark', '>= 0.0.0'
27 changes: 14 additions & 13 deletions recipes/tarball.rb
Expand Up @@ -22,19 +22,20 @@

include_recipe 'ark'

ark node[:gradle][:name] do
url node[:gradle][:release_url]
version node[:gradle][:version]
prefix_home node[:gradle][:home_dir]
prefix_root node[:gradle][:home_dir]
prefix_bin "#{node[:gradle][:home_dir]}/bin"
action :install
end
release_url = "#{node['gradle']['release_url_prefix']}#{node['gradle']['version']}#{node['gradle']['release_url_suffix']}"

cookbook_file "/etc/profile.d/gradle.sh" do
owner "root"
group "root"
mode 0644
ark node['gradle']['name'] do
url release_url
version node['gradle']['version']
prefix_home node['gradle']['home_dir']
prefix_root node['gradle']['home_dir']
prefix_bin "#{node['gradle']['home_dir']}/bin"
action :install
end

source "etc/profile.d/gradle.sh"
cookbook_file '/etc/profile.d/gradle.sh' do
owner 'root'
group 'root'
mode 0644
source 'etc/profile.d/gradle.sh'
end

0 comments on commit 538e41e

Please sign in to comment.