utsup 0.1.5 → 0.1.6

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.
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,7 @@
1
+ === 0.1.6
2
+
3
+ * ruby 1.9 compatability (thanks, http://github.com/jasherai)
4
+
1
5
  === 0.1.1
2
6
 
3
7
  * changed diff resolution to 5 minutes
@@ -12,7 +12,9 @@ utsup.com client
12
12
 
13
13
  == SYNOPSIS:
14
14
 
15
- FIX (code sample of usage)
15
+
16
+ do you use git to track project changes? need to know what members of your team are up to in real-time? hate having to ask for status updates?
17
+ UTSUP? allows you to transparently track user interactions with a repository through the command line, via twitter, and on the UTSUP?
16
18
 
17
19
  == REQUIREMENTS:
18
20
 
@@ -22,6 +22,8 @@ module Sup
22
22
  render "Your project_id was invalid, check #{PROJECT_CONFIG_PATH}".in_red
23
23
  rescue SocketError
24
24
  Sup::socket_error
25
+ rescue Exception => exc
26
+ render exc.message.in_red
25
27
  end
26
28
  end
27
29
 
@@ -1,12 +1,12 @@
1
1
  module Sup
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
 
4
4
  GLOBAL_CONFIG_PATH = '~/.utsup/config.yml'
5
5
  GLOBAL_PROJECT_CONFIG_PATH = '~/.utsup/projects.yml'
6
6
  PROJECT_CONFIG_PATH = '.git/utsup.yml'
7
7
 
8
8
  API_URL = "https://utsup.heroku.com"
9
- SIGNUP_URL = "http://utsup.com"
9
+ SIGNUP_URL = "http://www.utsup.com"
10
10
 
11
11
  class << self
12
12
 
@@ -75,35 +75,39 @@ module Sup
75
75
  "post-receive" => "sup git receive $@"
76
76
  }
77
77
 
78
- def init(project_title)
79
-
78
+ def init(project_title)
80
79
  # --- project init
81
80
  project_title = File.basename(Dir.pwd) if project_title.blank? || project_title == "."
82
81
  project = Api::Project.create :title => project_title
83
82
 
84
- # add project id to .git
85
- Yamlize.new File.join(Dir.pwd, PROJECT_CONFIG_PATH) do |project_config|
86
- project_config.project_id = project.id
87
- end
88
-
89
- # add project path and id to global project config (for differ)
90
- Yamlize.new GLOBAL_PROJECT_CONFIG_PATH, Array do |global_project_config|
91
- global_project_config << {'path'=>Dir.pwd, 'id'=>project.id}
92
- global_project_config.uniq!
93
- end
94
-
95
- # --- write git hooks
96
- GIT_HOOKS.each do |hook, command|
97
- path = File.join(Dir.pwd, '.git/hooks/', hook)
98
- exists = File.exists?(path)
99
-
100
- next if exists && File.read(path) =~ /#{Regexp.quote(command)}/
101
-
102
- File.open(path, (exists ? 'a' : 'w'), 0775) do |f|
103
- f.puts command
83
+ if project.valid?
84
+ # add project id to .git
85
+ Yamlize.new File.join(Dir.pwd, PROJECT_CONFIG_PATH) do |project_config|
86
+ project_config.project_id = project.id
87
+ end
88
+
89
+ # add project path and id to global project config (for differ)
90
+ Yamlize.new GLOBAL_PROJECT_CONFIG_PATH, Array do |global_project_config|
91
+ global_project_config << {'path'=>Dir.pwd, 'id'=>project.id}
92
+ global_project_config.uniq!
93
+ end
94
+
95
+ # --- write git hooks
96
+ GIT_HOOKS.each do |hook, command|
97
+ path = File.join(Dir.pwd, '.git/hooks/', hook)
98
+ exists = File.exists?(path)
99
+
100
+ next if exists && File.read(path) =~ /#{Regexp.quote(command)}/
101
+
102
+ File.open(path, (exists ? 'a' : 'w'), 0775) do |f|
103
+ f.puts command
104
+ end
104
105
  end
106
+
107
+ else
108
+ #// project creation faild
109
+ render project.errors.full_messages.map &:in_red
105
110
  end
106
-
107
111
  end
108
112
 
109
113
  # ===========================
@@ -162,7 +166,7 @@ module Sup
162
166
 
163
167
  case args.first.strip
164
168
 
165
- when "checkout":
169
+ when "checkout"
166
170
  previous_head = args[1]
167
171
  next_head = args[2]
168
172
  branch = args[3] == '1'
@@ -172,20 +176,20 @@ module Sup
172
176
  Api::Status.add :status_type => "StatusCheckout",
173
177
  :message => current_branch_name
174
178
 
175
- when "push":
179
+ when "push"
176
180
  resp = `git push #{args[1..-1]*' '} 2>&1`
177
181
  puts resp
178
182
  unless resp =~ /Everything up-to-date/
179
183
  Api::Status.add :status_type => "StatusPush", :message => "pushed"
180
184
  end
181
185
 
182
- when "receive":
186
+ when "receive"
183
187
  Api::Status.add :status_type => "StatusReceive",:message => "received"
184
188
 
185
- when "merge":
189
+ when "merge"
186
190
  Api::Status.add :status_type => "StatusMerge", :message => "merged"
187
191
 
188
- when "commit":
192
+ when "commit"
189
193
 
190
194
  commit = git.object('HEAD')
191
195
  sha = commit.sha
@@ -10,7 +10,7 @@ module Sup
10
10
 
11
11
  # no configure
12
12
  case command
