File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 1
- require "bundler/gem_tasks"
2
- require "net/http"
3
-
4
- PEM_PATH = File . expand_path ( File . join ( __FILE__ , "../lib/certifi/vendor/cacert.pem" ) )
5
- MKCERT_URL = "https://mkcert.org/generate/"
1
+ lib = File . expand_path ( '../lib' , __FILE__ )
2
+ $LOAD_PATH . unshift ( lib ) unless $LOAD_PATH . include? ( lib )
3
+ require 'certifi'
4
+ require 'bundler/gem_tasks'
5
+ require 'net/http'
6
6
7
7
begin
8
8
require 'rspec/core/rake_task'
@@ -17,8 +17,16 @@ rescue LoadError => e
17
17
# rspec won't exist on production
18
18
end
19
19
20
- task :update do
21
- File . open ( PEM_PATH , "w" ) do |f |
22
- f . write ( Net ::HTTP . get ( URI . parse ( MKCERT_URL ) ) )
20
+ task :update => [ :update_pem , :update_version ]
21
+
22
+ task :update_pem do
23
+ File . open ( Certifi . where , 'w' ) do |f |
24
+ f . write ( Net ::HTTP . get ( URI . parse ( 'https://mkcert.org/generate/' ) ) )
25
+ end
26
+ end
27
+
28
+ task :update_version do
29
+ File . open ( Certifi ::VERSION_PATH , 'w' ) do |f |
30
+ f . write ( Time . now . strftime ( '%Y-%m-%d' ) )
23
31
end
24
32
end
Original file line number Diff line number Diff line change
1
+ 2018-08-23
Original file line number Diff line number Diff line change 1
1
module Certifi
2
- VERSION = "2018.01.18"
2
+ VERSION_PATH = File . expand_path ( File . join ( File . dirname ( __FILE__ ) , "VERSION" ) )
3
+ VERSION = File . read ( VERSION_PATH )
3
4
end
You can’t perform that action at this time.
0 commit comments