prima-twig 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/twig-deploy +12 -0
  3. data/lib/prima_twig.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad41d69b98a6560c5e3e5288bfc3b0c7edc92c81
4
- data.tar.gz: eea4cb8ef3d2ee9bf8034717cf9d322c85405273
3
+ metadata.gz: b89b1ce8a16d763607388d27b14cc83b0a0a0965
4
+ data.tar.gz: f93347e8e3927ce906897524af3740404547604a
5
5
  SHA512:
6
- metadata.gz: 30260ed903372cb6da35bf5984b7b07161e4cbe730394d733f32ad9b8aa178cffd9a374cda06e79ae6a23a91263d682661a98733555386d60caf65d68125de9a
7
- data.tar.gz: 7aac94de96a4f7c3ade69768f66b614e3c11544f7429cd70978750ec9bc60ba38240f389189fab326c7c9416b20e416af7ae3009579c2f93daedf588a2bddab6
6
+ metadata.gz: cc0b137cb1f9c72fa64a089096362f5dd8dd74ef0d3e89efe5e87bd64d5b583d3a7996f27fa9e4f748c30597cc7fd66a513603b20a93bb8342612cc445b849bd
7
+ data.tar.gz: 69c15deb72962c1cbb3671966181af05c3889b6548ee2f8d4cfc7da8acf4e7b4407313e7408ae38ede675f8317fec5b6602dfb168031c9c23ae3202e96f40896
@@ -9,6 +9,8 @@ require 'redcarpet'
9
9
  require 'mail'
10
10
  require 'erb'
11
11
  require 'base64'
12
+ require 'rubyflare'
13
+ require 'pp'
12
14
 
13
15
  def help_content
14
16
  <<-HELP
@@ -88,6 +90,11 @@ class Review
88
90
 
89
91
  do_deploy! artifact_rev
90
92
 
93
+ output "Cancello la cache CDN".yellow
94
+ clear_cdn_cache
95
+ output "Cache cancellata con successo, la modifica sara' operativa entro 30 secondi\n\n".green
96
+
97
+
91
98
  output "Avvio paparatzinger per gli screenshot".yellow
92
99
  job_name = launch_paparatzinger(artifact[:commit_msg])
93
100
 
@@ -280,4 +287,9 @@ def get_paparatzinger_job_name(job_name)
280
287
  job_name.gsub /[^0-9a-z]/i, '-'
281
288
  end
282
289
 
290
+ def clear_cdn_cache
291
+ connection = Rubyflare.connect_with(@prima.config['cloudflare_email'], @prima.config['cloudflare_apikey'])
292
+ res = connection.delete("zones/1fb634f19c43dfb0162cc4cb91915da2/purge_cache", {"purge_everything":true})
293
+ end
294
+
283
295
  Review.new.execute! args
@@ -12,7 +12,7 @@ class Prima
12
12
  LABEL_HOTFIX='hotfix'
13
13
  LABEL_NEXT_RELEASE='next release'
14
14
  LABEL_IN_STAGING='in staging'
15
- CONFIG_KEYS=['github', 'mandrill']
15
+ CONFIG_KEYS=['github', 'mandrill', 'cloudflare_email', 'cloudflare_apikey']
16
16
  attr_reader :gh, :twig, :config, :rugged, :aws
17
17
 
18
18
  def initialize
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prima-twig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Giachino
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-10-05 00:00:00.000000000 Z
14
+ date: 2016-10-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: twig