gitsflow 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of gitsflow might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a313b9a90fc3e2d4aa3d61948cb1a8676207eff5b91c34bb7c830bf7acacec5
4
- data.tar.gz: 076cfa6afd9e5cbb87ae1cf81eb5334c14db826dfb80a7edcac708ebf610feef
3
+ metadata.gz: c958fc693a83032739a7345665449e485a0bbcc260443e56d4fae1a8aaf0336c
4
+ data.tar.gz: 71ac0432a9cd5ad92975785b786c172c5ec512172c2f508f1648a17a92cf18bd
5
5
  SHA512:
6
- metadata.gz: 5a1a70d837daa1b26bc09a75de606b28f7f61f87f210e803d58fb2d06acfd8972ec3ff04c956432383b87d70c334c2d788828fd2cd3e6e3aecbcd1b59ec3999f
7
- data.tar.gz: 1a229b6096b79ea7030e79e2453fa8bdd4b85c01d03454afcef8582d48241529f6b3cc0e417e9ed6eaf0fd498cb114a3ee717a656a389548fff07b8288263618
6
+ metadata.gz: 9c733c8c5615243ce57476d55b16fe171b831512246c966a512727245f9edde44ff59d0196a07c5e8877063277de120cd82a1170fab84d6b77e82d70a58e1b09
7
+ data.tar.gz: c14d110907080784d633ad3593e7d028ec483a6d6329d55ae84a292bef4e107caaaf84f838c20c3926c6dadfdc13769fbb3c56adcbf22098ba5939b4a08b29d2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitsflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Wherbet
@@ -87,25 +87,7 @@ executables:
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - ".gitignore"
91
- - CODE_OF_CONDUCT.md
92
- - Gemfile
93
- - Gemfile.lock
94
- - LICENSE.txt
95
- - README.md
96
- - Rakefile
97
90
  - bin/sflow
98
- - gitsflow.gemspec
99
- - lib/Git/git.rb
100
- - lib/GitLab/gitlab.rb
101
- - lib/GitLab/issue.rb
102
- - lib/GitLab/list.rb
103
- - lib/GitLab/merge_request.rb
104
- - lib/GitLab/user.rb
105
- - lib/config.rb
106
- - lib/sflow.rb
107
- - lib/string.rb
108
- - src/common/images/get_token.gif
109
91
  homepage: https://github.com/carloswherbet/GitSFlow
110
92
  licenses:
