rateaux 1.0.0 → 1.1.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 +4 -4
- data/README.md +11 -3
- data/lib/rateaux/version.rb +1 -1
- data/lib/tasks/rateaux_copy_non_digested_assets.rake +24 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17367b57be5978e1a70637c55e4bbd280b7c4232
|
4
|
+
data.tar.gz: 1fe8ac1f77aa84a23df05bd6454f8e4c7caf5d3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dc594f6918691f6c79013b70393879d202c3392883d2e6734efa496c750e308e4c1fca06f4421a1656e4da2f858e8c7a71b7340a3a59eb86aa23b5fb8d8c8f9
|
7
|
+
data.tar.gz: 533cd06a7fcd08017f1145944e4f309a96f4fb312ee37cca3f82d7786114b9264c2a142671d9fc96b4b894677865441aa0b7d149e689e4916f4f492694eafd10
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ Then type `bundle install` in a terminal.
|
|
16
16
|
|
17
17
|
### Truncate
|
18
18
|
|
19
|
-
Truncate all data from the current SQL database.
|
19
|
+
Truncate all data from the current SQL database. This removes all the data but keeps the tables.
|
20
20
|
|
21
21
|
```sh
|
22
22
|
$ rake db:truncate
|
@@ -24,7 +24,7 @@ $ rake db:truncate
|
|
24
24
|
|
25
25
|
### Encoding headers
|
26
26
|
|
27
|
-
Add the `# encoding: UTF-8` header to all ruby files in the project.
|
27
|
+
Add the `# encoding: UTF-8` header to all ruby files in the project. Useful before Ruby 2.
|
28
28
|
|
29
29
|
```sh
|
30
30
|
$ rake encoding_headers
|
@@ -49,8 +49,16 @@ This will:
|
|
49
49
|
|
50
50
|
### Cache clear
|
51
51
|
|
52
|
-
Empty the cache store
|
52
|
+
Empty the cache store.
|
53
53
|
|
54
54
|
```sh
|
55
55
|
$ rake cache_clear
|
56
56
|
```
|
57
|
+
|
58
|
+
### Assets Copy Non Digested
|
59
|
+
|
60
|
+
Copy assets files with a digest (for example `application-d45e…565.css`) to their non-digested form (for example `application.css`).
|
61
|
+
|
62
|
+
```sh
|
63
|
+
$ rake assets:copy_non_digested
|
64
|
+
```
|
data/lib/rateaux/version.rb
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
#
|
3
|
+
# Copy all assets to their non-digested form.
|
4
|
+
#
|
5
|
+
# Via https://github.com/rails/sprockets-rails/issues/49#issuecomment-20535134
|
6
|
+
|
7
|
+
namespace :assets do
|
8
|
+
|
9
|
+
desc "Copy non digested assets"
|
10
|
+
task copy_non_digested: :environment do
|
11
|
+
assets = Dir.glob(File.join(Rails.root, 'public/assets/**/*'))
|
12
|
+
regex = /(-{1}[a-z0-9]{32}*\.{1}){1}/
|
13
|
+
assets.each do |file|
|
14
|
+
next if File.directory?(file) || file !~ regex
|
15
|
+
|
16
|
+
source = file.split('/')
|
17
|
+
source.push(source.pop.gsub(regex, '.'))
|
18
|
+
|
19
|
+
non_digested = File.join(source)
|
20
|
+
FileUtils.cp(file, non_digested)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rateaux
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sunny Ripert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -62,6 +62,7 @@ files:
|
|
62
62
|
- lib/rateaux/version.rb
|
63
63
|
- lib/rateaux.rb
|
64
64
|
- lib/tasks/rateaux_cache_clear.rake
|
65
|
+
- lib/tasks/rateaux_copy_non_digested_assets.rake
|
65
66
|
- lib/tasks/rateaux_db_truncate.rake
|
66
67
|
- lib/tasks/rateaux_encoding_headers.rake
|
67
68
|
- lib/tasks/rateaux_git_checkout.rake
|