capistrano_api_docs_external_git 1.0.0 → 1.0.1

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: d2666f91d3e3a714f9282d23f5abda70ac6e6748
4
- data.tar.gz: e85060dbc9aba916d450ef9545815e25590037d9
3
+ metadata.gz: 94d96c73937dee3d6206f6ccde70df461b303d8d
4
+ data.tar.gz: fcf49e59af38d00ba27331720166b52364f460a1
5
5
  SHA512:
6
- metadata.gz: 2c98d166acaa3837576d047cfcdf4ace00512c141b5caf301c6f071be8253bc438f4f914afa09e1a787f3214b5feb72895beae3350f68767a1dbfa17e625eedc
7
- data.tar.gz: 2a76fdb0fbc8e10e55cf2f9476fb3230493384f62a7cd72852dfaca49b8001d24ecc7691614b1701d7611430ba67e3a1cec0da305cb62c11b3aef89a49312924
6
+ metadata.gz: b2b62ee862744833f42546c802c88b9a4d77a99764980c199ae1a2af3d9a6ec1b4ed40b90890746f8ea8945be845b5aaf6410e3fcb1f40e0f421be3faf9b58bf
7
+ data.tar.gz: 7152f3212b09737f5a4f58c2b9032839f5fbcc34454b047261b2aaa86d0a1029b21c579c1ca891a013765263aa6adb506bcb547755e7f4d6dc215bdcd8a874db
@@ -4,9 +4,9 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "capistrano_api_docs_external_git"
7
- spec.version = "1.0.0"
8
- spec.authors = ["Guilherme Pereira"]
9
- spec.email = ["guilherme.pereira@ndrive.com"]
7
+ spec.version = "1.0.1"
8
+ spec.authors = ["DevOps Team"]
9
+ spec.email = ["devops@ndrive.com"]
10
10
  spec.summary = %q{Add tasks to capistrano to a Rails project to work with gem api_docs.}
11
11
  spec.description = %q{Add tasks to capistrano to a Rails project to work with gem api_docs, and send files remotely to other git repository}
12
12
  spec.homepage = ""
@@ -11,11 +11,10 @@ namespace :api_docs_external_git do
11
11
  puts "**********************************"
12
12
  puts "Updating API Documentation"
13
13
  puts "**********************************"
14
-
15
14
  invoke :'api_docs_external_git:clone_repo'
16
15
  invoke :'api_docs_external_git:copy_files'
17
16
  invoke :'api_docs_external_git:add_files_git'
18
- invoke :'api_docs_external_git:raise_exception'
17
+ invoke :'api_docs_external_git:remove_files'
19
18
  end
20
19
 
21
20
  desc 'Clone documentation repository to tmp folder'
@@ -27,9 +26,12 @@ namespace :api_docs_external_git do
27
26
  desc 'Copy documentation files from local respository to documentation repository'
28
27
  task :copy_files do
29
28
  files = Dir.glob(fetch(:api_docs_path).join('*.{yml,md}'))
30
- destination_folder = fetch(:rails_root_tmp_path).join(fetch(:doc_repository_name), fetch(:api_docs_path).relative_path_from(fetch(:rails_root)))
29
+ destination_folder = fetch(:rails_root_tmp_path).join(fetch(:doc_repository_name), fetch(:api_docs_path).relative_path_from(fetch(:rails_root))).join(fetch(:application))
30
+
31
+ FileUtils.rm_r destination_folder, force: true
31
32
 
32
33
  puts "Copying documentation files"
34
+ FileUtils.mkdir_p destination_folder
33
35
  FileUtils.cp_r files, destination_folder
34
36
  end
35
37
 
@@ -42,6 +44,7 @@ namespace :api_docs_external_git do
42
44
  desc 'Add files to documentation git'
43
45
  task :add_files_git do
44
46
  puts "Saving documentation files on git repository"
47
+
45
48
  @git_repo.add(all: true)
46
49
  begin
47
50
  @git_repo.commit_all('Automatic add documentation')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano_api_docs_external_git
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
- - Guilherme Pereira
7
+ - DevOps Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-28 00:00:00.000000000 Z
11
+ date: 2014-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git
@@ -55,7 +55,7 @@ dependencies:
55
55
  description: Add tasks to capistrano to a Rails project to work with gem api_docs,
56
56
  and send files remotely to other git repository
57
57
  email:
58
- - guilherme.pereira@ndrive.com
58
+ - devops@ndrive.com
59
59
  executables: []
60
60
  extensions: []
61
61
  extra_rdoc_files: []