precious 0.0.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.
@@ -0,0 +1,8 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+ .idea
6
+ *.tmproj
7
+ *.rbc
8
+
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ -cfs
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in precious.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ # Precious: Keep your Bundler release tagging (<3), without pushing to RubyGems.org
2
+
3
+ This is a very simple gem that pulls in the Rake helpers from Bundler, but neuters the pushing to RubyGems. Having Bundler tag-and-push your gems to Git is wonderful. Having it push your internal-only gems to RubyGems, well, isn't.
4
+
5
+ ## To use:
6
+
7
+ ### In [your_gem].gemspec
8
+
9
+ s.add_development_dependency 'precious'
10
+
11
+ ### In your gem's Rakefile
12
+
13
+ # Recommended, but not required:
14
+ task :release => :spec
15
+
16
+ # Replace 'Bundler::GemHelper.install_tasks' with:
17
+ Precious::GemHelper.install_tasks
18
+
19
+ ## Caveats:
20
+
21
+ I've currently evaluating I might better test this, so please stay tuned. Currently, a test exists only to verify that it prints a warning if Bundler's version is untested with this gem.
@@ -0,0 +1,16 @@
1
+ require 'bundler'
2
+
3
+ Bundler::GemHelper.install_tasks
4
+
5
+ require 'rspec'
6
+ require 'rspec/core'
7
+ require 'rspec/core/rake_task'
8
+
9
+ task :release => :spec
10
+
11
+ desc 'Run Specs'
12
+ RSpec::Core::RakeTask.new(:spec) do |spec|
13
+ spec.pattern = 'spec/**/*_spec.rb'
14
+ spec.verbose = true
15
+ spec.rspec_opts = ['--color']
16
+ end
@@ -0,0 +1,3 @@
1
+ module Precious
2
+ autoload :GemHelper, 'precious/gem_helper'
3
+ end
@@ -0,0 +1,53 @@
1
+ require 'bundler'
2
+
3
+ if Bundler::VERSION >= '1.1'
4
+ STDERR.puts "Warning! Precious has not been verified to work with Bundler point-releases, beyond 1.0. For everyone's safety, tasks are unavailable."
5
+
6
+ module Precious
7
+ class GemHelper
8
+ def self.install_tasks(opts={})
9
+ # Do nothing.
10
+ end
11
+ end
12
+ end
13
+ else
14
+
15
+ module Precious
16
+ class GemHelper < Bundler::GemHelper
17
+ def install
18
+ desc "Build #{name}-#{version}.gem into the pkg directory"
19
+ task 'build' do
20
+ build_gem
21
+ end
22
+
23
+ desc "Build and install #{name}-#{version}.gem into system gems"
24
+ task 'install' do
25
+ install_gem
26
+ end
27
+
28
+ desc "Create tag #{version_tag} and push to your default, remote Git repository"
29
+ task 'release' do
30
+ release_git
31
+ end
32
+ end
33
+
34
+ # Modify existing behavior, then call it something else.
35
+ def release_gem
36
+ guard_clean
37
+ guard_already_tagged
38
+ tag_version {
39
+ build_gem
40
+ git_push
41
+ }
42
+ end
43
+ alias :release_git :release_gem
44
+
45
+ protected
46
+ # Kill the the rubygem_push method, just in case.
47
+ def rubygem_push(path)
48
+ # Do nothing.
49
+ end
50
+ end
51
+ end
52
+
53
+ end
@@ -0,0 +1,3 @@
1
+ module Precious
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "precious/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "precious"
7
+ s.version = Precious::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Scott Gonyea"]
10
+ s.email = ["me@sgonyea.com"]
11
+ s.homepage = "http://github.com/sgonyea/precious"
12
+ s.summary = %q{Precious helpers for your Bundler.}
13
+ s.description = %q{PRECIOUS! SHINY!}
14
+
15
+ s.add_development_dependency 'rspec', '~>2.6.0'
16
+ s.add_development_dependency 'rr', '~>1.0.2'
17
+
18
+ s.files = `git ls-files`.split("\n")
19
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
+ s.require_paths = ["lib"]
22
+ end
@@ -0,0 +1,13 @@
1
+ require File.expand_path('../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe Precious do
4
+ describe 'GemHelper' do
5
+ it "should print to STDERR if Bundler's version has not yet been tested." do
6
+ Bundler::VERSION = '1.1.0'
7
+
8
+ mock(STDERR).puts("Warning! Precious has not been verified to work with Bundler point-releases, beyond 1.0. For everyone's safety, tasks are unavailable.")
9
+
10
+ Precious::GemHelper
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,7 @@
1
+ require 'bundler/setup'
2
+
3
+ Bundler.require :default, :development
4
+
5
+ RSpec.configure do |config|
6
+ config.mock_with :rr
7
+ end
metadata ADDED
@@ -0,0 +1,110 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: precious
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Scott Gonyea
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-05-22 00:00:00 -07:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: rspec
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ hash: 23
30
+ segments:
31
+ - 2
32
+ - 6
33
+ - 0
34
+ version: 2.6.0
35
+ type: :development
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: rr
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ hash: 19
46
+ segments:
47
+ - 1
48
+ - 0
49
+ - 2
50
+ version: 1.0.2
51
+ type: :development
52
+ version_requirements: *id002
53
+ description: PRECIOUS! SHINY!
54
+ email:
55
+ - me@sgonyea.com
56
+ executables: []
57
+
58
+ extensions: []
59
+
60
+ extra_rdoc_files: []
61
+
62
+ files:
63
+ - .gitignore
64
+ - .rspec
65
+ - Gemfile
66
+ - README.md
67
+ - Rakefile
68
+ - lib/precious.rb
69
+ - lib/precious/gem_helper.rb
70
+ - lib/precious/version.rb
71
+ - precious.gemspec
72
+ - spec/precious/gem_helper_spec.rb
73
+ - spec/spec_helper.rb
74
+ has_rdoc: true
75
+ homepage: http://github.com/sgonyea/precious
76
+ licenses: []
77
+
78
+ post_install_message:
79
+ rdoc_options: []
80
+
81
+ require_paths:
82
+ - lib
83
+ required_ruby_version: !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ hash: 3
89
+ segments:
90
+ - 0
91
+ version: "0"
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ none: false
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ hash: 3
98
+ segments:
99
+ - 0
100
+ version: "0"
101
+ requirements: []
102
+
103
+ rubyforge_project:
104
+ rubygems_version: 1.4.2
105
+ signing_key:
106
+ specification_version: 3
107
+ summary: Precious helpers for your Bundler.
108
+ test_files:
109
+ - spec/precious/gem_helper_spec.rb
110
+ - spec/spec_helper.rb