prima-twig 0.0.10 → 0.0.11

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: 5445337413d58fbcf02c22ab2788cb65cb14e8d3
4
- data.tar.gz: d4f11fb373e5cd1813d80e2cab574658ebb5b6fa
3
+ metadata.gz: c716c024c25c66f63d2191d909dae689c575e95a
4
+ data.tar.gz: ef65e6652f87fd539305b6e0df765adb247725eb
5
5
  SHA512:
6
- metadata.gz: c9f3af6a05272eb8de9d7e3426abf5a8e573ec8ed1f7c62807d2843d166fbec58ad6cfc8ff861d0d22da17fb2b3634795c7dcac5c28f3abe67166df0a438ae13
7
- data.tar.gz: bd86d90fcf01550207125ade6b2b4d6e7406eca2ca7fb49cd0714b42cd85f27417da7f348f2f089379f095a3efabcf55c5d4254acc165bef23e6a431567a34eb
6
+ metadata.gz: 745640d28a76cbfd14425e6f31b9ac5504d56fe0e7b0b54e074a10e0c59c7c5306be549f1fd20efe9fcf0df8db059bc78544428979d298f21f2950160a0076d6
7
+ data.tar.gz: 7b4e51b34230cd1817c57970857051ff9685382c2bdbe3b43fa0e1083d67db882d5593d704508df6aa7b39203c77bf691762691d528fe9987987d61aeac5f6a8
data/bin/twig-circle ADDED
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require_relative '../lib/prima_twig.rb'
5
+ require 'colorize'
6
+ require 'highline/import'
7
+ require 'launchy'
8
+
9
+
10
+ def help_content
11
+ <<-HELP
12
+
13
+ twig-circle
14
+ ===========
15
+
16
+ Opens circleci contextual to the current branch
17
+
18
+ Synopsis
19
+ --------
20
+
21
+ twig circle [-b|--branch <branch>]
22
+
23
+ Description
24
+ -----------
25
+
26
+ Opens circleci contextual to the current branch
27
+
28
+ Subcommand for Twig: <http://rondevera.github.io/twig/>
29
+ Author: Matteo Giachino <https://github.com/matteosister>
30
+
31
+ HELP
32
+ end
33
+
34
+ args = ARGV.dup
35
+
36
+ if args.include?('--help')
37
+ puts help_content
38
+ exit
39
+ end
40
+
41
+ class Circle
42
+ def initialize
43
+ @prima = Prima.new
44
+ end
45
+
46
+ def execute
47
+ Launchy.open("https://circleci.com/gh/#{ @prima.repo_name }/tree/#{ @prima.current_branch_name }")
48
+ end
49
+ end
50
+
51
+ Circle.new.execute
data/bin/twig-open-pr CHANGED
@@ -18,7 +18,7 @@ Opens a PR on github for this branch, if not already opened
18
18
  Synopsis
19
19
  --------
20
20
 
21
- twig open-pr [-b|--branch <branch>]
21
+ twig open-pr
22
22
 
23
23
  Description
24
24
  -----------
data/bin/twig-review CHANGED
@@ -17,7 +17,7 @@ Puts the pull request for the current branch in review
17
17
  Synopsis
18
18
  --------
19
19
 
20
- twig review [-b|--branch <branch>]
20
+ twig review
21
21
 
22
22
  Description
23
23
  -----------
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prima-twig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Giachino
@@ -98,13 +98,13 @@ dependencies:
98
98
  description: Our tools to manage git, github and trello
99
99
  email: matteo.giachino@prima.it
100
100
  executables:
101
- - twig-deploy
101
+ - twig-circle
102
102
  - twig-open-pr
103
103
  - twig-review
104
104
  extensions: []
105
105
  extra_rdoc_files: []
106
106
  files:
107
- - bin/twig-deploy
107
+ - bin/twig-circle
108
108
  - bin/twig-open-pr
109
109
  - bin/twig-review
110
110
  - lib/prima_twig.rb
data/bin/twig-deploy DELETED
@@ -1,83 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'rubygems'
4
- require_relative '../lib/prima_twig.rb'
5
- require 'colorize'
6
- require 'highline/import'
7
-
8
-
9
- def help_content
10
- <<-HELP
11
-
12
- twig-deploy
13
- ===========
14
-
15
- Updates master and push to origin
16
-
17
- Synopsis
18
- --------
19
-
20
- twig deploy
21
-
22
- Description
23
- -----------
24
-
25
- Merges dev in master and push dev and master to origin, than returns to the actual branch
26
-
27
- Subcommand for Twig: <http://rondevera.github.io/twig/>
28
- Author: Matteo Giachino <https://github.com/matteosister>
29
-
30
- HELP
31
- end
32
-
33
- args = ARGV.dup
34
-
35
- if args.include?('--help')
36
- puts help_content
37
- exit
38
- end
39
-
40
- class Review
41
- def initialize
42
- @prima = Prima.new
43
- end
44
-
45
- def execute
46
- if @prima.head_detached?
47
- puts 'Head detached'.red
48
- exit(1)
49
- end
50
-
51
- unless @prima.is_clean?
52
- puts 'hai dei file non committati...non posso continuare'.red
53
- #exit(1)
54
- end
55
-
56
- actual_branch = @prima.current_branch_name
57
- puts actual_branch.green
58
-
59
- step 'git fetch'
60
- step 'git checkout dev'
61
- step 'git merge origin/dev'
62
- step 'git checkout master'
63
- step 'git merge origin/master'
64
- step 'git merge --ff-only dev'
65
- step 'git push origin master'
66
- step "git checkout #{actual_branch}"
67
-
68
- #puts "Il branch #{ @prima.current_branch_name } è ora in review".green
69
- exit 0
70
- end
71
-
72
- def step command, output = nil
73
- if output
74
- puts output
75
- else
76
- puts command
77
- end
78
- `#{command}`
79
- exit($?.exitstatus) unless 0 === $?.exitstatus
80
- end
81
- end
82
-
83
- Review.new.execute