dpl 1.9.1.travis.2660.5 → 1.9.1.travis.2666.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -31
- data/Rakefile +103 -7
- data/lib/dpl/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8997fbbf6eb43dcb503cf4a1bf17e09f100a932ece178c0b5b060a09ba142b2d
|
4
|
+
data.tar.gz: 21d597381e3b2ba19c5c58905e6abecb28a96f60d16ca587dccb6e2e9fbd2cc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f0634b3006d58f72dd5ffe9da623f5a7c279efda96f2d535ff33dee527deae92eb6e48de24ce17aa35e50cd8199fb146dc803f8caccf85510f95714b72fa987
|
7
|
+
data.tar.gz: fc0822828ec9e4cc9bbb22e9f7fbf3856610fabda0d57fe42b147f91233b7e916a4079bbb017489ac98f381b8c71556e18b8dcc6b449ea86611a98c2a05e291b
|
data/.travis.yml
CHANGED
@@ -38,6 +38,7 @@ sudo: false
|
|
38
38
|
|
39
39
|
before_cache:
|
40
40
|
- rm -rf $GEM_HOME/cache/dpl-*.travis.*.gem $GEM_HOME/gems/dpl-*.travis.* $GEM_HOME/specifications/dpl-*.travis.*
|
41
|
+
- git checkout bin/dpl
|
41
42
|
|
42
43
|
cache:
|
43
44
|
directories:
|
@@ -48,38 +49,11 @@ cache:
|
|
48
49
|
before_install:
|
49
50
|
- gem update bundler
|
50
51
|
|
51
|
-
|
52
|
-
-
|
53
|
-
- gem build dpl.gemspec && gem install dpl-*.gem
|
54
|
-
- echo -e "\n${ANSI_GREEN}Run specs${ANSI_RESET}"
|
55
|
-
- |
|
56
|
-
spec_errors=0
|
57
|
-
for f in dpl-*.gemspec; do
|
58
|
-
base=${f%*.gemspec}; name=${base#dpl-*}
|
59
|
-
echo -e "\n${ANSI_GREEN}${base}${ANSI_RESET}\n"
|
60
|
-
echo -e "source 'https://rubygems.org'\ngemspec :name => \"dpl-${name}\"" > Gemfile-${name}
|
61
|
-
export BUNDLE_GEMFILE=Gemfile-${name}
|
62
|
-
bundle install --gemfile Gemfile-${name} --path=vendor/cache/dpl-${name} --binstubs=bin && ./bin/rspec spec/provider/${name}_spec.rb
|
63
|
-
if [[ $? -ne 0 ]]; then
|
64
|
-
echo -e "${ANSI_RED}${name} specs failed${ANSI_RESET}" && let spec_errors=$spec_errors+1
|
65
|
-
fi
|
66
|
-
done
|
67
|
-
test $spec_errors -eq 0
|
68
|
-
- echo -e "\n${ANSI_GREEN}Install gem and invoke dpl${ANSI_RESET}"
|
69
|
-
- |
|
70
|
-
no_err=0
|
71
|
-
export BUNDLE_GEMFILE=Gemfile
|
72
|
-
for f in dpl-*.gemspec; do
|
73
|
-
base=${f%*.gemspec}; name=${base#dpl-*}
|
74
|
-
echo -e "\n${ANSI_GREEN}${base}${ANSI_RESET}\n"
|
75
|
-
gem build --silent $f && gem install --no-post-install-message dpl-${name}-*.gem && ( dpl --provider=${name} --no-deploy )
|
76
|
-
if [[ $? -ne 0 ]]; then
|
77
|
-
echo -e "${ANSI_RED}${name} invocation failed${ANSI_RESET}" && let no_err=$no_err+1
|
78
|
-
fi
|
79
|
-
done
|
80
|
-
test $no_err -eq 0
|
81
|
-
# - bundle exec rake && gem build dpl.gemspec && gem install dpl-*.gem && dpl --provider=script --script='echo foo'
|
52
|
+
before_script:
|
53
|
+
- rm -f $(ruby -r rubygems -e "puts Gem.bindir")/dpl
|
82
54
|
|
55
|
+
script:
|
56
|
+
- rake
|
83
57
|
|
84
58
|
notifications:
|
85
59
|
webhooks: "http://requestb.in/1guaq7t1"
|
data/Rakefile
CHANGED
@@ -1,12 +1,108 @@
|
|
1
1
|
require 'bundler'
|
2
|
+
require 'term/ansicolor'
|
3
|
+
require 'pathname'
|
4
|
+
require 'logger'
|
5
|
+
require './lib/dpl/version'
|
2
6
|
|
3
|
-
|
7
|
+
include Term::ANSIColor
|
4
8
|
|
5
|
-
|
6
|
-
|
7
|
-
|
9
|
+
def logger
|
10
|
+
@logger ||= Logger.new($stdout)
|
11
|
+
end
|
8
12
|
|
9
|
-
|
13
|
+
def top
|
14
|
+
@top ||= Pathname.new File.expand_path(File.dirname(__FILE__))
|
15
|
+
end
|
16
|
+
|
17
|
+
def gem_version
|
18
|
+
ENV['DPL_VERSION'] || DPL::VERSION
|
19
|
+
end
|
20
|
+
|
21
|
+
gemspecs = FileList[File.join(top, "dpl-*.gemspec")]
|
22
|
+
|
23
|
+
providers = gemspecs.map { |f| /dpl-(?<provider>.*)\.gemspec/ =~ f && provider }
|
24
|
+
|
25
|
+
dpl_bin = File.join(Gem.bindir, "dpl")
|
26
|
+
|
27
|
+
task :default => [:spec, :install] do
|
28
|
+
Rake::Task["spec_providers"].invoke
|
29
|
+
Rake::Task["check_providers"].invoke
|
30
|
+
end
|
31
|
+
|
32
|
+
task :spec_providers do
|
33
|
+
providers.each do |provider|
|
34
|
+
Rake::Task["spec-#{provider}"].invoke
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
task :check_providers do
|
39
|
+
providers.each do |provider|
|
40
|
+
Rake::Task["check-#{provider}"].invoke
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
task :deep_clean do
|
45
|
+
Rake::Task[:clean].invoke
|
46
|
+
sh "git clean -dfx"
|
47
|
+
end
|
48
|
+
|
49
|
+
task :clean do
|
50
|
+
rm_rf "stubs"
|
51
|
+
rm_rf "vendor"
|
52
|
+
end
|
53
|
+
|
54
|
+
desc "Run dpl specs"
|
55
|
+
task :spec do
|
56
|
+
ruby '-S rspec spec/cli_spec.rb spec/provider_spec.rb'
|
57
|
+
end
|
58
|
+
|
59
|
+
desc "Build dpl gem"
|
60
|
+
file "dpl-#{gem_version}.gem" do
|
61
|
+
logger.info green("Building dpl gem")
|
62
|
+
ruby "-S gem build dpl.gemspec"
|
63
|
+
end
|
64
|
+
|
65
|
+
desc "Install dpl gem"
|
66
|
+
task :install => "dpl-#{gem_version}.gem" do
|
67
|
+
Rake::FileTask[dpl_bin].invoke
|
68
|
+
end
|
69
|
+
|
70
|
+
file dpl_bin do
|
71
|
+
logger.info green("Installing dpl gem")
|
72
|
+
ruby "-S gem install dpl-#{gem_version}.gem"
|
73
|
+
end
|
74
|
+
|
75
|
+
providers.each do |provider|
|
76
|
+
desc "Write Gemfile-#{provider}"
|
77
|
+
file "Gemfile-#{provider}" do |t|
|
78
|
+
gemfile = top + t.name
|
79
|
+
logger.info green("Writing #{gemfile}")
|
80
|
+
gemfile.write %Q(source 'https://rubygems.org'\ngemspec :name => "dpl-#{provider}"\n)
|
81
|
+
end
|
82
|
+
|
83
|
+
desc %Q(Run dpl-#{provider} specs)
|
84
|
+
task "spec-#{provider}" => [:install, "Gemfile-#{provider}"] do |t|
|
85
|
+
logger.info green("Running `bundle install` for #{provider}")
|
86
|
+
# rm_rf 'stubs'
|
87
|
+
# rm_rf '.bundle'
|
88
|
+
sh 'bash', '-cl', "bundle install --gemfile=Gemfile-#{provider} --path=vendor/cache/dpl-#{provider} --retry=3 --binstubs=stubs"
|
89
|
+
logger.info green("Running specs for #{provider}")
|
90
|
+
sh "env BUNDLE_GEMFILE=Gemfile-#{provider} ./stubs/rspec spec/provider/#{provider}_spec.rb"
|
91
|
+
end
|
92
|
+
|
93
|
+
desc "Build dpl-#{provider} gem"
|
94
|
+
file "dpl-#{provider}-#{gem_version}.gem" do
|
95
|
+
logger.info green("Building dpl-#{provider} gem")
|
96
|
+
ruby "-S gem build --silent dpl-#{provider}.gemspec"
|
97
|
+
end
|
98
|
+
|
99
|
+
desc "Test dpl-#{provider} gem"
|
100
|
+
task "check-#{provider}" => [:install, "dpl-#{provider}-#{gem_version}.gem"] do
|
101
|
+
logger.info green("Installing dpl-#{provider} gem")
|
102
|
+
sh "gem install --no-post-install-message dpl-#{provider}-#{gem_version}.gem"
|
103
|
+
logger.info green("Testing dpl-#{provider} loads correctly")
|
104
|
+
ruby "-S dpl --provider=#{provider} --skip-cleanup=true --no-deploy"
|
105
|
+
end
|
106
|
+
|
107
|
+
end
|
10
108
|
|
11
|
-
`bundle exec rspec spec/provider/#{provider}_spec.rb`
|
12
|
-
end
|
data/lib/dpl/version.rb
CHANGED