rails-ext 0.3.27 → 0.3.28
Sign up to get free protection for your applications and to get access to all the features.
- data/.git/COMMIT_EDITMSG +1 -1
- data/.git/index +0 -0
- data/.git/logs/HEAD +6 -0
- data/.git/logs/refs/heads/master +6 -0
- data/.git/logs/refs/remotes/origin/master +6 -0
- data/.git/objects/0f/0c8c6adaa43424f5037ca877211f6298d2400e +3 -0
- data/.git/objects/19/e876f62b90c9229b329227b24c1a8341282618 +0 -0
- data/.git/objects/1c/b54426926c16534375c353f9e7e04d6301a1b1 +0 -0
- data/.git/objects/1d/a311ae0ff991064b0544a989f18263985f368f +0 -0
- data/.git/objects/26/bc58288bd96634bd5a8be0ff2b6f890f35cf97 +0 -0
- data/.git/objects/2b/92d865e68b56fc2689b74a36eddd56dae29a88 +0 -0
- data/.git/objects/2e/7a5197f328963dfbbaa60ef2fd39a2360ec631 +0 -0
- data/.git/objects/2e/f1776e24d5e5e16f197095d890be91a2285c77 +0 -0
- data/.git/objects/30/81da56a76478c99b075f8e173527a482f1dd08 +0 -0
- data/.git/objects/37/81a6d614f28843c373dc678762e5c6d9676316 +2 -0
- data/.git/objects/48/08a771a51ac9867398791e978cd20d4b13e4ce +0 -0
- data/.git/objects/54/a81991fe89c15984d406d16c04faf45fd7251a +0 -0
- data/.git/objects/54/b5f348d5e841928a9d90b5c4c3de5bbaaa015d +3 -0
- data/.git/objects/6a/613e120fe466ecbde8c0322da0f84af5eb41dc +3 -0
- data/.git/objects/6f/e30114856fcb1fa466c1a18fecfe2dc2ce4169 +0 -0
- data/.git/objects/7f/72d4e7d7b03be87d9441370970ab4c8d344640 +0 -0
- data/.git/objects/81/7f6d877cb630b3e1f649769fadf69c2114a456 +0 -0
- data/.git/objects/85/b75423eae1ce81ed64ddf8d6abeaaea855ba8a +0 -0
- data/.git/objects/85/c7a500980188445fa88eb33b4ea3274042f563 +0 -0
- data/.git/objects/87/c521c60f20f4e35639a78e5c2beb31848a761c +0 -0
- data/.git/objects/93/31ab9c89c69dda86fced860f572236a48947d4 +0 -0
- data/.git/objects/99/d31cde9fe69079a60379da41d7b25ac4e92bf8 +0 -0
- data/.git/objects/9b/a013a45d3dbe5c03ffd15d8866be4198029b90 +0 -0
- data/.git/objects/9b/a3774d4672b4f15a74f0c3c2b3d8269f5ca8f8 +0 -0
- data/.git/objects/9c/445d11eaf28e0d97ab55d0c2584f7ab31bef1d +0 -0
- data/.git/objects/ac/d01650fc4540a21e360d94f299682bd2f348f2 +0 -0
- data/.git/objects/b1/fe0302a0c114aa0686c68b8f92f46813a9f0b7 +0 -0
- data/.git/objects/b6/74b8fbbe1c22c793f97eb9d8cedad090145a3c +0 -0
- data/.git/objects/b7/f8065f8058acf6afe0ab6377a031af3b0f868f +0 -0
- data/.git/objects/be/ccc2dfb4ebb94c6920aa5543dff4e2b4add690 +3 -0
- data/.git/objects/c6/4b93c451584a04f99fd52b62b763b8e4e20585 +0 -0
- data/.git/objects/dd/7be4b09356883dc3ee66dda94ca95822b2be10 +0 -0
- data/.git/objects/ee/937c25fa0b87440bbd7b802f7b68750ae6b962 +0 -0
- data/.git/objects/ee/f8ef7501c7e368ee7a305a5a41c64ee9c7c41c +0 -0
- data/.git/objects/ef/88073aabdae498a225427228ccd088f09ace07 +0 -0
- data/.git/objects/f2/4f1c44768d2bf5f2748730377745243ac5d1b5 +0 -0
- data/.git/objects/f3/a2737cc886fa3e1a8c993ab0b3e33073e4f665 +0 -0
- data/.git/objects/f4/b2f322842db705def556599c1648269c7502d6 +0 -0
- data/.git/objects/f6/e78f8597cecad3ff464f8c4ad7210178bd86af +0 -0
- data/.git/objects/fc/952bdf54d2d727b3b3c2971f00347265b5b070 +0 -0
- data/.git/refs/heads/master +1 -1
- data/.git/refs/remotes/origin/master +1 -1
- data/README.markdown +12 -2
- data/Rakefile +1 -1
- data/lib/{interface_builder → abstract_interface}/controller_helper.rb +3 -3
- data/lib/{interface_builder → abstract_interface}/form_builders/abstract_form_builder.rb +1 -1
- data/lib/{interface_builder → abstract_interface}/form_builders/themed_form_builder.rb +1 -1
- data/lib/{interface_builder → abstract_interface}/form_builders/themed_form_tag_builder.rb +1 -1
- data/lib/{interface_builder → abstract_interface}/haml_builder.rb +1 -1
- data/lib/{interface_builder → abstract_interface}/model_stub.rb +0 -0
- data/lib/{interface_builder → abstract_interface}/support.rb +0 -0
- data/lib/abstract_interface/theme.rb +31 -0
- data/lib/{interface_builder → abstract_interface}/view_builder.rb +2 -2
- data/lib/abstract_interface/view_helper.rb +41 -0
- data/lib/abstract_interface.rb +78 -0
- data/spec/rails_ext/haml_builder_spec.rb +2 -2
- metadata +55 -15
- data/lib/interface_builder/theme.rb +0 -12
- data/lib/interface_builder/view_helper.rb +0 -19
- data/lib/interface_builder.rb +0 -50
data/.git/COMMIT_EDITMSG
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
refactor abstract interface
|
data/.git/index
CHANGED
Binary file
|
data/.git/logs/HEAD
CHANGED
@@ -86,3 +86,9 @@ fcf17b13f109f3a2d9e9e9bd20d61d38b535a612 ceefc114c8fd5ad31b82e1cf19c5c143e6e4ed8
|
|
86
86
|
ceefc114c8fd5ad31b82e1cf19c5c143e6e4ed84 07a10d899d45eed94d2f303586053fa61beafba1 alex <alex@amac.local> 1274343288 +0400 commit: tmp theme
|
87
87
|
07a10d899d45eed94d2f303586053fa61beafba1 712aa2c2ef44c499b0251dbe46eee1c90afbdeb6 alex <alex@amac.local> 1274515487 +0400 commit: spec fixes
|
88
88
|
712aa2c2ef44c499b0251dbe46eee1c90afbdeb6 c51b776d4635d2566cb593bd296e65254a23032f alex <alex@amac.local> 1274527321 +0400 commit: upd theme
|
89
|
+
c51b776d4635d2566cb593bd296e65254a23032f 3081da56a76478c99b075f8e173527a482f1dd08 alex <alex@amac.local> 1274602902 +0400 commit: refactoring abstract interface
|
90
|
+
3081da56a76478c99b075f8e173527a482f1dd08 c64b93c451584a04f99fd52b62b763b8e4e20585 alex <alex@amac.local> 1274604411 +0400 commit: upd
|
91
|
+
c64b93c451584a04f99fd52b62b763b8e4e20585 f6e78f8597cecad3ff464f8c4ad7210178bd86af alex <alex@amac.local> 1274604454 +0400 commit: upd
|
92
|
+
f6e78f8597cecad3ff464f8c4ad7210178bd86af 3781a6d614f28843c373dc678762e5c6d9676316 alex <alex@amac.local> 1274604514 +0400 commit: upd
|
93
|
+
3781a6d614f28843c373dc678762e5c6d9676316 beccc2dfb4ebb94c6920aa5543dff4e2b4add690 alex <alex@amac.local> 1274610364 +0400 commit: upd abstract interface
|
94
|
+
beccc2dfb4ebb94c6920aa5543dff4e2b4add690 0f0c8c6adaa43424f5037ca877211f6298d2400e alex <alex@amac.local> 1274611070 +0400 commit: refactor abstract interface
|
data/.git/logs/refs/heads/master
CHANGED
@@ -86,3 +86,9 @@ fcf17b13f109f3a2d9e9e9bd20d61d38b535a612 ceefc114c8fd5ad31b82e1cf19c5c143e6e4ed8
|
|
86
86
|
ceefc114c8fd5ad31b82e1cf19c5c143e6e4ed84 07a10d899d45eed94d2f303586053fa61beafba1 alex <alex@amac.local> 1274343288 +0400 commit: tmp theme
|
87
87
|
07a10d899d45eed94d2f303586053fa61beafba1 712aa2c2ef44c499b0251dbe46eee1c90afbdeb6 alex <alex@amac.local> 1274515487 +0400 commit: spec fixes
|
88
88
|
712aa2c2ef44c499b0251dbe46eee1c90afbdeb6 c51b776d4635d2566cb593bd296e65254a23032f alex <alex@amac.local> 1274527321 +0400 commit: upd theme
|
89
|
+
c51b776d4635d2566cb593bd296e65254a23032f 3081da56a76478c99b075f8e173527a482f1dd08 alex <alex@amac.local> 1274602902 +0400 commit: refactoring abstract interface
|
90
|
+
3081da56a76478c99b075f8e173527a482f1dd08 c64b93c451584a04f99fd52b62b763b8e4e20585 alex <alex@amac.local> 1274604411 +0400 commit: upd
|
91
|
+
c64b93c451584a04f99fd52b62b763b8e4e20585 f6e78f8597cecad3ff464f8c4ad7210178bd86af alex <alex@amac.local> 1274604454 +0400 commit: upd
|
92
|
+
f6e78f8597cecad3ff464f8c4ad7210178bd86af 3781a6d614f28843c373dc678762e5c6d9676316 alex <alex@amac.local> 1274604514 +0400 commit: upd
|
93
|
+
3781a6d614f28843c373dc678762e5c6d9676316 beccc2dfb4ebb94c6920aa5543dff4e2b4add690 alex <alex@amac.local> 1274610364 +0400 commit: upd abstract interface
|
94
|
+
beccc2dfb4ebb94c6920aa5543dff4e2b4add690 0f0c8c6adaa43424f5037ca877211f6298d2400e alex <alex@amac.local> 1274611070 +0400 commit: refactor abstract interface
|
@@ -71,3 +71,9 @@ fcf17b13f109f3a2d9e9e9bd20d61d38b535a612 ceefc114c8fd5ad31b82e1cf19c5c143e6e4ed8
|
|
71
71
|
ceefc114c8fd5ad31b82e1cf19c5c143e6e4ed84 07a10d899d45eed94d2f303586053fa61beafba1 alex <alex@amac.local> 1274343294 +0400 update by push
|
72
72
|
07a10d899d45eed94d2f303586053fa61beafba1 712aa2c2ef44c499b0251dbe46eee1c90afbdeb6 alex <alex@amac.local> 1274515494 +0400 update by push
|
73
73
|
712aa2c2ef44c499b0251dbe46eee1c90afbdeb6 c51b776d4635d2566cb593bd296e65254a23032f alex <alex@amac.local> 1274527328 +0400 update by push
|
74
|
+
c51b776d4635d2566cb593bd296e65254a23032f 3081da56a76478c99b075f8e173527a482f1dd08 alex <alex@amac.local> 1274602907 +0400 update by push
|
75
|
+
3081da56a76478c99b075f8e173527a482f1dd08 c64b93c451584a04f99fd52b62b763b8e4e20585 alex <alex@amac.local> 1274604415 +0400 update by push
|
76
|
+
c64b93c451584a04f99fd52b62b763b8e4e20585 f6e78f8597cecad3ff464f8c4ad7210178bd86af alex <alex@amac.local> 1274604458 +0400 update by push
|
77
|
+
f6e78f8597cecad3ff464f8c4ad7210178bd86af 3781a6d614f28843c373dc678762e5c6d9676316 alex <alex@amac.local> 1274604519 +0400 update by push
|
78
|
+
3781a6d614f28843c373dc678762e5c6d9676316 beccc2dfb4ebb94c6920aa5543dff4e2b4add690 alex <alex@amac.local> 1274610370 +0400 update by push
|
79
|
+
beccc2dfb4ebb94c6920aa5543dff4e2b4add690 0f0c8c6adaa43424f5037ca877211f6298d2400e alex <alex@amac.local> 1274611075 +0400 update by push
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,3 @@
|
|
1
|
+
x�S]k�0ݳ��>�ሌ�A�DŽ͍��`������������Kb�+
|
2
|
+
+4�~��s�i#^Fpw{sQ�ɚ#L"�%��Lh�)���K�в���JSXN_ޞ'�)�~,����u��|��.8�X��k�(���@ ��3,0�+&u�8�m��|躠��@��>T��`��<�U�� ����p^y�a2�y)�4(��gQ}�1����쯀v+ϤnH�H�t�(B��W;��<���6�V'z'��I.�A���R���e���f���5�VftԎ�!dٺ���M�3+4+�%����w�sE�F^�
|
3
|
+
�ⱛ�S�[\���{��
|
4
|
��o���uۇo(�5�GE�"�1�A�Z�zN��$�v��?a8\�o��8�~�=�� �
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/.git/refs/heads/master
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
0f0c8c6adaa43424f5037ca877211f6298d2400e
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
0f0c8c6adaa43424f5037ca877211f6298d2400e
|
data/README.markdown
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
-
#
|
1
|
+
# Ruby on Rails extensions.
|
2
2
|
|
3
|
-
|
3
|
+
* Abstract Interface: Tool for rapid web interface creation, see [Common Interface][common_interface] - concrete realisation of Abstract Interface
|
4
|
+
* MongoMapperExt: MongoMapper extensions, Migration, Query Profiling in Log, Attributes Cache, Default Scope, BelongsTo Counter Cache
|
5
|
+
* Sunspot: Sunspot support for MongoMapper
|
6
|
+
* rails_ext - a lots of Rails hacks, mainly to add inheritance support (because there's no OOD and inheritance in Rails by default).
|
7
|
+
|
8
|
+
All these extensions should be different gems itself but right for me it's easier to deal with all of them in one place, later I'll split them.
|
9
|
+
|
10
|
+
|
11
|
+
Copyright (c) 2009 Alexey Petrushin ([http://bos-tec.com](http://bos-tec.com)), released under the MIT license.
|
12
|
+
|
13
|
+
[common_interface]: http://github.com/alexeypetrushin/common_interface
|
data/Rakefile
CHANGED
@@ -18,7 +18,7 @@ require 'fileutils'
|
|
18
18
|
|
19
19
|
spec = Gem::Specification.new do |s|
|
20
20
|
s.name = "rails-ext"
|
21
|
-
s.version = "0.3.
|
21
|
+
s.version = "0.3.28"
|
22
22
|
s.summary = "Set of common Ruby on Rails extensions"
|
23
23
|
s.description = "Set of common Ruby on Rails extensions"
|
24
24
|
s.author = "Alexey Petrushin"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module AbstractInterface
|
2
2
|
module ControllerHelper
|
3
3
|
TEMPLATE_EXTENSIONS = ['html.haml', 'html.erb']
|
4
4
|
|
@@ -11,7 +11,7 @@ module InterfaceBuilder
|
|
11
11
|
"_#{partial}"
|
12
12
|
end
|
13
13
|
|
14
|
-
TEMPLATE_EXTENSIONS.any?{|ext| File.exist? "#{
|
14
|
+
TEMPLATE_EXTENSIONS.any?{|ext| File.exist? "#{AbstractInterface.themes_dir}/#{current_theme.name}/#{partial_fname}.#{ext}"}
|
15
15
|
end
|
16
16
|
cache_with_params! :themed_partial_exist? unless Rails.development?
|
17
17
|
|
@@ -24,7 +24,7 @@ module InterfaceBuilder
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def current_theme
|
27
|
-
@current_theme ||=
|
27
|
+
@current_theme ||= AbstractInterface::Theme.new
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
File without changes
|
File without changes
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module AbstractInterface
|
2
|
+
class Theme
|
3
|
+
attr_writer :name, :layout_template, :layout
|
4
|
+
def name; @name || 'default' end
|
5
|
+
def layout; @layout || 'default' end
|
6
|
+
|
7
|
+
def layout_template;
|
8
|
+
@layout_template || layout_definition['layout_template'] || 'default'
|
9
|
+
end
|
10
|
+
|
11
|
+
def layout_definition
|
12
|
+
layout_definitions[layout] || layout_definitions['default'] || {}
|
13
|
+
end
|
14
|
+
|
15
|
+
def layout_definitions
|
16
|
+
if AbstractInterface.layouts_defined?
|
17
|
+
AbstractInterface.layout_definitions(name)
|
18
|
+
else
|
19
|
+
{}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def available_layouts_names
|
24
|
+
layout_definitions.keys
|
25
|
+
end
|
26
|
+
|
27
|
+
def metadata
|
28
|
+
AbstractInterface.theme_metadata(name)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module AbstractInterface
|
2
2
|
class ViewBuilder
|
3
3
|
|
4
4
|
def self.generate_helper_methods methods
|
@@ -114,7 +114,7 @@ end}
|
|
114
114
|
unless themed_partial_exist? partial
|
115
115
|
|
116
116
|
# we don't need _theme_wrapper for dialog and popup, it should be invisible
|
117
|
-
classes = if
|
117
|
+
classes = if AbstractInterface.dont_wrap_into_placeholder.include? partial
|
118
118
|
"_d"
|
119
119
|
else
|
120
120
|
"_d _theme_wrapper"
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module AbstractInterface
|
2
|
+
module ViewHelper
|
3
|
+
#
|
4
|
+
# Basic
|
5
|
+
#
|
6
|
+
def b
|
7
|
+
@b ||= AbstractInterface::ViewBuilder.new self
|
8
|
+
end
|
9
|
+
alias_method :builder, :b
|
10
|
+
|
11
|
+
def themed_resource resource
|
12
|
+
"/#{AbstractInterface.plugin_name.should_not_be!(:blank)}/themes/#{current_theme.name}/#{resource}"
|
13
|
+
end
|
14
|
+
|
15
|
+
# def current_layout
|
16
|
+
# @current_layout || "default"
|
17
|
+
# end
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
def build_layout layout = nil
|
26
|
+
# Configuring
|
27
|
+
current_theme.layout = layout
|
28
|
+
|
29
|
+
# Rendering
|
30
|
+
current_theme.layout_definition['slots'].each do |slot_name, slots|
|
31
|
+
slots = Array(slots)
|
32
|
+
slots.each do |partial|
|
33
|
+
content_for slot_name do
|
34
|
+
render :partial => partial
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require 'abstract_interface/haml_builder'
|
2
|
+
require 'abstract_interface/model_stub'
|
3
|
+
require 'abstract_interface/view_helper'
|
4
|
+
require 'abstract_interface/support'
|
5
|
+
|
6
|
+
ActionController::Base.class_eval do
|
7
|
+
include AbstractInterface::ControllerHelper
|
8
|
+
helper AbstractInterface::ViewHelper
|
9
|
+
|
10
|
+
helper_method :themed_partial_exist?, :themed_partial, :current_theme
|
11
|
+
end
|
12
|
+
|
13
|
+
ActionView::Base.field_error_proc = lambda do |html_tag, instance|
|
14
|
+
html_tag
|
15
|
+
end
|
16
|
+
|
17
|
+
module AbstractInterface
|
18
|
+
class << self
|
19
|
+
attr_accessor :plugin_name
|
20
|
+
attr_accessor :layout_configurations_dir
|
21
|
+
|
22
|
+
def generate_helper_methods *args
|
23
|
+
AbstractInterface::ViewBuilder.generate_helper_methods *args
|
24
|
+
end
|
25
|
+
|
26
|
+
def available_themes; @available_themes ||= [] end
|
27
|
+
|
28
|
+
# Templates that should be wrapped if it doesn't defined for current theme
|
29
|
+
def dont_wrap_into_placeholder; @dont_wrap_into_placeholder ||= Set.new end
|
30
|
+
|
31
|
+
# TODO 3 don't cache it becouse there's a lots of text data that will be reside in memory.
|
32
|
+
def theme_metadata theme
|
33
|
+
metadata = {}
|
34
|
+
fname = "#{AbstractInterface.themes_dir}/#{theme}/metadata.rb"
|
35
|
+
if File.exist? fname
|
36
|
+
code = File.read fname
|
37
|
+
metadata = eval code
|
38
|
+
metadata.should! :be_a, Hash
|
39
|
+
end
|
40
|
+
metadata.to_openobject
|
41
|
+
end
|
42
|
+
cache_with_params! :theme_metadata unless Rails.development?
|
43
|
+
|
44
|
+
def themes_dir
|
45
|
+
"#{RAILS_ROOT}/vendor/plugins/#{AbstractInterface.plugin_name.should_not_be!(:blank)}/app/views/themes"
|
46
|
+
end
|
47
|
+
|
48
|
+
def layouts_defined?
|
49
|
+
!!layout_configurations_dir
|
50
|
+
end
|
51
|
+
|
52
|
+
def layout_definitions theme
|
53
|
+
fname = "#{layout_configurations_dir.should_not_be!(:empty)}/#{theme}.yml"
|
54
|
+
File.should! :exist?, fname
|
55
|
+
lds = YAML.load_file(fname)
|
56
|
+
validate_layout_definition!(lds, theme)
|
57
|
+
lds
|
58
|
+
end
|
59
|
+
cache_with_params! :layout_definitions unless Rails.development?
|
60
|
+
|
61
|
+
protected
|
62
|
+
def validate_layout_definition! lds, theme
|
63
|
+
lds.should! :be_a, Hash
|
64
|
+
unless lds.include?('default')
|
65
|
+
raise "No 'default' layout definition for '#{theme}' Theme (there always should be definition for 'default' layout)!"
|
66
|
+
end
|
67
|
+
lds.each do |theme_name, ld|
|
68
|
+
ld.should! :be_a, Hash
|
69
|
+
ld.should! :include, 'layout_template'
|
70
|
+
ld.should! :include, 'slots'
|
71
|
+
ld['slots'].should! :be_a, Hash
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
|
78
|
+
Rails.development{RailsExt.create_public_symlinks!} # rails_ext.css, rails_ext.js in development mode
|
@@ -2,7 +2,7 @@ require 'spec'
|
|
2
2
|
|
3
3
|
require 'ruby_ext'
|
4
4
|
require 'active_support'
|
5
|
-
require "#{File.dirname __FILE__}/../../lib/
|
5
|
+
require "#{File.dirname __FILE__}/../../lib/abstract_interface/haml_builder"
|
6
6
|
|
7
7
|
require 'facets/openobject'
|
8
8
|
|
@@ -27,7 +27,7 @@ describe "HamlBuilder use cases" do
|
|
27
27
|
args.size.should! :be_in, 0..1
|
28
28
|
opt[:content] = args.first if args.size == 1
|
29
29
|
|
30
|
-
r =
|
30
|
+
r = AbstractInterface::HamlBuilder.get_input(TemplateStub, opt, &block)
|
31
31
|
convert_to_hashes r
|
32
32
|
end
|
33
33
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 43
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 28
|
10
|
+
version: 0.3.28
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alexey Petrushin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-05-
|
18
|
+
date: 2010-05-23 00:00:00 +04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- .git/objects/0d/f02169bc94825e3629924eb44a662f07dc4dd8
|
106
106
|
- .git/objects/0e/3e1ba37a5dde54955067f2281ed9a59498f6fc
|
107
107
|
- .git/objects/0e/569306967bfebd5fd43b846a852b684c7f49e9
|
108
|
+
- .git/objects/0f/0c8c6adaa43424f5037ca877211f6298d2400e
|
108
109
|
- .git/objects/0f/92cb7ae358323d43d026b83f7d1a4969cf7568
|
109
110
|
- .git/objects/0f/d3ac42b07c2d3102263bd939704f5633db304e
|
110
111
|
- .git/objects/10/1f52d83027dfe5798f87aec1118f02d19e5cf8
|
@@ -137,6 +138,7 @@ files:
|
|
137
138
|
- .git/objects/18/adbbbcd043a3ef3e19854df8476b02d69544d0
|
138
139
|
- .git/objects/19/1f68644a3646d774f2546c4cd49ac7d66f4cc2
|
139
140
|
- .git/objects/19/c7ed2568bccfa8a745c4d32550ea5e9e47e6f8
|
141
|
+
- .git/objects/19/e876f62b90c9229b329227b24c1a8341282618
|
140
142
|
- .git/objects/1a/929bce5b1c62a0c863ddca593310376374c3bf
|
141
143
|
- .git/objects/1a/ff7d3c3636d032e1245491ca5261355fa4a207
|
142
144
|
- .git/objects/1b/83175202b0bdd9e8aac50c186533c1730aa220
|
@@ -145,7 +147,9 @@ files:
|
|
145
147
|
- .git/objects/1c/14e28ef05892ccfe61da3dc28e16f87040fe43
|
146
148
|
- .git/objects/1c/65c12ac1816d1b56c7c3892acc61512696c673
|
147
149
|
- .git/objects/1c/7fd48742e76d2cd6605e1a569e65e79ddd8f92
|
150
|
+
- .git/objects/1c/b54426926c16534375c353f9e7e04d6301a1b1
|
148
151
|
- .git/objects/1d/3972733ede74012559f4c784b39ec66ff4166d
|
152
|
+
- .git/objects/1d/a311ae0ff991064b0544a989f18263985f368f
|
149
153
|
- .git/objects/1d/d49713de2942dc974e55adc3684f55b2b817e2
|
150
154
|
- .git/objects/1e/48b01e103c5d1be1107bfd6d227eda271580c8
|
151
155
|
- .git/objects/1e/6374b23c71a07b0e414e80912fd45503bd3daf
|
@@ -173,6 +177,7 @@ files:
|
|
173
177
|
- .git/objects/25/fa15d9a065f0d6e7ff2756b369c6a81799b03e
|
174
178
|
- .git/objects/26/0e9c6d3781e3ea13d10067398a51a2d5d7bf51
|
175
179
|
- .git/objects/26/8fe011dd9d01aa6e05c2004280b78e149ea29e
|
180
|
+
- .git/objects/26/bc58288bd96634bd5a8be0ff2b6f890f35cf97
|
176
181
|
- .git/objects/26/f7780cd6f6f06c9986ee53443de25c3f96d40e
|
177
182
|
- .git/objects/27/37bd94ff477fad57bb86f0a3e37110f6a75cb5
|
178
183
|
- .git/objects/27/c51d8db9f25b7b6596dceb626252c90fd26b57
|
@@ -191,15 +196,19 @@ files:
|
|
191
196
|
- .git/objects/2a/0ababefe6746dc4b945e3054349c31dcdd816c
|
192
197
|
- .git/objects/2a/a47868a74cd3eea9d22e179f7ebc76d939e3ad
|
193
198
|
- .git/objects/2b/0fbe9a4022a4a112d2fa583f79dc6221ef2baf
|
199
|
+
- .git/objects/2b/92d865e68b56fc2689b74a36eddd56dae29a88
|
194
200
|
- .git/objects/2c/21f9d1b567c0d8f3d74e71b38beee67a53afdc
|
195
201
|
- .git/objects/2c/633c11fb72405c6646493bc6c4d8c4fed0b9a6
|
196
202
|
- .git/objects/2c/b04524ccd690f1cb4345586ca9138f9615afd5
|
197
203
|
- .git/objects/2d/043376f1bc26b2dad3e79fc72ea14341ea437d
|
198
204
|
- .git/objects/2d/90f7bfae12824956e169af9762be28dd79e8ce
|
199
205
|
- .git/objects/2e/3e3fc8e46949a9b944da3c36207c444aa2c9b7
|
206
|
+
- .git/objects/2e/7a5197f328963dfbbaa60ef2fd39a2360ec631
|
200
207
|
- .git/objects/2e/f02adc5485c579d75dfacf7034b20760f2fdf4
|
208
|
+
- .git/objects/2e/f1776e24d5e5e16f197095d890be91a2285c77
|
201
209
|
- .git/objects/2f/af7acb8454f4b248d928b9a92f09571302a174
|
202
210
|
- .git/objects/30/69d4978bbdfacf4402c4339438b29657275f2c
|
211
|
+
- .git/objects/30/81da56a76478c99b075f8e173527a482f1dd08
|
203
212
|
- .git/objects/30/e5bf9c61cc450f8024ab7029a490d7fb9f3ff7
|
204
213
|
- .git/objects/31/2394103747eda7e407df494c3e5d6263d6f476
|
205
214
|
- .git/objects/31/2f74fcf97e832a3493accaf640f001d6d85170
|
@@ -215,6 +224,7 @@ files:
|
|
215
224
|
- .git/objects/36/c05d6453dfbf5cdea71c4a40e0e7539eaa669e
|
216
225
|
- .git/objects/36/c16174f65a0fc67c520aa36225d3e8c7a05775
|
217
226
|
- .git/objects/36/c7ec2150ecaa7af94d9556c218f723a2eff0e1
|
227
|
+
- .git/objects/37/81a6d614f28843c373dc678762e5c6d9676316
|
218
228
|
- .git/objects/37/8d35c31ccb70ca6bbb2fdc2fd4d4d302ff4f41
|
219
229
|
- .git/objects/37/f8dc86fe13f6752dfb6c7880abec894e5a5a35
|
220
230
|
- .git/objects/38/60bc71d9acadda183a096c1c8ca36129672ea6
|
@@ -258,6 +268,7 @@ files:
|
|
258
268
|
- .git/objects/47/4f3074d7b1360f1897d62dd54444f70e645f1e
|
259
269
|
- .git/objects/47/afb623cc9949394fc403bc977671307c1a9eda
|
260
270
|
- .git/objects/48/0602886685e84f2a257eb8e95acfc8af1166b6
|
271
|
+
- .git/objects/48/08a771a51ac9867398791e978cd20d4b13e4ce
|
261
272
|
- .git/objects/48/9d9ebe59b365b9778ebf368682803fe2962dde
|
262
273
|
- .git/objects/49/66cd792ea3e03d5091aa7a332f2a082e479a76
|
263
274
|
- .git/objects/49/b7ee2b8f19ff0639d351fd5f3616c1360ff700
|
@@ -292,6 +303,8 @@ files:
|
|
292
303
|
- .git/objects/53/8aca7c60ef3cdfde25d4698e8e133ce18e512e
|
293
304
|
- .git/objects/53/b8187421c09e55e44b8d6fb3c4cd7feb0a51b2
|
294
305
|
- .git/objects/54/713b018cb71a95e3f10510ea96b9f103ef0255
|
306
|
+
- .git/objects/54/a81991fe89c15984d406d16c04faf45fd7251a
|
307
|
+
- .git/objects/54/b5f348d5e841928a9d90b5c4c3de5bbaaa015d
|
295
308
|
- .git/objects/55/0dd68cd7e6918dd1473d609e8cafcde8f89009
|
296
309
|
- .git/objects/55/3b8cd5bc6a69c81af2f957445c7a381fdf7220
|
297
310
|
- .git/objects/55/45d0d521bb723db8feae0223fa838a183e38b7
|
@@ -351,6 +364,7 @@ files:
|
|
351
364
|
- .git/objects/6a/02fd5698264a4165c46af5175a39f5b130de9c
|
352
365
|
- .git/objects/6a/07aec23c51e5893c9664a739f5b27993fbc625
|
353
366
|
- .git/objects/6a/2daaf6529a3841c7fd39683d9bcec79b48f79e
|
367
|
+
- .git/objects/6a/613e120fe466ecbde8c0322da0f84af5eb41dc
|
354
368
|
- .git/objects/6a/90d6784ac3b6580ef470dac68c2d93c276d6a7
|
355
369
|
- .git/objects/6a/cdfb69624140a67634b65ab8230cc5e0ffd543
|
356
370
|
- .git/objects/6b/6ca4397efe04b2f715692d6086b73253b7402d
|
@@ -369,6 +383,7 @@ files:
|
|
369
383
|
- .git/objects/6e/b67e3ad9f44898acced6d861f9743dad07e49c
|
370
384
|
- .git/objects/6f/72c276ac50a5731aa5f7e7e01dd2793113fe5b
|
371
385
|
- .git/objects/6f/8c62387c94fbb7639a1c1f25df92cab15d2154
|
386
|
+
- .git/objects/6f/e30114856fcb1fa466c1a18fecfe2dc2ce4169
|
372
387
|
- .git/objects/71/2aa2c2ef44c499b0251dbe46eee1c90afbdeb6
|
373
388
|
- .git/objects/71/3ef09968f2aa2abf7a0e908286ec5c80d3b9e9
|
374
389
|
- .git/objects/71/8629a1ac1903b2e69404a365610df5e249cee8
|
@@ -414,9 +429,11 @@ files:
|
|
414
429
|
- .git/objects/7e/ca6f113845c2dcdf536daa084349445d608879
|
415
430
|
- .git/objects/7f/2f1e8e10a6b78b831b5f9a07e538db8f15104e
|
416
431
|
- .git/objects/7f/5a29b185109286dba66581a28bcbe2ec398f9a
|
432
|
+
- .git/objects/7f/72d4e7d7b03be87d9441370970ab4c8d344640
|
417
433
|
- .git/objects/80/1343ae84fe604b9fb93fb2265d2e3a49f25d3e
|
418
434
|
- .git/objects/80/4a20e92f38623945cdb50ed8864d014632cf44
|
419
435
|
- .git/objects/81/156e1461b12b90f0dc2604458317ca8f5d45c0
|
436
|
+
- .git/objects/81/7f6d877cb630b3e1f649769fadf69c2114a456
|
420
437
|
- .git/objects/81/d4aa3b627dfc7397ce3f71577a8307324b8289
|
421
438
|
- .git/objects/81/e506fe8796b432c7d3aa075a5f5844c839a23a
|
422
439
|
- .git/objects/82/0190b802ed213aab7a56a928a09db06e2a90a2
|
@@ -432,12 +449,15 @@ files:
|
|
432
449
|
- .git/objects/84/a211c6a73f57c4bb5e04e4abbb21ccd36fb18f
|
433
450
|
- .git/objects/84/bfc21516dfc947e9aa64a47000b46da2c801d9
|
434
451
|
- .git/objects/85/013aed579984acc4cf2aecab48fa398a2084a9
|
452
|
+
- .git/objects/85/b75423eae1ce81ed64ddf8d6abeaaea855ba8a
|
453
|
+
- .git/objects/85/c7a500980188445fa88eb33b4ea3274042f563
|
435
454
|
- .git/objects/85/eee9f4c1a6f710ed87bf28a0531275777f8848
|
436
455
|
- .git/objects/85/fd531f7352ad8f5ac030eed2204a662dd10a66
|
437
456
|
- .git/objects/86/23de615f686de621ca23cbbff6a07885101df9
|
438
457
|
- .git/objects/86/92c6013c20c061359f6482ba5338615952918c
|
439
458
|
- .git/objects/86/b31b604469e9b261f4e5b927932504bca8c402
|
440
459
|
- .git/objects/86/b5d7431198d0cbd17573297b56feb1a6084820
|
460
|
+
- .git/objects/87/c521c60f20f4e35639a78e5c2beb31848a761c
|
441
461
|
- .git/objects/87/fc827fd223cac6b4e55d823a9ea86bb0726a3b
|
442
462
|
- .git/objects/88/b888ea16fb14478c659390ce54e980b86198ef
|
443
463
|
- .git/objects/89/2697494eb70fdccaf26bf547bb8d7428c0e5ff
|
@@ -471,6 +491,7 @@ files:
|
|
471
491
|
- .git/objects/92/debcedcd81c328806dc7506b3cd91990bb9775
|
472
492
|
- .git/objects/92/e1c250edfca72ed0932934257ef3cfc7122ec5
|
473
493
|
- .git/objects/92/e1f3936e7c33007d0a466b836804450992a1eb
|
494
|
+
- .git/objects/93/31ab9c89c69dda86fced860f572236a48947d4
|
474
495
|
- .git/objects/93/f9a6b596879347290cde161b03052bb22021de
|
475
496
|
- .git/objects/94/72f3ac9e890231482aadd774bdc1c9ba742497
|
476
497
|
- .git/objects/94/7bf4d6e7e81d5ca62a381caa8d761a9c43cf8a
|
@@ -488,12 +509,16 @@ files:
|
|
488
509
|
- .git/objects/99/368683bd721c6c1b8db8eb1b468dffefa61a2e
|
489
510
|
- .git/objects/99/8afa58b56034f5458b4aef2b8255daa53a5bb1
|
490
511
|
- .git/objects/99/a23df6dd9c448928b25f2e749871c6fc696a32
|
512
|
+
- .git/objects/99/d31cde9fe69079a60379da41d7b25ac4e92bf8
|
491
513
|
- .git/objects/9a/ef8f9aacfa5609934eac4de71d9440a23b1b9f
|
492
514
|
- .git/objects/9b/11e8efda3f1354c0076a4f102fb38430f4b3b2
|
493
515
|
- .git/objects/9b/8d018e85ce2ef1c2797cea4bf739426a767a02
|
516
|
+
- .git/objects/9b/a013a45d3dbe5c03ffd15d8866be4198029b90
|
494
517
|
- .git/objects/9b/a1a0e6e5050444fc8743a18341ae219c54aa9b
|
518
|
+
- .git/objects/9b/a3774d4672b4f15a74f0c3c2b3d8269f5ca8f8
|
495
519
|
- .git/objects/9c/20b1616810e3d1d5951ea6251ff2d28322dc16
|
496
520
|
- .git/objects/9c/356fa968ee88fb38a4129fcfbef3eb1b1ba50e
|
521
|
+
- .git/objects/9c/445d11eaf28e0d97ab55d0c2584f7ab31bef1d
|
497
522
|
- .git/objects/9d/23038fb44baa1cf819d782b731f77e281f2e06
|
498
523
|
- .git/objects/9d/3f16cdc12f32c4fa10b7df80eb6e8a09e96a84
|
499
524
|
- .git/objects/9d/66146c5013029dfe26de7404c6fb65c7fd4288
|
@@ -536,6 +561,7 @@ files:
|
|
536
561
|
- .git/objects/ab/d27aa19a08f7a172d66da7ab0125838c09317e
|
537
562
|
- .git/objects/ac/92bcf6c74d23824c3c7ce341f667507592c7f9
|
538
563
|
- .git/objects/ac/a1ad63cec98e0b3dae23fbe088f5a5d2125a7a
|
564
|
+
- .git/objects/ac/d01650fc4540a21e360d94f299682bd2f348f2
|
539
565
|
- .git/objects/ac/df4d7cb89a31894b95d8c107a4824f84c6cf55
|
540
566
|
- .git/objects/ad/66aac16165dd71456e4488069248d6f10ebb8f
|
541
567
|
- .git/objects/ae/536c345aad67cee8ce167dc91006263e63885f
|
@@ -550,6 +576,7 @@ files:
|
|
550
576
|
- .git/objects/b1/0d2b27582bb0d779efe6e17c45aaa671d32f3a
|
551
577
|
- .git/objects/b1/2623653bc803aeab5b77efdc72f79fb8f9c80e
|
552
578
|
- .git/objects/b1/8a3c6bf39b910b9805973578074e6d6b692a4a
|
579
|
+
- .git/objects/b1/fe0302a0c114aa0686c68b8f92f46813a9f0b7
|
553
580
|
- .git/objects/b2/99ac9d0ac730461d7610161b99ee4191c7c2b8
|
554
581
|
- .git/objects/b2/a135cb8023def22524c4f6094d94cbc0c16c69
|
555
582
|
- .git/objects/b2/cd852090540d0b2450b901397edd924d8c0ba9
|
@@ -563,7 +590,9 @@ files:
|
|
563
590
|
- .git/objects/b5/15828bb32356501aa81bb4e808ea5d7d77f068
|
564
591
|
- .git/objects/b5/33c1c1bca9eae5b7e75c639fff8ec2c2f9fea1
|
565
592
|
- .git/objects/b5/edd343ceb8e87d1a73922612aec210b393f839
|
593
|
+
- .git/objects/b6/74b8fbbe1c22c793f97eb9d8cedad090145a3c
|
566
594
|
- .git/objects/b7/88e3ac322b164a2a223f80f8a6da0836d9d1dd
|
595
|
+
- .git/objects/b7/f8065f8058acf6afe0ab6377a031af3b0f868f
|
567
596
|
- .git/objects/b8/aaaf4949881600102a72a60f17fd58918dbd7b
|
568
597
|
- .git/objects/b8/efcaff7f11cc584ac44303449d96592853c528
|
569
598
|
- .git/objects/b9/d34f7765b265ccfb07337dc5f55914454e8a23
|
@@ -579,6 +608,7 @@ files:
|
|
579
608
|
- .git/objects/bd/eab0ec8a914cdd8c9341340191c116a4bf2d3e
|
580
609
|
- .git/objects/be/29c116694d85d48cf177cf30816aa159189536
|
581
610
|
- .git/objects/be/4935dda5362a24e6fae89d4cd8f3cb2d302d01
|
611
|
+
- .git/objects/be/ccc2dfb4ebb94c6920aa5543dff4e2b4add690
|
582
612
|
- .git/objects/c0/22e88f31b91cecfc45b1bae611c27f5b12ca15
|
583
613
|
- .git/objects/c0/6835afc7627a9a401fe6a2118721857db3aeb5
|
584
614
|
- .git/objects/c0/724bc45e241d336d6376f14d9b258c2e4744d4
|
@@ -602,6 +632,7 @@ files:
|
|
602
632
|
- .git/objects/c5/64ac68ebc8e0db7a6355a45f3299829ef2a825
|
603
633
|
- .git/objects/c5/9dfa6bb36393437844b2e4acd5452338d587a0
|
604
634
|
- .git/objects/c6/16f380978400df648417cbbd197680f7e1a451
|
635
|
+
- .git/objects/c6/4b93c451584a04f99fd52b62b763b8e4e20585
|
605
636
|
- .git/objects/c6/9db405143490c407206cf8afd7537a49ea30b2
|
606
637
|
- .git/objects/c7/19fb334a65a20594437e2e6c944a08f30cfdf9
|
607
638
|
- .git/objects/c7/a9ce2f4c2230143a30c77952c14ddf6507f511
|
@@ -651,6 +682,7 @@ files:
|
|
651
682
|
- .git/objects/dc/d404a6183c1b2160add042127ada7ff83c9b7c
|
652
683
|
- .git/objects/dc/e1fc65f9462792558151feab3fa64abf3a229f
|
653
684
|
- .git/objects/dd/3a0aa57ce643ce2ab757237040de6fb4692fc9
|
685
|
+
- .git/objects/dd/7be4b09356883dc3ee66dda94ca95822b2be10
|
654
686
|
- .git/objects/dd/a1f7a239fae8c8a259b10eebb45003194a840b
|
655
687
|
- .git/objects/dd/ad36d883dd04cb1b68f0f81d5b3fa98b8551e3
|
656
688
|
- .git/objects/de/10bee1e91cfbd53ccaa073aada68cbfeac22d8
|
@@ -707,27 +739,34 @@ files:
|
|
707
739
|
- .git/objects/ed/6f2933b5e004994c7614117439dcf72acf66e3
|
708
740
|
- .git/objects/ed/c690a7821df2da3c0ddeee24b87187b3a99d91
|
709
741
|
- .git/objects/ee/8f2701595573a12b9186f3655a8baede5e8b4d
|
742
|
+
- .git/objects/ee/937c25fa0b87440bbd7b802f7b68750ae6b962
|
710
743
|
- .git/objects/ee/ccaf0d272346a1dcc672a4131ba692a0027049
|
744
|
+
- .git/objects/ee/f8ef7501c7e368ee7a305a5a41c64ee9c7c41c
|
745
|
+
- .git/objects/ef/88073aabdae498a225427228ccd088f09ace07
|
711
746
|
- .git/objects/f0/af2f0e63f924f45e55af90e691f3588552ffc9
|
712
747
|
- .git/objects/f0/cc5fe16472186b3920fefdd8e1e3ca0715ca7e
|
713
748
|
- .git/objects/f1/9154fc5093f2fd56f2660f386975b2a79be76f
|
714
749
|
- .git/objects/f2/196f15b2d432b2a2d641aed4ae5afe7190edb9
|
715
750
|
- .git/objects/f2/1aa127d1512cc6c8e46bf4f680a71277db8896
|
716
751
|
- .git/objects/f2/474d9a4174ecfa5d43a77cd7ba6063935eb335
|
752
|
+
- .git/objects/f2/4f1c44768d2bf5f2748730377745243ac5d1b5
|
717
753
|
- .git/objects/f2/efda050bcf5d33d3f8e8fb2848b0be926c1731
|
718
754
|
- .git/objects/f3/3573a82a9e7dbf9bc7f5b3feded4c223701d1f
|
719
755
|
- .git/objects/f3/695926e6f2e6409080b838ac0ceee37b76dafe
|
720
756
|
- .git/objects/f3/7784042bc99c16c02fd104dda82aafa42d4c9c
|
757
|
+
- .git/objects/f3/a2737cc886fa3e1a8c993ab0b3e33073e4f665
|
721
758
|
- .git/objects/f3/f41f5c38825fcae9dd63fc9f18ce66b9ce08b7
|
722
759
|
- .git/objects/f4/0f07e77ddaea3f97b82650633f361af19afdca
|
723
760
|
- .git/objects/f4/2863a866b6cd3bb09d0482052cbf2da7fb4e5a
|
724
761
|
- .git/objects/f4/2bc1aaa21ccdaa1bc0cfa8efb982b09b7eebb1
|
762
|
+
- .git/objects/f4/b2f322842db705def556599c1648269c7502d6
|
725
763
|
- .git/objects/f5/8ca6b23d3ab90715ea6ba514546a416e50064e
|
726
764
|
- .git/objects/f5/91a5c39e03e2102c9101db957b48c8c76e194c
|
727
765
|
- .git/objects/f6/0fd8c2582e0f7688877f12f78ddb97a291046c
|
728
766
|
- .git/objects/f6/1b2020cae7004d97b849c7a58a691ad39d125f
|
729
767
|
- .git/objects/f6/3ad03a8daa1602df63aab3838947c18fa63797
|
730
768
|
- .git/objects/f6/b9bcda0a6940c634c0ac0d6ac626028927e1da
|
769
|
+
- .git/objects/f6/e78f8597cecad3ff464f8c4ad7210178bd86af
|
731
770
|
- .git/objects/f7/32b167a61d8db0328f0196af00b55147ebf756
|
732
771
|
- .git/objects/f7/b177b2c6b25dd886d23d6be87bcf802af9b513
|
733
772
|
- .git/objects/f7/be86378738705bbd1f97dd8be92c3cc7d54a66
|
@@ -743,6 +782,7 @@ files:
|
|
743
782
|
- .git/objects/fc/022a0a2ed82b2361292833c0cb90f996aae858
|
744
783
|
- .git/objects/fc/269675339310e8f1ade1282978274f7da2713c
|
745
784
|
- .git/objects/fc/57fb9c7c3071095af9657d1cca26afaf5f258e
|
785
|
+
- .git/objects/fc/952bdf54d2d727b3b3c2971f00347265b5b070
|
746
786
|
- .git/objects/fc/bf66b949d823f884d1aff2f3e192943cb195a2
|
747
787
|
- .git/objects/fc/f17b13f109f3a2d9e9e9bd20d61d38b535a612
|
748
788
|
- .git/objects/fd/066ab33785d26d7c6728d2651bfd560da5bdd1
|
@@ -761,17 +801,17 @@ files:
|
|
761
801
|
- .git/refs/heads/master
|
762
802
|
- .git/refs/remotes/origin/HEAD
|
763
803
|
- .git/refs/remotes/origin/master
|
764
|
-
- lib/
|
765
|
-
- lib/
|
766
|
-
- lib/
|
767
|
-
- lib/
|
768
|
-
- lib/
|
769
|
-
- lib/
|
770
|
-
- lib/
|
771
|
-
- lib/
|
772
|
-
- lib/
|
773
|
-
- lib/
|
774
|
-
- lib/
|
804
|
+
- lib/abstract_interface/controller_helper.rb
|
805
|
+
- lib/abstract_interface/form_builders/abstract_form_builder.rb
|
806
|
+
- lib/abstract_interface/form_builders/themed_form_builder.rb
|
807
|
+
- lib/abstract_interface/form_builders/themed_form_tag_builder.rb
|
808
|
+
- lib/abstract_interface/haml_builder.rb
|
809
|
+
- lib/abstract_interface/model_stub.rb
|
810
|
+
- lib/abstract_interface/support.rb
|
811
|
+
- lib/abstract_interface/theme.rb
|
812
|
+
- lib/abstract_interface/view_builder.rb
|
813
|
+
- lib/abstract_interface/view_helper.rb
|
814
|
+
- lib/abstract_interface.rb
|
775
815
|
- lib/mongo_mapper_ext/db_config.rb
|
776
816
|
- lib/mongo_mapper_ext/hacks/fixes.rb
|
777
817
|
- lib/mongo_mapper_ext/hacks/time_measuring.rb
|
@@ -1,12 +0,0 @@
|
|
1
|
-
module InterfaceBuilder
|
2
|
-
class Theme
|
3
|
-
attr_writer :name, :layout_template, :layout
|
4
|
-
def name; @name || 'default' end
|
5
|
-
def layout_template; @layout_template || 'default' end
|
6
|
-
def layout; @layout || 'default' end
|
7
|
-
|
8
|
-
def metadata
|
9
|
-
InterfaceBuilder.theme_metadata(name)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module InterfaceBuilder
|
2
|
-
module ViewHelper
|
3
|
-
#
|
4
|
-
# Basic
|
5
|
-
#
|
6
|
-
def b
|
7
|
-
@b ||= InterfaceBuilder::ViewBuilder.new self
|
8
|
-
end
|
9
|
-
alias_method :builder, :b
|
10
|
-
|
11
|
-
def themed_resource resource
|
12
|
-
"/#{InterfaceBuilder.plugin_name.should_not_be!(:blank)}/themes/#{current_theme.name}/#{resource}"
|
13
|
-
end
|
14
|
-
|
15
|
-
# def current_layout
|
16
|
-
# @current_layout || "default"
|
17
|
-
# end
|
18
|
-
end
|
19
|
-
end
|
data/lib/interface_builder.rb
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
require 'interface_builder/haml_builder'
|
2
|
-
require 'interface_builder/model_stub'
|
3
|
-
require 'interface_builder/view_helper'
|
4
|
-
require 'interface_builder/support'
|
5
|
-
|
6
|
-
ActionController::Base.class_eval do
|
7
|
-
include InterfaceBuilder::ControllerHelper
|
8
|
-
helper InterfaceBuilder::ViewHelper
|
9
|
-
|
10
|
-
helper_method :themed_partial_exist?, :themed_partial, :current_theme
|
11
|
-
end
|
12
|
-
|
13
|
-
ActionView::Base.field_error_proc = lambda do |html_tag, instance|
|
14
|
-
html_tag
|
15
|
-
end
|
16
|
-
|
17
|
-
module InterfaceBuilder
|
18
|
-
class << self
|
19
|
-
attr_accessor :plugin_name
|
20
|
-
|
21
|
-
def generate_helper_methods *args
|
22
|
-
InterfaceBuilder::ViewBuilder.generate_helper_methods *args
|
23
|
-
end
|
24
|
-
|
25
|
-
def available_themes; @available_themes ||= [] end
|
26
|
-
|
27
|
-
# Templates that should be wrapped if it doesn't defined for current theme
|
28
|
-
def dont_wrap_into_placeholder; @dont_wrap_into_placeholder ||= Set.new end
|
29
|
-
|
30
|
-
# TODO 3 don't cache it becouse there's a lots of text data that will be reside in memory.
|
31
|
-
def theme_metadata theme
|
32
|
-
metadata = {}
|
33
|
-
fname = "#{InterfaceBuilder.themes_dir}/#{theme}/metadata.rb"
|
34
|
-
if File.exist? fname
|
35
|
-
code = File.read fname
|
36
|
-
metadata = eval code
|
37
|
-
metadata.should! :be_a, Hash
|
38
|
-
end
|
39
|
-
metadata.to_openobject
|
40
|
-
end
|
41
|
-
cache_with_params! :theme_metadata unless Rails.development?
|
42
|
-
|
43
|
-
def themes_dir
|
44
|
-
"#{RAILS_ROOT}/vendor/plugins/#{InterfaceBuilder.plugin_name.should_not_be!(:blank)}/app/views/themes"
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
49
|
-
|
50
|
-
Rails.development{RailsExt.create_public_symlinks!} # rails_ext.css, rails_ext.js in development mode
|