diff --git a/.env b/.env index a3e3314..e20a026 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -TOKEN=asdf-token +TOKEN=d121d128bf0b9d185cbad163fa410d958a30d37d diff --git a/Gemfile.lock b/Gemfile.lock index 66e9509..7f413c7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,16 +1,15 @@ PATH remote: . specs: - circleci (0.0.7) - hashie (~> 2.1.0, >= 2.1.0) - rest-client (~> 1.6.7, >= 1.6.7) + circleci (0.0.9) + rest-client (~> 1.7.2, >= 1.7.2) GEM remote: https://rubygems.org/ specs: addressable (2.3.6) coderay (1.1.0) - coveralls (0.7.0) + coveralls (0.7.1) multi_json (~> 1.3) rest-client simplecov (>= 0.7) @@ -19,24 +18,25 @@ GEM crack (0.4.2) safe_yaml (~> 1.0.0) diff-lcs (1.2.5) - docile (1.1.3) - dotenv (0.10.0) - ethon (0.7.0) + docile (1.1.5) + dotenv (1.0.2) + ethon (0.7.1) ffi (>= 1.3.0) - ffi (1.9.3) + ffi (1.9.6) gemcutter (0.7.1) - hashie (2.1.0) method_source (0.8.2) - mime-types (2.2) - multi_json (1.9.2) - pry (0.9.12.6) - coderay (~> 1.0) - method_source (~> 0.8) + mime-types (2.4.3) + multi_json (1.10.1) + netrc (0.8.0) + pry (0.10.1) + coderay (~> 1.1.0) + method_source (~> 0.8.1) slop (~> 3.4) - rake (10.1.0) - redcarpet (3.1.1) - rest-client (1.6.7) - mime-types (>= 1.16) + rake (10.3.2) + redcarpet (3.2.0) + rest-client (1.7.2) + mime-types (>= 1.16, < 3.0) + netrc (~> 0.7) rspec (2.14.1) rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) @@ -46,38 +46,38 @@ GEM diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.14.6) safe_yaml (1.0.2) - simplecov (0.8.2) + simplecov (0.9.1) docile (~> 1.1.0) - multi_json + multi_json (~> 1.0) simplecov-html (~> 0.8.0) simplecov-html (0.8.0) - slop (3.5.0) + slop (3.6.0) term-ansicolor (1.3.0) tins (~> 1.0) thor (0.19.1) - tins (1.3.0) - typhoeus (0.6.8) - ethon (>= 0.7.0) - vcr (2.9.0) + tins (1.3.3) + typhoeus (0.6.9) + ethon (>= 0.7.1) + vcr (2.9.3) webmock (1.17.4) addressable (>= 2.2.7) crack (>= 0.3.2) - yard (0.8.7.4) + yard (0.8.7.6) PLATFORMS ruby DEPENDENCIES circleci! - coveralls (~> 0.7.0, >= 0.7.0) - dotenv (~> 0.10.0, >= 0.10.0) + coveralls (~> 0.7.1, >= 0.7.1) + dotenv (~> 1.0.2, >= 1.0.2) gemcutter (~> 0.7.1, >= 0.7.1) - pry (~> 0.9.12, >= 0.9.12.6) - rake (~> 10.1.0, >= 10.1.0) - redcarpet (~> 3.1.0, >= 3.1.0) + pry (~> 0.10.1, >= 0.10.1) + rake (~> 10.3.2, >= 10.3.2) + redcarpet (~> 3.2.0, >= 3.2.0) rspec (~> 2.14.1, >= 2.14.1) - simplecov (~> 0.8.2, >= 0.8.2) - typhoeus (~> 0.6.8, >= 0.6.8) - vcr (~> 2.9.0, >= 2.9.0) + simplecov (~> 0.9.1, >= 0.9.1) + typhoeus (~> 0.6.9, >= 0.6.9) + vcr (~> 2.9.3, >= 2.9.3) webmock (~> 1.17.4, >= 1.17.4) - yard (~> 0.8.7, >= 0.8.7.4) + yard (~> 0.8.7, >= 0.8.7.6) diff --git a/README.md b/README.md index 74e9265..63baf7b 100644 --- a/README.md +++ b/README.md @@ -604,6 +604,10 @@ Tests are ran using Rspec and VCR for API interaction recording. Run using `rake` or `rspec`. Please add tests for any new features or endpoints added if you are contributing. +Tests are using a live CircleCi API token for this repository. Any tests +should be using this key, which is in the `.env` file. You should not have +to do anything outside of writing the tests against this repository. + ## License Written by Chavez diff --git a/circleci.gemspec b/circleci.gemspec index 6c60b25..a89d72a 100644 --- a/circleci.gemspec +++ b/circleci.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'circleci' - s.version = '0.0.7' - s.date = '2014-06-08' + s.version = '0.0.9' + s.date = '2014-11-04' s.summary = 'Circle CI API Wrapper' s.description = 'Wraps Circle CI API calls in a gem.' s.licenses = ['MIT'] @@ -14,20 +14,19 @@ Gem::Specification.new do |s| s.extra_rdoc_files = ['README.md'] # Gem Dependencies - s.add_dependency 'hashie', '~> 2.1.0', '>= 2.1.0' - s.add_dependency 'rest-client', '~> 1.6.7', '>= 1.6.7' + s.add_dependency 'rest-client', '~> 1.7.2', '>= 1.7.2' # Dev Dependencies - s.add_development_dependency 'coveralls', '~> 0.7.0', '>= 0.7.0' - s.add_development_dependency 'dotenv', '~> 0.10.0', '>= 0.10.0' + s.add_development_dependency 'coveralls', '~> 0.7.1', '>= 0.7.1' + s.add_development_dependency 'dotenv', '~> 1.0.2', '>= 1.0.2' s.add_development_dependency 'gemcutter', '~> 0.7.1', '>= 0.7.1' - s.add_development_dependency 'pry', '~> 0.9.12', '>= 0.9.12.6' - s.add_development_dependency 'rake', '~> 10.1.0', '>= 10.1.0' - s.add_development_dependency 'redcarpet', '~> 3.1.0', '>= 3.1.0' + s.add_development_dependency 'pry', '~> 0.10.1', '>= 0.10.1' + s.add_development_dependency 'rake', '~> 10.3.2', '>= 10.3.2' + s.add_development_dependency 'redcarpet', '~> 3.2.0', '>= 3.2.0' s.add_development_dependency 'rspec', '~> 2.14.1', '>= 2.14.1' - s.add_development_dependency 'simplecov', '~> 0.8.2', '>= 0.8.2' - s.add_development_dependency 'typhoeus', '~> 0.6.8', '>= 0.6.8' - s.add_development_dependency 'vcr', '~> 2.9.0', '>= 2.9.0' + s.add_development_dependency 'simplecov', '~> 0.9.1', '>= 0.9.1' + s.add_development_dependency 'typhoeus', '~> 0.6.9', '>= 0.6.9' + s.add_development_dependency 'vcr', '~> 2.9.3', '>= 2.9.3' s.add_development_dependency 'webmock', '~> 1.17.4', '>= 1.17.4' - s.add_development_dependency 'yard', '~> 0.8.7', '>= 0.8.7.4' + s.add_development_dependency 'yard', '~> 0.8.7', '>= 0.8.7.6' end diff --git a/spec/cassettes/build/artifacts/success.yml b/spec/cassettes/build/artifacts/success.yml index d04ae0c..ea68512 100644 --- a/spec/cassettes/build/artifacts/success.yml +++ b/spec/cassettes/build/artifacts/success.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://circleci.com/api/v1/project/janstenpickle/logback-flume/2/artifacts?circle-token=asdf-token + uri: https://circleci.com/api/v1/project/janstenpickle/logback-flume/2/artifacts?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: '' diff --git a/spec/cassettes/build/get/success.yml b/spec/cassettes/build/get/success.yml index 987d3de..573e143 100644 --- a/spec/cassettes/build/get/success.yml +++ b/spec/cassettes/build/get/success.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://circleci.com/api/v1/project/mtchavez/rb-array-sorting/1?circle-token=asdf-token + uri: https://circleci.com/api/v1/project/mtchavez/rb-array-sorting/1?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: '' diff --git a/spec/cassettes/build/retry/success.yml b/spec/cassettes/build/retry/success.yml index 6841489..c9944ca 100644 --- a/spec/cassettes/build/retry/success.yml +++ b/spec/cassettes/build/retry/success.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://circleci.com/api/v1/project/mtchavez/rb-array-sorting/1/retry?circle-token=asdf-token + uri: https://circleci.com/api/v1/project/mtchavez/rb-array-sorting/1/retry?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: accept=application%2Fjson&content-type=application%2Fjson diff --git a/spec/cassettes/organization.yml b/spec/cassettes/organization.yml index c9e37d0..1c6653a 100644 --- a/spec/cassettes/organization.yml +++ b/spec/cassettes/organization.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://circleci.com/api/v1/organization/orga-name?circle-token=asdf-token + uri: https://circleci.com/api/v1/organization/orga-name?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: '' diff --git a/spec/cassettes/project/all/success.yml b/spec/cassettes/project/all/success.yml index 6361595..f2ebae1 100644 --- a/spec/cassettes/project/all/success.yml +++ b/spec/cassettes/project/all/success.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://circleci.com/api/v1/projects?circle-token=asdf-token + uri: https://circleci.com/api/v1/projects?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: '' diff --git a/spec/cassettes/project/build/success.yml b/spec/cassettes/project/build/success.yml index b0dc558..4072b36 100644 --- a/spec/cassettes/project/build/success.yml +++ b/spec/cassettes/project/build/success.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://circleci.com/api/v1/project/Shopify/google_auth?circle-token=asdf-token + uri: https://circleci.com/api/v1/project/Shopify/google_auth?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: accept=application%2Fjson&content-type=application%2Fjson @@ -113,6 +113,6 @@ http_interactions: "feature_flags" : { }, "author_name" : "Francois Chagnon" } - http_version: + http_version: recorded_at: Thu, 05 Jun 2014 17:22:52 GMT recorded_with: VCR 2.9.0 diff --git a/spec/cassettes/project/build_branch/success.yml b/spec/cassettes/project/build_branch/success.yml index ae114e4..85795ee 100644 --- a/spec/cassettes/project/build_branch/success.yml +++ b/spec/cassettes/project/build_branch/success.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://circleci.com/api/v1/project/ad2games/soapy_cake/tree/master?circle-token=asdf-token + uri: https://circleci.com/api/v1/project/ad2games/soapy_cake/tree/master?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: accept=application%2Fjson&content-type=application%2Fjson @@ -128,6 +128,6 @@ http_interactions: "canceled" : false, "author_email" : "hwartig@gmail.com" } - http_version: + http_version: recorded_at: Tue, 29 Jul 2014 14:05:36 GMT recorded_with: VCR 2.9.0 diff --git a/spec/cassettes/project/clear_cache/success.yml b/spec/cassettes/project/clear_cache/success.yml index 0422aeb..1b9e949 100644 --- a/spec/cassettes/project/clear_cache/success.yml +++ b/spec/cassettes/project/clear_cache/success.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: delete - uri: https://circleci.com/api/v1/project/mtchavez/rb-array-sorting/build-cache?circle-token=asdf-token + uri: https://circleci.com/api/v1/project/mtchavez/rb-array-sorting/build-cache?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: '' diff --git a/spec/cassettes/project/enable/success.yml b/spec/cassettes/project/enable/success.yml index 2b8a397..c487197 100644 --- a/spec/cassettes/project/enable/success.yml +++ b/spec/cassettes/project/enable/success.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://circleci.com/api/v1/project/Shopify/google_auth/enable?circle-token=asdf-token + uri: https://circleci.com/api/v1/project/Shopify/google_auth/enable?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: accept=application%2Fjson&content-type=application%2Fjson @@ -59,6 +59,6 @@ http_interactions: yOyjRZHhRWb2XT707Pvlq3ISr+r6304fNuMMzBz4YEYm9wIuOdlCHKLYoJVk N86cYeo+PxZFdYepVj72Bou1FXGl4hYEMT5maLgabF69DeYsfy9NyeLwD8Ci XsxZBwAA - http_version: + http_version: recorded_at: Thu, 05 Jun 2014 17:25:59 GMT recorded_with: VCR 2.9.0 diff --git a/spec/cassettes/project/follow/success.yml b/spec/cassettes/project/follow/success.yml index ff31731..8e6c09b 100644 --- a/spec/cassettes/project/follow/success.yml +++ b/spec/cassettes/project/follow/success.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://circleci.com/api/v1/project/Shopify/google_auth/follow?circle-token=asdf-token + uri: https://circleci.com/api/v1/project/Shopify/google_auth/follow?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: accept=application%2Fjson&content-type=application%2Fjson @@ -47,6 +47,6 @@ http_interactions: "followed" : true, "first_build" : null } - http_version: + http_version: recorded_at: Thu, 05 Jun 2014 17:21:23 GMT recorded_with: VCR 2.9.0 diff --git a/spec/cassettes/project/recent_builds/encoding.json b/spec/cassettes/project/recent_builds/encoding.json index 6087c42..c696bc1 100644 --- a/spec/cassettes/project/recent_builds/encoding.json +++ b/spec/cassettes/project/recent_builds/encoding.json @@ -17,7 +17,7 @@ } }, "request": { - "uri": "https://circleci.com/api/v1/project/mtchavez/encoding?circle-token=asdf-token", + "uri": "https://circleci.com/api/v1/project/mtchavez/encoding?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d", "body": { "encoding": "UTF-8", "string": "" diff --git a/spec/cassettes/project/recent_builds/success.yml b/spec/cassettes/project/recent_builds/success.yml index 6e8e592..1c55d13 100644 --- a/spec/cassettes/project/recent_builds/success.yml +++ b/spec/cassettes/project/recent_builds/success.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://circleci.com/api/v1/project/mtchavez/rb-array-sorting?circle-token=asdf-token + uri: https://circleci.com/api/v1/project/mtchavez/rb-array-sorting?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: '' diff --git a/spec/cassettes/project/recent_builds_branch/success.yml b/spec/cassettes/project/recent_builds_branch/success.yml index 9179373..041ffa3 100644 --- a/spec/cassettes/project/recent_builds_branch/success.yml +++ b/spec/cassettes/project/recent_builds_branch/success.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://circleci.com/api/v1/project/mtchavez/rb-array-sorting/tree/master?circle-token=asdf-token + uri: https://circleci.com/api/v1/project/mtchavez/rb-array-sorting/tree/master?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: '' diff --git a/spec/cassettes/project/settings/success.yml b/spec/cassettes/project/settings/success.yml index feda198..8c683c1 100644 --- a/spec/cassettes/project/settings/success.yml +++ b/spec/cassettes/project/settings/success.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://circleci.com/api/v1/project/Shopify/google_auth/settings?circle-token=asdf-token + uri: https://circleci.com/api/v1/project/Shopify/google_auth/settings?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: '' @@ -55,6 +55,6 @@ http_interactions: YpHz84Ysi1/CWBSy2BmzU0BZDCLtDDfGzatoXv6ppOT5KtMfoRXG7DPjPfgp VpqNDt2HekK52fY0h2A4h2ctysSgjXHyEKLNRiWefyzpAdeFYL1iu0vi8jZ/ /CyKak07owMSgKPGSdABcxTlbRwI82zUfFz65Bd63t/5L3TX3M5xBAAA - http_version: + http_version: recorded_at: Thu, 05 Jun 2014 17:22:52 GMT recorded_with: VCR 2.9.0 diff --git a/spec/cassettes/project/unfollow/success.yml b/spec/cassettes/project/unfollow/success.yml index eede8cb..d16cc7c 100644 --- a/spec/cassettes/project/unfollow/success.yml +++ b/spec/cassettes/project/unfollow/success.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://circleci.com/api/v1/project/Shopify/google_auth/unfollow?circle-token=asdf-token + uri: https://circleci.com/api/v1/project/Shopify/google_auth/unfollow?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: accept=application%2Fjson&content-type=application%2Fjson @@ -46,6 +46,6 @@ http_interactions: { "followed" : false } - http_version: + http_version: recorded_at: Thu, 05 Jun 2014 17:20:02 GMT recorded_with: VCR 2.9.0 diff --git a/spec/cassettes/user/me/success.yml b/spec/cassettes/user/me/success.yml index 51616eb..719b50b 100644 --- a/spec/cassettes/user/me/success.yml +++ b/spec/cassettes/user/me/success.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://circleci.com/api/v1/me?circle-token=asdf-token + uri: https://circleci.com/api/v1/me?circle-token=d121d128bf0b9d185cbad163fa410d958a30d37d body: encoding: US-ASCII string: '' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e57c0da..45f204e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -38,7 +38,7 @@ config.ignore_localhost = true config.default_cassette_options = { :record => :new_episodes } - config.filter_sensitive_data('asdf-token') { ENV['TOKEN'] } + config.filter_sensitive_data('d121d128bf0b9d185cbad163fa410d958a30d37d') { ENV['TOKEN'] } config.filter_sensitive_data('orga-name') { ENV['ORGANIZATION'] } config.configure_rspec_metadata! end