t1k 1.2.0 → 2.0.0.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/CODE_OF_CONDUCT.md +13 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +113 -0
  6. data/Rakefile +1 -29
  7. data/T1000 +24 -0
  8. data/bin/t1k +8 -0
  9. data/lib/t1k/command.rb +50 -0
  10. data/lib/t1k/commands/commit.rb +37 -0
  11. data/lib/t1k/commands/hack.rb +26 -0
  12. data/lib/t1k/commands/init.rb +22 -0
  13. data/lib/t1k/commands/ship.rb +23 -0
  14. data/lib/t1k/commands/sink.rb +20 -0
  15. data/lib/t1k/repositories/bitbucket.rb +15 -15
  16. data/lib/t1k/repositories/github.rb +54 -54
  17. data/lib/t1k/repository.rb +18 -13
  18. data/lib/t1k/tracker.rb +18 -13
  19. data/lib/t1k/trackers/pivotal.rb +15 -15
  20. data/lib/t1k/trackers/trello.rb +51 -49
  21. data/lib/t1k/version.rb +1 -1
  22. data/lib/t1k.rb +44 -30
  23. data/resources/T1000 +24 -0
  24. data/spec/spec_helper.rb +2 -0
  25. data/spec/t1k_spec.rb +11 -0
  26. data/t1k.gemspec +27 -0
  27. metadata +61 -107
  28. data/MIT-LICENSE +0 -20
  29. data/README.rdoc +0 -3
  30. data/lib/t1k/engine.rb +0 -5
  31. data/lib/t1k/trackers/nothing.rb +0 -18
  32. data/lib/tasks/commit.rake +0 -12
  33. data/lib/tasks/hack.rake +0 -20
  34. data/lib/tasks/ship.rake +0 -15
  35. data/lib/tasks/sink.rake +0 -14
  36. data/lib/tasks/t1k_tasks.rake +0 -4
  37. data/test/dummy/README.rdoc +0 -28
  38. data/test/dummy/Rakefile +0 -6
  39. data/test/dummy/app/assets/javascripts/application.js +0 -13
  40. data/test/dummy/app/assets/stylesheets/application.css +0 -15
  41. data/test/dummy/app/controllers/application_controller.rb +0 -5
  42. data/test/dummy/app/helpers/application_helper.rb +0 -2
  43. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  44. data/test/dummy/bin/bundle +0 -3
  45. data/test/dummy/bin/rails +0 -4
  46. data/test/dummy/bin/rake +0 -4
  47. data/test/dummy/bin/setup +0 -29
  48. data/test/dummy/config/application.rb +0 -26
  49. data/test/dummy/config/boot.rb +0 -5
  50. data/test/dummy/config/database.yml +0 -25
  51. data/test/dummy/config/environment.rb +0 -5
  52. data/test/dummy/config/environments/development.rb +0 -41
  53. data/test/dummy/config/environments/production.rb +0 -79
  54. data/test/dummy/config/environments/test.rb +0 -42
  55. data/test/dummy/config/initializers/assets.rb +0 -11
  56. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  57. data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
  58. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  59. data/test/dummy/config/initializers/inflections.rb +0 -16
  60. data/test/dummy/config/initializers/mime_types.rb +0 -4
  61. data/test/dummy/config/initializers/session_store.rb +0 -3
  62. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  63. data/test/dummy/config/locales/en.yml +0 -23
  64. data/test/dummy/config/routes.rb +0 -56
  65. data/test/dummy/config/secrets.yml +0 -22
  66. data/test/dummy/config.ru +0 -4
  67. data/test/dummy/public/404.html +0 -67
  68. data/test/dummy/public/422.html +0 -67
  69. data/test/dummy/public/500.html +0 -66
  70. data/test/dummy/public/favicon.ico +0 -0
  71. data/test/test_helper.rb +0 -19
  72. data/test/tk1_test.rb +0 -36
@@ -1,23 +1,23 @@
1
1
  # pivotal requirements
2
2
 
3
3
  module T1k
4
- module Trackers
5
- class Pivotal
4
+ module Trackers
5
+ class Pivotal
6
6
 
