percy-client 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/percy/client/environment.rb +4 -3
- data/lib/percy/client/version.rb +1 -1
- data/spec/lib/percy/client/environment_spec.rb +7 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 096d4881852bec3bc9671df6c024876fe2a57d97
|
|
4
|
+
data.tar.gz: e3c8a3aef727a224d3fbdd4d0de0594893db9d8c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0833ad669954a8b991bf2e4f91ab65c76ca11fd29acb888daaf281ff3611b2acfef60c8c5982b7d06638708b18221156380e66671deb1c181f1487a75a5db620
|
|
7
|
+
data.tar.gz: 8f91884e1c5abe7087bd9d53670519eeca845800ca47890db035442d628f89505555cafe52a7550930a2c291a0a100f6c3e638c9fa4134e3d9f613a27ef2369c
|
data/Gemfile.lock
CHANGED
|
@@ -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['
|
|
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
|
|
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
|
|
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
|
data/lib/percy/client/version.rb
CHANGED
|
@@ -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['
|
|
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
|
|
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.
|
|
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-
|
|
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.
|
|
176
|
+
rubygems_version: 2.2.2
|
|
177
177
|
signing_key:
|
|
178
178
|
specification_version: 4
|
|
179
179
|
summary: Percy::Client
|