utsup 0.0.8 → 0.0.9

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 (4) hide show
  1. data.tar.gz.sig +0 -0
  2. data/lib/sup.rb +8 -3
  3. metadata +2 -2
  4. metadata.gz.sig +0 -0
data.tar.gz.sig CHANGED
Binary file
data/lib/sup.rb CHANGED
@@ -6,7 +6,7 @@ require 'yaml'
6
6
  require 'git'
7
7
 
8
8
  module Sup
9
- VERSION = '0.0.8'
9
+ VERSION = '0.0.9'
10
10
  GIT_HOOKS = %w(post-commit post-receive post-merge post-checkout) #TODO: post-rebase?
11
11
 
12
12
  GLOBAL_CONFIG_PATH = '~/.utsup'
@@ -87,6 +87,7 @@ eos
87
87
  File.open(File.join(Dir.pwd, '.git/hooks/', hook), 'w', 0775) do |f|
88
88
  f.write(File.read(File.join(File.dirname(__FILE__),'hooks',hook)))
89
89
  end
90
+ #TODO: make sure files are executable if already existed
90
91
  end
91
92
 
92
93
  end
@@ -173,7 +174,7 @@ eos
173
174
 
174
175
  Api::Status.add :status_type => "StatusCommit",
175
176
  :message => commit.message,
176
- :ref => sha, :text => commit.diff_parent
177
+ :ref => sha, :text => `git diff HEAD~ HEAD`
177
178
 
178
179
  else
179
180
  puts "WTF git status is that?"
@@ -266,6 +267,7 @@ eos
266
267
  module Command
267
268
  class << self
268
269
  def run(command, args)
270
+ bench = Time.now
269
271
 
270
272
  # no configure
271
273
  case command
@@ -313,13 +315,14 @@ eos
313
315
  Sup::get_users
314
316
 
315
317
  when "all":
316
- # TODO: show all today
317
318
  Sup::get_statuses :today => true
318
319
 
319
320
  when "search":
320
321
  # TODO: search
321
322
 
322
323
  when /.+/:
324
+
325
+ # TODO: combine user_name check and supdate into one ActiveResource call -- do name-check & return or supdate on server
323
326
  if Api::User.check_name(command)
324
327
  Sup::get_statuses :name => command, :today => true
325
328
  return
@@ -334,6 +337,8 @@ eos
334
337
  Sup::get_statuses
335
338
  end
336
339
 
340
+ # TODO: config file option to set verbosity
341
+ puts "UtSup? v.#{VERSION} (#{Time.now - bench}s)"
337
342
  end
338
343
  end
339
344
  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.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Merwin
@@ -30,7 +30,7 @@ cert_chain:
30
30
  DrswbWvrKlA=
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2009-10-01 00:00:00 -07:00
33
+ date: 2009-10-21 00:00:00 -07:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file