Created
April 16, 2010 04:06
-
-
Save hedgehog/367991 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gemfile | |
gem "cc-wordpress", "0.5.0", :git => "file:///usr/src/cc-wordpress", | |
:tag => "default" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: utf-8 -*- | |
lib = File.expand_path('../', __FILE__) | |
lib_up = File.expand_path('../../', __FILE__) | |
$:.unshift lib unless $:.include?(lib) | |
$:.unshift lib_up unless $:.include?(lib_up) | |
require 'json' | |
require 'bundler/version' | |
Gem::Specification.new do |s| | |
md = JSON.parse(File.read('metadata.json')) | |
# Required attributes | |
s.name = File.basename(lib,".*") | |
s.version = md["version"] | |
s.files = Dir.glob("**/*") | |
s.summary = md["description"] ? md["description"] : "No description in metadata.json" | |
# Optional attributes (gem build warning raised without these) | |
s.author = md["maintainer"] ? md["maintainer"] : "No maintainer" | |
s.description = md["long_description"] ? md["long_description"] : s.summary | |
s.email = md["maintainer_email"] ? md["maintainer_email"] : "No maintainer email" | |
s.homepage = "http://www.opscode.com" | |
md['dependencies'].each { |k,v| s.add_dependency(k,v) }; | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $ ls -la /usr/src/cc-wordpress | |
drwxr-xr-x 6 hedge users 4096 2010-04-16 13:37 . | |
drwxrwxrwx 153 root root 12288 2010-04-16 10:32 .. | |
drwxr-xr-x 2 hedge users 4096 2010-04-16 08:52 attributes | |
-rw-r--r-- 1 hedge users 10240 2010-04-16 13:37 cc-wordpress-0.5.0.gem | |
-rw-r--r-- 1 hedge users 998 2010-04-16 13:28 cc-wordpress.gemspec | |
drwxr-xr-x 8 hedge users 4096 2010-04-16 13:38 .git | |
-rw-r--r-- 1 hedge users 7391 2010-04-16 08:52 metadata.json | |
-rw-r--r-- 1 hedge users 2177 2010-04-16 08:52 metadata.rb | |
-rw-r--r-- 1 hedge users 3139 2010-04-16 08:52 README.rdoc | |
drwxr-xr-x 2 hedge users 4096 2010-04-16 08:52 recipes | |
drwxr-xr-x 3 hedge users 4096 2010-04-16 08:52 templates |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment