tension 0.9 → 0.9.1
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 +4 -4
- data/README.md +12 -12
- data/lib/tension/tension_helper.rb +2 -2
- data/tension.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9cf71e35efaa0ea2e7eb78d0052a2df8b45b632
|
4
|
+
data.tar.gz: b24c477ef7dc0caee9c6822876b94d9dfcf131ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bd97a878212cc03faa6ea81a407f8dbb1b454070680e23f881b734bb5450fadf5a78008e1b6da00211d2621cd4d8004fbac8f890b9d23a33e844bc05196e096
|
7
|
+
data.tar.gz: 0fbcadf94b6608f3ea34b189995224c3fe24a29158a6f1b178cb3d611214b761154f2b83a7f642c93dd712f9b6f6455f23d86f3bd399f46f3cfa048520decf2b
|
data/README.md
CHANGED
@@ -11,21 +11,21 @@ _Tension_ helps you out. It takes Rails's existing controller/view file structur
|
|
11
11
|
and applies it to JavaScript and CSS assets as well. Let's take a sample Rails app:
|
12
12
|
|
13
13
|
app
|
14
|
-
|
14
|
+
assets
|
15
15
|
+ controllers
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
| account
|
17
|
+
| api
|
18
|
+
\ + blog
|
19
|
+
| posts_controller.rb
|
20
|
+
models
|
21
21
|
+ views
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
| account
|
23
|
+
| api
|
24
|
+
\ + blog
|
25
|
+
\ + posts
|
26
|
+
| index.html.erb
|
27
27
|
+ layouts
|
28
|
-
|
28
|
+
| blog.html.erb
|
29
29
|
|
30
30
|
The standard structure Rails enforces is __module__ → __controller__ →
|
31
31
|
__action__. For the PostsController, the __action__ logic is tucked away alongside
|
@@ -6,7 +6,7 @@ module Tension
|
|
6
6
|
extend ActiveSupport::Concern
|
7
7
|
|
8
8
|
# Just call
|
9
|
-
def asset_for type,
|
9
|
+
def asset_for type, *args
|
10
10
|
asset = Tension::Environment.asset_map
|
11
11
|
.fetch( request.params[:controller] )
|
12
12
|
.fetch( request.params[:action] )
|
@@ -19,7 +19,7 @@ module Tension
|
|
19
19
|
:stylesheet_link_tag
|
20
20
|
end
|
21
21
|
|
22
|
-
send( include_method, asset.logical_path )
|
22
|
+
send( include_method, asset.logical_path, *args )
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
data/tension.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piers Mainwaring
|
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
58
|
version: '0'
|
59
59
|
requirements: []
|
60
60
|
rubyforge_project:
|
61
|
-
rubygems_version: 2.0.
|
61
|
+
rubygems_version: 2.0.0
|
62
62
|
signing_key:
|
63
63
|
specification_version: 4
|
64
64
|
summary: Tighten up Rails's asset pipeline for CSS & JS.
|