homeschool 0.0.1.13 → 0.0.1.16

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -84,7 +84,8 @@ end
84
84
  desc "Publish the release files to RubyForge."
85
85
  task :release => :package do
86
86
  rubyforge do
87
- raise "rubyforge not configured" if userconfig[:username] == 'username'
87
+ login
88
+ throw RubyForgeNotConfigured if userconfig[:username] == 'username'
88
89
  puts %{Preparing to release #{PKG_NAME}-#{PKG_VERSION}}
89
90
  [:gem, :tgz, :zip].each_with_index do |ext, index|
90
91
  send(index<1? :add_release : :add_file, PKG_RUBYFORGE_PROJECT, PKG_NAME, [PKG_NAME, PKG_VERSION]*'-', "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}")
data/lib/form_buildr.rb CHANGED
@@ -37,12 +37,17 @@
37
37
  # <input id="person_name" name="person[name]" size="30" type="text" />
38
38
  #
39
39
  class ActionView::Helpers::FormBuilder
40
+
41
+ def labeled_check_box(method, options={})
42
+ return send(:check_box, method, options.without(:label, :no_colon)) + send(:label_for, method, options)
43
+ end
44
+
40
45
  rdef(/labeled_(.*)/) do |match, *args|
41
46
  return send(:label_for, *args) + send(match[1].to_sym, *args)
42
47
  end
43
48
 
44
49
  def label_for(method, options={})
45
50
  options = {:label => options} if options.is_a? String
46
- %{<label class="fieldLabel" for="#{@object_name}_#{method}">#{options[:label] || method.to_s.humanize.singularize}#{":" if !options[:no_colon]}</label>}
51
+ %{<label class="fieldLabel" for="#{@object_name}_#{method}">#{options[:label] || method.to_s.humanize}#{":" if !options[:no_colon]}</label>}
47
52
  end
48
53
  end
data/lib/homeschool.rb CHANGED
@@ -122,6 +122,13 @@ class Hash
122
122
  end
123
123
  end
124
124
  end
125
+
126
+ def without(*args)
127
+ reject do |k, v|
128
+ args.include?(k)
129
+ end
130
+ end
131
+
125
132
  def filter(*keys)
126
133
  keys.inject({}) do |h, key|
127
134
  h[key] = self[key]; h
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
2
+ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: homeschool
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.1.13
7
- date: 2007-09-10 00:00:00 -04:00
6
+ version: 0.0.1.16
7
+ date: 2007-09-11 00:00:00 -04:00
8
8
  summary: The homeschool gem
9
9
  require_paths:
10
10
  - lib