capistrano3-casica 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +47 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/capistrano3-casica.gemspec +29 -0
- data/lib/capistrano3/casica.rb +5 -0
- data/lib/capistrano3/casica/tasks/casica.rake +19 -0
- data/lib/capistrano3/casica/updater.rb +20 -0
- data/lib/capistrano3/casica/version.rb +5 -0
- metadata +130 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7e61506f9e02a7527856b22f34ee924b1bbb8e22
|
4
|
+
data.tar.gz: 26150262b49c9eac85f0b406f95b087b406483f3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3ff01144e3c76a9f38d294ca488386b6f23f983ec5e54f7412ce0bc54cc3d00e7ea246b7f61a7e26de24865d8c3b48d083a556047a96cc9f0f4c83d881558911
|
7
|
+
data.tar.gz: afabe08b2b54ab2ecb5f7245c43fd0f739def9bb584f43ace80cc17b0df9673ece52e8e1b006ff05fca0da1a63d10ec09caf9dd10f9b30724b065a8128a366d9
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Yuta Igarashi
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# Capistrano3::Casica
|
2
|
+
|
3
|
+
Casica status updater for capistrano3.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'capistrano3-casica', require: false
|
11
|
+
```
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
in `Capfile`:
|
16
|
+
|
17
|
+
```
|
18
|
+
require 'capistrano3/casica'
|
19
|
+
```
|
20
|
+
|
21
|
+
## Configuration
|
22
|
+
|
23
|
+
in `config/deploy/staging.rb`:
|
24
|
+
|
25
|
+
```
|
26
|
+
set :casica_token, "<token>"
|
27
|
+
set :casica_project_id, "<project_id>"
|
28
|
+
set :casica_from_status, "merged"
|
29
|
+
set :casica_to_status, "stg_deployed"
|
30
|
+
```
|
31
|
+
|
32
|
+
in `config/deploy/production.rb`:
|
33
|
+
|
34
|
+
```
|
35
|
+
set :casica_token, "<token>"
|
36
|
+
set :casica_project_id, "<project_id>"
|
37
|
+
set :casica_from_status, "confirmed"
|
38
|
+
set :casica_to_status, "deployed"
|
39
|
+
```
|
40
|
+
|
41
|
+
## Contributing
|
42
|
+
|
43
|
+
1. Fork it ( https://github.com/startup-technology/capistrano3-casica/fork )
|
44
|
+
2. Create your feature branch (git checkout -b my-new-feature)
|
45
|
+
3. Commit your changes (git commit -am 'Add some feature')
|
46
|
+
4. Push to the branch (git push origin my-new-feature)
|
47
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "capistrano3/casica"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'capistrano3/casica/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "capistrano3-casica"
|
8
|
+
spec.version = Capistrano3::Casica::VERSION
|
9
|
+
spec.authors = ["Yuta Igarashi"]
|
10
|
+
spec.email = ["y.iga.thunder@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Capistrano 3.x plugin for casica}
|
13
|
+
spec.description = %q{Capistrano 3.x plugin for casica}
|
14
|
+
spec.homepage = "https://github.com/startup-technology/capistrano3-casica"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "bin"
|
21
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_dependency "capistrano", "~> 3.0"
|
25
|
+
spec.add_dependency "casica", "~> 0.1.3"
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.14"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
29
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
namespace :casica do
|
2
|
+
desc 'Update story/task status of casica'
|
3
|
+
task :update_status do
|
4
|
+
on roles(:app) do
|
5
|
+
info "casica start updating status..."
|
6
|
+
|
7
|
+
token = fetch(:casica_token)
|
8
|
+
project_id = fetch(:casica_project_id)
|
9
|
+
from_status = fetch(:casica_from_status)
|
10
|
+
to_status = fetch(:casica_to_status)
|
11
|
+
|
12
|
+
Capistrano3::Casica::Updater.new(token: token, project_id: project_id, from_status: from_status, to_status: to_status).execute
|
13
|
+
|
14
|
+
info "done"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
after 'deploy:finished', 'casica:update_status'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Capistrano3
|
2
|
+
module Casica
|
3
|
+
class Updater
|
4
|
+
attr_accessor :token, :project_id, :from_status, :to_status
|
5
|
+
|
6
|
+
def initialize(token:,project_id:,from_status:,to_status:)
|
7
|
+
@token = token
|
8
|
+
@project_id = project_id
|
9
|
+
@from_status = from_status
|
10
|
+
@to_status = to_status
|
11
|
+
end
|
12
|
+
|
13
|
+
def execute
|
14
|
+
client = ::Casica::Client.new(token: token)
|
15
|
+
client.update_story_status(project_id: project_id, from_status: from_status, to_status: to_status)
|
16
|
+
client.update_task_status(project_id: project_id, from_status: from_status, to_status: to_status)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano3-casica
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yuta Igarashi
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-08-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capistrano
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: casica
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.1.3
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.1.3
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.14'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.14'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
description: Capistrano 3.x plugin for casica
|
84
|
+
email:
|
85
|
+
- y.iga.thunder@gmail.com
|
86
|
+
executables:
|
87
|
+
- console
|
88
|
+
- setup
|
89
|
+
extensions: []
|
90
|
+
extra_rdoc_files: []
|
91
|
+
files:
|
92
|
+
- ".gitignore"
|
93
|
+
- ".rspec"
|
94
|
+
- ".travis.yml"
|
95
|
+
- Gemfile
|
96
|
+
- LICENSE.txt
|
97
|
+
- README.md
|
98
|
+
- Rakefile
|
99
|
+
- bin/console
|
100
|
+
- bin/setup
|
101
|
+
- capistrano3-casica.gemspec
|
102
|
+
- lib/capistrano3/casica.rb
|
103
|
+
- lib/capistrano3/casica/tasks/casica.rake
|
104
|
+
- lib/capistrano3/casica/updater.rb
|
105
|
+
- lib/capistrano3/casica/version.rb
|
106
|
+
homepage: https://github.com/startup-technology/capistrano3-casica
|
107
|
+
licenses:
|
108
|
+
- MIT
|
109
|
+
metadata: {}
|
110
|
+
post_install_message:
|
111
|
+
rdoc_options: []
|
112
|
+
require_paths:
|
113
|
+
- lib
|
114
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
requirements: []
|
125
|
+
rubyforge_project:
|
126
|
+
rubygems_version: 2.6.11
|
127
|
+
signing_key:
|
128
|
+
specification_version: 4
|
129
|
+
summary: Capistrano 3.x plugin for casica
|
130
|
+
test_files: []
|