rails-template-cache 0.1.1 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc268901f07132d99450aeb81de8122eaf154505
4
- data.tar.gz: 791cb335571992755d5f3aeb0c344b09d8c35750
3
+ metadata.gz: 069839b775db149ce4f65d9ab3b048c4b484ae11
4
+ data.tar.gz: 3262e9e5351e0f0daa2400ebbcc72ab28d41bb24
5
5
  SHA512:
6
- metadata.gz: 65419d317d7e51c7844ec856e81f185eb3643cf74d7b3afe7e2a23728516f3fb9b91ff1882ea21507876f5923c1dafe7e4247f621b32e6f910fe50b045cd609e
7
- data.tar.gz: 7a8b5a9ed68d100e2953d2000fcfd375c8bca0f4ec8a1507b73b37dd397ff6cfbcd1a87b754bdbe8fd9126d6b4be6882aa6b5992cda874a00d8c38c9a81cf5f9
6
+ metadata.gz: 62a4d47731a58d1f67957501ddbd74c7f0c2f4a3c487f4e7c256e80a1dc8a660fb663b7f69754108a8217e90413effc269f1da0292e7afd99268f1a4bdd64f62
7
+ data.tar.gz: 3626fe27b56e2fa0e92e673b061c21c2bf28f44e7219b534ac05fcbf95d113cefeecd1c46b9859a41fb8d736ca2a799c3d3bb86e4a22488d021cfb806e8a1f6e
@@ -8,6 +8,7 @@ module RailsTemplateCache
8
8
  rtc_config.compress_html = false
9
9
  rtc_config.templates_path = File.join( ['app', 'assets', 'javascripts'] )
10
10
  rtc_config.extensions = %w(erb haml html slim)
11
+ rtc_config.prepend_client_path = ''
11
12
  end
12
13
  end
13
14
 
@@ -17,7 +18,7 @@ module RailsTemplateCache
17
18
 
18
19
  Dir.glob("#{base}/**/*.#{exts}").each do |f|
19
20
  key, ext = RailsTemplateCache::Template
20
- .asset_data(f, config.rails_template_cache.templates_path)
21
+ .asset_data(f, config.rails_template_cache.templates_path, config.rails_template_cache.prepend_client_path)
21
22
 
22
23
  RailsTemplateCache.templates[key] = RailsTemplateCache::Template
23
24
  .new(f, ext, compress: config.rails_template_cache.compress_html)
@@ -16,15 +16,15 @@ module RailsTemplateCache
16
16
  @opts[:compress] ? compress_html(rendered_template) : rendered_template
17
17
  end
18
18
 
19
- def self.asset_data(path, templates_path = "")
19
+ def self.asset_data(path, templates_path = "", prepend_client_path)
20
20
  result = []
21
21
  case path.to_s
22
22
  when /#{templates_path}\/(.*)(\.html)$/
23
- result = "#{$1}#{$2}", $2
23
+ result = "#{prepend_client_path}#{$1}#{$2}", $2
24
24
  when /#{templates_path}\/(.*\.html)(\.\w+)$/
25
- result = $1, $2
25
+ result = "#{prepend_client_path}#{$1}", $2
26
26
  when /#{templates_path}\/(.*)(\.\w+)$/
27
- result = "#{$1}.html", $2
27
+ result = "#{prepend_client_path}#{$1}.html", $2
28
28
  end
29
29
  result
30
30
  end
@@ -1,3 +1,3 @@
1
1
  module RailsTemplateCache
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -1,4 +1,3 @@
1
- require "rails-template-cache/version"
2
1
  require "rails-template-cache/template"
3
2
  require "rails-template-cache/engine"
4
3
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-template-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Mendes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-11 00:00:00.000000000 Z
11
+ date: 2016-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project:
148
- rubygems_version: 2.4.5
148
+ rubygems_version: 2.4.5.1
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Adding templates to Angular's templateCache with Rails.