capistrano_api_docs_external_git 1.0.2 → 1.0.3

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: 55ef7c897261d97b66a8c60b03209f2e638b3bd0
4
- data.tar.gz: e47564876452f34bd102662e12742cbd1b4742ac
3
+ metadata.gz: ceb788060cd24e4aa1bf9d0b6c6fb663ff769a95
4
+ data.tar.gz: 60254ff94d892d93bea48e29d6ee122224059c8c
5
5
  SHA512:
6
- metadata.gz: 9f2075facb91c7f68811b9d9e1c10ec02724dc9b688253da68847599bd0f685ecc8a1e659b700d695ec780373551fb853d5104e4b2f437c367ec8f57a9536e78
7
- data.tar.gz: 3a4ee2c32090c7521c281f4f286c5ba4e914392adbd6054893ee2b92d41f55e2c780f4e06e25e56d983503cf8bf990892a4b7f11ff23c4d3d23d46ca8d611877
6
+ metadata.gz: e218eac2eb93b8dcc544a4c1bf9ed73aaba3633d5a4b51fdbfe6d39f22a8adf6530afcfbbb74e167d6c262693327636122dafa96fe34cdbabb570621b6294d6b
7
+ data.tar.gz: 6a05c8b167013041f267f83ff0434508886e6c1abcb48edd8f62f51a6e5cd33b791c31111feaa71156bca0701adf8290633a13bb14c092f92885b469434831b3
@@ -4,7 +4,7 @@ $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.2"
7
+ spec.version = "1.0.3"
8
8
  spec.authors = ["DevOps Team"]
9
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.}
@@ -1,4 +1,7 @@
1
1
  namespace :api_docs_external_git do
2
+ def print_message message
3
+ SSHKit.config.output << SSHKit::LogMessage.new(Logger::INFO, "[#{Color.green("unknown")}] #{message}")
4
+ end
2
5
 
3
6
  set :doc_git_repository, nil
4
7
  set :doc_repository_name, "api-docs"
@@ -8,7 +11,7 @@ namespace :api_docs_external_git do
8
11
  set :api_docs_path, fetch(:rails_root).join("doc", "api")
9
12
 
10
13
  task :setup do
11
- info "Updating API documentation"
14
+ print_message "Updating API documentation"
12
15
  invoke :'api_docs_external_git:clone_repo'
13
16
  invoke :'api_docs_external_git:copy_files'
14
17
  invoke :'api_docs_external_git:add_files_git'
@@ -17,7 +20,7 @@ namespace :api_docs_external_git do
17
20
 
18
21
  desc 'Clone documentation repository to tmp folder'
19
22
  task :clone_repo do
20
- info "Cloning #{fetch(:doc_git_repository)} for temporary folder"
23
+ print_message "Cloning #{fetch(:doc_git_repository)} for temporary folder"
21
24
  @git_repo = Git.clone(fetch(:doc_git_repository), fetch(:doc_repository_name), path: fetch(:rails_root_tmp_path))
22
25
  end
23
26
 
@@ -28,20 +31,20 @@ namespace :api_docs_external_git do
28
31
 
29
32
  FileUtils.rm_r destination_folder, force: true
30
33
 
31
- info "Copying documentation files"
34
+ print_message "Copying documentation files"
32
35
  FileUtils.mkdir_p destination_folder
33
36
  FileUtils.cp_r files, destination_folder
34
37
  end
35
38
 
36
39
  desc 'Remove documentation repository'
37
40
  task :remove_files do
38
- info "Removing documentation repository"
41
+ print_message "Removing documentation repository"
39
42
  FileUtils.rm_r fetch(:rails_root_tmp_path).join(fetch(:doc_repository_name))
40
43
  end
41
44
 
42
45
  desc 'Add files to documentation git'
43
46
  task :add_files_git do
44
- info "Saving documentation files on git repository"
47
+ print_message "Saving documentation files on git repository"
45
48
 
46
49
  @git_repo.add(all: true)
47
50
  begin
metadata CHANGED
@@ -1,7 +1,7 @@
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.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - DevOps Team