natives 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/VERSION +1 -1
- data/chef-solo/Berksfile.lock +10 -0
- data/chef-solo/cookbooks/natives/Berksfile +3 -0
- data/chef-solo/cookbooks/natives/Gemfile +5 -0
- data/chef-solo/cookbooks/natives/LICENSE +3 -0
- data/chef-solo/cookbooks/natives/README.md +13 -0
- data/chef-solo/cookbooks/natives/chefignore +96 -0
- data/chef-solo/cookbooks/natives/libraries/natives_recipe_helper.rb +37 -0
- data/chef-solo/cookbooks/natives/metadata.rb +9 -0
- data/chef-solo/cookbooks/natives/recipes/default.rb +28 -0
- data/natives.gemspec +11 -3
- metadata +10 -2
- data/chef-solo/.gitignore +0 -17
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NmI2YmE2YTk1NDI0YjQ4ZTkzOTNkZWNjOTFjMWViNWJlNDdiM2JlZQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
MjNhYjMyNjAzNGRmMzg3N2U4NTg1NWFjMDgxMTA4YTA2ZTU0MmJhYw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
YWEwOWMwNTFlMGExMmZhM2FmMjBhZTBiMGJkYjVmOTlhYzA2NmRlZjEwZjAz
|
|
10
|
+
Y2MzOTgyMmI0ZTQ5ZDM1ZWNhZThkNzE3M2MyM2Q3NDg4YmI1YThhMjZhYjkz
|
|
11
|
+
NWI1YWIzZDk0MmM1OThmODZjYmQzZGQ5YTM1YTJiNjcxZDc0OGY=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
N2I3Mjg4MDM3Y2I1NGM1ZDMwOTlmMjYxYjdkNjNhNjJhMzgyN2ExZjFjODQ5
|
|
14
|
+
MzMwNWJmZGFkOTFjNGQwOWU2MjM5MzNmMDVkNDY5NWUxMDY4ODlkY2YwNDk1
|
|
15
|
+
YjM0ODQ1MGY0MTNhZjZjMGM5ZTUwNWIxNmEyMzNiZDdiYmNkMTY=
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.1
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Put files/directories that should be ignored in this file when uploading
|
|
2
|
+
# or sharing to the community site.
|
|
3
|
+
# Lines that start with '# ' are comments.
|
|
4
|
+
|
|
5
|
+
# OS generated files #
|
|
6
|
+
######################
|
|
7
|
+
.DS_Store
|
|
8
|
+
Icon?
|
|
9
|
+
nohup.out
|
|
10
|
+
ehthumbs.db
|
|
11
|
+
Thumbs.db
|
|
12
|
+
|
|
13
|
+
# SASS #
|
|
14
|
+
########
|
|
15
|
+
.sass-cache
|
|
16
|
+
|
|
17
|
+
# EDITORS #
|
|
18
|
+
###########
|
|
19
|
+
\#*
|
|
20
|
+
.#*
|
|
21
|
+
*~
|
|
22
|
+
*.sw[a-z]
|
|
23
|
+
*.bak
|
|
24
|
+
REVISION
|
|
25
|
+
TAGS*
|
|
26
|
+
tmtags
|
|
27
|
+
*_flymake.*
|
|
28
|
+
*_flymake
|
|
29
|
+
*.tmproj
|
|
30
|
+
.project
|
|
31
|
+
.settings
|
|
32
|
+
mkmf.log
|
|
33
|
+
|
|
34
|
+
## COMPILED ##
|
|
35
|
+
##############
|
|
36
|
+
a.out
|
|
37
|
+
*.o
|
|
38
|
+
*.pyc
|
|
39
|
+
*.so
|
|
40
|
+
*.com
|
|
41
|
+
*.class
|
|
42
|
+
*.dll
|
|
43
|
+
*.exe
|
|
44
|
+
*/rdoc/
|
|
45
|
+
|
|
46
|
+
# Testing #
|
|
47
|
+
###########
|
|
48
|
+
.watchr
|
|
49
|
+
.rspec
|
|
50
|
+
spec/*
|
|
51
|
+
spec/fixtures/*
|
|
52
|
+
test/*
|
|
53
|
+
features/*
|
|
54
|
+
Guardfile
|
|
55
|
+
Procfile
|
|
56
|
+
|
|
57
|
+
# SCM #
|
|
58
|
+
#######
|
|
59
|
+
.git
|
|
60
|
+
*/.git
|
|
61
|
+
.gitignore
|
|
62
|
+
.gitmodules
|
|
63
|
+
.gitconfig
|
|
64
|
+
.gitattributes
|
|
65
|
+
.svn
|
|
66
|
+
*/.bzr/*
|
|
67
|
+
*/.hg/*
|
|
68
|
+
*/.svn/*
|
|
69
|
+
|
|
70
|
+
# Berkshelf #
|
|
71
|
+
#############
|
|
72
|
+
Berksfile
|
|
73
|
+
Berksfile.lock
|
|
74
|
+
cookbooks/*
|
|
75
|
+
tmp
|
|
76
|
+
|
|
77
|
+
# Cookbooks #
|
|
78
|
+
#############
|
|
79
|
+
CONTRIBUTING
|
|
80
|
+
CHANGELOG*
|
|
81
|
+
|
|
82
|
+
# Strainer #
|
|
83
|
+
############
|
|
84
|
+
Colanderfile
|
|
85
|
+
Strainerfile
|
|
86
|
+
.colander
|
|
87
|
+
.strainer
|
|
88
|
+
|
|
89
|
+
# Vagrant #
|
|
90
|
+
###########
|
|
91
|
+
.vagrant
|
|
92
|
+
Vagrantfile
|
|
93
|
+
|
|
94
|
+
# Travis #
|
|
95
|
+
##########
|
|
96
|
+
.travis.yml
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module NativesRecipeHelper
|
|
2
|
+
def use_homebrew?
|
|
3
|
+
::File.exist? '/usr/local/bin/brew'
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def use_apt?
|
|
7
|
+
!which('apt-get').nil?
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def natives_install_list
|
|
11
|
+
node["natives"]["install_list"]
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def current_package_provider
|
|
15
|
+
package_provider = Chef::Platform.find_provider_for_node({
|
|
16
|
+
platform: node[:platform], platform_version: node[:platform_version]},
|
|
17
|
+
::Chef::Resource::Package.new(""))
|
|
18
|
+
package_provider.to_s.split('::').last.downcase
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def which(cmd)
|
|
22
|
+
paths = (ENV['PATH'].split(::File::PATH_SEPARATOR) + %w(/bin /usr/bin /sbin /usr/sbin))
|
|
23
|
+
|
|
24
|
+
paths.each do |path|
|
|
25
|
+
possible = File.join(path, cmd)
|
|
26
|
+
return possible if File.executable?(possible)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
nil
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
class Chef
|
|
34
|
+
class Recipe
|
|
35
|
+
include NativesRecipeHelper
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Cookbook Name:: natives
|
|
3
|
+
# Recipe:: default
|
|
4
|
+
#
|
|
5
|
+
# Copyright (C) 2013 YOUR_NAME
|
|
6
|
+
#
|
|
7
|
+
# All rights reserved - Do Not Redistribute
|
|
8
|
+
#
|
|
9
|
+
|
|
10
|
+
require 'natives/catalog'
|
|
11
|
+
|
|
12
|
+
include_recipe 'homebrew' if use_homebrew?
|
|
13
|
+
include_recipe 'apt' if use_apt?
|
|
14
|
+
|
|
15
|
+
natives_install_list.each do |catalog_name, entries|
|
|
16
|
+
catalog = Natives::Catalog.new(
|
|
17
|
+
catalog_name,
|
|
18
|
+
node[:platform],
|
|
19
|
+
node[:platform_version],
|
|
20
|
+
current_package_provider)
|
|
21
|
+
|
|
22
|
+
packages = catalog.native_packages_for(entries.first)
|
|
23
|
+
packages.each do |package_name|
|
|
24
|
+
package package_name do
|
|
25
|
+
action :install
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
data/natives.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: natives 0.1.
|
|
5
|
+
# stub: natives 0.1.1 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "natives"
|
|
9
|
-
s.version = "0.1.
|
|
9
|
+
s.version = "0.1.1"
|
|
10
10
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
12
12
|
s.authors = ["Huiming Teo"]
|
|
@@ -28,10 +28,18 @@ Gem::Specification.new do |s|
|
|
|
28
28
|
"Rakefile",
|
|
29
29
|
"VERSION",
|
|
30
30
|
"bin/natives",
|
|
31
|
-
"chef-solo/.gitignore",
|
|
32
31
|
"chef-solo/.kitchen.yml",
|
|
33
32
|
"chef-solo/Berksfile",
|
|
33
|
+
"chef-solo/Berksfile.lock",
|
|
34
34
|
"chef-solo/config.rb",
|
|
35
|
+
"chef-solo/cookbooks/natives/Berksfile",
|
|
36
|
+
"chef-solo/cookbooks/natives/Gemfile",
|
|
37
|
+
"chef-solo/cookbooks/natives/LICENSE",
|
|
38
|
+
"chef-solo/cookbooks/natives/README.md",
|
|
39
|
+
"chef-solo/cookbooks/natives/chefignore",
|
|
40
|
+
"chef-solo/cookbooks/natives/libraries/natives_recipe_helper.rb",
|
|
41
|
+
"chef-solo/cookbooks/natives/metadata.rb",
|
|
42
|
+
"chef-solo/cookbooks/natives/recipes/default.rb",
|
|
35
43
|
"chef-solo/vendored-cookbooks/apt/CHANGELOG.md",
|
|
36
44
|
"chef-solo/vendored-cookbooks/apt/README.md",
|
|
37
45
|
"chef-solo/vendored-cookbooks/apt/attributes/default.rb",
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: natives
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Huiming Teo
|
|
@@ -158,10 +158,18 @@ files:
|
|
|
158
158
|
- Rakefile
|
|
159
159
|
- VERSION
|
|
160
160
|
- bin/natives
|
|
161
|
-
- chef-solo/.gitignore
|
|
162
161
|
- chef-solo/.kitchen.yml
|
|
163
162
|
- chef-solo/Berksfile
|
|
163
|
+
- chef-solo/Berksfile.lock
|
|
164
164
|
- chef-solo/config.rb
|
|
165
|
+
- chef-solo/cookbooks/natives/Berksfile
|
|
166
|
+
- chef-solo/cookbooks/natives/Gemfile
|
|
167
|
+
- chef-solo/cookbooks/natives/LICENSE
|
|
168
|
+
- chef-solo/cookbooks/natives/README.md
|
|
169
|
+
- chef-solo/cookbooks/natives/chefignore
|
|
170
|
+
- chef-solo/cookbooks/natives/libraries/natives_recipe_helper.rb
|
|
171
|
+
- chef-solo/cookbooks/natives/metadata.rb
|
|
172
|
+
- chef-solo/cookbooks/natives/recipes/default.rb
|
|
165
173
|
- chef-solo/vendored-cookbooks/apt/CHANGELOG.md
|
|
166
174
|
- chef-solo/vendored-cookbooks/apt/README.md
|
|
167
175
|
- chef-solo/vendored-cookbooks/apt/attributes/default.rb
|