cloud_crooner 0.0.3 → 0.0.4
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 +3 -0
- data/README.md +16 -4
- data/cloud_crooner.gemspec +1 -1
- data/lib/cloud_crooner/version.rb +1 -1
- data/spec/cloud_crooner_spec.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bfc2bd64853b8882225c1eee53f60db46ba204f
|
4
|
+
data.tar.gz: 48911144f0e9b22e4151f68faa751958c11e1bef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71598ab117b33123982bbbc3716f272af829aec6ec992504855cfcd44769c19e12483ebceed603261ef2b851b843c0fae4744cf057c2b148d63203b129a454cd
|
7
|
+
data.tar.gz: 74b5d266070262eb66919df7eb2b80dbe2fef29939b636aed71fd5ecc07af9f50452cd3467e047b914b47d8af611073bbf0d747c1df324fc4239935cec25fbe3
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -26,9 +26,13 @@ Cloud Crooner has many configuration options which can be set in a configure blo
|
|
26
26
|
config.prefix = '/assets'
|
27
27
|
end
|
28
28
|
|
29
|
-
`
|
29
|
+
`serve_assets` - where and how to serve assets. You have three options:
|
30
30
|
|
31
|
-
`
|
31
|
+
* `local_dynamic` - default in test & dev environments. Serves assets locally with Sprockets, dynamically generating them.
|
32
|
+
* `local_static` - serves compiled assets from `public_folder`. _Be aware that attempting to test this on your machine using rackup or thin will not work_. Rack does not serve files from `\public`. If you want to see static assets in action without messing with Rack internals, you must run [shotgun](https://github.com/rtomayko/shotgun) or something like it.
|
33
|
+
* `remote` - default in prod - serves compiled assets from S3
|
34
|
+
|
35
|
+
`public_folder` - the public folder of your application. By default set to `/public`. If you are using a different public folder, you must set it in this config block as well as in your application.
|
32
36
|
|
33
37
|
`prefix` - the path from root where you keep your assets. By default it is `/assets`. Your compiled assets will be placed in `public_folder/prefix.` It will also be the pseudo-folder on S3 where your assets will be stored, so the paths will look something like `http://bucket-name.s3.amazonaws.com/prefix/filename`.
|
34
38
|
|
@@ -134,9 +138,9 @@ Now on the command line, run `rake assets:sync` and the following will happen:
|
|
134
138
|
3. manifest will be updated
|
135
139
|
4. old backups locally and remotely will be deleted
|
136
140
|
|
137
|
-
Running your app in development mode will serve uncompiled assets locally (from `/assets`), and running your app in production mode will serve your compiled assets from S3. If you have `
|
141
|
+
Running your app in development mode will serve uncompiled assets locally (from `/assets`), and running your app in production mode will serve your compiled assets from S3. If you have `serve_assets` set to `local_static` your compiled assets will be served from `public/assets`.
|
138
142
|
|
139
|
-
If you want to precompile and upload your assets every time you spin up your app, you can put the configure block directly into config.ru and after config run CloudCrooner.sync
|
143
|
+
If you want to precompile and upload your assets every time you spin up your app, you can put the configure block directly into config.ru and after config run `CloudCrooner.sync`.
|
140
144
|
|
141
145
|
|
142
146
|
## Helpers
|
@@ -144,17 +148,25 @@ If you want to precompile and upload your assets every time you spin up your app
|
|
144
148
|
Helper methods are provided for use in your views using the [sprockets-helpers](https://github.com/petebrowne/sprockets-helpers) gem.
|
145
149
|
|
146
150
|
`stylesheet_tag` - put this in your views to insert an html tag referencing a stylesheet in the Sprockets load path. For example, if you have `/assets/stylesheets/application.scss` and have placed `assets/stylesheets` in the load path, you would write:
|
151
|
+
|
147
152
|
<%= stylesheet_tag 'application' %>
|
153
|
+
|
148
154
|
and in dev it will compile to
|
155
|
+
|
149
156
|
<link rel="stylesheet" href="/assets/application.css">
|
157
|
+
|
150
158
|
in prod it will compile to
|
159
|
+
|
151
160
|
<link rel="stylesheet" href="http://my-bucket.s3.amazonaws.com/assets/application.css">
|
152
161
|
|
153
162
|
`javascript_tag` - similar to `stylesheet_tag`
|
154
163
|
|
155
164
|
`asset_tag` - similar to stylesheet, but you pass a block to generate a tag of your choosing.
|
165
|
+
|
156
166
|
asset_tag('main.js') { |path| "<script src=#{path}></script>" }
|
167
|
+
|
157
168
|
will generate
|
169
|
+
|
158
170
|
<script src=/main.js></script>
|
159
171
|
|
160
172
|
`asset_path` - returns the path to an asset, no tag.
|
data/cloud_crooner.gemspec
CHANGED
data/spec/cloud_crooner_spec.rb
CHANGED
@@ -356,7 +356,7 @@ describe CloudCrooner do
|
|
356
356
|
end # construct
|
357
357
|
end # it
|
358
358
|
|
359
|
-
it 'compiles and does not sync assets if
|
359
|
+
it 'compiles and does not sync assets if serving local files' do
|
360
360
|
within_construct do |c|
|
361
361
|
mock_environment(c)
|
362
362
|
CloudCrooner.configure do |config|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloud_crooner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bambery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1.
|
103
|
+
version: '1.2'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '1.
|
110
|
+
version: '1.2'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: sprockets-helpers
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|