mote-render 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d58f145229d11c826d348a7c9029f55ddadc2255
4
- data.tar.gz: 4806a2c6136d19f669e092594702596d15580cc8
3
+ metadata.gz: e737210fc934290abe83e1a731c3c4b47ffe472f
4
+ data.tar.gz: f710e22734f6193621e2e7a16f49e0df7abcc019
5
5
  SHA512:
6
- metadata.gz: ebf30bde402675f07583ddfaab987334594ac97d353e68e66b0464ea3e6013f40d6ae795a7161cd28390fccccd2aca6ea4a76753253f341a17472a6170217721
7
- data.tar.gz: e1e1321486a2c6f04d39f1a19c9dc44079f5b203bd4ec76de61309d8f118297a6461d887f24273332412a7a9763fdfe7d56353a826a7e1969b0502ceb8692226
6
+ metadata.gz: e48ff4e04a5d00f41060288e71cb390c2c16f10d95a3e26d4b037d8a0445116ef7b2cb36f8ba90982bc3b3150a356ec3f5961eacb90ad4c35b211aa00d7bdb41
7
+ data.tar.gz: 73261e0449178c7b2357da2fe3b45b65ee566414356401d7e4522144e76a05d1880554007059e8dede03a22433dfefced5934920df9907435c4bcb7c957f0c78
@@ -1,5 +1,3 @@
1
- require "mote"
2
-
3
1
  module Mote::Render
4
2
  include Mote::Helpers
5
3
 
@@ -10,20 +8,22 @@ module Mote::Render
10
8
  end
11
9
 
12
10
  def render(template, locals = {}, layout = settings[:mote][:layout])
13
- res.write view(template, locals, layout)
11
+ res.write(view(template, locals, layout))
14
12
  end
15
13
 
16
14
  def view(template, locals = {}, layout = settings[:mote][:layout])
17
- partial(layout, locals.merge(content: partial(template, locals)))
15
+ return partial(layout, locals.merge(content: partial(template, locals)))
18
16
  end
19
17
 
20
18
  def partial(template, locals = {})
21
- mote(mote_path(template), locals.merge(app: self), TOPLEVEL_BINDING)
19
+ return mote(mote_path(template), locals.merge(app: self), TOPLEVEL_BINDING)
22
20
  end
23
21
 
24
22
  def mote_path(template)
25
- return template if template.end_with?(".mote")
26
-
27
- File.join(settings[:mote][:views], "#{template}.mote")
23
+ if template.end_with?(".mote")
24
+ return template
25
+ else
26
+ return File.join(settings[:mote][:views], "#{template}.mote")
27
+ end
28
28
  end
29
29
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "mote-render"
3
- s.version = "1.0.0"
3
+ s.version = "1.1.0"
4
4
  s.summary = "Mote plugin for Cuba."
5
5
  s.description = s.summary
6
6
  s.authors = ["Cyril David", "Francesco Rodríguez", "Mayn Kjær"]
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
 
11
11
  s.files = `git ls-files`.split("\n")
12
12
 
13
- s.add_dependency "mote"
13
+ s.add_development_dependency "mote"
14
14
  s.add_development_dependency "cuba"
15
15
  s.add_development_dependency "cutest"
16
16
  end
@@ -1,4 +1,5 @@
1
1
  require "cuba/test"
2
+ require "mote"
2
3
  require_relative "../lib/mote/render"
3
4
 
4
5
  Cuba.plugin(Mote::Render)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mote-render
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril David
@@ -10,48 +10,48 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-06-10 00:00:00.000000000 Z
13
+ date: 2014-08-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mote
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - '>='
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
21
  version: '0'
22
- type: :runtime
22
+ type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - '>='
26
+ - - ">="
27
27
  - !ruby/object:Gem::Version
28
28
  version: '0'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: cuba
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - '>='
33
+ - - ">="
34
34
  - !ruby/object:Gem::Version
35
35
  version: '0'
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - '>='
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: cutest
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - '>='
47
+ - - ">="
48
48
  - !ruby/object:Gem::Version
49
49
  version: '0'
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - '>='
54
+ - - ">="
55
55
  - !ruby/object:Gem::Version
56
56
  version: '0'
57
57
  description: Mote plugin for Cuba.
@@ -62,7 +62,7 @@ executables: []
62
62
  extensions: []
63
63
  extra_rdoc_files: []
64
64
  files:
65
- - .gems
65
+ - ".gems"
66
66
  - LICENSE
67
67
  - README.md
68
68
  - lib/mote/render.rb
@@ -83,17 +83,17 @@ require_paths:
83
83
  - lib
84
84
  required_ruby_version: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - '>='
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - '>='
91
+ - - ">="
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  requirements: []
95
95
  rubyforge_project:
96
- rubygems_version: 2.0.14
96
+ rubygems_version: 2.2.2
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Mote plugin for Cuba.