utsup 0.1.0 → 0.1.1

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/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ === 0.1.1
2
+
3
+ * changed diff resolution to 5 minutes
4
+ * added console based login for sup setup
5
+
1
6
  === 0.0.1
2
7
 
3
8
  * added Differ
data/PostInstall.txt CHANGED
@@ -6,7 +6,11 @@ Be sure to sign up for an account at http://utsup.com
6
6
 
7
7
  Then, to begin using, first run:
8
8
 
9
- sup setup <your-api-key>
9
+ sup setup
10
+
11
+ You can view command reference here:
12
+
13
+ sup help
10
14
 
11
15
  Thanks for using UtSup!
12
16
  - Lemur Heavy Industries (http://lemurheavy.com)
data/Rakefile CHANGED
@@ -18,7 +18,6 @@ $hoe = Hoe.spec 'utsup' do
18
18
  # self.spec_extras[:extensions] = "extconf.rb"
19
19
  self.spec_extras[:rdoc_options] = ""
20
20
  self.spec_extras[:homepage] = %q{http://github.com/yickster/utsup_gem}
21
-
22
21
  end
23
22
 
24
23
  require 'newgem/tasks'
data/lib/sup/api.rb CHANGED
@@ -30,6 +30,17 @@ module Sup
30
30
  end
31
31
 
32
32
  class User < Base
33
+ def self.get_api_key(email,password)
34
+ project_config = Yamlize.new(File.join(Dir.pwd, PROJECT_CONFIG_PATH)) rescue {}
35
+ Base.site = "http://#{project_config['domain'] || "utsup.com"}"
36
+
37
+ begin
38
+ post(:get_api_key, :email => email, :password => password).body
39
+ rescue ActiveResource::ResourceNotFound
40
+ false
41
+ end
42
+ end
43
+
33
44
  def self.check_name(name)
34
45
  begin
35
46
  get :check_name, :name => name
@@ -1,6 +1,8 @@
1
+ #TODO: check git status for added un-tracked files
2
+
1
3
  module Sup
2
4
  module Differ
3
- INTERVAL = 5
5
+ INTERVAL = 300
4
6
  # TODO: pull interval out of config.yml?
5
7
 
6
8
  class << self
data/lib/sup/help.rb CHANGED
@@ -19,7 +19,7 @@ module Sup
19
19
  help # show this message
20
20
  version # show version
21
21
 
22
- setup <api_key> # initializes global config file
22
+ setup <api_key> # initializes global config file, if no api_key specified, will let you login
23
23
 
24
24
  init <project name> # initilize current directory
25
25
 
data/lib/sup.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # TODO: testing suite
2
+ # TODO: proxy option
2
3
 
3
4
  $:.unshift(File.dirname(__FILE__)) unless
4
5
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
@@ -14,20 +15,43 @@ require 'sup/api'
14
15
  require 'sup/command'
15
16
 
16
17
  module Sup
17
- VERSION = '0.1.0'
18
+ VERSION = '0.1.1'
18
19
  GIT_HOOKS = %w(post-commit post-receive post-merge post-checkout) #TODO: post-rebase?
19
20
 
20
21
  GLOBAL_CONFIG_PATH = '~/.utsup/config.yml'
21
22
  GLOBAL_PROJECT_CONFIG_PATH = '~/.utsup/projects.yml'
22
23
  PROJECT_CONFIG_PATH = '.git/utsup.yml'
23
24
 
25
+ URL = "https://utsup.heroku.com"
26
+ SIGNUP_URL = "http://utsup.com"
27
+
24
28
  class << self
25
29
 
26
30
  # ===========================
27
31
  # Setup
28
32
  # ===========================
29
33
 
30
- def setup(api_key="your api key here")
34
+ def sign_in
35
+ puts "Enter your UtSup.com credentials. Don't have an account yet? Create one at #{SIGNUP_URL}"
36
+
37
+ loop do
38
+ print "Email: "
39
+ email = gets.chomp
40
+ print "Password: "
41
+ system "stty -echo"
42
+ password = gets.chomp
43
+ system "stty echo"
44
+ puts ""
45
+
46
+ if api_key = Api::User.get_api_key(email, password)
47
+ return api_key
48
+ else
49
+ puts "Couldn't find that email/password combo..."
50
+ end
51
+ end
52
+ end
53
+
54
+ def setup(api_key=nil)
31
55
  require 'fileutils'
32
56
 
33
57
  # --- global init
@@ -41,16 +65,13 @@ module Sup
41
65
  FileUtils.mv oldpath+'.bak', global_config_path
42
66
  end
43
67
 
44
- unless File.exists?(global_config_path)
45
- FileUtils.mkdir File.dirname(global_config_path)
46
- FileUtils.copy File.join(File.dirname(__FILE__), 'config/utsup.sample'), global_config_path
47
-
48
- Yamlize.new global_config_path do |global_config|
49
- global_config.api_key = api_key
50
- end
51
-
52
- puts "Initialized ~/.utsup/config.yml"
53
-
68
+ FileUtils.mkdir File.dirname(global_config_path) rescue nil
69
+ global_config = Yamlize.new global_config_path
70
+
71
+ unless global_config['api_key']
72
+ global_config.api_key = api_key || sign_in
73
+ global_config.save
74
+ puts "Success! Added API Key to #{GLOBAL_CONFIG_PATH}\n - Lemur Heavy Industries (http://lemurheavy.com)"
54
75
  else
55
76
  puts "You're good to go."
56
77
  end
data.tar.gz.sig ADDED
@@ -0,0 +1 @@
1
+ ��x�j�n�3�u B� �;&gM�����6┚:��I�hb|F��!��-e��櫾k|�7�nO��Ț�YU��ҝ
metadata CHANGED
@@ -1,15 +1,36 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utsup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Merwin
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDNDCCAhygAwIBAgIBADANBgkqhkiG9w0BAQUFADBAMQ0wCwYDVQQDDARuaWNr
14
+ MRowGAYKCZImiZPyLGQBGRYKbGVtdXJoZWF2eTETMBEGCgmSJomT8ixkARkWA2Nv
15
+ bTAeFw0wOTA5MjkyMzEzMDVaFw0xMDA5MjkyMzEzMDVaMEAxDTALBgNVBAMMBG5p
16
+ Y2sxGjAYBgoJkiaJk/IsZAEZFgpsZW11cmhlYXZ5MRMwEQYKCZImiZPyLGQBGRYD
17
+ Y29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3uflg3FiN5qVj79C
18
+ hL+IdQJI+t1bGLrcx38cgFk9wzsBWb4OuGJdfRfUputDQ1f0q+tmRO834YuiEzq9
19
+ Ekhv8GMQ4KepU6E6d1mbBVSovuDljxpprGDP1Aj/ahiG4vU26gE9IjNFxwlkRPov
20
+ jVgUNVU2iXtd7pAM3EeEIzSFXfoTOGl1sk6UXMlMRyD6rkuIHiM08+7Q6UMdkO49
21
+ fMqF49DeMrlJfY4HBbegAF4dpWNY3SPhFWtOcdtCRF0AplB7HtR5laBsAdHjz3gM
22
+ klk+KNM5vptxWJPIqvXWS4pPudBCwz40gXRGR+BpU0UQiTqp1FiKCgL7DI4/Tm62
23
+ CHNMvwIDAQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU
24
+ DtwNA5H16pAiznZOti8bEjba8tUwDQYJKoZIhvcNAQEFBQADggEBALYguz5G0/OJ
25
+ xT+pCJlgQuU5XbKPx9dibev3ixqDaXz6F3rofNyskUGuCz80pIxwuVjsf7SC/l6x
26
+ iSqV4RZvqrQvgMa2VIQrbIfVya59CyFl+nlENev58nSZHo/3+AOK/rCLrvyRbv+y
27
+ NZocOuJdRiSWjnnRga8ccYA/Hu5OQsqUi3zWcZJx9Pf1yik/TGQBB5fVCg3wc/tT
28
+ 86mx1YMM5+6jp62bpABA/ztg5a1AwPjLztZO+kdsa5JPAe8kEORjgFUQd0bgoG1k
29
+ CGOLg0n36R4a1G+c6Meu9GeNGECbxY/1lzZOU9gfTqKd3DB+14BvAyvc5dTbR/RX
30
+ DrswbWvrKlA=
31
+ -----END CERTIFICATE-----
11
32
 
12
- date: 2009-10-31 00:00:00 -07:00
33
+ date: 2009-11-12 00:00:00 -08:00
13
34
  default_executable:
14
35
  dependencies:
15
36
  - !ruby/object:Gem::Dependency
@@ -40,7 +61,7 @@ dependencies:
40
61
  requirements:
41
62
  - - ">="
42
63
  - !ruby/object:Gem::Version
43
- version: 2.3.2
64
+ version: 2.3.3
44
65
  version:
45
66
  description: utsup.com client
46
67
  email:
@@ -87,7 +108,8 @@ post_install_message: "=======================================\n\
87
108
  UtSup Installed!\n\
88
109
  =======================================\n\n\
89
110
  Be sure to sign up for an account at http://utsup.com\n\n\
90
- Then, to begin using, first run:\n\n sup setup <your-api-key>\n\n\
111
+ Then, to begin using, first run:\n\n sup setup\n\n\
112
+ You can view command reference here:\n\n sup help\n\n\
91
113
  Thanks for using UtSup!\n - Lemur Heavy Industries (http://lemurheavy.com)\n "
92
114
  rdoc_options: []
93
115
 
metadata.gz.sig ADDED
Binary file