7
- # pivotal configurations
8
- # cattr_accessor :config_name
9
- # @@config_name = "default value"
7
+ # pivotal configurations
8
+ # cattr_accessor :config_name
9
+ # @@config_name = "default value"
10
10
 
11
- # implement setup method
12
- # def self.setup &block
13
- # yield(self) if block_given?
14
- # end
11
+ # implement setup method
12
+ # def self.setup &block
13
+ # yield(self) if block_given?
14
+ # end
15
15
 
16
- # implement get_card method
17
- # def self.get_card(url_card); end
16
+ # implement get_card method
17
+ # def self.get_card(url_card); end
18
18
 
19
- # implement get_card method
20
- # def self.update_card(card, issue); end
21
- end
22
- end
19
+ # implement get_card method
20
+ # def self.update_card(card, issue); end
21
+ end
22
+ end
23
23
  end
@@ -1,52 +1,54 @@
1
- require "trello"
1
+ require 'trello'
2
2
 
3
3
  module T1k
4
- module Trackers
5
- class Trello
6
-
7
- cattr_accessor :developer_public_key
8
- @@developer_public_key = ""
9
-
10
- cattr_accessor :member_token
11
- @@member_token = ""
12
-
13
- cattr_accessor :user_name
14
- @@user_name = ""
15
-
16
- cattr_accessor :board_name
17
- @@board_name = ""
18
-
19
- def self.setup &block
20
- yield(self) if block_given?
21
- self.config_keys
22
- end
23
-
24
- def self.config_keys
25
- ::Trello.configure do |config|
26
- config.developer_public_key = self.developer_public_key
27
- config.member_token = self.member_token
28
- end
29
- end
30
-
31
- def self.get_card url_card
32
- puts "Catching card"
33
-
34
- me = ::Trello::Member.find(self.user_name)
35
- raise "User not found" if me.nil?
36
- board = me.boards.select{|x| x.name.upcase == self.board_name.upcase}.first
37
- raise "Board not found.\nBoards available: #{me.boards.map(&:name)}" if board.nil?
38
- card = board.cards.select{|x| x.url.index(url_card)}.first
39
- raise "Card not found" if card.nil?
40
-
41
- card
42
- end
43
-
44
- def self.update_card card, issue
45
- puts "Updating card"
46
- card.name = "[##{issue.code}] #{card.name}"
47
- card.desc = "#{issue.link} #{card.desc}"
48
- card.save
49
- end
50
- end
51
- end
4
+ module Trackers
5
+ class Trello
6
+
7
+ cattr_accessor :developer_public_key
8
+ @@developer_public_key = ""
9
+
10
+ cattr_accessor :member_token
11
+ @@member_token = ""
12
+
13
+ cattr_accessor :user_name
14
+ @@user_name = ""
15
+
16
+ cattr_accessor :board_name
17
+ @@board_name = ""
18
+
19
+ def self.setup &block
20
+ yield(self) if block_given?
21
+ self.config_keys
22
+ end
23
+
24
+ def self.config_keys
25
+ ::Trello.configure do |config|
26
+ config.developer_public_key = self.developer_public_key
27
+ config.member_token = self.member_token
28
+ end
29
+ end
30
+
31
+ def self.get_card url_card
32
+ begin
33
+ puts 'Fetching card'
34
+
35
+ me = ::Trello::Member.find(self.user_name)
36
+ board = me.boards.select{|x| x.name.upcase == self.board_name.upcase}.first
37
+ card = board.cards.select{|x| x.url.index(url_card)}.first
38
+ raise if card.nil?
39
+
40
+ card
41
+ rescue
42
+ raise 'Card not found'
43
+ end
44
+ end
45
+
46
+ def self.update_card card, issue
47
+ puts 'Updating card'
48
+ card.name = "[##{issue.code}] #{card.name}"
49
+ card.desc = "#{issue.link} #{card.desc}"
50
+ card.save
51
+ end
52
+ end
53
+ end
52
54
  end
data/lib/t1k/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module T1k
2
- VERSION = "1.2.0"
2
+ VERSION = "2.0.0.alpha"
3
3
  end
data/lib/t1k.rb CHANGED
@@ -1,43 +1,57 @@
1
- require 't1k/engine'
1
+ require 't1k/version'
2
+ require 't1k/command'
3
+ require 'pathname'
4
+ require 'active_support/core_ext/module/delegation'
5
+ require 'active_support/core_ext/module/attribute_accessors'
6
+ require 'active_support/inflector'
2
7
 
