t1k 4.0.5 → 4.2.1
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 +115 -0
- data/T1000 +44 -0
- data/lib/t1k/repositories/bitbucket.rb +24 -40
- data/lib/t1k/version.rb +1 -1
- data/t1k.gemspec +3 -3
- metadata +21 -20
- data/t1k-4.0.4.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: adc4d10cf568cbbe04fdfafab6efe2264bd575a19e8d92c210921d1e31641671
|
|
4
|
+
data.tar.gz: f88aefa96104e945a721154168e7ae035afd4dd3486a05b3f772f9e405bb5e5f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2c2b0f953169cbf6144d39dce113fa44fbd32b4cf7da7fda4399d92afd84a53856f191b1d25c899b8c2f8ae5c8badd69e347187f105086f41470822a07889ac1
|
|
7
|
+
data.tar.gz: 390bca843e67137a1a21aabab532ba2e88d23a7de3b436dd1a0513ee226114727c512f1ec37dea0c04ef369a19cf9528333dae9960d23e5124d7afaccbf94d15
|
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
t1k (4.2.1)
|
|
5
|
+
activesupport (~> 4.2)
|
|
6
|
+
clive (~> 1.2.1)
|
|
7
|
+
github_api (~> 0.18)
|
|
8
|
+
ruby-trello (~> 2.1)
|
|
9
|
+
tinybucket2 (~> 2.0.0)
|
|
10
|
+
|
|
11
|
+
GEM
|
|
12
|
+
remote: https://rubygems.org/
|
|
13
|
+
specs:
|
|
14
|
+
activemodel (4.2.11)
|
|
15
|
+
activesupport (= 4.2.11)
|
|
16
|
+
builder (~> 3.1)
|
|
17
|
+
activesupport (4.2.11)
|
|
18
|
+
i18n (~> 0.7)
|
|
19
|
+
minitest (~> 5.1)
|
|
20
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
|
21
|
+
tzinfo (~> 1.1)
|
|
22
|
+
addressable (2.6.0)
|
|
23
|
+
public_suffix (>= 2.0.2, < 4.0)
|
|
24
|
+
builder (3.2.3)
|
|
25
|
+
clive (1.2.1)
|
|
26
|
+
coderay (1.1.2)
|
|
27
|
+
concurrent-ruby (1.1.4)
|
|
28
|
+
descendants_tracker (0.0.4)
|
|
29
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
|
30
|
+
docile (1.1.5)
|
|
31
|
+
domain_name (0.5.20180417)
|
|
32
|
+
unf (>= 0.0.5, < 1.0.0)
|
|
33
|
+
faraday (0.15.4)
|
|
34
|
+
multipart-post (>= 1.2, < 3)
|
|
35
|
+
faraday-http-cache (1.3.1)
|
|
36
|
+
faraday (~> 0.8)
|
|
37
|
+
faraday_middleware (0.13.1)
|
|
38
|
+
faraday (>= 0.7.4, < 1.0)
|
|
39
|
+
github_api (0.18.2)
|
|
40
|
+
addressable (~> 2.4)
|
|
41
|
+
descendants_tracker (~> 0.0.4)
|
|
42
|
+
faraday (~> 0.8)
|
|
43
|
+
hashie (~> 3.5, >= 3.5.2)
|
|
44
|
+
oauth2 (~> 1.0)
|
|
45
|
+
hashie (3.6.0)
|
|
46
|
+
http-cookie (1.0.3)
|
|
47
|
+
domain_name (~> 0.5)
|
|
48
|
+
i18n (0.9.5)
|
|
49
|
+
concurrent-ruby (~> 1.0)
|
|
50
|
+
json (1.8.6)
|
|
51
|
+
jwt (2.1.0)
|
|
52
|
+
method_source (0.9.2)
|
|
53
|
+
mime-types (3.2.2)
|
|
54
|
+
mime-types-data (~> 3.2015)
|
|
55
|
+
mime-types-data (3.2018.0812)
|
|
56
|
+
minitest (5.11.3)
|
|
57
|
+
multi_json (1.13.1)
|
|
58
|
+
multi_xml (0.6.0)
|
|
59
|
+
multipart-post (2.0.0)
|
|
60
|
+
netrc (0.11.0)
|
|
61
|
+
oauth (0.5.4)
|
|
62
|
+
oauth2 (1.4.1)
|
|
63
|
+
faraday (>= 0.8, < 0.16.0)
|
|
64
|
+
jwt (>= 1.0, < 3.0)
|
|
65
|
+
multi_json (~> 1.3)
|
|
66
|
+
multi_xml (~> 0.5)
|
|
67
|
+
rack (>= 1.2, < 3)
|
|
68
|
+
pry (0.12.2)
|
|
69
|
+
coderay (~> 1.1.0)
|
|
70
|
+
method_source (~> 0.9.0)
|
|
71
|
+
public_suffix (3.0.3)
|
|
72
|
+
rack (2.0.6)
|
|
73
|
+
rake (10.5.0)
|
|
74
|
+
rest-client (2.0.2)
|
|
75
|
+
http-cookie (>= 1.0.2, < 2.0)
|
|
76
|
+
mime-types (>= 1.16, < 4.0)
|
|
77
|
+
netrc (~> 0.8)
|
|
78
|
+
ruby-trello (2.1.0)
|
|
79
|
+
activemodel (>= 3.2.0)
|
|
80
|
+
addressable (~> 2.3)
|
|
81
|
+
json
|
|
82
|
+
oauth (>= 0.4.5)
|
|
83
|
+
rest-client (>= 1.8.0)
|
|
84
|
+
simple_oauth (0.3.1)
|
|
85
|
+
simplecov (0.11.2)
|
|
86
|
+
docile (~> 1.1.0)
|
|
87
|
+
json (~> 1.8)
|
|
88
|
+
simplecov-html (~> 0.10.0)
|
|
89
|
+
simplecov-html (0.10.2)
|
|
90
|
+
thread_safe (0.3.6)
|
|
91
|
+
tinybucket2 (2.0.0)
|
|
92
|
+
activemodel (>= 4.1.6)
|
|
93
|
+
activesupport (>= 4.1.6)
|
|
94
|
+
faraday (~> 0.9)
|
|
95
|
+
faraday-http-cache (~> 1.2)
|
|
96
|
+
faraday_middleware (~> 0.10)
|
|
97
|
+
simple_oauth (~> 0.3)
|
|
98
|
+
tzinfo (1.2.5)
|
|
99
|
+
thread_safe (~> 0.1)
|
|
100
|
+
unf (0.1.4)
|
|
101
|
+
unf_ext
|
|
102
|
+
unf_ext (0.0.7.5)
|
|
103
|
+
|
|
104
|
+
PLATFORMS
|
|
105
|
+
ruby
|
|
106
|
+
|
|
107
|
+
DEPENDENCIES
|
|
108
|
+
bundler (~> 2.0.1)
|
|
109
|
+
pry
|
|
110
|
+
rake (~> 10.0)
|
|
111
|
+
simplecov (~> 0.11.2)
|
|
112
|
+
t1k!
|
|
113
|
+
|
|
114
|
+
BUNDLED WITH
|
|
115
|
+
2.0.1
|
data/T1000
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
T1k.setup do |config|
|
|
2
|
+
|
|
3
|
+
# Setup Github repository credentials
|
|
4
|
+
# Create an auth_token here: https://github.com/settings/applications
|
|
5
|
+
#
|
|
6
|
+
# config.repository.adapter = :github
|
|
7
|
+
# config.repository.setup do |c|
|
|
8
|
+
# c.user = "GITHUB_USER"
|
|
9
|
+
# c.repo = "REPOSITORY_NAME"
|
|
10
|
+
# c.oauth_token = "YOUR_GITHUB_AUTH_TOKEN"
|
|
11
|
+
# end
|
|
12
|
+
|
|
13
|
+
# Setup Bitbucket repository credentials
|
|
14
|
+
config.repository.adapter = :bitbucket
|
|
15
|
+
config.repository.setup do |c|
|
|
16
|
+
## Configure access_token if you can prepare OAuth2 access_token.
|
|
17
|
+
# c.access_token = 'your_access_token'
|
|
18
|
+
|
|
19
|
+
## Configure oauth_token/oauth_secret if you want to use OAuth1.0 authentication.
|
|
20
|
+
## (This config will be ignored if you configure OAuth2 access_token.)
|
|
21
|
+
c.repo_owner = "BITBUCKET_OWNER"
|
|
22
|
+
c.repo = "BITBUCKET_REPO"
|
|
23
|
+
c.oauth_token = 'BITBUCKET_TOKEN'
|
|
24
|
+
c.oauth_secret = 'BITBUCKET_SECRET'
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# config.repository.default_remote_branch = :master
|
|
28
|
+
# or
|
|
29
|
+
# config.repository.default_remote_branch = :branch
|
|
30
|
+
# |-> this option disables direct merge on origin master
|
|
31
|
+
|
|
32
|
+
# Setup Trello board credentials
|
|
33
|
+
#
|
|
34
|
+
# Trello APP_DEVELOPER_KEY: https://trello.com/app-key
|
|
35
|
+
# Trello App permission key: https://trello.com/1/connect?key=YOUR_KEY&name=BOARD_NAME&expiration=never&response_type=token&scope=read,write
|
|
36
|
+
#
|
|
37
|
+
# config.tracker.adapter = [:trello, :pivotal, :none]
|
|
38
|
+
# config.tracker.setup do |c|
|
|
39
|
+
# c.user_name = "TRELLO_USER"
|
|
40
|
+
# c.board_name = "TRELLO_BOARD_NAME"
|
|
41
|
+
# c.member_token = "TRELLO_APP_TOKEN"
|
|
42
|
+
# c.developer_public_key = "TRELLO_DEVELOPER_PUB_KEY"
|
|
43
|
+
# end
|
|
44
|
+
end
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
require '
|
|
1
|
+
require 'tinybucket'
|
|
2
2
|
|
|
3
3
|
module T1k
|
|
4
4
|
module Repositories
|
|
5
5
|
class Bitbucket
|
|
6
|
+
cattr_accessor :oauth_token
|
|
7
|
+
@@oauth_token = ""
|
|
8
|
+
|
|
9
|
+
cattr_accessor :oauth_secret
|
|
10
|
+
@@oauth_secret = ""
|
|
6
11
|
|
|
7
12
|
cattr_accessor :user
|
|
8
13
|
@@user = ""
|
|
@@ -26,17 +31,21 @@ module T1k
|
|
|
26
31
|
|
|
27
32
|
def self.create_issue title
|
|
28
33
|
puts 'Creating issue'
|
|
29
|
-
me
|
|
30
|
-
self.repo_owner
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
issue_number = self.send(:issue_url_from, issue)
|
|
34
|
+
me = self.login
|
|
35
|
+
rep = me.repo(self.repo_owner, self.repo)
|
|
36
|
+
issue = me.issues.create({ title: title })
|
|
37
|
+
issue_number = self.send(:issue_url_from, issue)
|
|
34
38
|
|
|
35
39
|
issue_number
|
|
36
40
|
end
|
|
37
41
|
|
|
38
42
|
def self.login
|
|
39
|
-
|
|
43
|
+
Tinybucket.configure do |config|
|
|
44
|
+
config.oauth_token = self.oauth_token
|
|
45
|
+
config.oauth_secret = self.oauth_secret
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
Tinybucket.new
|
|
40
49
|
end
|
|
41
50
|
|
|
42
51
|
def self.get_issue number
|
|
@@ -46,11 +55,9 @@ module T1k
|
|
|
46
55
|
end
|
|
47
56
|
|
|
48
57
|
puts 'Recovering existent issue'
|
|
49
|
-
me
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
issue = me.issues.find(self.repo_owner, self.repo, number )
|
|
53
|
-
issue_number = self.send(:issue_url_from, issue)
|
|
58
|
+
me = self.login
|
|
59
|
+
issue = rep.issues.find(number)
|
|
60
|
+
issue_number = self.send(:issue_url_from, issue)
|
|
54
61
|
|
|
55
62
|
issue_number
|
|
56
63
|
end
|
|
@@ -64,25 +71,7 @@ module T1k
|
|
|
64
71
|
end
|
|
65
72
|
|
|
66
73
|
def self.issue_url_from issue
|
|
67
|
-
|
|
68
|
-
issue_url = "https://bitbucket.org/#{self.repo_owner}/#{self.repo}/#{issue_number}"
|
|
69
|
-
|
|
70
|
-
issue_url
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
def self.get_repo_owner_for me
|
|
74
|
-
unless me.kind_of? BitBucket::Client
|
|
75
|
-
puts "You should pass a valid user."
|
|
76
|
-
exit 1
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
project = me.repos.all.select {|hash| hash.name == self.repo }
|
|
80
|
-
|
|
81
|
-
# /1.0/repositories/OWNER/REPO
|
|
82
|
-
# > 1. /repositories/
|
|
83
|
-
# > 2. OWNER
|
|
84
|
-
|
|
85
|
-
project[0]['resource_uri'].match(/(\/\w+\/)(\w+)/)[2]
|
|
74
|
+
issue.links['self']['href']
|
|
86
75
|
end
|
|
87
76
|
|
|
88
77
|
def self.setup &block
|
|
@@ -90,18 +79,13 @@ module T1k
|
|
|
90
79
|
end
|
|
91
80
|
|
|
92
81
|
def self.valid_keys?
|
|
93
|
-
me =
|
|
82
|
+
me = self.login
|
|
94
83
|
|
|
95
84
|
begin
|
|
96
|
-
has_project = me.
|
|
97
|
-
|
|
98
|
-
unless has_project.empty?
|
|
99
|
-
@@messages << "Wecolme #{self.user} - BitBucket"
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
return not(has_project.empty?)
|
|
85
|
+
has_project = me.repo(self.repo_owner, self.repo).load
|
|
86
|
+
@@messages << "Wecolme to BitBucket"
|
|
103
87
|
rescue Exception => e
|
|
104
|
-
@@errors << e.message
|
|
88
|
+
@@errors << "Bucket not recovery: #{e.message}"
|
|
105
89
|
return false
|
|
106
90
|
end
|
|
107
91
|
end
|
data/lib/t1k/version.rb
CHANGED
data/t1k.gemspec
CHANGED
|
@@ -19,14 +19,14 @@ Gem::Specification.new do |spec|
|
|
|
19
19
|
spec.executables = ["t1k"]
|
|
20
20
|
spec.require_paths = ["lib", "resources"]
|
|
21
21
|
|
|
22
|
-
spec.add_development_dependency 'bundler' , '~> 1
|
|
22
|
+
spec.add_development_dependency 'bundler' , '~> 2.0.1'
|
|
23
23
|
spec.add_development_dependency 'rake' , '~> 10.0'
|
|
24
24
|
spec.add_development_dependency 'simplecov' , '~>0.11.2'
|
|
25
25
|
spec.add_development_dependency 'pry'
|
|
26
26
|
|
|
27
|
+
spec.add_dependency 'tinybucket2' , '~> 2.0.0'
|
|
27
28
|
spec.add_dependency 'ruby-trello' , '~> 2.1'
|
|
28
29
|
spec.add_dependency 'github_api' , '~> 0.18'
|
|
29
30
|
spec.add_dependency 'activesupport', '~> 4.2'
|
|
30
|
-
spec.add_dependency 'clive' , '~> 1.2.1'
|
|
31
|
-
spec.add_dependency 'bitbucket_rest_api'
|
|
31
|
+
spec.add_dependency 'clive' , '~> 1.2.1'
|
|
32
32
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: t1k
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rodrigo Maia
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2019-
|
|
13
|
+
date: 2019-02-25 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: bundler
|
|
@@ -18,14 +18,14 @@ dependencies:
|
|
|
18
18
|
requirements:
|
|
19
19
|
- - "~>"
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version:
|
|
21
|
+
version: 2.0.1
|
|
22
22
|
type: :development
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
25
|
requirements:
|
|
26
26
|
- - "~>"
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
|
-
version:
|
|
28
|
+
version: 2.0.1
|
|
29
29
|
- !ruby/object:Gem::Dependency
|
|
30
30
|
name: rake
|
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -68,6 +68,20 @@ dependencies:
|
|
|
68
68
|
- - ">="
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
70
|
version: '0'
|
|
71
|
+
- !ruby/object:Gem::Dependency
|
|
72
|
+
name: tinybucket2
|
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
|
74
|
+
requirements:
|
|
75
|
+
- - "~>"
|
|
76
|
+
- !ruby/object:Gem::Version
|
|
77
|
+
version: 2.0.0
|
|
78
|
+
type: :runtime
|
|
79
|
+
prerelease: false
|
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
81
|
+
requirements:
|
|
82
|
+
- - "~>"
|
|
83
|
+
- !ruby/object:Gem::Version
|
|
84
|
+
version: 2.0.0
|
|
71
85
|
- !ruby/object:Gem::Dependency
|
|
72
86
|
name: ruby-trello
|
|
73
87
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -124,20 +138,6 @@ dependencies:
|
|
|
124
138
|
- - "~>"
|
|
125
139
|
- !ruby/object:Gem::Version
|
|
126
140
|
version: 1.2.1
|
|
127
|
-
- !ruby/object:Gem::Dependency
|
|
128
|
-
name: bitbucket_rest_api
|
|
129
|
-
requirement: !ruby/object:Gem::Requirement
|
|
130
|
-
requirements:
|
|
131
|
-
- - ">="
|
|
132
|
-
- !ruby/object:Gem::Version
|
|
133
|
-
version: '0'
|
|
134
|
-
type: :runtime
|
|
135
|
-
prerelease: false
|
|
136
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
137
|
-
requirements:
|
|
138
|
-
- - ">="
|
|
139
|
-
- !ruby/object:Gem::Version
|
|
140
|
-
version: '0'
|
|
141
141
|
description: Use those scripts to create automatically branchs associated with issues
|
|
142
142
|
and tracked commits.
|
|
143
143
|
email:
|
|
@@ -151,9 +151,11 @@ extra_rdoc_files: []
|
|
|
151
151
|
files:
|
|
152
152
|
- "./CODE_OF_CONDUCT.md"
|
|
153
153
|
- "./Gemfile"
|
|
154
|
+
- "./Gemfile.lock"
|
|
154
155
|
- "./LICENSE.txt"
|
|
155
156
|
- "./README.md"
|
|
156
157
|
- "./Rakefile"
|
|
158
|
+
- "./T1000"
|
|
157
159
|
- "./bin/t1k"
|
|
158
160
|
- "./lib/t1k.rb"
|
|
159
161
|
- "./lib/t1k/command.rb"
|
|
@@ -184,7 +186,6 @@ files:
|
|
|
184
186
|
- "./spec/t1k/commands/ship_spec.rb"
|
|
185
187
|
- "./spec/t1k/commands/validate_spec.rb"
|
|
186
188
|
- "./spec/t1k_spec.rb"
|
|
187
|
-
- "./t1k-4.0.4.gem"
|
|
188
189
|
- "./t1k.gemspec"
|
|
189
190
|
- README.md
|
|
190
191
|
- Rakefile
|
|
@@ -211,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
211
212
|
version: '0'
|
|
212
213
|
requirements: []
|
|
213
214
|
rubyforge_project:
|
|
214
|
-
rubygems_version: 2.7.
|
|
215
|
+
rubygems_version: 2.7.8
|
|
215
216
|
signing_key:
|
|
216
217
|
specification_version: 4
|
|
217
218
|
summary: T1K - Automated Git and Trello Workflow
|
data/t1k-4.0.4.gem
DELETED
|
Binary file
|