torba 0.5.0 → 0.5.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/CHANGELOG.md +6 -0
- data/README.md +9 -7
- data/lib/torba/import_list.rb +1 -1
- data/test/import_list_test.rb +12 -4
- data/torba.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: 23e2abb7390731963e44e6ebdcb5bedd5d27e57f
|
4
|
+
data.tar.gz: 9a9489f4884a201b605276a00020608dd3a64818
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72a08348248dd5590983fc017f4c6852fd47d566a17f15e23602f1cb86548ad518392bf62fe860e3229d388ec52a55c3bff3f0139ce4c81f92492361b659057b
|
7
|
+
data.tar.gz: 3349f620649fad89b2767ad4ff1be60e443459b212d2cf7b236122897f85de603db9b0e5d73a5a7366a50443cb04e936cd511e2ff8a1aae5cb9f940d38a139a2
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -17,7 +17,7 @@ Production ready.
|
|
17
17
|
|
18
18
|
## Documentation
|
19
19
|
|
20
|
-
[Released version](http://rubydoc.info/gems/torba/0.5.
|
20
|
+
[Released version](http://rubydoc.info/gems/torba/0.5.1)
|
21
21
|
|
22
22
|
## Why
|
23
23
|
|
@@ -91,6 +91,10 @@ and/or "@import" [Sass directives][sass-import] to "application.css".
|
|
91
91
|
|
92
92
|
If any changes made to the Torbafile, run `bundle exec torba pack` again.
|
93
93
|
|
94
|
+
### Examples
|
95
|
+
|
96
|
+
See fully configured [Rails application][rails-example].
|
97
|
+
|
94
98
|
### Torbafile
|
95
99
|
|
96
100
|
Torbafile is an assets specification. It is a plain text file that contains one or more
|
@@ -281,13 +285,10 @@ Specify the `TORBA_HOME_PATH` env variable pointing to a persistent directory
|
|
281
285
|
writable by your deploy user and shared across releases. Capistrano's `shared`
|
282
286
|
directory is good for this.
|
283
287
|
|
284
|
-
For
|
285
|
-
|
286
|
-
|
287
|
-
export TORBA_HOME_PATH=/var/www/my_app/shared/torba
|
288
|
+
For Capistrano 3, you can set this up in `config/deploy.rb`:
|
289
|
+
```
|
290
|
+
set :default_env, { torba_home_path: shared_path.join('vendor/torba') }
|
288
291
|
```
|
289
|
-
|
290
|
-
There is no need to add a symlink.
|
291
292
|
|
292
293
|
### Troubleshooting
|
293
294
|
|
@@ -311,3 +312,4 @@ TORBA_DONT_VERIFY=1 bin/rake assets:precompile
|
|
311
312
|
[semver]: http://semver.org/
|
312
313
|
[rails-ticket-vendoring]: https://github.com/rails/rails/pull/7968
|
313
314
|
[npm]: https://npmjs.com
|
315
|
+
[rails-example]: https://github.com/torba-rb/rails-example
|
data/lib/torba/import_list.rb
CHANGED
data/test/import_list_test.rb
CHANGED
@@ -26,19 +26,27 @@ module Torba
|
|
26
26
|
ImportList::Asset.new("/dir/stylesheet.css", "stylesheet.css")
|
27
27
|
end
|
28
28
|
|
29
|
+
def scss_asset
|
30
|
+
ImportList::Asset.new("/dir/stylesheet.scss", "stylesheet.scss")
|
31
|
+
end
|
32
|
+
|
33
|
+
def sass_asset
|
34
|
+
ImportList::Asset.new("/dir/stylesheet.sass", "stylesheet.sass")
|
35
|
+
end
|
36
|
+
|
29
37
|
def test_css_assets
|
30
|
-
list = ImportList.new([js_asset, css_asset])
|
31
|
-
assert [css_asset], list.css_assets
|
38
|
+
list = ImportList.new([js_asset, css_asset, scss_asset, sass_asset])
|
39
|
+
assert [css_asset, scss_asset, sass_asset], list.css_assets
|
32
40
|
end
|
33
41
|
|
34
42
|
def test_non_css_assets
|
35
|
-
list = ImportList.new([js_asset, css_asset])
|
43
|
+
list = ImportList.new([js_asset, css_asset, scss_asset, sass_asset])
|
36
44
|
assert [js_asset], list.non_css_assets
|
37
45
|
end
|
38
46
|
|
39
47
|
def test_non_js_css_assets
|
40
48
|
img_asset = ImportList::Asset.new("/dir/image.png", "image.png")
|
41
|
-
list = ImportList.new([js_asset, css_asset, img_asset])
|
49
|
+
list = ImportList.new([js_asset, css_asset, scss_asset, sass_asset, img_asset])
|
42
50
|
assert [img_asset], list.non_js_css_assets
|
43
51
|
end
|
44
52
|
end
|
data/torba.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: torba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrii Malyshko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|