Skip to content
Browse files

Prepare for 0.1.5

* 4 minor enhancements
  * Removed 'all_targets' - just use ruby to DRY up garlic.rb
  * Changed templates wrt above
  * Better tabtab completions
  * Updated TODO
  • Loading branch information...
1 parent c573070 commit e252e31e5c86fe83897de8ddd899a7a83eadf00d @ianwhite committed
Showing with 50 additions and 128 deletions.
  1. +0 −5 CHANGELOG
  2. +28 −0 History.txt
  3. 0 MIT-LICENSE → License.txt
  4. +0 −1 README
  5. +8 −106 README.textile
  6. +1 −1 Rakefile
  7. +0 −2 TODO
  8. +4 −0 Todo.txt
  9. +2 −2 garlic.gemspec
  10. +1 −1 lib/garlic.rb
  11. +0 −5 lib/garlic/configurator.rb
  12. +1 −2 lib/garlic/session.rb
  13. +1 −3 lib/garlic/target.rb
  14. +4 −0 lib/tabtab_definitions/garlic.rb
View
5 CHANGELOG
@@ -1,5 +0,0 @@
-* 0.1.2
- * making use of garlic as a gem
- * changed paths, repos are now stored in ~/.garlic/repos (and this shared across multiple garlic sessions), work is in .garlic_work
-
-* 0.1.1 freelancing-god added gem goodness
View
28 History.txt
@@ -0,0 +1,28 @@
+== 0.1.5 2008-11-25
+
+* 4 minor enhancements
+ * Removed 'all_targets' - just use ruby to DRY up garlic.rb
+ * Changed templates wrt above
+ * Better tabtab completions
+ * Updated TODO
+
+== 0.1.4 2008-11-20
+
+* 1 minor enhancement
+ * Added tabtab definitions that are in the right place
+
+== 0.1.3 2008-11-20
+
+* 1 minor enhancement
+ * Added tabtab definitions
+
+== 0.1.2
+
+* 2 major enhancements
+ * garlic CLI
+ * repos are now stored in ~/.garlic/repos (and this shared across multiple garlic sessions), work is in ./.garlic
+
+== 0.1.1
+
+* 1 major enhancement:
+ * freelancing-god added gem goodness
View
0 MIT-LICENSE → License.txt
File renamed without changes.
View
1 README
View
114 README.textile
@@ -15,6 +15,11 @@ Garlic works by cloning git repos for all your dependencies (so they all must be
git repos), and then using git to checkout various tags and branches to build
your app against.
+h2. It's still new, and not shiny yet
+
+Please feel free to make it shinier. I'm successfully using it on most of my plugins, and I test
+with garlic and cucumber.
+
h2. Get up and running quickly
You have a plugin and you want it tested against different versions of rails?
@@ -81,113 +86,9 @@ h2. Running Shell commands across multiple targets
Check dis out
- garlic shell # "Example output":http://gist.github.com/21496
-
----
-
-The following still needs to be updated for the new gem/cmd-line version
-
-h2. Example workflow
-
-Let's say I'm patching resources_controller.
-
-First I grab it, and set up garlic
-
- git clone git://github.com/ianwhite/resources_controller.git
- cd resources_controller
- rake get_garlic
- cp garlic_example.rb garlic.rb
- # I could now edit garlic.rb to point the repos at my local copies, for speed
-
-Now, I download and run the CI suite
-
- rake garlic:all
-
-Now, I make some changes
-
- git checkout -b my_change
- # ... commit some changes into 'my_change'
- rake garlic
- # ... everything is fine, so I can merge these into master, or send a pull request
-
-h3. How do I run the specs on uncommitted code?
-
-The best way is to make the changes in one of the 'work' targets. For example:
-
- # after running rake garlic:all
- cd garlic/work/edge/vendor/plugins/resources_controller
- # ... make changes without committing
- rake spec
- # ... it passes, so commit
- git commit -m "My great change"
-
-Now you can push these changes back upstream to your local 'master' repo
-
- git push origin my_changes # or you could push to master branch or whatever
+ garlic shell # "Example output":http://gist.github.com/28795
-Then cd back up there, and run rake garlic to verify your changes against the other
-targets. If these all pass, you can push, or send a pull request
-
-h2.How to add garlic to your repo (example: rails plugin)
-
-h4. 1. require the garlic tasks into your own Rakefile
-
- # rescue this just in case the plugin user doesn't have garlic
- begin
- require 'garlic'
- rescue LoadError
- end
-
-h4. 2. add a garlic.rb
-
-An example garlic.rb:
-
- garlic do
- # repos
- repo 'rails', :url => 'git://github.com/rails/rails'
- repo 'rspec', :url => 'git://github.com/dchelimsky/rspec'
- repo 'rspec-rails', :url => 'git://github.com/dchelimsky/rspec-rails'
- repo 'resources_controller', :path => '.'
-
- # targets
- target 'edge'
- target '2.0-stable', :branch => 'origin/2-0-stable'
- target '2.0.2', :tag => 'v2.0.2'
-
- all_targets do
- prepare do
- plugin 'resources_controller', :clone => true
- plugin 'rspec'
- plugin 'rspec-rails' do
- sh "script/generate rspec -f"
- end
- end
-
- run do
- cd "vendor/plugins/resources_controller"
- sh "rake spec:rcov:verify"
- end
- end
- end
- end
-
-h4. 3. ignore the garlic artefacts
-
-Example .gitignore
-
- .garlic_work
-
-h4. 4. Run it
-
- rake garlic:all
-
-And to run it again, once you've made changes
-
- rake garlic
-
-To make sure you're running against the latest repos:
-
- rake garlic:update_repos
+You can pipe any thing into garlic shell and it will execute across all of your garlic targets
h2. Lend a hand
@@ -202,5 +103,6 @@ h2. Lent a hand
Thanks very much to:
* Pat Allan
+* Dr Nic Williams
View
2 Rakefile
@@ -21,7 +21,7 @@ spec = Gem::Specification.new do |s|
s.test_files = FileList["spec/**/*_spec.rb"]
s.files = FileList[
"lib/**/*.rb", "templates/*.rb",
- "MIT-LICENSE", "README.textile", "TODO", "CHANGELOG"
+ "License.txt", "README.textile", "Todo.txt", "History.txt"
]
s.executables = ["garlic"]
end
View
2 TODO
@@ -1,2 +0,0 @@
-* specs
-* rewrite using grit? (research: is grit the defacto standard for ruby controlling git?)
View
4 Todo.txt
@@ -0,0 +1,4 @@
+* add 'gem' dependency - should it freeze the gem? or use ginger?
+* specs!
+* cucumber features!
+* rewrite using grit? (research: is grit the defacto standard for ruby controlling git?)
View
4 garlic.gemspec
@@ -2,11 +2,11 @@
Gem::Specification.new do |s|
s.name = %q{garlic}
- s.version = "0.1.4"
+ s.version = "0.1.5"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Ian White"]
- s.date = %q{2008-11-23}
+ s.date = %q{2008-11-25}
s.default_executable = %q{garlic}
s.description = %q{Set of commands/rake-tasks for CI against multiple version of rails/deps.}
s.email = %q{ian.w.white@gmail.com}
View
2 lib/garlic.rb
@@ -11,7 +11,7 @@ module Garlic
module Version
Major = 0
Minor = 1
- Tiny = 4
+ Tiny = 5
String = [Major, Minor, Tiny].join('.')
end
View
5 lib/garlic/configurator.rb
@@ -13,11 +13,6 @@ def repo(name, options = {})
options[:path] ||= "#{garlic.repo_path}/#{name}"
garlic.repos << Repo.new(options)
end
-
- def all_targets(options = {}, &block)
- BlockParser.new(options, [:prepare, :run], &block) if block_given?
- garlic.all_targets = options
- end
def target(name, options = {}, &block)
options[:name] = name
View
3 lib/garlic/session.rb
@@ -2,13 +2,12 @@ module Garlic
# this class runs the top level garlic commands
class Session
attr_reader :actor, :run_targets
- attr_accessor :repos, :targets, :all_targets, :repo_path, :work_path, :verbose
+ attr_accessor :repos, :targets, :repo_path, :work_path, :verbose
def initialize(actor = nil, &block)
@actor = actor
self.repos = []
self.targets = []
- self.all_targets = {}
self.work_path = ".garlic"
self.repo_path = "~/.garlic/repos"
configure(&block) if block_given?
View
4 lib/garlic/target.rb
@@ -18,12 +18,10 @@ def initialize(garlic, options = {})
def prepare
puts "\nPreparing target #{name} (#{tree_ish})"
install_rails
- runner.run(&garlic.all_targets[:prepare]) if garlic.all_targets[:prepare]
runner.run(&@prepare) if @prepare
end
- def run(command = nil)
- runner.run(&garlic.all_targets[:run]) if garlic.all_targets[:run]
+ def run
runner.run(&@run) if @run
end
View
4 lib/tabtab_definitions/garlic.rb
@@ -4,4 +4,8 @@
Garlic::Session.commands.each do |c|
g.command c
end
+
+ g.command :generate do
+ `ls ~/.garlic/templates`.split
+ end
end

0 comments on commit e252e31

Please sign in to comment.
Something went wrong with that request. Please try again.