cid 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/.travis.yml +13 -0
- data/Gemfile +3 -0
- data/Rakefile +16 -0
- data/bin/cid +18 -0
- data/cid.gemspec +11 -0
- data/features/publish.feature +29 -0
- data/features/step_definitions/cid.rb +7 -0
- data/features/support/env.rb +28 -0
- data/features/validate.feature +30 -0
- data/lib/cid/datapackage.rb +57 -0
- data/lib/cid/helpers/github.rb +91 -0
- data/lib/cid/publish.rb +28 -0
- data/lib/cid/validation.rb +1 -1
- data/lib/cid/version.rb +1 -1
- data/lib/cid.rb +11 -0
- data/spec/cassettes/Cid_Publish/should_be_able_to_create_a_new_blob.yml +81 -0
- data/spec/cassettes/Cid_Publish/should_be_able_to_create_a_new_commit_from_a_tree.yml +244 -0
- data/spec/cassettes/Cid_Publish/should_be_able_to_create_a_tree_with_the_new_blob_in_it_given_a_filename.yml +240 -0
- data/spec/cassettes/Cid_Publish/should_be_able_to_fetch_the_default_branch_for_a_repo.yml +83 -0
- data/spec/cassettes/Cid_Publish/should_be_able_to_get_a_blob_sha_for_a_file_on_a_branch.yml +82 -0
- data/spec/cassettes/Cid_Publish/should_be_able_to_get_latest_commit_SHA_on_a_branch.yml +83 -0
- data/spec/cassettes/Cid_Publish/should_push_to_the_default_branch.yml +583 -0
- data/spec/datapackage_spec.rb +27 -0
- data/spec/fixtures/multiple_files/datapackage.json +71 -0
- data/spec/fixtures/no_schema/votes/votes-1.csv +13 -0
- data/spec/fixtures/valid/datapackage.json +71 -0
- data/spec/publish_spec.rb +45 -0
- data/spec/spec_helper.rb +10 -0
- data/spec/validate_spec.rb +9 -0
- metadata +209 -35
@@ -0,0 +1,82 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.github.com/repos/theodi/cid-test/git/trees/master?access_token=<GITHUB_OAUTH_TOKEN>
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
|
12
|
+
Accept-Charset:
|
13
|
+
- utf-8
|
14
|
+
User-Agent:
|
15
|
+
- Github Ruby Gem 0.11.3
|
16
|
+
Authorization:
|
17
|
+
- Token token="<GITHUB_OAUTH_TOKEN>"
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- GitHub.com
|
27
|
+
Date:
|
28
|
+
- Thu, 22 May 2014 14:10:41 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Status:
|
34
|
+
- 200 OK
|
35
|
+
X-Ratelimit-Limit:
|
36
|
+
- '5000'
|
37
|
+
X-Ratelimit-Remaining:
|
38
|
+
- '4983'
|
39
|
+
X-Ratelimit-Reset:
|
40
|
+
- '1400771341'
|
41
|
+
Cache-Control:
|
42
|
+
- private, max-age=60, s-maxage=60
|
43
|
+
Last-Modified:
|
44
|
+
- Thu, 22 May 2014 14:09:56 GMT
|
45
|
+
Etag:
|
46
|
+
- '"47f7c7c0132d67ee74b4feb0e63dedba"'
|
47
|
+
X-Oauth-Scopes:
|
48
|
+
- gist, repo, user
|
49
|
+
X-Accepted-Oauth-Scopes:
|
50
|
+
- ''
|
51
|
+
Vary:
|
52
|
+
- Accept, Authorization, Cookie, X-GitHub-OTP
|
53
|
+
- Accept-Encoding
|
54
|
+
X-Github-Media-Type:
|
55
|
+
- github.v3; format=json
|
56
|
+
X-Xss-Protection:
|
57
|
+
- 1; mode=block
|
58
|
+
X-Frame-Options:
|
59
|
+
- deny
|
60
|
+
Content-Security-Policy:
|
61
|
+
- default-src 'none'
|
62
|
+
Access-Control-Allow-Credentials:
|
63
|
+
- 'true'
|
64
|
+
Access-Control-Expose-Headers:
|
65
|
+
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
|
66
|
+
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
67
|
+
Access-Control-Allow-Origin:
|
68
|
+
- '*'
|
69
|
+
X-Github-Request-Id:
|
70
|
+
- 4F4C59B3:3039:36E64DD:537E0560
|
71
|
+
Strict-Transport-Security:
|
72
|
+
- max-age=31536000
|
73
|
+
X-Content-Type-Options:
|
74
|
+
- nosniff
|
75
|
+
X-Served-By:
|
76
|
+
- d818ddef80f4c7d10683dd483558952a
|
77
|
+
body:
|
78
|
+
encoding: UTF-8
|
79
|
+
string: '{"sha":"master","url":"https://api.github.com/repos/theodi/cid-test/git/trees/master","tree":[{"mode":"100644","type":"blob","sha":"c22d8945fac6a4ce4be188002dcd09656bd85898","path":"datapackage.json","size":2473,"url":"https://api.github.com/repos/theodi/cid-test/git/blobs/c22d8945fac6a4ce4be188002dcd09656bd85898"},{"mode":"040000","type":"tree","sha":"d649696e0f04601419e691387e8c8cb8a218521e","path":"votes","url":"https://api.github.com/repos/theodi/cid-test/git/trees/d649696e0f04601419e691387e8c8cb8a218521e"}]}'
|
80
|
+
http_version:
|
81
|
+
recorded_at: Thu, 22 May 2014 14:10:46 GMT
|
82
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,83 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.github.com/repos/theodi/cid-test/branches/master?access_token=<GITHUB_OAUTH_TOKEN>
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
|
12
|
+
Accept-Charset:
|
13
|
+
- utf-8
|
14
|
+
User-Agent:
|
15
|
+
- Github Ruby Gem 0.11.3
|
16
|
+
Authorization:
|
17
|
+
- Token token="<GITHUB_OAUTH_TOKEN>"
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- GitHub.com
|
27
|
+
Date:
|
28
|
+
- Thu, 22 May 2014 14:09:58 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Status:
|
34
|
+
- 200 OK
|
35
|
+
X-Ratelimit-Limit:
|
36
|
+
- '5000'
|
37
|
+
X-Ratelimit-Remaining:
|
38
|
+
- '4990'
|
39
|
+
X-Ratelimit-Reset:
|
40
|
+
- '1400771341'
|
41
|
+
Cache-Control:
|
42
|
+
- private, max-age=60, s-maxage=60
|
43
|
+
Etag:
|
44
|
+
- '"415926a4f7e38db12005354bd3cf4b39"'
|
45
|
+
X-Oauth-Scopes:
|
46
|
+
- gist, repo, user
|
47
|
+
X-Accepted-Oauth-Scopes:
|
48
|
+
- ''
|
49
|
+
Vary:
|
50
|
+
- Accept, Authorization, Cookie, X-GitHub-OTP
|
51
|
+
- Accept-Encoding
|
52
|
+
X-Github-Media-Type:
|
53
|
+
- github.v3; format=json
|
54
|
+
X-Xss-Protection:
|
55
|
+
- 1; mode=block
|
56
|
+
X-Frame-Options:
|
57
|
+
- deny
|
58
|
+
Content-Security-Policy:
|
59
|
+
- default-src 'none'
|
60
|
+
Access-Control-Allow-Credentials:
|
61
|
+
- 'true'
|
62
|
+
Access-Control-Expose-Headers:
|
63
|
+
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
|
64
|
+
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
65
|
+
Access-Control-Allow-Origin:
|
66
|
+
- '*'
|
67
|
+
X-Github-Request-Id:
|
68
|
+
- 4F4C59B3:303A:419E2B7:537E0536
|
69
|
+
Strict-Transport-Security:
|
70
|
+
- max-age=31536000
|
71
|
+
X-Content-Type-Options:
|
72
|
+
- nosniff
|
73
|
+
X-Served-By:
|
74
|
+
- 62a1303ae95931e56e387e87d354bb24
|
75
|
+
body:
|
76
|
+
encoding: UTF-8
|
77
|
+
string: '{"name":"master","commit":{"sha":"357b6cbb632a533bf20657975b6100a0b837b15c","commit":{"author":{"name":"ODI
|
78
|
+
Robot","email":"odi-jenkins@users.noreply.github.com","date":"2014-05-22T14:09:55Z"},"committer":{"name":"ODI
|
79
|
+
Robot","email":"odi-jenkins@users.noreply.github.com","date":"2014-05-22T14:09:55Z"},"message":"Updated
|
80
|
+
datapackage.json","tree":{"sha":"f93721ec813957d3df629ddc68b3e3c1397d02de","url":"https://api.github.com/repos/theodi/cid-test/git/trees/f93721ec813957d3df629ddc68b3e3c1397d02de"},"url":"https://api.github.com/repos/theodi/cid-test/git/commits/357b6cbb632a533bf20657975b6100a0b837b15c","comment_count":0},"url":"https://api.github.com/repos/theodi/cid-test/commits/357b6cbb632a533bf20657975b6100a0b837b15c","html_url":"https://github.com/theodi/cid-test/commit/357b6cbb632a533bf20657975b6100a0b837b15c","comments_url":"https://api.github.com/repos/theodi/cid-test/commits/357b6cbb632a533bf20657975b6100a0b837b15c/comments","author":{"login":"odi-robot","id":3439860,"avatar_url":"https://avatars.githubusercontent.com/u/3439860?","gravatar_id":"b96a794974d7bd76d161ebe533f2a9d0","url":"https://api.github.com/users/odi-robot","html_url":"https://github.com/odi-robot","followers_url":"https://api.github.com/users/odi-robot/followers","following_url":"https://api.github.com/users/odi-robot/following{/other_user}","gists_url":"https://api.github.com/users/odi-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/odi-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odi-robot/subscriptions","organizations_url":"https://api.github.com/users/odi-robot/orgs","repos_url":"https://api.github.com/users/odi-robot/repos","events_url":"https://api.github.com/users/odi-robot/events{/privacy}","received_events_url":"https://api.github.com/users/odi-robot/received_events","type":"User","site_admin":false},"committer":{"login":"odi-robot","id":3439860,"avatar_url":"https://avatars.githubusercontent.com/u/3439860?","gravatar_id":"b96a794974d7bd76d161ebe533f2a9d0","url":"https://api.github.com/users/odi-robot","html_url":"https://github.com/odi-robot","followers_url":"https://api.github.com/users/odi-robot/followers","following_url":"https://api.github.com/users/odi-robot/following{/other_user}","gists_url":"https://api.github.com/users/odi-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/odi-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odi-robot/subscriptions","organizations_url":"https://api.github.com/users/odi-robot/orgs","repos_url":"https://api.github.com/users/odi-robot/repos","events_url":"https://api.github.com/users/odi-robot/events{/privacy}","received_events_url":"https://api.github.com/users/odi-robot/received_events","type":"User","site_admin":false},"parents":[{"sha":"e55df79f1a47c2175e0857ffeff1e2f84ad76071","url":"https://api.github.com/repos/theodi/cid-test/commits/e55df79f1a47c2175e0857ffeff1e2f84ad76071","html_url":"https://github.com/theodi/cid-test/commit/e55df79f1a47c2175e0857ffeff1e2f84ad76071"}]},"_links":{"self":"https://api.github.com/repos/theodi/cid-test/branches/master","html":"https://github.com/theodi/cid-test/tree/master"}}'
|
81
|
+
http_version:
|
82
|
+
recorded_at: Thu, 22 May 2014 14:10:03 GMT
|
83
|
+
recorded_with: VCR 2.4.0
|