true-web 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -4
- data/Gemfile.lock +1 -2
- data/lib/true-web/version.rb +1 -1
- data/lib/true-web/views.rb +1 -5
- data/spec/fixture-app/app.rb +3 -1
- data/spec/fixture-app/services/authentication/app/presenters/index.html.ms.rb +5 -0
- data/spec/fixture-app/services/authentication/app/templates/index.html.ms +4 -1
- data/spec/fixture-app/services/authentication/init.rb +1 -1
- data/spec/true-web/views_spec.rb +11 -1
- metadata +3 -2
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
true-web (0.1.
|
4
|
+
true-web (0.1.2)
|
5
5
|
activesupport (>= 3.0.0)
|
6
6
|
honkster-addressable (>= 2.2.3)
|
7
7
|
mustache
|
@@ -11,7 +11,6 @@ PATH
|
|
11
11
|
|
12
12
|
GEM
|
13
13
|
remote: http://rubygems.org/
|
14
|
-
remote: http://gems.github.com/
|
15
14
|
specs:
|
16
15
|
activesupport (3.0.9)
|
17
16
|
addressable (2.2.4)
|
data/lib/true-web/version.rb
CHANGED
data/lib/true-web/views.rb
CHANGED
@@ -18,7 +18,7 @@ module TrueWeb
|
|
18
18
|
{
|
19
19
|
'data-template' => path,
|
20
20
|
'data-type' => "Template"
|
21
|
-
}
|
21
|
+
}
|
22
22
|
end
|
23
23
|
|
24
24
|
def define_method_via_include(method_name, &definition)
|
@@ -26,10 +26,6 @@ module TrueWeb
|
|
26
26
|
define_method(method_name, &definition)
|
27
27
|
end)
|
28
28
|
end
|
29
|
-
|
30
|
-
def metadata_keys
|
31
|
-
['data-template', 'data-type']
|
32
|
-
end
|
33
29
|
end
|
34
30
|
|
35
31
|
attr_reader :app_instance
|
data/spec/fixture-app/app.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
self.url_prefix = "/authentication"
|
1
|
+
self.url_prefix = "/authentication"
|
data/spec/true-web/views_spec.rb
CHANGED
@@ -13,7 +13,17 @@ module TrueWeb
|
|
13
13
|
describe "lazily created method" do
|
14
14
|
context "when the presenter file exists" do
|
15
15
|
it "evals the presenter file (which is responsible for adding the method)" do
|
16
|
-
|
16
|
+
authentication_path = "#{FixtureApp.root_dir}/services/authentication"
|
17
|
+
service = Service.new(authentication_path).init
|
18
|
+
app_instance = Object.new
|
19
|
+
stub(app_instance).services {[service]}
|
20
|
+
stub(app_instance).config {FixtureApp}
|
21
|
+
views = Class.new(TrueWeb::Views).new(app_instance)
|
22
|
+
|
23
|
+
html = views["/authentication/index.html.ms"].call("param1 value")
|
24
|
+
html.should include("param1 value")
|
25
|
+
doc = Nokogiri::HTML(html)
|
26
|
+
doc.at(".child-div").should be_present
|
17
27
|
end
|
18
28
|
end
|
19
29
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: true-web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Brian Takita
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-07-
|
13
|
+
date: 2011-07-17 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -181,6 +181,7 @@ files:
|
|
181
181
|
- lib/true-web/version.rb
|
182
182
|
- lib/true-web/views.rb
|
183
183
|
- spec/fixture-app/app.rb
|
184
|
+
- spec/fixture-app/services/authentication/app/presenters/index.html.ms.rb
|
184
185
|
- spec/fixture-app/services/authentication/app/templates/index.html.ms
|
185
186
|
- spec/fixture-app/services/authentication/init.rb
|
186
187
|
- spec/fixture-app/services/authentication/public/javascripts/foo.js
|