modular 0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/modular/components/base.rb +3 -2
- data/lib/modular/rendering.rb +11 -1
- data/lib/modular/version.rb +1 -1
- data/modular-app/app/components/hello_world.rb +7 -0
- data/modular-app/app/components/helpers_example.rb +6 -0
- data/modular-app/app/views/components/hello_world.html.erb +1 -0
- data/modular-app/app/views/components/helpers_example.html.erb +6 -0
- data/modular-app/spec/components/hello_world.rb +8 -0
- data/modular-app/spec/components/helpers_example.rb +8 -0
- metadata +23 -16
@@ -7,9 +7,10 @@ module Modular
|
|
7
7
|
module Components
|
8
8
|
class Base < Modular::Helpers::AbstractModel
|
9
9
|
#rendering
|
10
|
-
include AbstractController
|
10
|
+
include AbstractController
|
11
|
+
include Rendering, Helpers
|
11
12
|
include Modular::Components::DirectRender
|
12
|
-
|
13
|
+
|
13
14
|
#slug
|
14
15
|
def self.type
|
15
16
|
self.name.rpartition("::").last
|
data/lib/modular/rendering.rb
CHANGED
@@ -13,9 +13,14 @@ module Modular
|
|
13
13
|
type.underscore
|
14
14
|
end
|
15
15
|
|
16
|
+
def config
|
17
|
+
ActionController::Base.config
|
18
|
+
end
|
19
|
+
|
16
20
|
def execute
|
21
|
+
|
17
22
|
end
|
18
|
-
|
23
|
+
|
19
24
|
def render
|
20
25
|
execute
|
21
26
|
modular_render :render_type => :direct
|
@@ -45,6 +50,11 @@ module Modular
|
|
45
50
|
a.html_safe
|
46
51
|
end
|
47
52
|
end
|
53
|
+
|
54
|
+
context.send :include, Rails.application.routes.url_helpers if defined? Rails
|
55
|
+
|
56
|
+
context.send :include, ApplicationHelper if defined? ApplicationHelper
|
57
|
+
|
48
58
|
context
|
49
59
|
end
|
50
60
|
end
|
data/lib/modular/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
<%=@text%>
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modular
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Alex Rozumiy
|
@@ -14,13 +15,13 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2011-07-
|
18
|
+
date: 2011-07-28 00:00:00 +03:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: rails
|
22
|
-
|
23
|
-
|
23
|
+
type: :runtime
|
24
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
25
|
none: false
|
25
26
|
requirements:
|
26
27
|
- - ">="
|
@@ -29,12 +30,12 @@ dependencies:
|
|
29
30
|
segments:
|
30
31
|
- 0
|
31
32
|
version: "0"
|
32
|
-
|
33
|
-
|
33
|
+
prerelease: false
|
34
|
+
requirement: *id001
|
34
35
|
- !ruby/object:Gem::Dependency
|
35
36
|
name: rspec
|
36
|
-
|
37
|
-
|
37
|
+
type: :development
|
38
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
38
39
|
none: false
|
39
40
|
requirements:
|
40
41
|
- - ">="
|
@@ -45,12 +46,12 @@ dependencies:
|
|
45
46
|
- 0
|
46
47
|
- 0
|
47
48
|
version: 2.0.0
|
48
|
-
|
49
|
-
|
49
|
+
prerelease: false
|
50
|
+
requirement: *id002
|
50
51
|
- !ruby/object:Gem::Dependency
|
51
52
|
name: autotest
|
52
|
-
|
53
|
-
|
53
|
+
type: :development
|
54
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
54
55
|
none: false
|
55
56
|
requirements:
|
56
57
|
- - ">="
|
@@ -59,8 +60,8 @@ dependencies:
|
|
59
60
|
segments:
|
60
61
|
- 0
|
61
62
|
version: "0"
|
62
|
-
|
63
|
-
|
63
|
+
prerelease: false
|
64
|
+
requirement: *id003
|
64
65
|
description: This gem provides functionality for modular frontend layout
|
65
66
|
email:
|
66
67
|
- brain-geek@yandex.ua
|
@@ -98,6 +99,8 @@ files:
|
|
98
99
|
- modular-app/app/components/fake_news_feed.rb
|
99
100
|
- modular-app/app/components/foobar.rb
|
100
101
|
- modular-app/app/components/heavy_task.rb
|
102
|
+
- modular-app/app/components/hello_world.rb
|
103
|
+
- modular-app/app/components/helpers_example.rb
|
101
104
|
- modular-app/app/components/validated.rb
|
102
105
|
- modular-app/app/components/vertical.rb
|
103
106
|
- modular-app/app/controllers/application_controller.rb
|
@@ -121,6 +124,8 @@ files:
|
|
121
124
|
- modular-app/app/views/components/fake_news_feed.html.erb
|
122
125
|
- modular-app/app/views/components/foobar.html.erb
|
123
126
|
- modular-app/app/views/components/heavy_task.html.erb
|
127
|
+
- modular-app/app/views/components/hello_world.html.erb
|
128
|
+
- modular-app/app/views/components/helpers_example.html.erb
|
124
129
|
- modular-app/app/views/components/validated.html.erb
|
125
130
|
- modular-app/app/views/components/vertical.html.erb
|
126
131
|
- modular-app/app/views/example/index.html.erb
|
@@ -149,6 +154,8 @@ files:
|
|
149
154
|
- modular-app/script/rails
|
150
155
|
- modular-app/spec/components/base.rb
|
151
156
|
- modular-app/spec/components/container.rb
|
157
|
+
- modular-app/spec/components/hello_world.rb
|
158
|
+
- modular-app/spec/components/helpers_example.rb
|
152
159
|
- modular-app/spec/components/validated.rb
|
153
160
|
- modular-app/spec/controllers/cached_for_time_controller_spec.rb
|
154
161
|
- modular-app/spec/controllers/cached_forever_controller_spec.rb
|
@@ -194,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
201
|
requirements: []
|
195
202
|
|
196
203
|
rubyforge_project: modular
|
197
|
-
rubygems_version: 1.
|
204
|
+
rubygems_version: 1.6.2
|
198
205
|
signing_key:
|
199
206
|
specification_version: 3
|
200
207
|
summary: This gem provides functionality for modular frontend layout
|