manifestly 2.2.1 → 2.3.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: 7a07010d357d1a65507c6b7a8326b9db4b82814d
4
- data.tar.gz: 01e562142d702cb0c91709e4118aa3522e0975c3
3
+ metadata.gz: d62c8dfcbbf81b5c0214dba1f2af56f95629122b
4
+ data.tar.gz: ac1e5f68ffd0c99cbfd42a99cd8119b8602fd2db
5
5
  SHA512:
6
- metadata.gz: 6306bba1d20524ce11f7bf7ba112da59ae5eee735daf8185f6ba4f9875f5eb7046bfa48932b81c9d88f8b23e0d4a257df099f1da94458a2f4a3cc576057330d4
7
- data.tar.gz: a1c736ab12d009589d19585e484e21ebdd62cc1a2bb9223b2940aecdff80f235a47345b59d10f937d5fb887360bc149ec4f0a3b5f56f0e24ac4d20f4b3c2c42b
6
+ metadata.gz: 2b5b02fb9c83d0082f5a1f641ed377a32daeafd4dd317c7cef1d09a963ed5d4381ab45776bf921183ee049fe4b37996989aa079cf862f16f80137f2212da78fa
7
+ data.tar.gz: 587e782061553e4c1957e25e3bec0361d2657c5dc893fb8335d33c5248d64d550e1070a2b614d798875ce45a57e15cf592c34f9f0b46adcad7ba8abb7cebe88c
@@ -234,7 +234,7 @@ module Manifestly
234
234
 
235
235
  end
236
236
 
237
- desc "upload", "Upload a local manifest file to a manifest repository"
237
+ desc "upload", "Upload a local manifest file to a manifest repository and print its SHA"
238
238
  file_option("upload")
239
239
  repo_option
240
240
  repo_file_option("The name of the manifest to upload to in the repository, with path if applicable")
@@ -246,15 +246,16 @@ module Manifestly
246
246
  long_desc <<-DESC
247
247
  Upload a manifest when you want to share it with others or persist it
248
248
  permanently. Since manifests are stored remotely as versions of a file
249
- in git, it cannot be changed once uploaded.
249
+ in git, it cannot be changed once uploaded. Prints out the manifest SHA.
250
250
  DESC
251
251
  def upload
252
252
  repository = Repository.load_cached(options[:repo], update: true)
253
253
 
254
254
  begin
255
255
  repository.push_file!(options[:file], options[:repo_file], options[:message])
256
- rescue Manifestly::Repository::ManifestUnchanged => e
257
- say "The manifest you requested to push is already the latest and so could not be pushed."
256
+ rescue Manifestly::Repository::ManifestUnchanged
257
+ ensure
258
+ say repository.current_commit
258
259
  end
259
260
  end
260
261
 
@@ -88,7 +88,7 @@ module Manifestly
88
88
  full_repository_file_path = File.join(@path, repository_file_path)
89
89
  FileUtils.cp(local_file_path, full_repository_file_path)
90
90
  git.add(repository_file_path)
91
- raise ManifestUnchanged if git.status.changed.empty?
91
+ raise ManifestUnchanged if git.status.changed.empty? && git.status.added.empty?
92
92
  git.commit(message)
93
93
  git.push
94
94
  end
@@ -1,3 +1,3 @@
1
1
  module Manifestly
2
- VERSION = "2.2.1"
2
+ VERSION = "2.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manifestly
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Slavinsky
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-13 00:00:00.000000000 Z
11
+ date: 2016-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor