datadog-sdk-testing 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tasks/ci/common.rb +8 -0
- data/lib/tasks/sdk.rake +13 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cf9017d51fc0316c48b723cba91e63e71bf4fe0
|
4
|
+
data.tar.gz: 15c6919d3984c52d84b66d0c3617dfb3d5d87f61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d61a36709b687ffefc33c5499c192a9338adef9294ced09662ffe89a793693c54f19d594611897a089822f1bafe25558abdf1a51b85c000eb7baa751fd9a6678
|
7
|
+
data.tar.gz: 8a1af63b9ab48149762fbf41153945e779fffecb35c48e536926bd0eccecc74f78d4ba52424c549eda4c46b2ab1cd3eccef80059fe016639b05fcbc1eea7182a
|
data/lib/tasks/ci/common.rb
CHANGED
@@ -12,6 +12,14 @@ def check_env
|
|
12
12
|
abort 'SDK_HOME env variable must be defined in your Rakefile to used this gem.' unless ENV['SDK_HOME']
|
13
13
|
end
|
14
14
|
|
15
|
+
def sed(source, a, b, mods)
|
16
|
+
if RUBY_PLATFORM.include? 'darwin'
|
17
|
+
sh "sed -i '' \"s/#{a}/#{b}/#{mods}\" #{source}"
|
18
|
+
else
|
19
|
+
sh "sed -i \"s/#{a}/#{b}/#{mods}\" #{source}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
15
23
|
def sleep_for(secs)
|
16
24
|
puts "Sleeping for #{secs}s".blue
|
17
25
|
sleep(secs)
|
data/lib/tasks/sdk.rake
CHANGED
@@ -7,7 +7,10 @@ require 'bundler'
|
|
7
7
|
|
8
8
|
# Flavored Travis CI jobs
|
9
9
|
require 'ci/default'
|
10
|
-
|
10
|
+
|
11
|
+
Dir.glob("#{ENV['SDK_HOME']}/*/ci/").each do |f|
|
12
|
+
Rake.add_rakelib f
|
13
|
+
end
|
11
14
|
|
12
15
|
CLOBBER.include '**/*.pyc'
|
13
16
|
|
@@ -91,21 +94,21 @@ namespace :generate do
|
|
91
94
|
puts "generating skeleton files for #{args[:option]}"
|
92
95
|
gem_home = Bundler.rubygems.find_name('datadog-sdk-testing').first.full_gem_path
|
93
96
|
capitalized = args[:option].capitalize
|
94
|
-
sh "mkdir -p #{ENV['SDK_HOME']}/ci"
|
95
|
-
sh "
|
96
|
-
sh "cp #{gem_home}/lib/config/ci/skeleton.rake #{ENV['SDK_HOME']}/ci/#{args[:option]}.rake"
|
97
|
+
sh "mkdir -p #{ENV['SDK_HOME']}/#{args[:option]}/ci"
|
98
|
+
sh "cp #{gem_home}/lib/config/ci/skeleton.rake #{ENV['SDK_HOME']}/#{args[:option]}/ci/#{args[:option]}.rake"
|
97
99
|
sh "cp #{gem_home}/lib/config/manifest.json #{ENV['SDK_HOME']}/#{args[:option]}/manifest.json"
|
98
100
|
sh "cp #{gem_home}/lib/config/check.py #{ENV['SDK_HOME']}/#{args[:option]}/check.py"
|
99
101
|
sh "cp #{gem_home}/lib/config/test_skeleton.py #{ENV['SDK_HOME']}/#{args[:option]}/test_#{args[:option]}.py"
|
100
102
|
sh "cp #{gem_home}/lib/config/metadata.csv #{ENV['SDK_HOME']}/#{args[:option]}/metadata.csv"
|
101
103
|
sh "cp #{gem_home}/lib/config/requirements.txt #{ENV['SDK_HOME']}/#{args[:option]}/requirements.txt"
|
102
104
|
sh "cp #{gem_home}/lib/config/README.md #{ENV['SDK_HOME']}/#{args[:option]}/README.md"
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
105
|
+
Dir.glob("#{ENV['SDK_HOME']}/#{args[:option]}/**/*") do |f|
|
106
|
+
if File.file?(f)
|
107
|
+
sed(f, 'skeleton', "#{args[:option]}", 'g')
|
108
|
+
sed(f, 'Skeleton', "#{capitalized}", 'g')
|
109
|
+
end
|
110
|
+
end
|
111
|
+
sh "git add #{ENV['SDK_HOME']}/#{args[:option]}/"
|
109
112
|
|
110
113
|
new_file = "#{ENV['SDK_HOME']}/circle.yml.new"
|
111
114
|
File.open(new_file, 'w') do |fo|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datadog-sdk-testing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jaime Fullaondo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Datadog Integration SDK testing/scaffolding gem
|
14
14
|
email: jaime.fullaondo@datadoghq.com
|