js_assets 0.0.3 → 0.0.5

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: 237eaf5e9692bb47d8c034053b37d0157fe91598
4
- data.tar.gz: 37103bc00378399fa92e7feefbbcf256df0a523b
3
+ metadata.gz: 9e65fa590254131ac6454d57a16f9d5b63ee7820
4
+ data.tar.gz: 10f4c3a93943c742e4865a68bdc10ef2adfe44f8
5
5
  SHA512:
6
- metadata.gz: d35409b898d09e36c1898ee5214a8770509d96cb9061f09aab57a7785048b43fff5dc9a05c1a4ed3bcaff1a108780e9e00e9469dbb8a64279c2428cb0eb78653
7
- data.tar.gz: 070b623a1982ae03f36983748d2b720a46d610b56fe5ccd4e4be84d8c09178b072d715b994ce4aef8cfd147c80d34a746046e1f0b8d756d01724d20fe4f9f210
6
+ metadata.gz: 51fa58b5dc888ecc3890acdb97336b511de841fff548f3f2db893aa6d000129d5d28b1c0374720325f135e3e168d3b4fc89bd820ff8a48cf81bbdafe377eb906
7
+ data.tar.gz: 696e48629414f45dac04be585f93e9f9f519f45a5d93ea9652eefff9e7f8b57d591bdeb5423e8775263a3b9f335d5cc9cb6c3ee0a8f0e2566cd7a1d539a0ea86
data/README.md CHANGED
@@ -42,7 +42,7 @@ JsAssets::List.exclude << '*.png'
42
42
  ```
43
43
  Initially, the list is taken asset falling within the filter `app/config/environments/production.rb`
44
44
  ```ruby
45
- config.assets.precompile += ['*.html']
45
+ config.assets.precompile += ['*.html']
46
46
  ```
47
47
  By default:
48
48
  ```ruby
@@ -12,7 +12,11 @@ module JsAssets
12
12
  if logical_path = ::Rails.application.assets.send(:logical_path_for_filename, filename, assets_filters)
13
13
  next if matches_filter(@exclude, logical_path, filename)
14
14
  next unless matches_filter(@allow, logical_path, filename)
15
- project_assets[logical_path] = ::ApplicationController.helpers.asset_path(logical_path)
15
+ if ::Rails.env == 'development'
16
+ project_assets[logical_path] = ::ApplicationController.helpers.asset_path(logical_path)
17
+ elsif ::Rails.env == 'production'
18
+ project_assets[logical_path] = '/assets/' + ::Rails.application.assets[logical_path].digest_path
19
+ end
16
20
  end
17
21
  end
18
22
  return project_assets
@@ -1,3 +1,3 @@
1
1
  module JsAssets
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: js_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zaur Abasmirzoev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-24 00:00:00.000000000 Z
11
+ date: 2013-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -78,9 +78,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  version: '0'
79
79
  requirements: []
80
80
  rubyforge_project:
81
- rubygems_version: 2.0.7
81
+ rubygems_version: 2.1.8
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: Javascript helper
85
85
  test_files: []
86
- has_rdoc: