sugar 0.0.21 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -3,3 +3,4 @@
3
3
  coverage
4
4
  rdoc
5
5
  pkg
6
+ *.gem
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ begin
11
11
  gem.authors = ["Alexander Semyonov"]
12
12
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
13
13
  end
14
-
14
+ Jeweler::GemcutterTasks.new
15
15
  rescue LoadError
16
16
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
17
17
  end
@@ -39,18 +39,11 @@ end
39
39
 
40
40
  task :default => :test
41
41
 
42
- require 'rake/rdoctask'
43
- Rake::RDocTask.new do |rdoc|
44
- if File.exist?('VERSION.yml')
45
- config = YAML.load(File.read('VERSION.yml'))
46
- version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
47
- else
48
- version = ""
42
+ begin
43
+ require 'yard'
44
+ YARD::Rake::YardocTask.new
45
+ rescue LoadError
46
+ task :yardoc do
47
+ abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
49
48
  end
50
-
51
- rdoc.rdoc_dir = 'rdoc'
52
- rdoc.title = "Sugar #{version}"
53
- rdoc.rdoc_files.include('README*')
54
- rdoc.rdoc_files.include('lib/**/*.rb')
55
49
  end
56
-
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.21
1
+ 0.0.23
@@ -35,7 +35,7 @@ module Sugar
35
35
  # Put submit with proper text
36
36
  def submit(form, title = nil)
37
37
  title ||= t("#{controller.controller_name}.#{view_name}.submit",
38
- :default => form.object.new_record? ? "#{t('add')} #{form.object.class.human_name}" : "#{t('save')} #{form.object.class.human_name}")
38
+ :default => form.object.new_record? ? "#{t('add', :default => 'Add')} #{form.object.class.human_name}" : "#{t('save', :default => 'Save')} #{form.object.class.human_name}")
39
39
  form.submit(title)
40
40
  end
41
41
 
@@ -93,7 +93,8 @@ module Sugar
93
93
  end
94
94
 
95
95
  def button_to_delete(something, title = nil)
96
- title ||= t('.delete', :default => "Delete #{something.class.human_name}")
96
+ title ||= t('.delete',
97
+ :default => "Delete #{(something.is_a?(Array) ? something.last : something).class.human_name}")
97
98
  button_to(title,
98
99
  polymorphic_path(something),
99
100
  :class => 'delete action',
data/sugar.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sugar}
8
- s.version = "0.0.21"
8
+ s.version = "0.0.23"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alexander Semyonov"]
12
- s.date = %q{2009-08-14}
12
+ s.date = %q{2009-08-31}
13
13
  s.email = %q{rotuka@rotuka.com}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Semyonov
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-14 00:00:00 +04:00
12
+ date: 2009-08-31 00:00:00 +04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15