utsup 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +3 -3
- data/Manifest.txt +0 -4
- data/lib/sup/base.rb +19 -18
- metadata +1 -5
- metadata.gz.sig +2 -3
- data/lib/hooks/post-checkout +0 -2
- data/lib/hooks/post-commit +0 -2
- data/lib/hooks/post-merge +0 -2
- data/lib/hooks/post-receive +0 -2
data.tar.gz.sig
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
�N& |4R�}je�c�)m���
|
2
|
+
��o�YL 1��6��:��A���ׇ=$�4�F8�Zl����ǒ��g��`��g4o':(��e_xPf\Y4T���J��="�a>\d�`Q�I��gL�߷������1jzǀ��M�?/���7��V">�������;p�$`�a�c����{�#�(7��ǒM��]���7BDq�\Rc؝�_���~�)�.H��5?E_nFc�
|
3
|
+
o(Z3��+�f�
|
data/Manifest.txt
CHANGED
data/lib/sup/base.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
module Sup
|
2
|
-
VERSION = '0.1.
|
3
|
-
GIT_HOOKS = %w(post-commit post-receive post-merge post-checkout) #TODO: post-rebase?
|
2
|
+
VERSION = '0.1.4'
|
4
3
|
|
5
4
|
GLOBAL_CONFIG_PATH = '~/.utsup/config.yml'
|
6
5
|
GLOBAL_PROJECT_CONFIG_PATH = '~/.utsup/projects.yml'
|
@@ -69,6 +68,13 @@ module Sup
|
|
69
68
|
# Init
|
70
69
|
# ===========================
|
71
70
|
|
71
|
+
GIT_HOOKS = {
|
72
|
+
"post-checkout" => "sup git checkout $@",
|
73
|
+
"post-commit" => "sup git commit",
|
74
|
+
"post-merge" => "sup git merge $@",
|
75
|
+
"post-receive" => "sup git receive $@"
|
76
|
+
}
|
77
|
+
|
72
78
|
def init(project_title)
|
73
79
|
|
74
80
|
# --- project init
|
@@ -87,20 +93,14 @@ module Sup
|
|
87
93
|
end
|
88
94
|
|
89
95
|
# --- write git hooks
|
90
|
-
|
91
|
-
GIT_HOOKS.each do |hook|
|
96
|
+
GIT_HOOKS.each do |hook, command|
|
92
97
|
path = File.join(Dir.pwd, '.git/hooks/', hook)
|
93
|
-
|
98
|
+
exists = File.exists?(path)
|
94
99
|
|
95
|
-
if File.
|
96
|
-
puts "You already have a git hook here: #{path}"
|
97
|
-
puts "Please make sure it's executable add this to it:"
|
98
|
-
puts hook_cmd + "\n"
|
99
|
-
next
|
100
|
-
end
|
100
|
+
next if exists && File.read(path) =~ /#{Regexp.quote(command)}/
|
101
101
|
|
102
|
-
File.open(path, 'w', 0775) do |f|
|
103
|
-
f.
|
102
|
+
File.open(path, (exists ? 'a' : 'w'), 0775) do |f|
|
103
|
+
f.puts command
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
@@ -111,12 +111,13 @@ module Sup
|
|
111
111
|
# ===========================
|
112
112
|
|
113
113
|
def configure
|
114
|
+
begin
|
115
|
+
global_config = Yamlize.new GLOBAL_CONFIG_PATH
|
116
|
+
project_config = Yamlize.new(File.join(Dir.pwd, PROJECT_CONFIG_PATH)) rescue {}
|
117
|
+
global_project_config = Yamlize.new GLOBAL_PROJECT_CONFIG_PATH
|
114
118
|
|
115
|
-
|
116
|
-
|
117
|
-
global_project_config = Yamlize.new GLOBAL_PROJECT_CONFIG_PATH
|
118
|
-
|
119
|
-
unless global_config['api_key']
|
119
|
+
raise unless global_config['api_key']
|
120
|
+
rescue
|
120
121
|
setup
|
121
122
|
exit 0
|
122
123
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utsup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Merwin
|
@@ -92,10 +92,6 @@ files:
|
|
92
92
|
- README.rdoc
|
93
93
|
- Rakefile
|
94
94
|
- lib/config/utsup.sample
|
95
|
-
- lib/hooks/post-commit
|
96
|
-
- lib/hooks/post-checkout
|
97
|
-
- lib/hooks/post-merge
|
98
|
-
- lib/hooks/post-receive
|
99
95
|
- lib/sup.rb
|
100
96
|
- lib/sup/differ/differ_control.rb
|
101
97
|
- lib/sup/differ/differ_run.rb
|
metadata.gz.sig
CHANGED
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
R{��0���f�9=(-=5Y�!�fu�|.�I(� -~����i}�(�U�
|
1
|
+
�gV�4�y_����� �I�ɀ-����_�p�����>N[[/H.�oj���Q�VX�"Z`�|��nc�{J*�CwHzM�}��W�v:�)������p������]]6�����{��\Qݜ���4QDZ?|�H�'�F���h�_[�w-8�d���X�8��b���v<ڶf��7Q�#�2�O�(�����S�
|
2
|
+
N�!��)�R��9����w�u�)8�U�4���|��E�g����q��7�q�x�^rO��
|
data/lib/hooks/post-checkout
DELETED
data/lib/hooks/post-commit
DELETED
data/lib/hooks/post-merge
DELETED
data/lib/hooks/post-receive
DELETED