dcrec1-gemhub 0.1.0

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.
data/README.textile ADDED
@@ -0,0 +1,28 @@
1
+ h2. INSTALLATION
2
+
3
+ @sudo gem install dcrec1-gemhub -s http://gems.github.com@
4
+
5
+ h2. LICENSE:
6
+
7
+ (The MIT License)
8
+
9
+ Copyright (c) 2008 FIX
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining
12
+ a copy of this software and associated documentation files (the
13
+ 'Software'), to deal in the Software without restriction, including
14
+ without limitation the rights to use, copy, modify, merge, publish,
15
+ distribute, sublicense, and/or sell copies of the Software, and to
16
+ permit persons to whom the Software is furnished to do so, subject to
17
+ the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be
20
+ included in all copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
23
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
25
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
26
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
27
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
28
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,47 @@
1
+ require 'rubygems'
2
+ require 'rubygems/specification'
3
+ require 'rake'
4
+ require 'rake/gempackagetask'
5
+ require 'spec/rake/spectask'
6
+
7
+ GEM = "gemhub"
8
+ GEM_VERSION = "0.1.0"
9
+ SUMMARY = "Simple gem creation"
10
+ AUTHOR = "Diego Carrion"
11
+ EMAIL = "dc.rec1@gmail.com"
12
+ HOMEPAGE = "http://www.mouseoverstudio.com/blog/"
13
+
14
+ spec = Gem::Specification.new do |s|
15
+ s.name = GEM
16
+ s.version = GEM_VERSION
17
+ s.platform = Gem::Platform::RUBY
18
+ s.summary = SUMMARY
19
+ s.require_paths = ['app_generators', 'bin', 'lib']
20
+ s.files = FileList['app_generators/**/*', 'bin/*', 'lib/**/*.rb', '[A-Z]*'].to_a
21
+ s.executables = ["gemhub"]
22
+
23
+ s.author = AUTHOR
24
+ s.email = EMAIL
25
+ s.homepage = HOMEPAGE
26
+ end
27
+
28
+ Spec::Rake::SpecTask.new do |t|
29
+ t.spec_files = FileList['spec/**/*_spec.rb']
30
+ t.spec_opts = %w(-fs --color)
31
+ end
32
+
33
+ Rake::GemPackageTask.new(spec) do |pkg|
34
+ pkg.gem_spec = spec
35
+ end
36
+
37
+ desc "Install the gem locally"
38
+ task :install => [:package] do
39
+ sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
40
+ end
41
+
42
+ desc "Create a gemspec file"
43
+ task :make_spec do
44
+ File.open("#{GEM}.gemspec", "w") do |file|
45
+ file.puts spec.to_ruby
46
+ end
47
+ end
@@ -0,0 +1,57 @@
1
+ require 'rbconfig'
2
+
3
+ class GemhubGenerator < RubiGen::Base
4
+
5
+ DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
6
+ Config::CONFIG['ruby_install_name'])
7
+
8
+ attr_reader :name, :module_name
9
+
10
+ def initialize(runtime_args, runtime_options = {})
11
+ super
12
+ usage if args.empty?
13
+ @destination_root = File.expand_path(args.shift)
14
+ @name = base_name
15
+ @module_name = base_name.split(/_+/).each{ |word| word.capitalize! }.join('')
16
+ end
17
+
18
+ def manifest
19
+ record do |m|
20
+ # Ensure appropriate folder(s) exists
21
+ m.directory ''
22
+ BASEDIRS.each { |path| m.directory path }
23
+
24
+ # Create stubs
25
+ # m.template "template.rb", "some_file_after_erb.rb"
26
+ m.template "lib/template.rb.erb", "lib/#{name}.rb"
27
+ m.template "spec/template_spec.rb.erb", "spec/#{name}_spec.rb"
28
+
29
+ m.file "README.textile", "README.textile"
30
+ m.template "Rakefile.erb", "Rakefile"
31
+ end
32
+ end
33
+
34
+ protected
35
+ def banner
36
+ <<-EOS
37
+ Creates a simple RubyGems scaffold.
38
+
39
+ USAGE: #{spec.name} name --simple"
40
+ EOS
41
+ end
42
+
43
+ def add_options!(opts)
44
+ opts.separator ''
45
+ opts.separator 'Options:'
46
+ # For each option below, place the default
47
+ # at the top of the file next to "default_options"
48
+ # opts.on("-a", "--author=\"Your Name\"", String,
49
+ # "Some comment about this option",
50
+ # "Default: none") { |x| options[:author] = x }
51
+ opts.on("-v", "--version", "Show the #{File.basename($0)} version number and quit.")
52
+ end
53
+
54
+ # Installation skeleton. Intermediate directories are automatically
55
+ # created so don't sweat their absence here.
56
+ BASEDIRS = %w(lib spec)
57
+ end
@@ -0,0 +1,24 @@
1
+ h2. LICENSE:
2
+
3
+ (The MIT License)
4
+
5
+ Copyright (c) 2008 FIX
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining
8
+ a copy of this software and associated documentation files (the
9
+ 'Software'), to deal in the Software without restriction, including
10
+ without limitation the rights to use, copy, modify, merge, publish,
11
+ distribute, sublicense, and/or sell copies of the Software, and to
12
+ permit persons to whom the Software is furnished to do so, subject to
13
+ the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be
16
+ included in all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
19
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,49 @@
1
+ require 'rubygems'
2
+ require 'rubygems/specification'
3
+ require 'rake'
4
+ require 'rake/gempackagetask'
5
+ require 'spec/rake/spectask'
6
+
7
+ GEM = "<%= name %>"
8
+ GEM_VERSION = "0.0.1"
9
+ SUMMARY = "FIXME Summary"
10
+ AUTHOR = "FIXME Author"
11
+ EMAIL = "FIXME Email"
12
+ HOMEPAGE = "FIXME HomePage"
13
+
14
+
15
+ spec = Gem::Specification.new do |s|
16
+ s.name = GEM
17
+ s.version = GEM_VERSION
18
+ s.platform = Gem::Platform::RUBY
19
+ s.summary = SUMMARY
20
+ s.require_paths = ['lib']
21
+ s.files = FileList['lib/**/*.rb' '[A-Z]*'].to_a
22
+
23
+ s.author = AUTHOR
24
+ s.email = EMAIL
25
+ s.homepage = HOMEPAGE
26
+
27
+ s.rubyforge_project = GEM # GitHub bug, gem isn't being build when this miss
28
+ end
29
+
30
+ Spec::Rake::SpecTask.new do |t|
31
+ t.spec_files = FileList['spec/**/*_spec.rb']
32
+ t.spec_opts = %w(-fs --color)
33
+ end
34
+
35
+ Rake::GemPackageTask.new(spec) do |pkg|
36
+ pkg.gem_spec = spec
37
+ end
38
+
39
+ desc "Install the gem locally"
40
+ task :install => [:package] do
41
+ sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
42
+ end
43
+
44
+ desc "Create a gemspec file"
45
+ task :make_spec do
46
+ File.open("#{GEM}.gemspec", "w") do |file|
47
+ file.puts spec.to_ruby
48
+ end
49
+ end
@@ -0,0 +1,2 @@
1
+ module <%= module_name %>
2
+ end
@@ -0,0 +1,5 @@
1
+ describe "<%= module_name %>" do
2
+ it "should have real tests" do
3
+ false.should eql(true)
4
+ end
5
+ end
data/bin/gemhub ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'rubigen'
5
+
6
+ if %w(-v --version).include? ARGV.first
7
+ require 'gemhub'
8
+ puts "#{File.basename($0)} #{GemHub::VERSION}"
9
+ exit(0)
10
+ end
11
+
12
+ require 'rubigen/scripts/generate'
13
+ RubiGen::Base.use_application_sources!
14
+ RubiGen::Scripts::Generate.new.run(ARGV, :generator => 'gemhub')
data/lib/gemhub.rb ADDED
@@ -0,0 +1,3 @@
1
+ class GemHub
2
+ VERSION = '0.1.0'
3
+ end
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dcrec1-gemhub
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Diego Carrion
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-10-23 00:00:00 -07:00
13
+ default_executable: gemhub
14
+ dependencies: []
15
+
16
+ description:
17
+ email: dc.rec1@gmail.com
18
+ executables:
19
+ - gemhub
20
+ extensions: []
21
+
22
+ extra_rdoc_files: []
23
+
24
+ files:
25
+ - app_generators/gemhub
26
+ - app_generators/gemhub/gemhub_generator.rb
27
+ - app_generators/gemhub/templates
28
+ - app_generators/gemhub/templates/README.textile
29
+ - app_generators/gemhub/templates/Rakefile.erb
30
+ - app_generators/gemhub/templates/lib
31
+ - app_generators/gemhub/templates/lib/template.rb.erb
32
+ - app_generators/gemhub/templates/spec
33
+ - app_generators/gemhub/templates/spec/template_spec.rb.erb
34
+ - bin/gemhub
35
+ - lib/gemhub.rb
36
+ - README.textile
37
+ - Rakefile
38
+ has_rdoc: false
39
+ homepage: http://www.mouseoverstudio.com/blog/
40
+ post_install_message:
41
+ rdoc_options: []
42
+
43
+ require_paths:
44
+ - app_generators
45
+ - bin
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: "0"
52
+ version:
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: "0"
58
+ version:
59
+ requirements: []
60
+
61
+ rubyforge_project: gemhub
62
+ rubygems_version: 1.2.0
63
+ signing_key:
64
+ specification_version: 2
65
+ summary: Simple gem creation
66
+ test_files: []
67
+