sugar 0.0.40 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/sugar.rb +6 -5
- data/lib/sugar/{actioncontroller.rb → action_controller.rb} +1 -1
- data/lib/sugar/{actionview.rb → action_view.rb} +7 -7
- data/lib/sugar/{actionview → action_view}/forms.rb +1 -1
- data/lib/sugar/{actionview → action_view}/stats.rb +1 -1
- data/lib/sugar/{actionview → action_view}/structure.rb +2 -2
- data/lib/sugar/{activerecord.rb → active_record.rb} +1 -1
- data/sugar.gemspec +8 -8
- metadata +8 -8
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
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::
|
12
|
-
ActionController::Base.send :include, Sugar::
|
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,12 +1,12 @@
|
|
1
|
-
require 'sugar/
|
2
|
-
require 'sugar/
|
3
|
-
require 'sugar/
|
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
|
7
|
-
include Sugar::
|
8
|
-
include Sugar::
|
9
|
-
include Sugar::
|
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
|
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].
|
39
|
+
[page_title, default].compact.join(separator)
|
40
40
|
end
|
41
41
|
|
42
42
|
# Build simple navigation list
|
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.
|
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{
|
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/
|
28
|
-
"lib/sugar/
|
29
|
-
"lib/sugar/
|
30
|
-
"lib/sugar/
|
31
|
-
"lib/sugar/
|
32
|
-
"lib/sugar/
|
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.
|
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:
|
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/
|
35
|
-
- lib/sugar/
|
36
|
-
- lib/sugar/
|
37
|
-
- lib/sugar/
|
38
|
-
- lib/sugar/
|
39
|
-
- lib/sugar/
|
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
|