Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
github
hub
提交
8c315698
H
hub
项目概览
github
/
hub
9 个月 前同步成功
通知
3
Star
22523
Fork
2406
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hub
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8c315698
编写于
12月 24, 2014
作者:
M
Mislav Marohnić
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'travis-container' into 1.12-stable
上级
43d566a0
aedf82f3
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
14 addition
and
132 deletion
+14
-132
.travis.yml
.travis.yml
+7
-10
Gemfile
Gemfile
+1
-2
Gemfile.lock
Gemfile.lock
+0
-3
script/bootstrap
script/bootstrap
+6
-0
script/cached-bundle
script/cached-bundle
+0
-46
script/s3-put
script/s3-put
+0
-71
未找到文件。
.travis.yml
浏览文件 @
8c315698
sudo
:
false
language
:
ruby
before_install
:
-
sudo apt-get update -qq
-
sudo apt-get install -qq tmux zsh git
install
:
script/cached-bundle install --deployment --without development --jobs 3 --retry
3
-
script/bootstrap
-
export PATH=~/bin:"$PATH"
script
:
script/test
language
:
ruby
bundler_args
:
--without development --deployment --jobs=3 --retry=3
cache
:
bundler
rvm
:
-
1.8.7
-
1.9.2
-
1.9.3
-
2.0.0
-
2.1.
0
-
2.1.
5
notifications
:
email
:
false
env
:
global
:
-
AMAZON_S3_BUCKET=ci-cache
-
AMAZON_ACCESS_KEY_ID=AKIAJQCVTDEWQHRPBPGQ
-
secure
:
"
XAZv5xyNjWt7F9hG0MZhDANVJ5h/ajEZvfJOEIZRQlE3X5x6oVgI8blLh/MmlRSF0kIyLckcn6t2ccjSOvwN2hca5bwZSjIqoKbJyNe2cmkxfi2432vEOu3Ve6PT5hZWX4R5RgT+xWyMjIJcdF3gUMP7ErXl64aEncBzeW6OoXM="
Gemfile
浏览文件 @
8c315698
...
...
@@ -5,11 +5,10 @@ gem 'minitest'
gem
'
aruba
'
,
'~> 0.5.3'
gem
'
cucumber
'
,
'~> 1.3.9'
gem
'
sinatra
'
gem
'
json
'
gem
'
json
'
,
:platform
=>
:ruby_18
gem
'
jruby-openssl
'
,
:platform
=>
:jruby
gem
'
webmock
'
,
'~> 1.9.0'
group
:development
do
gem
'
ronn
'
,
:platform
=>
:mri
gem
'
ruby-prof
'
end
Gemfile.lock
浏览文件 @
8c315698
...
...
@@ -28,7 +28,6 @@ GEM
jruby-openssl (0.7.7)
bouncy-castle-java (>= 1.5.0146.1)
json (1.8.0)
json (1.8.0-java)
minitest (5.0.5)
multi_json (1.10.1)
multi_test (0.1.1)
...
...
@@ -46,7 +45,6 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.0.0)
rspec-support (3.0.2)
ruby-prof (0.13.1)
sinatra (1.3.2)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
...
...
@@ -68,6 +66,5 @@ DEPENDENCIES
minitest
rake (~> 10.1.1)
ronn
ruby-prof
sinatra
webmock (~> 1.9.0)
script/bootstrap
0 → 100755
浏览文件 @
8c315698
#!/usr/bin/env bash
set
-e
if
[
-n
"
$TRAVIS
"
]
;
then
curl
-fsSL
https://ci-cache.s3.amazonaws.com/tmux-zsh.ubuntu.tgz |
tar
-xz
-C
~
fi
script/cached-bundle
已删除
100755 → 0
浏览文件 @
43d566a0
#!/usr/bin/env bash
# Usage: cached-bundle install --deployment
#
# After running `bundle`, caches the `vendor/bundle` directory to S3.
# On the next run, restores the cached directory before running `bundle`.
# When `Gemfile.lock` changes, the cache gets rebuilt.
#
# Requirements:
# - Gemfile.lock
# - TRAVIS_REPO_SLUG
# - TRAVIS_RUBY_VERSION
# - AMAZON_S3_BUCKET
# - script/s3-put
# - bundle
# - curl
#
# Author: Mislav Marohnić
set
-e
compute_md5
()
{
local
output
=
"
$(
openssl md5
)
"
echo
"
${
output
##*
}
"
}
download
()
{
curl
--tcp-nodelay
-qsfL
"
$1
"
-o
"
$2
"
}
bundle_path
=
"vendor/bundle"
gemfile_hash
=
"
$(
compute_md5 <
"
${
BUNDLE_GEMFILE
:-
Gemfile
}
.lock"
)
"
cache_name
=
"
${
TRAVIS_RUBY_VERSION
}
-
${
gemfile_hash
}
.tgz"
fetch_url
=
"http://
${
AMAZON_S3_BUCKET
}
.s3.amazonaws.com/
${
TRAVIS_REPO_SLUG
}
/
${
cache_name
}
"
if
download
"
$fetch_url
"
"
$cache_name
"
;
then
echo
"Reusing cached bundle
${
cache_name
}
"
tar
xzf
"
$cache_name
"
fi
bundle
"
$@
"
if
[
!
-f
"
$cache_name
"
]
&&
[
-n
"
$AMAZON_SECRET_ACCESS_KEY
"
]
;
then
echo
"Caching
\`
${
bundle_path
}
' to S3"
tar
czf
"
$cache_name
"
"
$bundle_path
"
script/s3-put
"
$cache_name
"
"
${
AMAZON_S3_BUCKET
}
:
${
TRAVIS_REPO_SLUG
}
/
${
cache_name
}
"
fi
script/s3-put
已删除
100755 → 0
浏览文件 @
43d566a0
#!/usr/bin/env bash
# Usage: s3-put <FILE> <S3_BUCKET>[:<PATH>] [<CONTENT_TYPE>]
#
# Uploads a file to the Amazon S3 service.
# Outputs the URL for the newly uploaded file.
#
# Requirements:
# - AMAZON_ACCESS_KEY_ID
# - AMAZON_SECRET_ACCESS_KEY
# - openssl
# - curl
#
# Author: Mislav Marohnić
set
-e
authorization
()
{
local
signature
=
"
$(
string_to_sign | hmac_sha1 |
base64
)
"
echo
"AWS
${
AMAZON_ACCESS_KEY_ID
?
}
:
${
signature
}
"
}
hmac_sha1
()
{
openssl dgst
-binary
-sha1
-hmac
"
${
AMAZON_SECRET_ACCESS_KEY
?
}
"
}
base64
()
{
openssl enc
-base64
}
bin_md5
()
{
openssl dgst
-binary
-md5
}
string_to_sign
()
{
echo
"
$http_method
"
echo
"
$content_md5
"
echo
"
$content_type
"
echo
"
$date
"
echo
"x-amz-acl:
$acl
"
printf
"/
$bucket
/
$remote_path
"
}
date_string
()
{
LC_TIME
=
C
date
"+%a, %d %h %Y %T %z"
}
file
=
"
$1
"
bucket
=
"
${
2
%%
:
*
}
"
remote_path
=
"
${
2
#*
:
}
"
content_type
=
"
$3
"
if
[
-z
"
$remote_path
"
]
||
[
"
$remote_path
"
=
"
$bucket
"
]
;
then
remote_path
=
"
${
file
##*/
}
"
fi
http_method
=
PUT
acl
=
"public-read"
content_md5
=
"
$(
bin_md5 <
"
$file
"
|
base64
)
"
date
=
"
$(
date_string
)
"
url
=
"https://
$bucket
.s3.amazonaws.com/
$remote_path
"
curl
-qsSf
-T
"
$file
"
\
-H
"Authorization:
$(
authorization
)
"
\
-H
"x-amz-acl:
$acl
"
\
-H
"Date:
$date
"
\
-H
"Content-MD5:
$content_md5
"
\
-H
"Content-Type:
$content_type
"
\
"
$url
"
echo
"
$url
"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录