111
93
  - MIT
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- *.gem
2
- /.bundle/
3
- /.yardoc
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- .env
11
-
12
- # rspec failure tracking
13
- .rspec_status
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at carloswherbet@gmail.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in SFlow.gemspec
6
- gemspec
@@ -1,45 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- gitsflow (0.1.0)
5
- dotenv (~> 0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- coderay (1.1.2)
11
- diff-lcs (1.3)
12
- dotenv (0.11.1)
13
- dotenv-deployment (~> 0.0.2)
14
- dotenv-deployment (0.0.2)
15
- method_source (1.0.0)
16
- pry (0.13.0)
17
- coderay (~> 1.1)
18
- method_source (~> 1.0)
19
- rake (12.3.3)
20
- rspec (3.9.0)
21
- rspec-core (~> 3.9.0)
22
- rspec-expectations (~> 3.9.0)
23
- rspec-mocks (~> 3.9.0)
24
- rspec-core (3.9.1)
25
- rspec-support (~> 3.9.1)
26
- rspec-expectations (3.9.1)
27
- diff-lcs (>= 1.2.0, < 2.0)
28
- rspec-support (~> 3.9.0)
29
- rspec-mocks (3.9.1)
30
- diff-lcs (>= 1.2.0, < 2.0)
31
- rspec-support (~> 3.9.0)
32
- rspec-support (3.9.2)
33
-
34
- PLATFORMS
35
- ruby
36
-
37
- DEPENDENCIES
38
- bundler (~> 1.16)
39
- gitsflow!
40
- pry (~> 0)
41
- rake (~> 12.3)
42
- rspec (~> 3.0)
43
-
44
- BUNDLED WITH
45
- 1.16.1
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2020 Carlos Wherbet
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 DELETED
@@ -1,96 +0,0 @@
1
- # GitSFlow
2
- GitSFlow is a tool that integrate Git custom commands with GitLab and it's inspired GitFlow
3
- ## Installation
4
-
5
-
6
- ```ruby
7
- gem 'gitsflow', group: :development
8
- ```
9
-
10
- 1 - Add this line to your application's Gemfile:
11
-
12
- $ bundle install
13
- $ sflow install
14
- -> It will install the git alias
15
-
16
- 2 - install it yourself as:
17
-
18
- $ gem install gitsflow
19
-
20
- And in your application's:
21
-
22
- $ sflow install
23
- -> It will install the git alias
24
-
25
-
26
- ## Flow Sugestion
27
-
28
-
29
- ## Config
30
-
31
- $ git sflow config
32
- or
33
- $ sflow config
34
-
35
- In your project create or update file .env with variables below:
36
-
37
- ```shell
38
- GITLAB_PROJECT_ID=
39
- GITLAB_TOKEN=
40
- GITLAB_URL_API=https://gitlab.com/api/v4
41
- GITLAB_EMAIL=
42
- GITLAB_LISTS=To Do,Doing,Next Release,Staging
43
- GITLAB_NEXT_RELEASE_LIST=Next Release
44
- GIT_BRANCH_MASTER=master
45
- GIT_BRANCH_DEVELOP=develop
46
- GIT_BRANCHES_STAGING=staging_1,staging_2
47
- ```
48
-
49
- ## Usage
50
-
51
- For help:
52
-
53
- $ git sflow help
54
- or
55
- $ sflow help
56
-
57
- List of commands:
58
- 1. git sflow feature start FEATURE DESCRIPTION
59
- 2. git sflow feature [reintegration|finish] FEATURE_BRANCH
60
- 3. git sflow feature codereview BRANCH
61
- 4. git sflow feature staging SOURCE_BRANCH
62
- 5. git sflow bugfix start BUGFIX DESCRIPTION
63
- 6. git sflow bugfix [reintegration|finish] BUGFIX_BRANCH
64
- 7. git sflow bugfix codereview BUGFIX_BRANCH
65
- 8. git sflow bugfix staging BUGFIX_BRANCH
66
- 9. git sflow hotfix start HOTFIX DESCRIPTION
67
- 10. git sflow hotfix [reintegration|finish] HOTFIX_BRANCH
68
- 11. git sflow release start RELEASE
69
- 12. git sflow release finish RELEASE
70
- 13. git sflow push BRANCH
71
-
72
-
73
-
74
- ## Uninstall
75
- $ git sflow uninstall
76
- or
77
- $ sflow uninstall
78
-
79
- TODO: Write usage instructions here
80
-
81
-
82
- ## Get a GitLab Token
83
-
84
- ![Get a GitLab Token](https://github.com/carloswherbet/GitSFlow/raw/master/src/common/images/get_token.gif "Get a GitLab Token")
85
-
86
- ## Contributing
87
-
88
- Bug reports and pull requests are welcome on GitHub at https://github.com/carloswherbet/GitSFlow. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
89
-
90
- ## License
91
-
92
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
93
-
94
- ## Code of Conduct
95
-
96
- Everyone interacting in the SFlow project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/carloswherbet/GitSFlow/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
@@ -1,37 +0,0 @@
1
- lib = File.expand_path("../lib", __FILE__)
2
- $LOAD_PATH.push(lib)
3
-
4
- require "sflow"
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{gitsflow}
8
- s.version = SFlow::VERSION
9
- s.date = %q{2020-03-20}
10
- s.bindir = "bin"
11
- s.homepage = "https://github.com/carloswherbet/GitSFlow"
12
- s.summary = %q{GitSFlow is a tool that integrate Git custom commands with GitLab and it's inspired GitFlow}
13
- s.authors = ["Carlos Wherbet"]
14
- s.email = 'carloswherbet@gmail.com'
15
- s.required_ruby_version = '>= 2.0.0'
16
- s.license = "MIT"
17
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
- # to allow pushing to a single host or delete this section to allow pushing to any host.
19
- if s.respond_to?(:metadata)
20
- s.metadata["allowed_push_host"] = "https://rubygems.org"
21
- else
22
- raise "RubyGems 2.0 or newer is required to protect against " \
23
- "public gem pushes."
24
- end
25
- s.executables << 'sflow'
26
-
27
- s.require_paths = ["lib"]
28
- s.files = `git ls-files -z`.split("\x0").reject do |f|
29
- f.match(%r{^(test|spec|features)/})
30
- end
31
- s.add_dependency "dotenv", "~> 0"
32
- s.add_development_dependency "pry", "~> 0"
33
- s.add_development_dependency "bundler", "~> 1.16"
34
- s.add_development_dependency "rake", "~> 12.3"
35
- s.add_development_dependency "rspec", "~> 3.0"
36
- end
37
-
@@ -1,78 +0,0 @@
1
- module Git
2
- def self.checkout branch
3
- print "checkout: ".yellow
4
- print "#{branch}\n\n".green
5
- system "git checkout #{branch}"
6
- self.pull branch
7
- end
8
-
9
- def self.merge from, to
10
- # self.checkout(from)
11
- self.checkout(to)
12
- print "Merge ".yellow
13
- print "#{from} ".green
14
- print "into ".yellow
15
- print "#{to} \n\n".green
16
- execute {"git pull origin #{from}"}
17
- end
18
-
19
- def self.delete_branch branch
20
- print "Delete branch: ".yellow
21
- print "#{branch} \n\n".green
22
- system("git checkout develop && git branch -D #{branch}")
23
- end
24
-
25
- def self.reset_hard from, to
26
- self.fetch from
27
- self.fetch to
28
- self.checkout(to)
29
- print "Reset --hard: #{to} is equal: ".yellow
30
- print "#{from}\n".green
31
- system "git reset --hard origin/#{from}\n\n"
32
- end
33
-
34
- def self.push branch
35
- print "Push: ".yellow
36
- print "#{branch}\n\n".green
37
- execute {"git push origin #{branch}"}
38
- end
39
-
40
- def self.pull branch
41
- print "Pull: ".yellow
42
- print "#{branch}\n\n".green
43
- system "git pull origin #{branch}"
44
- end
45
-
46
- def self.fetch branch
47
- print "Fetch: ".yellow
48
- print "#{branch}\n\n".green
49
- system "git fetch origin #{branch}"
50
- end
51
-
52
- def self.new_branch branch
53
- print "Create new branch: ".yellow
54
- print "#{branch}\n".green
55
- system "git checkout -b #{branch}"
56
- end
57
-
58
-
59
- def self.exist_branch? branch
60
- execute {"git fetch origin #{branch}"}
61
-
62
- end
63
-
64
-
65
- private
66
-
67
- def self.execute
68
- processs, stderr = Open3.popen3(yield) do |i, o, stderr, wait_thr|
69
- [wait_thr.value, stderr.read]
70
- end
71
- if processs.success?
72
- # print "Success!\n\n".green
73
- else
74
- raise "#{stderr}"
75
- end
76
- end
77
-
78
- end
@@ -1,65 +0,0 @@
1
- require 'json'
2
-
3
- module GitLab
4
- autoload :User, 'GitLab/user.rb'
5
- autoload :Issue, 'GitLab/issue.rb'
6
- autoload :MergeRequest, 'GitLab/merge_request.rb'
7
- autoload :List, 'GitLab/list.rb'
8
- def self.request_post url, params
9
- request = "#{$GITLAB_URL_API}/#{url}"
10
- uri = URI(request)
11
- req = Net::HTTP::Post.new(uri)
12
- req['PRIVATE-TOKEN'] = $GITLAB_TOKEN
13
- req.set_form_data(params)
14
- res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) {|http| http.request(req) }
15
- JSON.parse(res.body)
16
- end
17
-
18
- def self.request_put url, params
19
- request = "#{$GITLAB_URL_API}/#{url}"
20
- uri = URI(request)
21
- req = Net::HTTP::Put.new(uri)
22
- req['PRIVATE-TOKEN'] = $GITLAB_TOKEN
23
- req.set_form_data(params)
24
- res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) {|http| http.request(req) }
25
- JSON.parse(res.body)
26
- end
27
-
28
- def self.request_get url
29
- request = "#{$GITLAB_URL_API}/#{url}"
30
- uri = URI(request)
31
- req = Net::HTTP::Get.new(uri)
32
- req['PRIVATE-TOKEN'] = $GITLAB_TOKEN
33
- res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) {|http| http.request(req) }
34
- JSON.parse(res.body)
35
- end
36
-
37
-
38
-
39
- def self.create_labels
40
- url = "projects/#{$GITLAB_PROJECT_ID}/labels"
41
- params = [
42
- {name: 'feature', color: "#5CB85C"},
43
- {name: 'default_branch', color: "#34495E"},
44
- {name: 'version', color: "#34495E"},
45
- {name: 'hotfix', color: "#d9534f"},
46
- {name: 'production', color: "#F45D43"},
47
- {name: 'urgent', color: "#d9534f"},
48
- {name: 'bugfix', color: "#D9534F"},
49
- {name: 'changelog', color: "#0033CC"},
50
- {name: 'Staging', color: "#FAD8C7"},
51
- ]
52
- $GIT_BRANCHES_STAGING.each do |staging|
53
- params << {name: staging, color: '#FAD8C7'}
54
- end
55
-
56
- params << {name: $GITLAB_NEXT_RELEASE_LIST, color: '#34495E'}
57
-
58
- params.each do |label_params|
59
- self.request_post(url, label_params)
60
- end
61
-
62
- end
63
-
64
-
65
- end