sugar 0.0.40 → 0.0.41

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -49,4 +49,4 @@ rescue LoadError
49
49
  end
50
50
 
51
51
  desc "Bump patch version and release to github and gemcutter"
52
- task :bump => %w(version:bump:patch release gemcutter:release install)
52
+ task :bump => %w(version:bump:patch git:release gemcutter:release install)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.40
1
+ 0.0.41
data/lib/sugar.rb CHANGED
@@ -1,14 +1,15 @@
1
1
  module Sugar
2
+ autoload :ActiveRecord, 'sugar/active_record'
3
+ autoload :ActionView, 'sugar/action_view'
4
+ autoload :ActionController, 'sugar/action_controller'
5
+
2
6
  def self.locale_files
3
7
  Dir[File.join(File.dirname(__FILE__), 'sugar', 'locales', '*')]
4
8
  end
5
9
  end
6
10
 
7
- require 'sugar/actionview'
8
- require 'sugar/activerecord'
9
-
10
11
  if defined? Rails
11
- ActionView::Base.send :include, Sugar::Actionview if defined? ActionView
12
- ActionController::Base.send :include, Sugar::Actioncontroller if defined? ActionController
12
+ ActionView::Base.send :include, Sugar::ActionView if defined? ActionView
13
+ ActionController::Base.send :include, Sugar::ActionController if defined? ActionController
13
14
  I18n.load_path.unshift(*Sugar.locale_files)
14
15
  end
@@ -1,5 +1,5 @@
1
1
  module Sugar
2
- module Actioncontroller
2
+ module ActionController
3
3
  def flash_message(klass, message)
4
4
  message = "#{controller_name}.messages.#{message}" if message.is_a?(Symbol)
5
5
  flash[klass] = t(message)
@@ -1,12 +1,12 @@
1
- require 'sugar/actionview/forms'
2
- require 'sugar/actionview/structure'
3
- require 'sugar/actionview/stats'
1
+ require 'sugar/action_view/forms'
2
+ require 'sugar/action_view/structure'
3
+ require 'sugar/action_view/stats'
4
4
 
5
5
  module Sugar
6
- module Actionview
7
- include Sugar::Actionview::Structure
8
- include Sugar::Actionview::Forms
9
- include Sugar::Actionview::Stats
6
+ module ActionView
7
+ include Sugar::ActionView::Structure
8
+ include Sugar::ActionView::Forms
9
+ include Sugar::ActionView::Stats
10
10
 
11
11
  def human(*args)
12
12
  if args.size == 2
@@ -1,5 +1,5 @@
1
1
  module Sugar
2
- module Actionview
2
+ module ActionView
3
3
  module Forms
4
4
  # Put submit with proper text
5
5
  def submit(form, title = nil)
@@ -1,5 +1,5 @@
1
1
  module Sugar
2
- module Actionview
2
+ module ActionView
3
3
  module Stats
4
4
  # Set online statistics trackers
5
5
  # @options
@@ -1,5 +1,5 @@
1
1
  module Sugar
2
- module Actionview
2
+ module ActionView
3
3
  module Structure
4
4
  VIEW_PLACEHOLDERS = {
5
5
  'create' => 'new',
@@ -36,7 +36,7 @@ module Sugar
36
36
 
37
37
  def html_page_title(default = false, separator = ' | ')
38
38
  default ||= t('application.title')
39
- [page_title, default].compat.join(separator)
39
+ [page_title, default].compact.join(separator)
40
40
  end
41
41
 
42
42
  # Build simple navigation list
@@ -1,5 +1,5 @@
1
1
  module Sugar
2
- module Activerecord
2
+ module ActiveRecord
3
3
  def slug
4
4
  read_attribute(:slug) || to_s && write_attribute(:slug, to_s.parameterize) && read_attribute(:slug)
5
5
  end
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.40"
8
+ s.version = "0.0.41"
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-11-12}
12
+ s.date = %q{2010-02-09}
13
13
  s.email = %q{rotuka@tokak.ru}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -24,12 +24,12 @@ Gem::Specification.new do |s|
24
24
  "VERSION",
25
25
  "init.rb",
26
26
  "lib/sugar.rb",
27
- "lib/sugar/actioncontroller.rb",
28
- "lib/sugar/actionview.rb",
29
- "lib/sugar/actionview/forms.rb",
30
- "lib/sugar/actionview/stats.rb",
31
- "lib/sugar/actionview/structure.rb",
32
- "lib/sugar/activerecord.rb",
27
+ "lib/sugar/action_controller.rb",
28
+ "lib/sugar/action_view.rb",
29
+ "lib/sugar/action_view/forms.rb",
30
+ "lib/sugar/action_view/stats.rb",
31
+ "lib/sugar/action_view/structure.rb",
32
+ "lib/sugar/active_record.rb",
33
33
  "lib/sugar/locales/de.yml",
34
34
  "lib/sugar/locales/en.yml",
35
35
  "lib/sugar/locales/ru.yml",
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.40
4
+ version: 0.0.41
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-11-12 00:00:00 +03:00
12
+ date: 2010-02-09 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -31,12 +31,12 @@ files:
31
31
  - VERSION
32
32
  - init.rb
33
33
  - lib/sugar.rb
34
- - lib/sugar/actioncontroller.rb
35
- - lib/sugar/actionview.rb
36
- - lib/sugar/actionview/forms.rb
37
- - lib/sugar/actionview/stats.rb
38
- - lib/sugar/actionview/structure.rb
39
- - lib/sugar/activerecord.rb
34
+ - lib/sugar/action_controller.rb
35
+ - lib/sugar/action_view.rb
36
+ - lib/sugar/action_view/forms.rb
37
+ - lib/sugar/action_view/stats.rb
38
+ - lib/sugar/action_view/structure.rb
39
+ - lib/sugar/active_record.rb
40
40
  - lib/sugar/locales/de.yml
41
41
  - lib/sugar/locales/en.yml
42
42
  - lib/sugar/locales/ru.yml