faucet_pipeline_rails 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97fec74f079066619428bd49d015d7dc04e57e25
4
- data.tar.gz: 646f3f335aad7fa900059c818801e31877e68874
3
+ metadata.gz: fa546fe3ef7bf6aac77523e1cc0303a5be5f42b8
4
+ data.tar.gz: aceb6e978667b31b021f0192bf268dbde9a04b60
5
5
  SHA512:
6
- metadata.gz: 7e3b46db5330ea021dfded2c0803232ce05ff4bb6c34dcd6ec156fc79a347aa68e98481ee6ad217ab306507b5da2ef2ee1e04606610f80286d1f4f18ffdbaa9f
7
- data.tar.gz: c0494053c41fc8d4d4799ed93f37eb78f446d857f4c8a37e909db3c18c656f4a9fdab6f17161d9f59e84a6b5e117df5fba4681fed67ddec3a354c0b5a1e49ad0
6
+ metadata.gz: 7850f94b90e1de832d9a110df0da6c2ffcd442b85e9f36b7add465c5b89521606a126b2b52a2f03de5a13bceee7a5d6bb5ed916353ca924d14ee32f5c3509c2a
7
+ data.tar.gz: f78c317c2a1325e7fc802d03c1a2c8f71a99389488f76a12db2fee0d7ae5b6ef3a26a4e0b33ddb18458a8119b3954f81167e0f0a611a556c3a89818261c96984
data/README.md CHANGED
@@ -4,6 +4,9 @@ Instead of using the built-in asset pipeline of Rails, use
4
4
  [`faucet-pipeline`](https://github.com/faucet-pipeline/faucet-pipeline). This
5
5
  gem enables the required integration with Rails.
6
6
 
7
+ [You can find an example app
8
+ here](https://github.com/faucet-pipeline/faucet_pipeline_rails_example).
9
+
7
10
  Why is an integration like that required? `faucet-pipeline` modifies the names
8
11
  of the generated files depending on their content (by adding a hash of the file
9
12
  to the name), Rails will not be able to find the files on its own. You still
@@ -15,11 +18,12 @@ So let's say you have a JavaScript file called `application.js` (for example in
15
18
  `app/assets/javascripts`) and `faucet-pipeline` generates a file called
16
19
  `application-03118e77692b637cfc0f55bb27fef087.js` (for example in
17
20
  `public/assets/javascripts`) from that file. When you use `stylesheet_link_tag
18
- 'application'`, you expect that the resulting HTML points to the file
19
- containing the hash in its filename. To do that, `faucet-pipeline` generates a
20
- manifest files for each type of asset. In this case, it needs to generate a
21
- file called `javascript.json` in `public/assets/manifests` (to change this, see
22
- the Configuration section). The file should look like this:
21
+ 'public/assets/javascripts/application.js'`, you expect that the resulting HTML
22
+ points to the file containing the hash in its filename. To do that,
23
+ `faucet-pipeline` generates a manifest files for each type of asset. In this
24
+ case, it needs to generate a file called `javascript.json` in
25
+ `public/assets/manifests` (to change this, see the Configuration section). The
26
+ file should look like this:
23
27
 
24
28
  ```json
25
29
  {
@@ -115,6 +119,13 @@ module.exports = {
115
119
  };
116
120
  ```
117
121
 
122
+ In this case, your `application.html.erb` would contain lines like these:
123
+
124
+ ```erb
125
+ <%= stylesheet_link_tag 'public/assets/stylesheets/application.css', media: 'all', 'data-turbolinks-track': 'reload' %>
126
+ <%= javascript_include_tag 'public/assets/javascripts/application.js', 'data-turbolinks-track': 'reload' %>
127
+ ```
128
+
118
129
  You can change the path to the manifest fiels that with the following
119
130
  configuration:
120
131
 
@@ -8,7 +8,7 @@ module FaucetPipelineRails
8
8
  def fetch(asset_name)
9
9
  parsed_manifest.fetch(asset_name)
10
10
  rescue KeyError
11
- raise "The asset '#{asset_name}' of type '#{@type}' was not in the manifest"
11
+ raise "The asset '#{asset_name}' was not in the manifest"
12
12
  end
13
13
 
14
14
  private
@@ -1,3 +1,3 @@
1
1
  module FaucetPipelineRails
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faucet_pipeline_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Dohmen