13
- when "setup":
13
+ when "setup"
14
14
  return Sup::setup(args.last)
15
15
  end
16
16
 
@@ -18,49 +18,49 @@ module Sup
18
18
 
19
19
  case command
20
20
 
21
- when "help":
21
+ when "help"
22
22
  puts HELP_TEXT
23
23
 
24
- when "version":
24
+ when "version"
25
25
  puts VERSION
26
26
 
27
- when "init":
27
+ when "init"
28
28
  Sup::init args.first
29
29
  Differ::restart! # to reload projects.yml
30
30
  render "Supified!".in_green
31
31
 
32
- when "in":
32
+ when "in"
33
33
  Sup::check_in args.last
34
34
  Differ::start!
35
35
  render "Sup'd in.".in_green
36
36
 
37
- when "out":
37
+ when "out"
38
38
  Sup::check_out args.last
39
39
  Differ::stop!
40
40
  puts "Checked out."
41
41
 
42
42
  # --- Git -----------------
43
- when "git":
43
+ when "git"
44
44
  Sup::git_update args
45
- when "push":
45
+ when "push"
46
46
  Sup::git_update "push"
47
47
 
48
- when "nm":
48
+ when "nm"
49
49
  Sup::undo
50
50
  render "Undid last Supdate.".in_red
51
51
 
52
- when "remove":
52
+ when "remove"
53
53
  File.unlink File.join(Dir.pwd, PROJECT_CONFIG_PATH)
54
54
  # TODO: remove git hooks
55
55
  puts "De-Supified."
56
56
 
57
- when "users":
57
+ when "users"
58
58
  Sup::get_users
59
59
 
60
- when "all":
60
+ when "all"
61
61
  Sup::get_statuses :today => true
62
62
 
63
- when "search":
63
+ when "search"
64
64
  # TODO: search
65
65
 
66
66
  when "start"
@@ -70,7 +70,7 @@ module Sup
70
70
  Differ::stop!
71
71
  puts "Stopped."
72
72
 
73
- when /.+/:
73
+ when /.+/
74
74
 
75
75
  # TODO: combine user_name check and supdate into one ActiveResource call -- do name-check & return or supdate on server
76
76
  if Api::User.check_name(command)
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utsup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 6
9
+ version: 0.1.6
5
10
  platform: ruby
6
11
  authors:
7
12
  - Nick Merwin
@@ -30,49 +35,59 @@ cert_chain:
30
35
  DrswbWvrKlA=
31
36
  -----END CERTIFICATE-----
32
37
 
33
- date: 2009-11-17 00:00:00 -08:00
38
+ date: 2010-09-20 00:00:00 -07:00
34
39
  default_executable:
35
40
  dependencies:
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: git
38
- type: :runtime
39
- version_requirement:
40
- version_requirements: !ruby/object:Gem::Requirement
43
+ prerelease: false
44
+ requirement: &id001 !ruby/object:Gem::Requirement
41
45
  requirements:
42
46
  - - ">="
43
47
  - !ruby/object:Gem::Version
48
+ segments:
49
+ - 0
44
50
  version: "0"
45
- version:
51
+ type: :runtime
52
+ version_requirements: *id001
46
53
  - !ruby/object:Gem::Dependency
47
54
  name: daemons
48
- type: :runtime
49
- version_requirement:
50
- version_requirements: !ruby/object:Gem::Requirement
55
+ prerelease: false
56
+ requirement: &id002 !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - ">="
53
59
  - !ruby/object:Gem::Version
60
+ segments:
61
+ - 0
54
62
  version: "0"
55
- version:
63
+ type: :runtime
64
+ version_requirements: *id002
56
65
  - !ruby/object:Gem::Dependency
57
66
  name: terminal_markup
58
- type: :runtime
59
- version_requirement:
60
- version_requirements: !ruby/object:Gem::Requirement
67
+ prerelease: false
68
+ requirement: &id003 !ruby/object:Gem::Requirement
61
69
  requirements:
62
70
  - - ">="
63
71
  - !ruby/object:Gem::Version
72
+ segments:
73
+ - 0
64
74
  version: "0"
65
- version:
75
+ type: :runtime
76
+ version_requirements: *id003
66
77
  - !ruby/object:Gem::Dependency
67
78
  name: hoe
68
- type: :development
69
- version_requirement:
70
- version_requirements: !ruby/object:Gem::Requirement
79
+ prerelease: false
80
+ requirement: &id004 !ruby/object:Gem::Requirement
71
81
  requirements:
72
82
  - - ">="
73
83
  - !ruby/object:Gem::Version
84
+ segments:
85
+ - 2
86
+ - 3
87
+ - 3
74
88
  version: 2.3.3
75
- version:
89
+ type: :development
90
+ version_requirements: *id004
76
91
  description: utsup.com client
77
92
  email:
78
93
  - nick@lemurheavy.com
@@ -126,18 +141,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
141
  requirements:
127
142
  - - ">="
128
143
  - !ruby/object:Gem::Version
144
+ segments:
145
+ - 0
129
146
  version: "0"
130
- version:
131
147
  required_rubygems_version: !ruby/object:Gem::Requirement
132
148
  requirements:
133
149
  - - ">="
134
150
  - !ruby/object:Gem::Version
151
+ segments:
152
+ - 0
135
153
  version: "0"
136
- version:
137
154
  requirements: []
138
155
 
139
156
  rubyforge_project: utsup
140
- rubygems_version: 1.3.5
157
+ rubygems_version: 1.3.6
141
158
  signing_key:
142
159
  specification_version: 3
143
160
  summary: utsup.com client
metadata.gz.sig CHANGED
Binary file