frizz 1.2.2 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -52,8 +52,7 @@ end
52
52
 
53
53
  ### Basic deploys
54
54
 
55
- Deploy the contents of `build/` to your static website at "my-static-site.com",
56
- assuming your S3 bucket is named after your host as S3 static hosting requires:
55
+ Deploy the contents of `build/` to your bucket named "my-static-site.com":
57
56
 
58
57
  ```ruby
59
58
  site = Frizz::Site.new("my-static-site.com")
@@ -115,6 +114,13 @@ rake frizz:release:production # Build and deploy production: example.com
115
114
  rake frizz:release:staging # Build and deploy staging: staging.example.com
116
115
  ```
117
116
 
117
+ ##### Custom bucket names
118
+
119
+ If your buckets aren't named following the S3 static site naming conventions
120
+ (maybe you're putting a CDN in front of it and not using S3 static site
121
+ hosting), you can set a `bucket:` key along for each environment in `frizz.yml`
122
+ and it will be used to determine where to upload the build to.
123
+
118
124
  ### Settings and Variables for each of your environments
119
125
 
120
126
  Ever built a frontend app and wanted to hit a different API for dev, staging,
@@ -1,6 +1,6 @@
1
1
  module Frizz
2
2
  class Environment
3
- attr_reader :name
3
+ attr_reader :name, :bucket
4
4
 
5
5
  def initialize(name, data)
6
6
  @name = name
@@ -13,6 +13,8 @@ module Frizz
13
13
  instance_variable_get(ivar_name)
14
14
  end
15
15
  end
16
+
17
+ @bucket ||= @host
16
18
  end
17
19
 
18
20
  # This is a creative way to allow for calling frizz.production? or
@@ -32,18 +32,18 @@ module Frizz
32
32
 
33
33
  namespace :deploy do
34
34
  relevant_environments.each do |name, env|
35
- desc "Deploy build dir to #{env.name}: #{env.host}"
35
+ desc "Deploy build dir to #{env.name}: #{env.bucket}"
36
36
  task env.name do
37
- Frizz::Site.new(env.host).deploy!
37
+ Frizz::Site.new(env.bucket).deploy!
38
38
  end
39
39
  end
40
40
  end
41
41
 
42
42
  namespace :release do
43
43
  relevant_environments.each do |name, env|
44
- desc "Build and deploy #{env.name}: #{env.host}"
44
+ desc "Build and deploy #{env.name}: #{env.bucket}"
45
45
  task env.name => ["frizz:build:#{env.name}"] do
46
- Frizz::Site.new(env.host).deploy!
46
+ Frizz::Site.new(env.bucket).deploy!
47
47
  end
48
48
  end
49
49
  end
data/lib/frizz/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Frizz
2
- VERSION = "1.2.2"
2
+ VERSION = "1.3.2"
3
3
  end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: frizz
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.2.2
5
+ version: 1.3.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - patbenatar
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-02 00:00:00.000000000 Z
12
+ date: 2013-10-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  prerelease: false
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
144
  - !ruby/object:Gem::Version
145
145
  segments:
146
146
  - 0
147
- hash: 3692276564058458188
147
+ hash: -4055594557459652094
148
148
  version: '0'
149
149
  none: false
150
150
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  - !ruby/object:Gem::Version
154
154
  segments:
155
155
  - 0
156
- hash: 3692276564058458188
156
+ hash: -4055594557459652094
157
157
  version: '0'
158
158
  none: false
159
159
  requirements: []