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 +5 -0
 - data/PostInstall.txt +5 -1
 - data/Rakefile +0 -1
 - data/lib/sup/api.rb +11 -0
 - data/lib/sup/differ/differ.rb +3 -1
 - data/lib/sup/help.rb +1 -1
 - data/lib/sup.rb +33 -12
 - data.tar.gz.sig +1 -0
 - metadata +27 -5
 - metadata.gz.sig +0 -0
 
    
        data/History.txt
    CHANGED
    
    
    
        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 
     | 
| 
      
 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
    
    
    
        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
         
     | 
    
        data/lib/sup/differ/differ.rb
    CHANGED
    
    
    
        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. 
     | 
| 
      
 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  
     | 
| 
      
 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 
     | 
    
         
            -
                   
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
                     
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
                     
     | 
| 
       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. 
     | 
| 
      
 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- 
     | 
| 
      
 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. 
     | 
| 
      
 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 
     | 
| 
      
 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 
     |