geometrialab-abak-flow 0.2.3 → 0.2.4
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/README.md +3 -3
 - data/lib/abak-flow/request.rb +17 -15
 - data/lib/abak-flow/version.rb +1 -1
 - metadata +3 -3
 
    
        data/README.md
    CHANGED
    
    | 
         @@ -24,9 +24,9 @@ Github-flow же наоборот ведет основную разработк 
     | 
|
| 
       24 
24 
     | 
    
         
             
            # Установка
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
       26 
26 
     | 
    
         
             
                $ gem install abak-flow
         
     | 
| 
      
 27 
     | 
    
         
            +
                $ git config --global github.username YOURLOGIN
         
     | 
| 
      
 28 
     | 
    
         
            +
                $ git config --global github.password YOURPASSWORD
         
     | 
| 
       27 
29 
     | 
    
         
             
                $ git config --global alias.request '!request'
         
     | 
| 
       28 
     | 
    
         
            -
                $ git config --global abak.apiuser your_github_mail@gmail.com
         
     | 
| 
       29 
     | 
    
         
            -
                $ git config --global abak.apitoken 0123456789yourf0123456789token
         
     | 
| 
       30 
30 
     | 
    
         
             
                $ git remote add upstream git://github.com/github_user_name/project.git
         
     | 
| 
       31 
31 
     | 
    
         | 
| 
       32 
32 
     | 
    
         
             
            ### А если я использую прокси, как быть?
         
     | 
| 
         @@ -37,7 +37,7 @@ Github-flow же наоборот ведет основную разработк 
     | 
|
| 
       37 
37 
     | 
    
         
             
            Т.е если вы используете переменные окружения, то просто не указывайте прокси в конфиге
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
       39 
39 
     | 
    
         
             
            ### А если у меня есть баг-трэкер?
         
     | 
| 
       40 
     | 
    
         
            -
                $ git config  
     | 
| 
      
 40 
     | 
    
         
            +
                $ git config abak.tracker http://mytracker.com/ticket/
         
     | 
| 
       41 
41 
     | 
    
         | 
| 
       42 
42 
     | 
    
         
             
            К указанному адресу будет доавлен номер тикета для формирования ссылок на задачи в описании пулл реквестов.
         
     | 
| 
       43 
43 
     | 
    
         | 
    
        data/lib/abak-flow/request.rb
    CHANGED
    
    | 
         @@ -26,17 +26,18 @@ module Abak::Flow 
     | 
|
| 
       26 
26 
     | 
    
         | 
| 
       27 
27 
     | 
    
         
             
                  title = args.first.to_s.strip
         
     | 
| 
       28 
28 
     | 
    
         
             
                  title = task if task =~ /^\w+\-\d{1,}$/ && title.empty?
         
     | 
| 
      
 29 
     | 
    
         
            +
                  
         
     | 
| 
      
 30 
     | 
    
         
            +
                  username = Hub::Commands.send(:git_reader).read_config('github.username')
         
     | 
| 
      
 31 
     | 
    
         
            +
                  password = Hub::Commands.send(:git_reader).read_config('github.password')
         
     | 
| 
       29 
32 
     | 
    
         | 
| 
       30 
33 
     | 
    
         
             
                  tracker_url  = Hub::Commands.send(:git_reader).read_config('abak.tracker')
         
     | 
| 
       31 
     | 
    
         
            -
                  api_user     = Hub::Commands.send(:git_reader).read_config('abak.apiuser')
         
     | 
| 
       32 
     | 
    
         
            -
                  api_token    = Hub::Commands.send(:git_reader).read_config('abak.apitoken')
         
     | 
| 
       33 
34 
     | 
    
         
             
                  config_proxy = Hub::Commands.send(:git_reader).read_config('abak.proxy')
         
     | 
| 
       34 
35 
     | 
    
         
             
                  env_proxy    = ENV['http_proxy'] || ENV['HTTP_PROXY']
         
     | 
| 
       35 
36 
     | 
    
         | 
| 
       36 
37 
     | 
    
         
             
                  client_opts = {:proxy => config_proxy || env_proxy} if config_proxy || env_proxy
         
     | 
| 
       37 
38 
     | 
    
         
             
                  client_opts ||= {}
         
     | 
| 
       38 
39 
     | 
    
         | 
