skypager 0.0.5 → 0.0.6

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: 02aa518232f9553e53c8ecdddbdb55d1118e3697
4
- data.tar.gz: 269856d146d98cf16044c83874af17ddf705b054
3
+ metadata.gz: 1255f32a2f558cf91cb1daa447d209759f6b62be
4
+ data.tar.gz: 0e16117f9435562cdb26e69f5b1fc2481b3e6635
5
5
  SHA512:
6
- metadata.gz: c8cd34b2ad8b1bf61a9637094e2bed9fe95c061efb398051783536be1b58cc76590b290791b2a52d7274e9f0f04e8891d9e7298d22624ff5ba8a109f38ef9ff3
7
- data.tar.gz: 530be140aba47770a87067f8eef4f761d607e5d7c93c9c7a78926420a5a5c66bd4078a8fc1e9431ba67f95a2c9491d29b888ac90e7f7b6123ecd1a10c8c2a94f
6
+ metadata.gz: 927b6be93828744586b80f58ca22ea43dea43b754dd9bc6296d7127b4ae703aa4555951141af205ecf8d818ffe140168f18b056d958d27e89ab97c0fb42b9951
7
+ data.tar.gz: bdc5da28ff702873819cf6edc7f5c4340212e28d10dd81ea1b07024ea54dc079b3964b742e3b13d3908b5f77d1d46c096bdd4014a6e0afe7ebcdcbcee4a7aa49
@@ -55,7 +55,7 @@ module Skypager
55
55
 
56
56
  helpers do
57
57
  def deploy!
58
- site.deploy()
58
+ site.deploy(build_path)
59
59
  end
60
60
 
61
61
  def auto_deploy?
@@ -108,6 +108,8 @@ module Skypager
108
108
  def deploy_to(provider, options={})
109
109
  self.deploy_options ||= {}
110
110
 
111
+ self.deploy_options[:auto_deploy] = !!options[:auto_deploy]
112
+
111
113
  if provider == :amazon || provider == :aws
112
114
  self.deploy_options[:domain] = options[:domain] || Skypager.config.domain
113
115
  self.deploy_options[:bucket_name] = options[:bucket_name] || "#{ site_name }.#{ deploy_options[:domain] }"
@@ -195,12 +195,13 @@ module Skypager
195
195
  payload = prepare_deploy(build_dir)
196
196
 
197
197
  if payload.empty?
198
- puts "Nothing to deploy"
198
+ puts "== Nothing to deploy"
199
199
  end
200
200
 
201
201
  payload.each do |hash|
202
202
  if target.files.create(key: hash[:key], body: File.open(hash[:node]), public: true)
203
- puts "Deployed #{ hash[:key] }"
203
+ rel = hash[:key]
204
+ puts "== Deployed #{rel}"
204
205
  build_manifest[rel] = hash[:digest]
205
206
  end
206
207
  end
@@ -14,12 +14,22 @@ module Skypager
14
14
  end
15
15
 
16
16
  def storage
17
- @storage ||= Fog::Storage.new({
17
+ return @storage if @storage
18
+
19
+ # Silence fog warnings
20
+ Fog::Logger.define_singleton_method(:warning) do |*args|
21
+ nil
22
+ end
23
+
24
+ @storage = Fog::Storage.new({
18
25
  provider: 'AWS',
19
26
  aws_access_key_id: aws_access_key_id,
20
27
  aws_secret_access_key: aws_secret_access_key,
21
28
  path_style: true
22
29
  })
30
+
31
+
32
+ @storage
23
33
  end
24
34
 
25
35
  def cdn
@@ -128,9 +128,9 @@ module Skypager
128
128
  parts = remote.to_s.split("/")
129
129
  parts.shift
130
130
  part = parts.join("/")
131
- root.join(part)
131
+ local_path.join(part)
132
132
  else
133
- sanitized = remote.with_leading_slash.gsub(/^#{remote_path.to_s}/, '').without_leading_slash
133
+ sanitized = remote.with_leading_slash.gsub(/^#{remote_path.to_s.with_leading_slash}/, '').without_leading_slash
134
134
  local_path.join sanitized
135
135
  end
136
136
  end
@@ -1,3 +1,3 @@
1
1
  module Skypager
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skypager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Soeder