natives-catalog 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +153 -1
- data/VERSION +1 -1
- data/lib/natives-catalog.rb +1 -0
- data/natives-catalog.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmQwNTEwNTQwNTg4MGFkNDRkNTk2N2FkMDBmOWVhZjMwODUxMzU4Ng==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
N2U5OGFjMGY0M2VjNmIxMWI1OWZiN2UxY2EyZDVhNWU0MDU0Njg4Zg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjZiYzg0YWI1NTkxZGI3MWRjYjZjM2NjNWIxNTFhYzIxMDM3MDkxZTIxZDQ5
|
10
|
+
ZjI0MzdhODg1ZTI1ZDgyYTdjYjBmNjZiZDcyMDM0MzFiMjkxNjZlZDlkNWFh
|
11
|
+
MzI4OTQ0ZTYwMDg3ZDgxMWJjN2Y0ZTY5ODllOGZlOTBhMzc4YjI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGVkZmNlNWRiNTBiNDBiZGYyNTczZDkzMmZjOWM4ZTU2NzI1MWZjOGY4M2Ew
|
14
|
+
M2U5Yjk0YzZmOWQ5Y2IzZDQxMzg4ZjMwOWQwMmE5ZTA2OTk3MDM0MjE1OTI5
|
15
|
+
ZGNiY2I1ZmIzYTcwYzkxNzE4YzVkNjVmNjliOWU4NzQyYWJkZmY=
|
data/README.md
CHANGED
@@ -1,6 +1,158 @@
|
|
1
1
|
# natives-catalog
|
2
2
|
|
3
|
-
|
3
|
+
Maintains a catalog of native library packages required by Ruby gems, and a parser to load catalog files.
|
4
|
+
|
5
|
+
It can be extended to maintain additional catalogs e.g. for other package dependency manager such as `npm`.
|
6
|
+
|
7
|
+
It is currently used by [natives](https://github.com/teohm/natives) gem to install native packages on multiple platforms.
|
8
|
+
|
9
|
+
### Calling for ruby gems catalog contributors!
|
10
|
+
|
11
|
+
Your pull requests are welcomed to maintain the [rubygems catalog](https://github.com/teohm/natives-catalog/blob/master/catalogs/rubygems.yaml) and keep it up-to-date!
|
12
|
+
|
13
|
+
## Install
|
14
|
+
|
15
|
+
```
|
16
|
+
gem install natives-catalog
|
17
|
+
```
|
18
|
+
|
19
|
+
## Use
|
20
|
+
|
21
|
+
```
|
22
|
+
require 'natives/catalog'
|
23
|
+
|
24
|
+
catalog = Natives::Catalog.new(
|
25
|
+
'rubygems',
|
26
|
+
'mac_os_x', '10.7.5',
|
27
|
+
'homebrew')
|
28
|
+
|
29
|
+
catalog.to_hash # returns the loaded catalog hash
|
30
|
+
|
31
|
+
catalog.reload # reloads catalog files
|
32
|
+
|
33
|
+
catalog.native_packages_for('webcapybara', 'sqlite3')
|
34
|
+
# => ["qt", "sqlite"]
|
35
|
+
```
|
36
|
+
|
37
|
+
|
38
|
+
## Catalog
|
39
|
+
|
40
|
+
### Supported catalogs
|
41
|
+
|
42
|
+
* **[rubygems](https://github.com/teohm/natives-catalog/blob/master/catalogs/rubygems.yaml) (calling for your PR contributions!)**
|
43
|
+
* (new catalog contributors e.g. for `npm` are welcomed :-)
|
44
|
+
|
45
|
+
### Catalog load paths
|
46
|
+
|
47
|
+
It loads YAML files (.yaml, .yml) from the following paths in this order:
|
48
|
+
|
49
|
+
1. `catalogs/` in this gem.
|
50
|
+
2. `natives-catalogs/` in current working directory, if any.
|
51
|
+
|
52
|
+
When there are several YAML files in a path, they are **sorted by filename** and loaded in the same order.
|
53
|
+
|
54
|
+
### Catalog file format
|
55
|
+
|
56
|
+
A catalog file is written in YAML, based on this format:
|
57
|
+
|
58
|
+
```
|
59
|
+
catalog_name:
|
60
|
+
entry_name:
|
61
|
+
platform/package_provider:
|
62
|
+
version:
|
63
|
+
- package_name
|
64
|
+
```
|
65
|
+
|
66
|
+
For example,
|
67
|
+
|
68
|
+
```
|
69
|
+
rubygems:
|
70
|
+
capybara-webkit:
|
71
|
+
mac_os_x/homebrew:
|
72
|
+
10.7.5:
|
73
|
+
- libqtwebkit-dev
|
74
|
+
```
|
75
|
+
|
76
|
+
#### Use `default` when apply to all platforms
|
77
|
+
|
78
|
+
```
|
79
|
+
rubygems:
|
80
|
+
curb:
|
81
|
+
default:
|
82
|
+
- curl
|
83
|
+
```
|
84
|
+
|
85
|
+
#### Use `default` when apply to all versions
|
86
|
+
|
87
|
+
```
|
88
|
+
rubygems:
|
89
|
+
capybara-webkit:
|
90
|
+
mac_os_x/homebrew:
|
91
|
+
default:
|
92
|
+
- libqtwebkit-dev
|
93
|
+
```
|
94
|
+
|
95
|
+
#### Use array to group platforms
|
96
|
+
|
97
|
+
```
|
98
|
+
rubygems:
|
99
|
+
capybara-webkit:
|
100
|
+
[ubuntu/apt, debian/apt]:
|
101
|
+
default:
|
102
|
+
- libqtwebkit-dev
|
103
|
+
```
|
104
|
+
|
105
|
+
#### Use array to group versions
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
```
|
110
|
+
rubygems:
|
111
|
+
capybara-webkit:
|
112
|
+
ubuntu/apt:
|
113
|
+
[10.04, 10.04.1, 10.04.2, 10.04.3, 10.04.4]:
|
114
|
+
- libqt4-dev
|
115
|
+
default:
|
116
|
+
- libqtwebkit-dev
|
117
|
+
```
|
118
|
+
|
119
|
+
|
120
|
+
#### Supported values for platform/package_provider
|
121
|
+
|
122
|
+
The values are limited to the platforms and package providers [supported by Chef](https://github.com/opscode/chef/blob/master/lib/chef/platform/provider_mapping.rb), so that Chef can be used to perform the package installation (see [natives](https://github.com/teohm/natives) gem).
|
123
|
+
|
124
|
+
```
|
125
|
+
aix/aix
|
126
|
+
amazon/yum
|
127
|
+
arch/pacman
|
128
|
+
centos/yum
|
129
|
+
debian/apt
|
130
|
+
fedora/yum
|
131
|
+
freebsd/freebsd
|
132
|
+
gcel/apt
|
133
|
+
gentoo/portage
|
134
|
+
linaro/apt
|
135
|
+
linuxmint/apt
|
136
|
+
mac_os_x/homebrew
|
137
|
+
mac_os_x/macports
|
138
|
+
mac_os_x_server/macports
|
139
|
+
nexentacore/solaris
|
140
|
+
omnios/ips
|
141
|
+
openindiana/ips
|
142
|
+
opensolaris/ips
|
143
|
+
opensuse/zypper
|
144
|
+
oracle/yum
|
145
|
+
raspbian/apt
|
146
|
+
redhat/yum
|
147
|
+
scientific/yum
|
148
|
+
smartos/smartos
|
149
|
+
solaris2/ips
|
150
|
+
suse/zypper
|
151
|
+
ubuntu/apt
|
152
|
+
xcp/yum
|
153
|
+
xenserver/yum
|
154
|
+
```
|
155
|
+
|
4
156
|
|
5
157
|
## Contributing to natives-catalog
|
6
158
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.3
|
data/lib/natives-catalog.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
require 'natives/catalog'
|
data/natives-catalog.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-catalog 0.3.
|
5
|
+
# stub: natives-catalog 0.3.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "natives-catalog"
|
9
|
-
s.version = "0.3.
|
9
|
+
s.version = "0.3.3"
|
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"]
|