bundler_geminabox 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -8,23 +8,22 @@ It allows you to use the same friendly rake command that bundler provides for re
8
8
 
9
9
  ## Usage!
10
10
 
11
- In your gemfile
11
+ In your gemspec
12
12
 
13
13
  ```ruby
14
- gem "bundler_geminabox"
14
+ gem.add_development_dependency "bundler_geminabox"
15
15
  ```
16
16
 
17
- In your gem's Rakefile, insert
17
+ In your gem's Rakefile, replace
18
18
 
19
19
  ```ruby
20
- require "bundler_geminabox"
21
- BundlerGeminabox::GemHelper.install
20
+ require 'bundler/gem_tasks'
22
21
  ```
23
22
 
24
- after
23
+ with
25
24
 
26
25
  ```ruby
27
- Bundler::GemHelper.install_tasks
26
+ require "bundler_geminabox/gem_tasks"
28
27
  ```
29
28
 
30
29
  Then simply
@@ -1,26 +1,22 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
4
  require "bundler_geminabox/version"
4
5
 
5
- Gem::Specification.new do |s|
6
- s.name = "bundler_geminabox"
7
- s.version = BundlerGeminabox::VERSION
8
- s.authors = ["Josh Krueger"]
9
- s.email = ["joshsinbox@gmail.com"]
10
- s.homepage = "http://github.com/joshkrueger/bundler_geminabox"
11
- s.summary = %q{Release internal gems}
12
- s.description = %q{Allows you to build/tag/push internal gems to a geminabox gem server with the same commands bundler's rake helpers provide. This just hijacks the process :)}
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "bundler_geminabox"
8
+ gem.version = BundlerGeminabox::VERSION
9
+ gem.authors = ["Josh Krueger"]
10
+ gem.email = ["joshsinbox@gmail.com"]
11
+ gem.homepage = "http://github.com/joshkrueger/bundler_geminabox"
12
+ gem.summary = %q{Release internal gems}
13
+ gem.description = %q{Allows you to build/tag/push internal gems to a geminabox gem server with the same commands bundler's rake helpers provide. This just hijacks the process :)}
13
14
 
14
- s.rubyforge_project = "bundler_geminabox"
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
15
19
 
16
- s.files = `git ls-files`.split("\n")
17
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
- s.require_paths = ["lib"]
20
-
21
- s.add_dependency "geminabox"
22
-
23
- # specify any dependencies here; for example:
24
- # s.add_development_dependency "rspec"
25
- # s.add_runtime_dependency "rest-client"
20
+ gem.add_dependency "bundler"
21
+ gem.add_dependency "geminabox"
26
22
  end
@@ -1,10 +1,30 @@
1
+ require 'bundler/gem_helper'
2
+
1
3
  # Lets just hijack the rubygem_push method.
2
4
  # Should probably alias it so we can switch on a flag, but... whatever.
3
5
  # I'll do it later.
4
6
 
5
7
  module Bundler
6
8
  class GemHelper
7
- protected
9
+ def install
10
+ desc "Build #{name}-#{version}.gem into the pkg directory."
11
+ task 'build' do
12
+ build_gem
13
+ end
14
+
15
+ desc "Build and install #{name}-#{version}.gem into system gems."
16
+ task 'install' do
17
+ install_gem
18
+ end
19
+
20
+ desc "Create tag #{version_tag} and build and push #{name}-#{version}.gem to your geminabox server"
21
+ task 'release' do
22
+ release_gem
23
+ end
24
+
25
+ GemHelper.instance = self
26
+ end
27
+
8
28
  def rubygem_push(path)
9
29
  if Pathname.new("~/.gem/geminabox").expand_path.exist?
10
30
  sh("gem inabox #{path}")
@@ -0,0 +1,3 @@
1
+ require 'bundler_geminabox/ext/bundler/gem_helper'
2
+
3
+ Bundler::GemHelper.install_tasks
@@ -1,3 +1,3 @@
1
1
  module BundlerGeminabox
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -1,11 +1,4 @@
1
- require "bundler_geminabox/version"
2
-
1
+ require "bundler"
2
+ require "geminabox"
3
3
 
4
- module BundlerGeminabox
5
- # Your code goes here...
6
- class GemHelper
7
- def self.install
8
- require "bundler_geminabox/ext/bundler/gem_helper"
9
- end
10
- end
11
- end
4
+ require "bundler_geminabox/version"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler_geminabox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-15 00:00:00.000000000 Z
12
+ date: 2012-12-28 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: &2156438900 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *2156438900
14
25
  - !ruby/object:Gem::Dependency
15
26
  name: geminabox
16
- requirement: &2164667580 !ruby/object:Gem::Requirement
27
+ requirement: &2156436080 !ruby/object:Gem::Requirement
17
28
  none: false
18
29
  requirements:
19
30
  - - ! '>='
@@ -21,7 +32,7 @@ dependencies:
21
32
  version: '0'
22
33
  type: :runtime
23
34
  prerelease: false
24
- version_requirements: *2164667580
35
+ version_requirements: *2156436080
25
36
  description: Allows you to build/tag/push internal gems to a geminabox gem server
26
37
  with the same commands bundler's rake helpers provide. This just hijacks the process
27
38
  :)
@@ -38,6 +49,7 @@ files:
38
49
  - bundler_geminabox.gemspec
39
50
  - lib/bundler_geminabox.rb
40
51
  - lib/bundler_geminabox/ext/bundler/gem_helper.rb
52
+ - lib/bundler_geminabox/gem_tasks.rb
41
53
  - lib/bundler_geminabox/version.rb
42
54
  homepage: http://github.com/joshkrueger/bundler_geminabox
43
55
  licenses: []
@@ -58,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
70
  - !ruby/object:Gem::Version
59
71
  version: '0'
60
72
  requirements: []
61
- rubyforge_project: bundler_geminabox
73
+ rubyforge_project:
62
74
  rubygems_version: 1.8.6
63
75
  signing_key:
64
76
  specification_version: 3