| 
       39 
     | 
    
         
            -
                  api_client = Octokit::Client.new({:login =>  
     | 
| 
      
 40 
     | 
    
         
            +
                  api_client = Octokit::Client.new({:login => username, :password => password}.merge(client_opts))
         
     | 
| 
       40 
41 
     | 
    
         | 
| 
       41 
42 
     | 
    
         
             
                  # Проверим, что мы не в мастере или девелопе
         
     | 
| 
       42 
43 
     | 
    
         
             
                  if [:master, :develop].include? current_branch.to_sym
         
     | 
| 
         @@ -65,16 +66,16 @@ module Abak::Flow 
     | 
|
| 
       65 
66 
     | 
    
         
             
                  end
         
     | 
| 
       66 
67 
     | 
    
         | 
| 
       67 
68 
     | 
    
         
             
                  # Проверим, что у нас указан апи юзер
         
     | 
| 
       68 
     | 
    
         
            -
                  if  
     | 
| 
       69 
     | 
    
         
            -
                    say color('Необходимо указать своего пользователя 
     | 
| 
       70 
     | 
    
         
            -
                    say color('=> https://github.com/ 
     | 
| 
      
 69 
     | 
    
         
            +
                  if username.empty?
         
     | 
| 
      
 70 
     | 
    
         
            +
                    say color('Необходимо указать логин своего github пользователя', :error).to_s
         
     | 
| 
      
 71 
     | 
    
         
            +
                    say color('=> https://github.com/GeometriaLab/abak-flow/blob/master/README.md', :info).to_s
         
     | 
| 
       71 
72 
     | 
    
         
             
                    exit
         
     | 
| 
       72 
73 
     | 
    
         
             
                  end
         
     | 
| 
       73 
74 
     | 
    
         | 
| 
       74 
75 
     | 
    
         
             
                  # Проверим, что у нас указан токен
         
     | 
| 
       75 
     | 
    
         
            -
                  if  
     | 
| 
       76 
     | 
    
         
            -
                    say color('Необходимо указать  
     | 
| 
       77 
     | 
    
         
            -
                    say color('=> https://github.com/ 
     | 
| 
      
 76 
     | 
    
         
            +
                  if password.empty?
         
     | 
| 
      
 77 
     | 
    
         
            +
                    say color('Необходимо указать пароль своего github пользователя', :error).to_s
         
     | 
| 
      
 78 
     | 
    
         
            +
                    say color('=> https://github.com/GeometriaLab/abak-flow/blob/master/README.md', :info).to_s
         
     | 
| 
       78 
79 
     | 
    
         
             
                    exit
         
     | 
| 
       79 
80 
     | 
    
         
             
                  end
         
     | 
| 
       80 
81 
     | 
    
         | 
| 
         @@ -229,8 +230,9 @@ module Abak::Flow 
     | 
|
| 
       229 
230 
     | 
    
         
             
                  repository     = Hub::Commands.send :local_repo
         
     | 
| 
       230 
231 
     | 
    
         
             
                  current_branch = repository.current_branch.short_name
         
     | 
| 
       231 
232 
     | 
    
         | 
| 
       232 
     | 
    
         
            -
                   
     | 
| 
       233 
     | 
    
         
            -
                   
     | 
| 
      
 233 
     | 
    
         
            +
                  username     = Hub::Commands.send(:git_reader).read_config('github.username').to_s
         
     | 
| 
      
 234 
     | 
    
         
            +
                  password    = Hub::Commands.send(:git_reader).read_config('github.password').to_s
         
     | 
| 
      
 235 
     | 
    
         
            +
             
     | 
| 
       234 
236 
     | 
    
         
             
                  config_proxy = Hub::Commands.send(:git_reader).read_config('abak.proxy')
         
     | 
| 
       235 
237 
     | 
    
         
             
                  env_proxy    = ENV['http_proxy'] || ENV['HTTP_PROXY']
         
     | 
| 
       236 
238 
     | 
    
         | 
| 
         @@ -253,18 +255,18 @@ module Abak::Flow 
     | 
|
| 
       253 
255 
     | 
    
         
             
                  end
         
     | 
| 
       254 
256 
     | 
    
         | 
| 
       255 
257 
     | 
    
         
             
                  # Проверим, что у нас указан апи юзер
         
     | 
| 
       256 
     | 
    
         
            -
                  if  
     | 
| 
      
 258 
     | 
    
         
            +
                  if username.empty?
         
     | 
| 
       257 
259 
     | 
    
         
             
                    errors << [
         
     | 
| 
       258 
260 
     | 
    
         
             
                      'Необходимо указать своего пользователя API github',
         
     | 
| 
       259 
     | 
    
         
            -
                      '=> https://github.com/ 
     | 
| 
      
 261 
     | 
    
         
            +
                      '=> https://github.com/GeometriaLab/abak-flow/blob/master/README.md'
         
     | 
| 
       260 
262 
     | 
    
         
             
                    ]
         
     | 
| 
       261 
263 
     | 
    
         
             
                  end
         
     | 
| 
       262 
264 
     | 
    
         | 
| 
       263 
265 
     | 
    
         
             
                  # Проверим, что у нас указан токен
         
     | 
| 
       264 
     | 
    
         
            -
                  if  
     | 
| 
      
 266 
     | 
    
         
            +
                  if password.empty?
         
     | 
| 
       265 
267 
     | 
    
         
             
                    errors << [
         
     | 
| 
       266 
268 
     | 
    
         
             
                      'Необходимо указать токен своего пользователя API github',
         
     | 
| 
       267 
     | 
    
         
            -
                      '=> https://github.com/ 
     | 
| 
      
 269 
     | 
    
         
            +
                      '=> https://github.com/GeometriaLab/abak-flow/blob/master/README.md'
         
     | 
| 
       268 
270 
     | 
    
         
             
                    ]
         
     | 
| 
       269 
271 
     | 
    
         
             
                  end
         
     | 
| 
       270 
272 
     | 
    
         | 
    
        data/lib/abak-flow/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version 
     | 
|
| 
       5 
5 
     | 
    
         
             
              segments: 
         
     | 
| 
       6 
6 
     | 
    
         
             
              - 0
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 2
         
     | 
| 
       8 
     | 
    
         
            -
              -  
     | 
| 
       9 
     | 
    
         
            -
              version: 0.2. 
     | 
| 
      
 8 
     | 
    
         
            +
              - 4
         
     | 
| 
      
 9 
     | 
    
         
            +
              version: 0.2.4
         
     | 
| 
       10 
10 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       11 
11 
     | 
    
         
             
            authors: 
         
     | 
| 
       12 
12 
     | 
    
         
             
            - Strech (aka Sergey Fedorov)
         
     | 
| 
         @@ -14,7 +14,7 @@ autorequire: 
     | 
|
| 
       14 
14 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       15 
15 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
     | 
    
         
            -
            date: 2012-05- 
     | 
| 
      
 17 
     | 
    
         
            +
            date: 2012-05-22 00:00:00 +04:00
         
     | 
| 
       18 
18 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       19 
19 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       20 
20 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     |