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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ef53eec1265975cb1caf6335b7e80dd59ee5619
4
- data.tar.gz: b569177dfa0f3f8d4f7185d85f4038bebfda14ba
3
+ metadata.gz: 17367b57be5978e1a70637c55e4bbd280b7c4232
4
+ data.tar.gz: 1fe8ac1f77aa84a23df05bd6454f8e4c7caf5d3d
5
5
  SHA512:
6
- metadata.gz: d8cf78d7aea35a32663f35b420efbd4e5f0f33f26105199d3dd7a63055a185d14724b04f311608776eb5abab157001a0e855e5f7cccb6b39f4c08d3a1e9a04ba
7
- data.tar.gz: f55647c474babc985669924b3ae835e349d1a2b9e32f85d7b9669f6b7529420eb78eb29b4185a96a1c08b8023d1515d75a120c1ea89ea1ea2b9abb9d5c8ba6f0
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
+ ```
@@ -1,3 +1,3 @@
1
1
  module Rateaux
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -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.0.0
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: 2013-12-18 00:00:00.000000000 Z
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