Class: Bueller
- Inherits:
-
Object
- Object
- Bueller
- Defined in:
- lib/bueller.rb,
lib/bueller/errors.rb,
lib/bueller/version.rb,
lib/bueller/commands.rb,
lib/bueller/generator.rb,
lib/bueller/gemspec_helper.rb,
lib/bueller/version_helper.rb,
lib/bueller/rubyforge_tasks.rb,
lib/bueller/generator/options.rb,
lib/bueller/generator/rdoc_mixin.rb,
lib/bueller/generator/riot_mixin.rb,
lib/bueller/generator/yard_mixin.rb,
lib/bueller/commands/version/base.rb,
lib/bueller/generator/application.rb,
lib/bueller/generator/bacon_mixin.rb,
lib/bueller/generator/rspec_mixin.rb,
lib/bueller/commands/version/write.rb,
lib/bueller/commands/write_gemspec.rb,
lib/bueller/generator/github_mixin.rb,
lib/bueller/generator/shindo_mixin.rb,
lib/bueller/generator/shoulda_mixin.rb,
lib/bueller/generator/minitest_mixin.rb,
lib/bueller/generator/testspec_mixin.rb,
lib/bueller/generator/testunit_mixin.rb,
lib/bueller/generator/micronaut_mixin.rb,
lib/bueller/commands/version/bump_major.rb,
lib/bueller/commands/version/bump_minor.rb,
lib/bueller/commands/version/bump_patch.rb,
lib/bueller/tasks.rb
Overview
Bueller helps you craft the perfect Rubygem. Give him a gemspec, and he takes care of the rest.
See Bueller::Tasks for examples of how to get started.
Defined Under Namespace
Modules: Commands Classes: FileInTheWay, GemSpecHelper, GemspecError, Generator, GitInitFailed, NoGitHubRepoNameGiven, NoGitHubToken, NoGitHubUser, NoGitUserEmail, NoGitUserName, RubyforgeTasks, Tasks, VersionHelper, VersionYmlError
Constant Summary collapse
- VERSION =
"0.0.9"
Instance Attribute Summary collapse
-
#base_dir ⇒ Object
Returns the value of attribute base_dir.
-
#commit ⇒ Object
Returns the value of attribute commit.
-
#gemspec_helper ⇒ Object
Returns the value of attribute gemspec_helper.
-
#output ⇒ Object
Returns the value of attribute output.
-
#repo ⇒ Object
Returns the value of attribute repo.
-
#version_helper ⇒ Object
Returns the value of attribute version_helper.
Instance Method Summary collapse
-
#bump_major_version ⇒ Object
Bumps the major version.
-
#bump_minor_version ⇒ Object
Bumps the minor version.
-
#bump_patch_version ⇒ Object
Bumps the patch version.
- #git_base_dir(base_dir = nil) ⇒ Object
- #in_git_repo? ⇒ Boolean
-
#initialize(base_dir = '.') ⇒ Bueller
constructor
A new instance of Bueller.
-
#major_version ⇒ Object
Major version, as defined by the gemspec’s Version module.
-
#minor_version ⇒ Object
Minor version, as defined by the gemspec’s Version module.
-
#patch_version ⇒ Object
Patch version, as defined by the gemspec’s Version module.
-
#version ⇒ Object
Human readable version, which is used in the gemspec.
-
#write_gemspec ⇒ Object
Writes out the gemspec.
-
#write_version(major, minor, patch, build) ⇒ Object
Bumps the version, to the specific major/minor/patch version, writing out the appropriate version.rb, and then reloads it.
Constructor Details
#initialize(base_dir = '.') ⇒ Bueller
Returns a new instance of Bueller.
23 24 25 |
# File 'lib/bueller.rb', line 23 def initialize(base_dir = '.') self.base_dir = base_dir end |
Instance Attribute Details
#base_dir ⇒ Object
Returns the value of attribute base_dir.
21 22 23 |
# File 'lib/bueller.rb', line 21 def base_dir @base_dir end |
#commit ⇒ Object
Returns the value of attribute commit.
21 22 23 |
# File 'lib/bueller.rb', line 21 def commit @commit end |
#gemspec_helper ⇒ Object
Returns the value of attribute gemspec_helper.
21 22 23 |
# File 'lib/bueller.rb', line 21 def gemspec_helper @gemspec_helper end |
#output ⇒ Object
Returns the value of attribute output.
21 22 23 |
# File 'lib/bueller.rb', line 21 def output @output end |
#repo ⇒ Object
Returns the value of attribute repo.
21 22 23 |
# File 'lib/bueller.rb', line 21 def repo @repo end |
#version_helper ⇒ Object
Returns the value of attribute version_helper.
21 22 23 |
# File 'lib/bueller.rb', line 21 def version_helper @version_helper end |
Instance Method Details
#bump_major_version ⇒ Object
Bumps the major version.
1.5.1 -> 2.0.0
92 93 94 |
# File 'lib/bueller.rb', line 92 def bump_major_version Bueller::Commands::Version::BumpMajor.run_for self end |
#bump_minor_version ⇒ Object
Bumps the minor version.
1.5.1 -> 1.6.0
85 86 87 |
# File 'lib/bueller.rb', line 85 def bump_minor_version Bueller::Commands::Version::BumpMinor.run_for self end |
#bump_patch_version ⇒ Object
Bumps the patch version.
1.5.1 -> 1.5.2
78 79 80 |
# File 'lib/bueller.rb', line 78 def bump_patch_version Bueller::Commands::Version::BumpPatch.run_for self end |
#git_base_dir(base_dir = nil) ⇒ Object
101 102 103 104 105 106 107 108 109 110 |
# File 'lib/bueller.rb', line 101 def git_base_dir(base_dir = nil) if base_dir base_dir = File.dirname(base_dir) else base_dir = File.(self.base_dir || ".") end return nil if base_dir==File.dirname("/") return base_dir if File.exists?(File.join(base_dir, '.git')) git_base_dir(base_dir) end |
#in_git_repo? ⇒ Boolean
112 113 114 |
# File 'lib/bueller.rb', line 112 def in_git_repo? !git_base_dir.nil? end |
#major_version ⇒ Object
Major version, as defined by the gemspec’s Version module. For 1.5.3, this would return 1.
49 50 51 |
# File 'lib/bueller.rb', line 49 def major_version @version_helper.major end |
#minor_version ⇒ Object
Minor version, as defined by the gemspec’s Version module. For 1.5.3, this would return 5.
55 56 57 |
# File 'lib/bueller.rb', line 55 def minor_version @version_helper.minor end |
#patch_version ⇒ Object
Patch version, as defined by the gemspec’s Version module. For 1.5.3, this would return 5.
61 62 63 |
# File 'lib/bueller.rb', line 61 def patch_version @version_helper.patch end |
#version ⇒ Object
Human readable version, which is used in the gemspec.
66 67 68 |
# File 'lib/bueller.rb', line 66 def version version_helper.to_s end |
#write_gemspec ⇒ Object
Writes out the gemspec
71 72 73 |
# File 'lib/bueller.rb', line 71 def write_gemspec Bueller::Commands::WriteGemspec.run_for self end |
#write_version(major, minor, patch, build) ⇒ Object
Bumps the version, to the specific major/minor/patch version, writing out the appropriate version.rb, and then reloads it.
97 98 99 |
# File 'lib/bueller.rb', line 97 def write_version(major, minor, patch, build) Bueller::Commands::Version::Write.run_for self, major, minor, patch, build end |