3
8
  module T1k
4
- autoload :Repository, 't1k/repository'
5
- autoload :Tracker, 't1k/tracker'
9
+ autoload :Repository, 't1k/repository'
10
+ autoload :Tracker, 't1k/tracker'
6
11
 
7
- module Repositories
8
- autoload :Github, 't1k/repositories/github'
9
- autoload :Bitbucket, 't1k/repositories/bitbucket'
10
- end
12
+ module Repositories
13
+ autoload :Github, 't1k/repositories/github'
14
+ autoload :Bitbucket, 't1k/repositories/bitbucket'
15
+ end
11
16
 
12
- module Trackers
13
- autoload :Nothing, 't1k/trackers/nothing'
14
- autoload :Trello, 't1k/trackers/trello'
15
- autoload :Pivotal, 't1k/trackers/pivotal'
16
- end
17
+ module Trackers
18
+ autoload :Trello, 't1k/trackers/trello'
19
+ autoload :Pivotal, 't1k/trackers/pivotal'
20
+ end
17
21
 
18
- mattr_accessor :repository
19
- @@repository = T1k::Repository
22
+ mattr_accessor :repository
23
+ @@repository = T1k::Repository
20
24
 
21
- mattr_accessor :tracker
22
- @@tracker = T1k::Tracker
25
+ mattr_accessor :tracker
26
+ @@tracker = T1k::Tracker
23
27
 
28
+ mattr_accessor :tthousand_path
29
+ @@tthousand_path = Pathname.pwd + 'T1000'
24
30
 
25
- def self.setup &block
26
- yield(self) if block_given?
27
- end
31
+ def self.setup &block
32
+ yield(self) if block_given?
33
+ end
28
34
 
29
- def self.hack url_card
30
- card = tracker.get_card(url_card)
35
+ def self.hack url_card
36
+ card = tracker.get_card(url_card)
31
37
 
