eco-rails 0.1.0

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/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gemspec
data/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # eco-rails
2
+
3
+ Use your Eco templates from your Rails app.
4
+
5
+ ## Installation
6
+
7
+ In your `Gemfile`:
8
+
9
+ ```ruby
10
+ gem 'eco-rails'
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Just use your standard render calls:
16
+
17
+ ```erb
18
+ <%= render 'partial', some: 'value' %>
19
+ ```
20
+
21
+ ## Contributing
22
+
23
+ 1. Fork it
24
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
25
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
26
+ 4. Push to the branch (`git push origin my-new-feature`)
27
+ 5. Create new Pull Request
28
+
29
+ ## Copyright
30
+
31
+ (The MIT license)
32
+
33
+ Copyright (c) 2012 Mario Uher
34
+
35
+ Permission is hereby granted, free of charge, to any person obtaining
36
+ a copy of this software and associated documentation files (the
37
+ "Software"), to deal in the Software without restriction, including
38
+ without limitation the rights to use, copy, modify, merge, publish,
39
+ distribute, sublicense, and/or sell copies of the Software, and to
40
+ permit persons to whom the Software is furnished to do so, subject to
41
+ the following conditions:
42
+
43
+ The above copyright notice and this permission notice shall be
44
+ included in all copies or substantial portions of the Software.
45
+
46
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
47
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
48
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
49
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
50
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
51
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
52
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/eco-rails.gemspec ADDED
@@ -0,0 +1,16 @@
1
+ Gem::Specification.new do |gem|
2
+ gem.name = 'eco-rails'
3
+ gem.version = '0.1.0'
4
+ gem.authors = 'Mario Uher'
5
+ gem.email = 'uher.mario@gmail.com'
6
+ gem.description = 'Use your Eco templates from your Rails app.'
7
+ gem.summary = 'Eco templates for Rails.'
8
+ gem.homepage = 'http://haihappen.github.com/eco-rails'
9
+
10
+ gem.files = `git ls-files`.split("\n")
11
+ gem.require_path = 'lib'
12
+
13
+ gem.add_dependency 'activesupport', '~> 3.0'
14
+ gem.add_dependency 'actionpack', '~> 3.0'
15
+ gem.add_dependency 'eco'
16
+ end
@@ -0,0 +1,9 @@
1
+ module ActionView
2
+ module Template::Handlers
3
+ class Eco
4
+ def call(template)
5
+ "Eco.render(#{template.source.inspect}, local_assigns).html_safe"
6
+ end
7
+ end
8
+ end
9
+ end
data/lib/eco-rails.rb ADDED
@@ -0,0 +1,2 @@
1
+ require 'eco'
2
+ require 'eco-rails/railtie' if defined? Rails
@@ -0,0 +1,9 @@
1
+ require 'action_view/template/handlers/eco'
2
+
3
+ module EcoRails
4
+ class Railtie < Rails::Railtie
5
+ ActiveSupport.on_load :action_view do
6
+ ActionView::Template.register_template_handler :eco, ActionView::Template::Handlers::Eco.new
7
+ end
8
+ end
9
+ end
metadata ADDED
@@ -0,0 +1,98 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: eco-rails
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.1.0
6
+ platform: ruby
7
+ authors:
8
+ - Mario Uher
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-12-21 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ version_requirements: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ none: false
21
+ name: activesupport
22
+ type: :runtime
23
+ prerelease: false
24
+ requirement: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ version: '3.0'
29
+ none: false
30
+ - !ruby/object:Gem::Dependency
31
+ version_requirements: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ~>
34
+ - !ruby/object:Gem::Version
35
+ version: '3.0'
36
+ none: false
37
+ name: actionpack
38
+ type: :runtime
39
+ prerelease: false
40
+ requirement: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: '3.0'
45
+ none: false
46
+ - !ruby/object:Gem::Dependency
47
+ version_requirements: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ none: false
53
+ name: eco
54
+ type: :runtime
55
+ prerelease: false
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ none: false
62
+ description: Use your Eco templates from your Rails app.
63
+ email: uher.mario@gmail.com
64
+ executables: []
65
+ extensions: []
66
+ extra_rdoc_files: []
67
+ files:
68
+ - Gemfile
69
+ - README.md
70
+ - eco-rails.gemspec
71
+ - lib/action_view/template/handlers/eco.rb
72
+ - lib/eco-rails.rb
73
+ - lib/eco-rails/railtie.rb
74
+ homepage: http://haihappen.github.com/eco-rails
75
+ licenses: []
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ! '>='
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ none: false
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ none: false
92
+ requirements: []
93
+ rubyforge_project:
94
+ rubygems_version: 1.8.23
95
+ signing_key:
96
+ specification_version: 3
97
+ summary: Eco templates for Rails.
98
+ test_files: []