silverdot 0.1.2
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.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +1 -0
- data/Gemfile +4 -0
- data/Guardfile +9 -0
- data/MIT-LICENSE +20 -0
- data/README.md +49 -0
- data/Rakefile +13 -0
- data/lib/silverdot/alternative.rb +61 -0
- data/lib/silverdot/engine.rb +9 -0
- data/lib/silverdot/helpers/action_view_extension.rb +26 -0
- data/lib/silverdot/helpers/localize_helper.rb +16 -0
- data/lib/silverdot/helpers/url_helper.rb +16 -0
- data/lib/silverdot/hooks.rb +10 -0
- data/lib/silverdot/railtie.rb +7 -0
- data/lib/silverdot/renderer.rb +26 -0
- data/lib/silverdot.rb +29 -0
- data/silverdot.gemspec +26 -0
- data/spec/fake_app/rails_app.rb +20 -0
- data/spec/fake_app/views/_link.html.erb +1 -0
- data/spec/fake_app/views/_locale.html.erb +1 -0
- data/spec/fake_app/views/_object.html.erb +1 -0
- data/spec/fake_app/views/_single.html.erb +1 -0
- data/spec/helpers/action_view_extension_spec.rb +50 -0
- data/spec/render_spec.rb +27 -0
- data/spec/spec_helper.rb +15 -0
- metadata +202 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ab2ceff1f7a73f70f25632b103d62f4015431a8a
|
4
|
+
data.tar.gz: fdc413ef230e4c0d629448cd7966ca212e86fa0a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1169aba1ace236e82a3f5a1494d533cee001a9b0196427504adfe8863c460d0397bb494ced3e721edc094304f03cce254af1d98822f37f147b56cb4cbb4e712d
|
7
|
+
data.tar.gz: 35320ceba9ce3b41bd4436d117b37a76ff078083f414916b7e0ad94915f2db83f19f84dede6be681cd68838875c2dc2b36b6cc51576b8e648c0e04fe510d5f26
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/Gemfile
ADDED
data/Guardfile
ADDED
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Akira Matsuda
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Silverdot
|
2
|
+
|
3
|
+
This is providing to convert .html.erb to .html.ejs for embossing into your rails templates.
|
4
|
+
|
5
|
+
## Basic usage
|
6
|
+
|
7
|
+
in comments/\_item.html.erb
|
8
|
+
```erb
|
9
|
+
<li>
|
10
|
+
<strong><%= comment.user.name %></strong>
|
11
|
+
<p><%= comment.body %></p>
|
12
|
+
</li>
|
13
|
+
```
|
14
|
+
|
15
|
+
in comments/show.html.erb
|
16
|
+
```erb
|
17
|
+
<ul>
|
18
|
+
<% @comments.each do |comment| %>
|
19
|
+
<%= render 'item', comment: comment %>
|
20
|
+
<% end %>
|
21
|
+
</ul>
|
22
|
+
<script type="text/template">
|
23
|
+
<%= emboss 'item', with: :comment %>
|
24
|
+
</script>
|
25
|
+
```
|
26
|
+
|
27
|
+
render with @comments = []
|
28
|
+
```html
|
29
|
+
<ul>
|
30
|
+
</ul>
|
31
|
+
<script type="text/template">
|
32
|
+
<li>
|
33
|
+
<strong>{{ comment.user.name }}</strong>
|
34
|
+
<p>{{ comment.body }}</p>
|
35
|
+
<li>
|
36
|
+
</script>
|
37
|
+
```
|
38
|
+
|
39
|
+
## Emboss EJS Template
|
40
|
+
|
41
|
+
```erb
|
42
|
+
<%= emboss 'single', with: :single, jst: true %>
|
43
|
+
```
|
44
|
+
|
45
|
+
```html
|
46
|
+
<script>(function() { JST || (JST = {}); JST['single'] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<p>', single ,'</p>\n');}return __p.join('');};}).call(this);</script>
|
47
|
+
```
|
48
|
+
|
49
|
+
`JST['single']` is compiled javascript template.
|
data/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'bundler'
|
4
|
+
Bundler::GemHelper.install_tasks
|
5
|
+
|
6
|
+
require 'rspec/core'
|
7
|
+
require 'rspec/core/rake_task'
|
8
|
+
|
9
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
10
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
11
|
+
end
|
12
|
+
|
13
|
+
task :default => "spec"
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'action_view/helpers/capture_helper'
|
2
|
+
|
3
|
+
module Silverdot
|
4
|
+
class Alternative
|
5
|
+
include ::ActionView::Helpers::CaptureHelper
|
6
|
+
|
7
|
+
attr_accessor :output_buffer
|
8
|
+
|
9
|
+
def initialize(name)
|
10
|
+
@name = name
|
11
|
+
end
|
12
|
+
|
13
|
+
def method_missing(m, *args, &block)
|
14
|
+
if /\A[a-z_]+\z/ =~ m
|
15
|
+
child = Alternative.new(m)
|
16
|
+
child.parent = self
|
17
|
+
child
|
18
|
+
else
|
19
|
+
super(m, *args, &block)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def [](index)
|
24
|
+
end
|
25
|
+
|
26
|
+
def []=(index, value)
|
27
|
+
pp "[#{index}]=#{value}"
|
28
|
+
end
|
29
|
+
|
30
|
+
def <<(value)
|
31
|
+
pp value
|
32
|
+
end
|
33
|
+
|
34
|
+
def sort!
|
35
|
+
end
|
36
|
+
|
37
|
+
def parent=(value)
|
38
|
+
@parent = value
|
39
|
+
end
|
40
|
+
|
41
|
+
def prefix
|
42
|
+
"#{@parent.path}." unless @parent.nil?
|
43
|
+
end
|
44
|
+
|
45
|
+
def path
|
46
|
+
"#{prefix}#{@name}"
|
47
|
+
end
|
48
|
+
|
49
|
+
def each(&block)
|
50
|
+
block_name = block.parameters.first[1]
|
51
|
+
child = Alternative.new(block_name.to_s)
|
52
|
+
child.parent = self
|
53
|
+
content = capture(child, &block)
|
54
|
+
"{{ _.each(#{path}, function(#{block_name}){ }}#{content}{{ } }}"
|
55
|
+
end
|
56
|
+
|
57
|
+
def to_s
|
58
|
+
"{{ #{path} }}"
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Silverdot
|
2
|
+
module ActionViewExtension
|
3
|
+
def emboss(template, options = {})
|
4
|
+
with = options[:with]
|
5
|
+
with = [with] unless with.is_a?(Enumerable)
|
6
|
+
locals = Hash[with.inject([]) do |list, name|
|
7
|
+
list << [name.to_sym, Alternative.new(name)]
|
8
|
+
end ]
|
9
|
+
view = view_renderer.render(self, partial: template, locals: locals)
|
10
|
+
if options[:jst]
|
11
|
+
to_jst template, raw(::EJS.compile(view.to_str, Silverdot.ejs_options))
|
12
|
+
else
|
13
|
+
view
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
protected
|
18
|
+
|
19
|
+
def to_jst path, context
|
20
|
+
namespace = "JST"
|
21
|
+
<<-JST
|
22
|
+
<script>(function() { #{namespace} || (#{namespace} = {}); #{namespace}['#{path}'] = #{context};}).call(this);</script>
|
23
|
+
JST
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Silverdot
|
2
|
+
module LocalizeHelper
|
3
|
+
def self.included(base)
|
4
|
+
base.alias_method_chain :localize, :alternative
|
5
|
+
end
|
6
|
+
|
7
|
+
def localize_with_alternative(*args)
|
8
|
+
if args[0].is_a?(Alternative)
|
9
|
+
args[0]
|
10
|
+
else
|
11
|
+
localize_without_alternative(*args)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
alias :l :localize_with_alternative
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Silverdot
|
2
|
+
module UrlHelper
|
3
|
+
def self.included(base)
|
4
|
+
base.alias_method_chain :url_for, :alternative
|
5
|
+
end
|
6
|
+
|
7
|
+
def url_for_with_alternative(options = nil)
|
8
|
+
case options
|
9
|
+
when Alternative
|
10
|
+
options.url
|
11
|
+
else
|
12
|
+
url_for_without_alternative(options)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Silverdot
|
2
|
+
class Renderer
|
3
|
+
attr_reader :lookup_context
|
4
|
+
|
5
|
+
def initialize(helper, template)
|
6
|
+
@lookup_context = helper.lookup_context
|
7
|
+
@template = template
|
8
|
+
@alternatives = {}
|
9
|
+
end
|
10
|
+
|
11
|
+
def method_missing(m, *args, &block)
|
12
|
+
if @with.include? m.to_sym
|
13
|
+
@alternatives[m.to_sym] ||= Alternative.new(m.to_sym)
|
14
|
+
else
|
15
|
+
super(m, *args, &block)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def render(options = {})
|
20
|
+
@with = options[:with]
|
21
|
+
@with = [@with] unless @with.is_a?(Enumerable)
|
22
|
+
|
23
|
+
@template.render(self, {})
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/silverdot.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'ejs'
|
2
|
+
|
3
|
+
# load Rails/Railtie
|
4
|
+
begin
|
5
|
+
require 'rails'
|
6
|
+
rescue LoadError
|
7
|
+
#do nothing
|
8
|
+
end
|
9
|
+
|
10
|
+
module Silverdot
|
11
|
+
autoload :Alternative, 'silverdot/alternative'
|
12
|
+
autoload :Renderer, 'silverdot/renderer'
|
13
|
+
autoload :ActionViewExtension, 'silverdot/helpers/action_view_extension'
|
14
|
+
autoload :UrlHelper, 'silverdot/helpers/url_helper'
|
15
|
+
autoload :LocalizeHelper, 'silverdot/helpers/localize_helper'
|
16
|
+
|
17
|
+
class << self
|
18
|
+
def ejs_options
|
19
|
+
{ interpolation_pattern: /{{([\s\S]+?)}}/ }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
require 'silverdot/hooks'
|
25
|
+
|
26
|
+
if defined? Rails
|
27
|
+
require 'silverdot/railtie'
|
28
|
+
require 'silverdot/engine'
|
29
|
+
end
|
data/silverdot.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = "silverdot"
|
3
|
+
s.version = "0.1.2"
|
4
|
+
s.platform = Gem::Platform::RUBY
|
5
|
+
s.summary = ""
|
6
|
+
s.description = "Build JST from Rails view"
|
7
|
+
s.authors = ["niaeashes"]
|
8
|
+
s.email = "nia.eashes@gmail.com"
|
9
|
+
s.files = ["lib/silverdot.rb"]
|
10
|
+
s.license = "MIT"
|
11
|
+
|
12
|
+
s.files = `git ls-files`.split("\n")
|
13
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
+
s.require_paths = ['lib']
|
15
|
+
|
16
|
+
s.add_dependency 'activesupport', ['>= 3.0.0']
|
17
|
+
s.add_dependency 'actionpack', ['>= 3.0.0']
|
18
|
+
s.add_dependency 'ejs', ['>= 1.1.1']
|
19
|
+
|
20
|
+
s.add_development_dependency "tzinfo", [">= 0"]
|
21
|
+
s.add_development_dependency "rspec", [">= 2.5.0"]
|
22
|
+
s.add_development_dependency 'rake', ['>= 0']
|
23
|
+
s.add_development_dependency "bundler", [">= 1.1.0"]
|
24
|
+
s.add_development_dependency "rspec-rails", ['>= 0']
|
25
|
+
s.add_development_dependency "guard-rspec", ['>= 0']
|
26
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'action_controller/railtie'
|
2
|
+
require 'action_view/railtie'
|
3
|
+
|
4
|
+
# config
|
5
|
+
app = Class.new(Rails::Application)
|
6
|
+
app.config.secret_token = 'Pq+sCZ/ne22jr0L6zmLxv3tXaP+XZ8N2IsqTtZbIiNQ='
|
7
|
+
app.config.session_store :cookie_store, :key => '_myapp_session'
|
8
|
+
app.config.active_support.deprecation = :log
|
9
|
+
app.config.eager_load = false
|
10
|
+
|
11
|
+
# Rails.root
|
12
|
+
app.config.root = File.dirname(__FILE__)
|
13
|
+
Rails.backtrace_cleaner.remove_silencers!
|
14
|
+
app.initialize!
|
15
|
+
|
16
|
+
# controller
|
17
|
+
class ApplicationController < ActionController::Base; end
|
18
|
+
|
19
|
+
# helper
|
20
|
+
Object.const_set(:ApplicationHelper, Module.new)
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= link_to link.name, link %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= localize locale.created_at %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<ul><li><%= object.name %></li><li><%= object.age %></li></ul>
|
@@ -0,0 +1 @@
|
|
1
|
+
<p><%= single %></p>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Silverdot::ActionViewExtension do
|
4
|
+
before :each do
|
5
|
+
helper.lookup_context.prefixes = ''
|
6
|
+
helper.lookup_context.view_paths += Dir["#{Rails.root}/views"]
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "#emboss" do
|
10
|
+
describe 'spec/fake_app/views/single.html.erb' do
|
11
|
+
subject { helper.emboss('single', with: :single) }
|
12
|
+
it { should eq("<p>{{ single }}</p>\n") }
|
13
|
+
end
|
14
|
+
|
15
|
+
describe 'spec/fake_app/views/object.html.erb' do
|
16
|
+
subject { helper.emboss('object', with: :object) }
|
17
|
+
it { should eq("<ul><li>{{ object.name }}</li><li>{{ object.age }}</li></ul>\n") }
|
18
|
+
end
|
19
|
+
|
20
|
+
describe 'spec/fake_app/views/link.html.erb' do
|
21
|
+
subject { helper.emboss('link', with: :link) }
|
22
|
+
it { should eq("<a href=\"{{ link.url }}\">{{ link.name }}</a>\n") }
|
23
|
+
end
|
24
|
+
|
25
|
+
describe 'spec/fake_app/views/locale.html.erb' do
|
26
|
+
subject { helper.emboss('locale', with: :locale) }
|
27
|
+
it { should eq("{{ locale.created_at }}\n") }
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'with jst option' do
|
31
|
+
it 'compiles by ejs' do
|
32
|
+
::EJS.should_receive(:compile).with("<p>{{ single }}</p>\n", Silverdot.ejs_options).and_return('result')
|
33
|
+
helper.emboss('single', with: :single, jst: true)
|
34
|
+
end
|
35
|
+
|
36
|
+
describe 'Render <script> tag' do
|
37
|
+
subject { helper.emboss('single', with: :single, jst: true) }
|
38
|
+
it { should =~ /\A<script>[\s\S]+<\/script>\n?\z/ }
|
39
|
+
it { should =~ /JST\['single'\] = / }
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
describe 'without ejs option' do
|
44
|
+
it 'does not compile by ejs' do
|
45
|
+
::EJS.should_not_receive(:compile)
|
46
|
+
helper.emboss('single', with: :single, ejs: false)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
data/spec/render_spec.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Render Spec" do
|
4
|
+
describe Silverdot::Alternative do
|
5
|
+
it "gets to string its instance" do
|
6
|
+
example = Silverdot::Alternative.new('test')
|
7
|
+
example.to_s.should eq('{{ test }}')
|
8
|
+
end
|
9
|
+
|
10
|
+
it "gets to string with parent alternative" do
|
11
|
+
parent = Silverdot::Alternative.new('parent')
|
12
|
+
example = parent.child
|
13
|
+
example.to_s.should eq('{{ parent.child }}')
|
14
|
+
end
|
15
|
+
|
16
|
+
it "nests deep associations" do
|
17
|
+
root = Silverdot::Alternative.new('root')
|
18
|
+
root.first.second.to_s.should eq('{{ root.first.second }}')
|
19
|
+
root.first.second.third.to_s.should eq('{{ root.first.second.third }}')
|
20
|
+
end
|
21
|
+
|
22
|
+
it "#each" do
|
23
|
+
example = Silverdot::Alternative.new('example')
|
24
|
+
example.each { |name| '' }.should eq('{{ _.each(example, function(name){ }}{{ } }}')
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
Bundler.require
|
6
|
+
|
7
|
+
require 'fake_app/rails_app'
|
8
|
+
require 'rspec/rails'
|
9
|
+
|
10
|
+
# Requires supporting files with custom matchers and macros, etc,
|
11
|
+
# in ./support/ and its subdirectories.
|
12
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
13
|
+
|
14
|
+
RSpec.configure do |config|
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: silverdot
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- niaeashes
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: actionpack
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.0.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.0.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: ejs
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.1.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.1.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: tzinfo
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.5.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.5.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: bundler
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.1.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.1.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec-rails
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: guard-rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: Build JST from Rails view
|
140
|
+
email: nia.eashes@gmail.com
|
141
|
+
executables: []
|
142
|
+
extensions: []
|
143
|
+
extra_rdoc_files: []
|
144
|
+
files:
|
145
|
+
- .gitignore
|
146
|
+
- .rspec
|
147
|
+
- Gemfile
|
148
|
+
- Guardfile
|
149
|
+
- MIT-LICENSE
|
150
|
+
- README.md
|
151
|
+
- Rakefile
|
152
|
+
- lib/silverdot.rb
|
153
|
+
- lib/silverdot/alternative.rb
|
154
|
+
- lib/silverdot/engine.rb
|
155
|
+
- lib/silverdot/helpers/action_view_extension.rb
|
156
|
+
- lib/silverdot/helpers/localize_helper.rb
|
157
|
+
- lib/silverdot/helpers/url_helper.rb
|
158
|
+
- lib/silverdot/hooks.rb
|
159
|
+
- lib/silverdot/railtie.rb
|
160
|
+
- lib/silverdot/renderer.rb
|
161
|
+
- silverdot.gemspec
|
162
|
+
- spec/fake_app/rails_app.rb
|
163
|
+
- spec/fake_app/views/_link.html.erb
|
164
|
+
- spec/fake_app/views/_locale.html.erb
|
165
|
+
- spec/fake_app/views/_object.html.erb
|
166
|
+
- spec/fake_app/views/_single.html.erb
|
167
|
+
- spec/helpers/action_view_extension_spec.rb
|
168
|
+
- spec/render_spec.rb
|
169
|
+
- spec/spec_helper.rb
|
170
|
+
homepage:
|
171
|
+
licenses:
|
172
|
+
- MIT
|
173
|
+
metadata: {}
|
174
|
+
post_install_message:
|
175
|
+
rdoc_options: []
|
176
|
+
require_paths:
|
177
|
+
- lib
|
178
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
179
|
+
requirements:
|
180
|
+
- - '>='
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: '0'
|
183
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - '>='
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
requirements: []
|
189
|
+
rubyforge_project:
|
190
|
+
rubygems_version: 2.0.3
|
191
|
+
signing_key:
|
192
|
+
specification_version: 4
|
193
|
+
summary: ''
|
194
|
+
test_files:
|
195
|
+
- spec/fake_app/rails_app.rb
|
196
|
+
- spec/fake_app/views/_link.html.erb
|
197
|
+
- spec/fake_app/views/_locale.html.erb
|
198
|
+
- spec/fake_app/views/_object.html.erb
|
199
|
+
- spec/fake_app/views/_single.html.erb
|
200
|
+
- spec/helpers/action_view_extension_spec.rb
|
201
|
+
- spec/render_spec.rb
|
202
|
+
- spec/spec_helper.rb
|