32
- existent_issue_match = card.name.match /^\[#([0-9]*)\]/
33
- existent_issue_number = existent_issue_match[1] if existent_issue_match.present?
38
+ existent_issue_match = card.name.match /^\[#([0-9]*)\]/
39
+ existent_issue_number = existent_issue_match[1] if existent_issue_match.present?
34
40
 
35
- issue = existent_issue_number.present? ? repository.get_issue(existent_issue_number).html_url : repository.create_issue(card.name).html_url
41
+ issue = existent_issue_number.present? ? repository.get_issue(existent_issue_number).html_url : repository.create_issue(card.name).html_url
36
42
 
37
- issue_number = repository.get_issue_number(issue)
38
- tracker.update_card(card, issue_number) if existent_issue_number.nil?
43
+ issue_number = repository.get_issue_number(issue)
44
+ tracker.update_card(card, issue_number) if existent_issue_number.nil?
39
45
 
40
- puts "Card ##{issue_number.code} created and tracked"
41
- issue_number.code
42
- end
43
- end
46
+ puts "Card ##{issue_number.code} created and tracked"
47
+ issue_number.code
48
+ end
49
+
50
+ def self.path_to_resources
51
+ File.join(File.dirname(File.expand_path(__FILE__)), '../resources')
52
+ end
53
+
54
+ def self.setup_credentials
55
+ eval(File.read(@@tthousand_path)) if File.exists? @@tthousand_path
56
+ end
57
+ end
data/resources/T1000 ADDED
@@ -0,0 +1,24 @@
1
+ T1k.setup do |config|
2
+
3
+ # Setup Github repository credentials
4
+ #
5
+ # config.repository.adapter = :github
6
+ # config.repository.setup do |c|
7
+ # c.user = "GITHUB_USER"
8
+ # c.oauth_token = "GITHUB_AUTH_TOKEN"
9
+ # c.repo = "REPOSITORY_NAME"
10
+ # end
11
+
12
+ # Setup Trello board credentials
13
+ #
14
+ # T1k.setup do |config|
15
+ # config.tracker.adapter = :trello
16
+ # config.tracker.setup do |c|
17
+ # c.user_name = "TRELLO_USER"
18
+ # c.member_token = "TRELLO_MEMBER_TOKEN"
19
+ # c.board_name = "TRELLO_BOARD_NAME"
20
+ # c.developer_public_key = "TRELLO_DEVELOPER_PUB_KEY"
21
+ # end
22
+ # end
23
+
24
+ end
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 't1k'
data/spec/t1k_spec.rb ADDED
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe T1k do
4
+ it 'has a version number' do
5
+ expect(T1k::VERSION).not_to be nil
6
+ end
7
+
8
+ it 'does something useful' do
9
+ expect(false).to eq(true)
10
+ end
11
+ end
data/t1k.gemspec ADDED
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 't1k/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "t1k"
8
+ spec.version = T1k::VERSION
9
+ spec.authors = ["Rodrigo Maia"]
10
+ spec.email = ["rodrigomb@gmail.com"]
11
+
12
+ spec.homepage = "https://github.com/fortesinformatica/t1k"
13
+ spec.summary = "T1K - Automated Git and Trello Workflow"
14
+ spec.description = "Use those scripts to create automatically branchs associated with issues and tracked commits."
15
+ spec.license = "MIT"
16
+
17
+ spec.files = Dir["./**/*", "resources/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
18
+ spec.bindir = "bin"
19
+ spec.executables = ["t1k"]
20
+ spec.require_paths = ["lib", "resources"]
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.9"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_dependency "ruby-trello", "1.2.1"
25
+ spec.add_dependency "github_api", "~> 0.12"
26
+ spec.add_dependency 'activesupport', '~> 4.2.1'
27
+ end
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: t1k
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 2.0.0.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Maia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.2
20
- type: :runtime
19
+ version: '1.9'
20
+ type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 4.0.2
26
+ version: '1.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: ruby-trello
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -53,81 +67,56 @@ dependencies:
53
67
  - !ruby/object:Gem::Version
54
68
  version: '0.12'
55
69
  - !ruby/object:Gem::Dependency
56
- name: sqlite3
70
+ name: activesupport
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - '>='
73
+ - - ~>
60
74
  - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
75
+ version: 4.2.1
76
+ type: :runtime
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - '>='
80
+ - - ~>
67
81
  - !ruby/object:Gem::Version
68
- version: '0'
82
+ version: 4.2.1
69
83
  description: Use those scripts to create automatically branchs associated with issues
70
84
  and tracked commits.
71
85
  email:
72
86
  - rodrigomb@gmail.com
73
- executables: []
87
+ executables:
88
+ - t1k
74
89
  extensions: []
75
90
  extra_rdoc_files: []
76
91
  files:
77
- - MIT-LICENSE
78
- - README.rdoc
92
+ - ./CODE_OF_CONDUCT.md
93
+ - ./Gemfile
94
+ - ./LICENSE.txt
95
+ - ./README.md
96
+ - ./Rakefile
97
+ - ./T1000
98
+ - ./bin/t1k
99
+ - ./lib/t1k.rb
100
+ - ./lib/t1k/command.rb
101
+ - ./lib/t1k/commands/commit.rb
102
+ - ./lib/t1k/commands/hack.rb
103
+ - ./lib/t1k/commands/init.rb
104
+ - ./lib/t1k/commands/ship.rb
105
+ - ./lib/t1k/commands/sink.rb
106
+ - ./lib/t1k/repositories/bitbucket.rb
107
+ - ./lib/t1k/repositories/github.rb
108
+ - ./lib/t1k/repository.rb
109
+ - ./lib/t1k/tracker.rb
110
+ - ./lib/t1k/trackers/pivotal.rb
111
+ - ./lib/t1k/trackers/trello.rb
112
+ - ./lib/t1k/version.rb
113
+ - ./resources/T1000
114
+ - ./spec/spec_helper.rb
115
+ - ./spec/t1k_spec.rb
116
+ - ./t1k.gemspec
79
117
  - Rakefile
80
- - lib/t1k.rb
81
- - lib/t1k/engine.rb
82
- - lib/t1k/repositories/bitbucket.rb
83
- - lib/t1k/repositories/github.rb
84
- - lib/t1k/repository.rb
85
- - lib/t1k/tracker.rb
86
- - lib/t1k/trackers/nothing.rb
87
- - lib/t1k/trackers/pivotal.rb
88
- - lib/t1k/trackers/trello.rb
89
- - lib/t1k/version.rb
90
- - lib/tasks/commit.rake
91
- - lib/tasks/hack.rake
92
- - lib/tasks/ship.rake
93
- - lib/tasks/sink.rake
94
- - lib/tasks/t1k_tasks.rake
95
- - test/dummy/README.rdoc
96
- - test/dummy/Rakefile
97
- - test/dummy/app/assets/javascripts/application.js
98
- - test/dummy/app/assets/stylesheets/application.css
99
- - test/dummy/app/controllers/application_controller.rb
100
- - test/dummy/app/helpers/application_helper.rb
101
- - test/dummy/app/views/layouts/application.html.erb
102
- - test/dummy/bin/bundle
103
- - test/dummy/bin/rails
104
- - test/dummy/bin/rake
105
- - test/dummy/bin/setup
106
- - test/dummy/config.ru
107
- - test/dummy/config/application.rb
108
- - test/dummy/config/boot.rb
109
- - test/dummy/config/database.yml
110
- - test/dummy/config/environment.rb
111
- - test/dummy/config/environments/development.rb
112
- - test/dummy/config/environments/production.rb
113
- - test/dummy/config/environments/test.rb
114
- - test/dummy/config/initializers/assets.rb
115
- - test/dummy/config/initializers/backtrace_silencers.rb
116
- - test/dummy/config/initializers/cookies_serializer.rb
117
- - test/dummy/config/initializers/filter_parameter_logging.rb
118
- - test/dummy/config/initializers/inflections.rb
119
- - test/dummy/config/initializers/mime_types.rb
120
- - test/dummy/config/initializers/session_store.rb
121
- - test/dummy/config/initializers/wrap_parameters.rb
122
- - test/dummy/config/locales/en.yml
123
- - test/dummy/config/routes.rb
124
- - test/dummy/config/secrets.yml
125
- - test/dummy/public/404.html
126
- - test/dummy/public/422.html
127
- - test/dummy/public/500.html
128
- - test/dummy/public/favicon.ico
129
- - test/test_helper.rb
130
- - test/tk1_test.rb
118
+ - bin/t1k
119
+ - resources/T1000
131
120
  homepage: https://github.com/fortesinformatica/t1k
132
121
  licenses:
133
122
  - MIT
@@ -136,6 +125,7 @@ post_install_message:
136
125
  rdoc_options: []
137
126
  require_paths:
138
127
  - lib
128
+ - resources
139
129
  required_ruby_version: !ruby/object:Gem::Requirement
140
130
  requirements:
141
131
  - - '>='
@@ -143,49 +133,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
133
  version: '0'
144
134
  required_rubygems_version: !ruby/object:Gem::Requirement
145
135
  requirements:
146
- - - '>='
136
+ - - '>'
147
137
  - !ruby/object:Gem::Version
148
- version: '0'
138
+ version: 1.3.1
149
139
  requirements: []
150
140
  rubyforge_project:
151
141
  rubygems_version: 2.2.2
152
142
  signing_key:
153
143
  specification_version: 4
154
144
  summary: T1K - Automated Git and Trello Workflow
155
- test_files:
156
- - test/dummy/app/assets/javascripts/application.js
157
- - test/dummy/app/assets/stylesheets/application.css
158
- - test/dummy/app/controllers/application_controller.rb
159
- - test/dummy/app/helpers/application_helper.rb
160
- - test/dummy/app/views/layouts/application.html.erb
161
- - test/dummy/bin/bundle
162
- - test/dummy/bin/rails
163
- - test/dummy/bin/rake
164
- - test/dummy/bin/setup
165
- - test/dummy/config/application.rb
166
- - test/dummy/config/boot.rb
167
- - test/dummy/config/database.yml
168
- - test/dummy/config/environment.rb
169
- - test/dummy/config/environments/development.rb
170
- - test/dummy/config/environments/production.rb
171
- - test/dummy/config/environments/test.rb
172
- - test/dummy/config/initializers/assets.rb
173
- - test/dummy/config/initializers/backtrace_silencers.rb
174
- - test/dummy/config/initializers/cookies_serializer.rb
175
- - test/dummy/config/initializers/filter_parameter_logging.rb
176
- - test/dummy/config/initializers/inflections.rb
177
- - test/dummy/config/initializers/mime_types.rb
178
- - test/dummy/config/initializers/session_store.rb
179
- - test/dummy/config/initializers/wrap_parameters.rb
180
- - test/dummy/config/locales/en.yml
181
- - test/dummy/config/routes.rb
182
- - test/dummy/config/secrets.yml
183
- - test/dummy/config.ru
184
- - test/dummy/public/404.html
185
- - test/dummy/public/422.html
186
- - test/dummy/public/500.html
187
- - test/dummy/public/favicon.ico
188
- - test/dummy/Rakefile
189
- - test/dummy/README.rdoc
190
- - test/test_helper.rb
191
- - test/tk1_test.rb
145
+ test_files: []
data/MIT-LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright 2015 Rodrigo Maia
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc DELETED
@@ -1,3 +0,0 @@
1
- = T1k
2
-
3
- This project rocks and uses MIT-LICENSE.
data/lib/t1k/engine.rb DELETED
@@ -1,5 +0,0 @@
1
- module T1k
2
- class Engine < ::Rails::Engine
3
- isolate_namespace T1k
4
- end
5
- end
@@ -1,18 +0,0 @@
1
- module T1k
2
- module Trackers
3
- class Nothing
4
-
5
- Card = Struct.new(:name)
6
-
7
- def self.setup &block
8
- end
9
-
10
- def self.get_card title
11
- Card.new title
12
- end
13
-
14
- def self.update_card card, issue
15
- end
16
- end
17
- end
18
- end
@@ -1,12 +0,0 @@
1
- require 'rake'
2
-
3
- #rake t1k:commit['comentario do commit',close]
4
- namespace :t1k do
5
- desc "Commit using issue's info to track it down with github"
6
-
7
- task :commit, [:comment, :close] do |t, args|
8
- closed = args[:close] == 'close' ? "close " : ""
9
- branch = `git branch | grep '*' | awk '{print $2}'`
10
- system "git commit -m '[#{closed}##{branch.strip}] #{args[:comment]}'"
11
- end
12
- end
data/lib/tasks/hack.rake DELETED
@@ -1,20 +0,0 @@
1
- require 'rake'
2
-
3
- # rake t1k:hack['uD2GBBMf']
4
- namespace :t1k do
5
- desc "Creates an issue and update the trello's card"
6
-
7
- task :hack, [:path_card_part] do |t, args|
8
- code_card = T1k::hack args[:path_card_part]
9
-
10
- system 'git checkout master'
11
- system 'git pull --rebase origin master'
12
- existent_branch = `git branch --list #{code_card}`
13
-
14
- if existent_branch.present?
15
- system "git checkout #{code_card}"
16
- else
17
- system "git checkout -b #{code_card}"
18
- end
19
- end
20
- end
data/lib/tasks/ship.rake DELETED
@@ -1,15 +0,0 @@
1
- require 'rake'
2
-
3
- #rake t1k:ship
4
- namespace :t1k do
5
- desc "It merges the current branch with master and push"
6
-
7
- task :ship do |t, args|
8
- branch = `git branch | grep '*' | awk '{print $2}'`
9
- system "git checkout master"
10
- system "git pull --rebase"
11
- system "git merge #{branch.strip}"
12
- system "git commit -v"
13
- system "git push origin master"
14
- end
15
- end
data/lib/tasks/sink.rake DELETED
@@ -1,14 +0,0 @@
1
- require 'rake'
2
-
3
- #rake t1k:sink
4
- namespace :t1k do
5
- desc "Sync current branch with master"
6
-
7
- task :sink do |t, args|
8
- branch = `git branch | grep '*' | awk '{print $2}'`
9
- system "git checkout master"
10
- system "git pull --rebase origin master"
11
- system "git checkout #{branch.strip}"
12
- system "git rebase master #{branch.strip}"
13
- end
14
- end
@@ -1,4 +0,0 @@
1
- # desc "Explaining what the task does"
2
- # task :t1k do
3
- # # Task goes here
4
- # end