gemify 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/gemify +40 -0
  2. metadata +53 -0
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ @files = Dir["lib/**/*"]+Dir["bin/**/*"]
4
+
5
+ if @files.empty?
6
+ puts "Ops, no files to make a gem out of."
7
+ exit
8
+ else
9
+ puts "These files will be included in the gem:"
10
+ puts @files.map{|x|" "+x}
11
+ end
12
+
13
+ trap("INT"){puts;exit}
14
+
15
+ @config = Hash.new do |h,n|
16
+ m,e=n.to_s.gsub('_',' ').split("+",2)
17
+ print m.capitalize+"? "
18
+ print "(#{e}) " if e
19
+ h[n]=gets.strip
20
+ end
21
+
22
+ Gem::Builder.new(Gem::Specification.new do |s|
23
+ s.name = @config[:name_of_the_gem]
24
+ s.summary = @config[:summary]
25
+ s.version = @config[:version]
26
+ s.author = @config[:author]
27
+ s.email = @config[:email]
28
+ s.platform = Gem::Platform::RUBY
29
+ s.files = @files
30
+
31
+ if File.directory? "bin"
32
+ s.bindir = "bin"
33
+ s.executables << Dir["bin/**/*"].map{|x|x[4..-1]}
34
+ end
35
+ s.require_path = "lib" if File.directory? "lib"
36
+
37
+ @config[:"dependencies+split_by_space"].split(" ").each do |d|
38
+ s.add_dependency d
39
+ end
40
+ end).build
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gemify
3
+ version: !ruby/object:Gem::Version
4
+ version: "0.1"
5
+ platform: ruby
6
+ authors:
7
+ - Magnus Holm
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-02-07 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description:
17
+ email: judofyr@gmail.com
18
+ executables:
19
+ - - gemify
20
+ extensions: []
21
+
22
+ extra_rdoc_files: []
23
+
24
+ files:
25
+ - bin/gemify
26
+ has_rdoc: false
27
+ homepage:
28
+ post_install_message:
29
+ rdoc_options: []
30
+
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: "0"
38
+ version:
39
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ requirements: []
46
+
47
+ rubyforge_project:
48
+ rubygems_version: 1.0.1
49
+ signing_key:
50
+ specification_version: 2
51
+ summary: An extremely simple way to create a RubyGem
52
+ test_files: []
53
+