prima-twig 0.0.9 → 0.0.10

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/twig-deploy +83 -0
  3. metadata +4 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e51f7efbdc4ff239cee91b356d534a1391a4f25
4
- data.tar.gz: 736f2ba291557033b81b25c7f138b0b2ae347269
3
+ metadata.gz: 5445337413d58fbcf02c22ab2788cb65cb14e8d3
4
+ data.tar.gz: d4f11fb373e5cd1813d80e2cab574658ebb5b6fa
5
5
  SHA512:
6
- metadata.gz: 4f0181052d4055ce05f6b10365ab75fb213b5de0a8c5c0136808d66c56f9e0ad2d6e74d65d2238d71b8211513223c9df0f0d476d44026869e348181829f8e871
7
- data.tar.gz: 539f4b2935e092ee7bbb6789cbb6399c0d6d6696473b8d9a21e4a04d35e11ce31179b3f166a1df15bb4b001650db31dbcf95182e1f594bcd98fb2e58181c8df9
6
+ metadata.gz: c9f3af6a05272eb8de9d7e3426abf5a8e573ec8ed1f7c62807d2843d166fbec58ad6cfc8ff861d0d22da17fb2b3634795c7dcac5c28f3abe67166df0a438ae13
7
+ data.tar.gz: bd86d90fcf01550207125ade6b2b4d6e7406eca2ca7fb49cd0714b42cd85f27417da7f348f2f089379f095a3efabcf55c5d4254acc165bef23e6a431567a34eb
data/bin/twig-deploy ADDED
@@ -0,0 +1,83 @@
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
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.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Giachino
@@ -95,28 +95,16 @@ dependencies:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
97
  version: '2.0'
98
- - !ruby/object:Gem::Dependency
99
- name: rugged
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - "~>"
103
- - !ruby/object:Gem::Version
104
- version: '0.21'
105
- type: :runtime
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - "~>"
110
- - !ruby/object:Gem::Version
111
- version: '0.21'
112
98
  description: Our tools to manage git, github and trello
113
99
  email: matteo.giachino@prima.it
114
100
  executables:
101
+ - twig-deploy
115
102
  - twig-open-pr
116
103
  - twig-review
117
104
  extensions: []
118
105
  extra_rdoc_files: []
119
106
  files:
107
+ - bin/twig-deploy
120
108
  - bin/twig-open-pr
121
109
  - bin/twig-review
122
110
  - lib/prima_twig.rb
@@ -140,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
128
  version: '0'
141
129
  requirements: []
142
130
  rubyforge_project:
143
- rubygems_version: 2.4.3
131
+ rubygems_version: 2.4.6
144
132
  signing_key:
145
133
  specification_version: 4
146
134
  summary: The Prima twig toolbelt