percy-client 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24df8c4fd00e7b5a84afffb237b642d1720b89fa
4
- data.tar.gz: 3c18dc7ef7138240b5f82facfc4ed75c113b5b7a
3
+ metadata.gz: 096d4881852bec3bc9671df6c024876fe2a57d97
4
+ data.tar.gz: e3c8a3aef727a224d3fbdd4d0de0594893db9d8c
5
5
  SHA512:
6
- metadata.gz: 273baa8a0b0dc73c132a9074d7ae4f3800a170ccc88befc02e3b9dea1f5a0ed6c3780bddc4f6e4cbddeff059dfdd816ece500f6ffcb7a2296add163818d01817
7
- data.tar.gz: 808767c19370e264f7128ee2d25be74a36ed1063e55305406acdeaab7908bb8853a0a8eb23650b9d398184049284e7ac2364ef53b771db38e9e0bbc09a750c1e
6
+ metadata.gz: 0833ad669954a8b991bf2e4f91ab65c76ca11fd29acb888daaf281ff3611b2acfef60c8c5982b7d06638708b18221156380e66671deb1c181f1487a75a5db620
7
+ data.tar.gz: 8f91884e1c5abe7087bd9d53670519eeca845800ca47890db035442d628f89505555cafe52a7550930a2c291a0a100f6c3e638c9fa4134e3d9f613a27ef2369c
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- percy-client (1.4.2)
4
+ percy-client (1.6.0)
5
5
  faraday (>= 0.9)
6
6
  httpclient (>= 2.6)
7
7
 
@@ -91,4 +91,4 @@ DEPENDENCIES
91
91
  webmock
92
92
 
93
93
  BUNDLED WITH
94
- 1.10.6
94
+ 1.12.5
@@ -131,7 +131,8 @@ module Percy
131
131
  class << self; private :_raw_branch_output; end
132
132
 
133
133
  def self.repo
134
- return ENV['PERCY_REPO_SLUG'] if ENV['PERCY_REPO_SLUG']
134
+ return ENV['PERCY_PROJECT'] if ENV['PERCY_PROJECT']
135
+ return ENV['PERCY_REPO_SLUG'] if ENV['PERCY_REPO_SLUG'] # Deprecated.
135
136
 
136
137
  case current_ci
137
138
  when :travis
@@ -145,13 +146,13 @@ module Percy
145
146
  if origin_url == ''
146
147
  raise Percy::Client::Environment::RepoNotFoundError.new(
147
148
  'No local git repository found. ' +
148
- 'You can manually set PERCY_REPO_SLUG to fix this.')
149
+ 'You can manually set PERCY_PROJECT to fix this. See https://percy.io/docs')
149
150
  end
150
151
  match = origin_url.match(Regexp.new('[:/]([^/]+\/[^/]+?)(\.git)?\Z'))
151
152
  if !match
152
153
  raise Percy::Client::Environment::RepoNotFoundError.new(
153
154
  "Could not determine repository name from URL: #{origin_url.inspect}\n" +
154
- "You can manually set PERCY_REPO_SLUG to fix this.")
155
+ "You can manually set PERCY_PROJECT to fix this. See https://percy.io/docs")
155
156
  end
156
157
  match[1]
157
158
  end
@@ -1,5 +1,5 @@
1
1
  module Percy
2
2
  class Client
3
- VERSION = '1.5.0'
3
+ VERSION = '1.6.0'
4
4
  end
5
5
  end
@@ -5,7 +5,8 @@ RSpec.describe Percy::Client::Environment do
5
5
  ENV['PERCY_BRANCH'] = nil
6
6
  ENV['PERCY_TARGET_BRANCH'] = nil
7
7
  ENV['PERCY_PULL_REQUEST'] = nil
8
- ENV['PERCY_REPO_SLUG'] = nil
8
+ ENV['PERCY_PROJECT'] = nil
9
+ ENV['PERCY_REPO_SLUG'] = nil # Deprecated.
9
10
  ENV['PERCY_PARALLEL_NONCE'] = nil
10
11
  ENV['PERCY_PARALLEL_TOTAL'] = nil
11
12
 
@@ -131,7 +132,11 @@ RSpec.describe Percy::Client::Environment do
131
132
  it 'returns the current local repo name' do
132
133
  expect(Percy::Client::Environment.repo).to eq('percy/percy-client')
133
134
  end
134
- it 'can be overridden with PERCY_REPO_SLUG' do
135
+ it 'can be overridden with PERCY_PROJECT' do
136
+ ENV['PERCY_PROJECT'] = 'percy/slug'
137
+ expect(Percy::Client::Environment.repo).to eq('percy/slug')
138
+ end
139
+ it 'can be overridden with PERCY_REPO_SLUG (deprecated)' do
135
140
  ENV['PERCY_REPO_SLUG'] = 'percy/slug'
136
141
  expect(Percy::Client::Environment.repo).to eq('percy/slug')
137
142
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: percy-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Perceptual Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-30 00:00:00.000000000 Z
11
+ date: 2016-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  requirements: []
175
175
  rubyforge_project:
176
- rubygems_version: 2.4.5.1
176
+ rubygems_version: 2.2.2
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: Percy::Client