natives 0.5.0 → 0.5.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/README.md +53 -27
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/natives.gemspec +109 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTE5NDQ2M2I2ZDc4YTVmY2QyZDdiN2U2NmExMTA0NTEyNmFjYjUzNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OTBiZDc0NTVmZDhhN2RkYWYyOTkxMWYxMmQ3NTFjNGE4MDQ2YTc4ZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDlkMDYyMjVkM2Y3Y2Y1NGM5ZjRhMTY5YWI4NDZjYWVjNDc3MzYxMzU4N2Zi
|
10
|
+
ZmM0ZGJkZjQ5ZThkZDVkZWZhZGQ2MDhmZDUyZmI4Mjc0YzJhMjZlMTZhNGFi
|
11
|
+
YTFmNTE0MTJjNzYyZTgzZWJlODk5NTE2NmRkMjEyMjc0MTMwMmI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Yjk2NmNkM2E5MmZjZjcyYTU0ODMzODRlYTM1YWQ2ZjBhMDhlMDdlMTQxNTJl
|
14
|
+
OWU4ZGE5Y2I5ZWEzYmEzNDRkYzA1ZmM0ZTcxMThhOGFkZjQ3NjU5MTE0OWI3
|
15
|
+
YjJmMWEzNTU1NmJiN2ExYTBjNmVhMzJkODYwZGM0NjEyODEwMzU=
|
data/README.md
CHANGED
@@ -1,52 +1,78 @@
|
|
1
|
-
# natives
|
1
|
+
# natives
|
2
2
|
|
3
|
-
[](http://badge.fury.io/rb/natives)
|
4
|
+
[](https://codeclimate.com/github/teohm/natives)
|
5
5
|
|
6
|
-
|
6
|
+
List native packages required by ruby gems on your machine.
|
7
7
|
|
8
|
-
|
8
|
+
What it does:
|
9
9
|
|
10
|
-
|
10
|
+
* maintains a [multi-platform catalog](https://github.com/teohm/natives-catalog/blob/master/catalogs/rubygems.yaml) of native packages for ruby gems.
|
11
|
+
* detects platform, platform version using [Chef Ohai](https://github.com/opscode/ohai).
|
12
|
+
* detects package manager.
|
13
|
+
* returns a list of native packages based on the gems specified by you or a gemfile.
|
11
14
|
|
12
|
-
-----
|
13
|
-
### Calling for rubygems catalog contributors!
|
14
|
-
|
15
|
-
We need your help to populate and maintain the [rubygems catalog](https://github.com/teohm/natives-catalog/blob/master/catalogs/rubygems.yaml)! :-)
|
16
|
-
|
17
|
-
-----
|
18
15
|
|
19
16
|
## Install
|
20
17
|
|
21
18
|
```
|
22
|
-
gem install natives
|
19
|
+
gem install natives
|
23
20
|
```
|
24
21
|
|
25
22
|
## Use
|
26
23
|
|
27
24
|
```
|
28
|
-
|
25
|
+
natives list capybara-webkit sqlite3
|
26
|
+
```
|
27
|
+
|
28
|
+
### Have a gemfile?
|
29
|
+
|
30
|
+
```
|
31
|
+
natives list # looks for Gemfile in current directory
|
32
|
+
natives list --gemfile Gemfile.special
|
33
|
+
natives list --gemfile /path/to/Gemfile.special
|
34
|
+
```
|
35
|
+
|
36
|
+
### How to install native packages?
|
37
|
+
|
38
|
+
Output from `natives list` can be used together with your package manager e.g. `brew`, `apt-get`. If you need a package manager wrapper, try [pacapt](https://github.com/icy/pacapt).
|
39
|
+
|
40
|
+
```
|
41
|
+
brew install $(natives list capybara-webkit sqlite3)
|
42
|
+
apt-get install $(natives list capybara-webkit sqlite3)
|
43
|
+
pacapt -S $(natives list capybara-webkit sqlite3)
|
44
|
+
```
|
29
45
|
|
30
|
-
|
31
|
-
|
32
|
-
'mac_os_x', '10.7.5',
|
33
|
-
'homebrew')
|
46
|
+
### Switch catalog
|
47
|
+
It uses 'rubygems' catalog by default. To use a different catalog:
|
34
48
|
|
35
|
-
|
49
|
+
```
|
50
|
+
natives list --catalog npm sqlite3
|
51
|
+
```
|
36
52
|
|
37
|
-
|
53
|
+
### Custom (project-specific) catalog
|
54
|
+
It also looks for `natives-catalogs/` in current directory. If exists, it loads all catalog files in the directory.
|
38
55
|
|
39
|
-
catalog.native_packages_for('webcapybara', 'sqlite3')
|
40
|
-
# => ["qt", "sqlite"]
|
41
56
|
```
|
57
|
+
$ cd rails_app1
|
58
|
+
$ cat natives-catalogs/catalog1.yaml
|
59
|
+
rubygems:
|
60
|
+
my_gem:
|
61
|
+
mac_os_x/homebrew:
|
62
|
+
- package1
|
63
|
+
ubuntu/apt:
|
64
|
+
- package2
|
42
65
|
|
66
|
+
$ natives list my_gem # runs on mac os x
|
67
|
+
package1
|
68
|
+
```
|
43
69
|
|
44
70
|
## Catalog
|
45
71
|
|
46
72
|
### Supported catalogs
|
47
73
|
|
48
|
-
* **[rubygems](https://github.com/teohm/natives-catalog/blob/master/catalogs/rubygems.yaml)
|
49
|
-
*
|
74
|
+
* **[rubygems](https://github.com/teohm/natives-catalog/blob/master/catalogs/rubygems.yaml) <-- calling for contributions! :-)**
|
75
|
+
* new catalog contributions e.g. for "npm" are welcomed too! Just submit your PR.
|
50
76
|
|
51
77
|
### Catalog load paths
|
52
78
|
|
@@ -55,7 +81,7 @@ It loads YAML files (.yaml, .yml) from the following paths in this order:
|
|
55
81
|
1. `catalogs/` in this gem.
|
56
82
|
2. `natives-catalogs/` in current working directory, if any.
|
57
83
|
|
58
|
-
When there are
|
84
|
+
When there are multiple YAML files in a path, they are **sorted by filename** and loaded in that order.
|
59
85
|
|
60
86
|
### Catalog file format
|
61
87
|
|
@@ -125,7 +151,7 @@ rubygems:
|
|
125
151
|
|
126
152
|
#### Supported values for platform/package_provider
|
127
153
|
|
128
|
-
|
154
|
+
Not in the list? No worry, submit a PR to patch [`host_detection/package_provider.rb`](https://github.com/teohm/natives/blob/master/lib/natives/host_detection/package_provider.rb).
|
129
155
|
|
130
156
|
```
|
131
157
|
aix/aix
|
@@ -160,7 +186,7 @@ xenserver/yum
|
|
160
186
|
```
|
161
187
|
|
162
188
|
|
163
|
-
## Contributing to natives
|
189
|
+
## Contributing to natives
|
164
190
|
|
165
191
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
166
192
|
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
data/Rakefile
CHANGED
@@ -18,7 +18,7 @@ Jeweler::Tasks.new do |gem|
|
|
18
18
|
gem.homepage = "http://github.com/teohm/natives"
|
19
19
|
gem.license = "MIT"
|
20
20
|
gem.summary = %Q{Lookup native packages required by gems.}
|
21
|
-
gem.description = %Q{Lookup native package dependencies required by gems.}
|
21
|
+
gem.description = %Q{Lookup native package dependencies required by gems on your machine.}
|
22
22
|
gem.email = "teohuiming@gmail.com"
|
23
23
|
gem.authors = ["Huiming Teo"]
|
24
24
|
# dependencies defined in Gemfile
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/natives.gemspec
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: natives 0.5.1 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "natives"
|
9
|
+
s.version = "0.5.1"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.authors = ["Huiming Teo"]
|
13
|
+
s.date = "2013-11-09"
|
14
|
+
s.description = "Lookup native package dependencies required by gems on your machine."
|
15
|
+
s.email = "teohuiming@gmail.com"
|
16
|
+
s.executables = ["natives"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.md"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".rspec",
|
24
|
+
"Gemfile",
|
25
|
+
"Gemfile.lock",
|
26
|
+
"LICENSE.txt",
|
27
|
+
"README.md",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION",
|
30
|
+
"bin/natives",
|
31
|
+
"catalogs/rubygems.yaml",
|
32
|
+
"lib/natives.rb",
|
33
|
+
"lib/natives/apps.rb",
|
34
|
+
"lib/natives/apps/detect.rb",
|
35
|
+
"lib/natives/apps/list.rb",
|
36
|
+
"lib/natives/catalog.rb",
|
37
|
+
"lib/natives/catalog/loader.rb",
|
38
|
+
"lib/natives/catalog/merger.rb",
|
39
|
+
"lib/natives/catalog/selector.rb",
|
40
|
+
"lib/natives/catalog/validator.rb",
|
41
|
+
"lib/natives/cli.rb",
|
42
|
+
"lib/natives/gemfile_viewer.rb",
|
43
|
+
"lib/natives/host_detection.rb",
|
44
|
+
"lib/natives/host_detection/package_provider.rb",
|
45
|
+
"lib/natives/host_detection/platform.rb",
|
46
|
+
"natives.gemspec",
|
47
|
+
"spec/fixtures/Gemfile.empty",
|
48
|
+
"spec/fixtures/Gemfile.empty.lock",
|
49
|
+
"spec/fixtures/dir_with_matching_files/invalid1.yml",
|
50
|
+
"spec/fixtures/dir_with_matching_files/not_matching.json",
|
51
|
+
"spec/fixtures/dir_with_matching_files/valid1.yaml",
|
52
|
+
"spec/fixtures/dir_with_matching_files/valid2.yml",
|
53
|
+
"spec/fixtures/dir_without_matching_file/not_matching.json",
|
54
|
+
"spec/natives/apps/detect_spec.rb",
|
55
|
+
"spec/natives/apps/list_spec.rb",
|
56
|
+
"spec/natives/catalog/loader_spec.rb",
|
57
|
+
"spec/natives/catalog/merger_spec.rb",
|
58
|
+
"spec/natives/catalog/selector_spec.rb",
|
59
|
+
"spec/natives/catalog/validator_spec.rb",
|
60
|
+
"spec/natives/catalog_spec.rb",
|
61
|
+
"spec/natives/gemfile_viewer_spec.rb",
|
62
|
+
"spec/natives/host_detection/package_provider_spec.rb",
|
63
|
+
"spec/natives/host_detection/platform_spec.rb",
|
64
|
+
"spec/natives/host_detection_spec.rb",
|
65
|
+
"spec/spec_helper.rb"
|
66
|
+
]
|
67
|
+
s.homepage = "http://github.com/teohm/natives"
|
68
|
+
s.licenses = ["MIT"]
|
69
|
+
s.require_paths = ["lib"]
|
70
|
+
s.rubygems_version = "2.1.10"
|
71
|
+
s.summary = "Lookup native packages required by gems."
|
72
|
+
|
73
|
+
if s.respond_to? :specification_version then
|
74
|
+
s.specification_version = 4
|
75
|
+
|
76
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
77
|
+
s.add_runtime_dependency(%q<ohai>, [">= 0"])
|
78
|
+
s.add_runtime_dependency(%q<thor>, [">= 0"])
|
79
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
80
|
+
s.add_development_dependency(%q<yard>, [">= 0"])
|
81
|
+
s.add_development_dependency(%q<rdoc>, [">= 0"])
|
82
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
83
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
84
|
+
s.add_development_dependency(%q<debugger>, [">= 0"])
|
85
|
+
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
86
|
+
else
|
87
|
+
s.add_dependency(%q<ohai>, [">= 0"])
|
88
|
+
s.add_dependency(%q<thor>, [">= 0"])
|
89
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
90
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
91
|
+
s.add_dependency(%q<rdoc>, [">= 0"])
|
92
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
93
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
94
|
+
s.add_dependency(%q<debugger>, [">= 0"])
|
95
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
96
|
+
end
|
97
|
+
else
|
98
|
+
s.add_dependency(%q<ohai>, [">= 0"])
|
99
|
+
s.add_dependency(%q<thor>, [">= 0"])
|
100
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
101
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
102
|
+
s.add_dependency(%q<rdoc>, [">= 0"])
|
103
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
104
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
105
|
+
s.add_dependency(%q<debugger>, [">= 0"])
|
106
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: natives
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Huiming Teo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ohai
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
- - ! '>='
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
-
description: Lookup native package dependencies required by gems.
|
139
|
+
description: Lookup native package dependencies required by gems on your machine.
|
140
140
|
email: teohuiming@gmail.com
|
141
141
|
executables:
|
142
142
|
- natives
|
@@ -169,6 +169,7 @@ files:
|
|
169
169
|
- lib/natives/host_detection.rb
|
170
170
|
- lib/natives/host_detection/package_provider.rb
|
171
171
|
- lib/natives/host_detection/platform.rb
|
172
|
+
- natives.gemspec
|
172
173
|
- spec/fixtures/Gemfile.empty
|
173
174
|
- spec/fixtures/Gemfile.empty.lock
|
174
175
|
- spec/fixtures/dir_with_matching_files/invalid1.yml
|