git-topic 0.2.6.1 → 0.2.7
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/Gemfile.lock +1 -1
 - data/History.rdoc +7 -0
 - data/VERSION.yml +2 -2
 - data/lib/git_topic/naming.rb +0 -1
 - data/lib/git_topic.rb +3 -2
 - data/spec/git_topic_comments_spec.rb +13 -0
 - data/spec/git_topic_work_on_spec.rb +16 -0
 - data/spec/spec_helper.rb +3 -1
 - data/spec/template/origin/config +0 -2
 - metadata +3 -4
 
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/History.rdoc
    CHANGED
    
    
    
        data/VERSION.yml
    CHANGED
    
    
    
        data/lib/git_topic/naming.rb
    CHANGED
    
    
    
        data/lib/git_topic.rb
    CHANGED
    
    | 
         @@ -61,7 +61,7 @@ module GitTopic 
     | 
|
| 
       61 
61 
     | 
    
         
             
                    if remote_branches.include? "origin/#{b}"
         
     | 
| 
       62 
62 
     | 
    
         
             
                      git [
         
     | 
| 
       63 
63 
     | 
    
         
             
                        "reset --hard origin/#{b}",
         
     | 
| 
       64 
     | 
    
         
            -
                        "push origin :refs/heads/#{b} HEAD:refs/heads/#{wb}",
         
     | 
| 
      
 64 
     | 
    
         
            +
                        "push origin :refs/heads/#{b} +HEAD:refs/heads/#{wb}",
         
     | 
| 
       65 
65 
     | 
    
         
             
                      ]
         
     | 
| 
       66 
66 
     | 
    
         
             
                    end
         
     | 
| 
       67 
67 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -162,7 +162,8 @@ module GitTopic 
     | 
|
| 
       162 
162 
     | 
    
         | 
| 
       163 
163 
     | 
    
         
             
                  sb = ''
         
     | 
| 
       164 
164 
     | 
    
         
             
                  rb = remote_branches_organized
         
     | 
| 
       165 
     | 
    
         
            -
                   
     | 
| 
      
 165 
     | 
    
         
            +
                  # Only others' branche should appear as ‘topics you can review’
         
     | 
| 
      
 166 
     | 
    
         
            +
                  review_ut   = rb[:review].select{ |u, t| u != user }
         
     | 
| 
       166 
167 
     | 
    
         
             
                  rejected_ut = rb[:rejected]
         
     | 
| 
       167 
168 
     | 
    
         | 
| 
       168 
169 
     | 
    
         
             
                  unless review_ut.empty?
         
     | 
| 
         @@ -33,6 +33,19 @@ describe GitTopic do 
     | 
|
| 
       33 
33 
     | 
    
         
             
                    GitTopic.comments "rejected/#{@user}/krakens"
         
     | 
| 
       34 
34 
     | 
    
         
             
                  end
         
     | 
| 
       35 
35 
     | 
    
         | 
| 
      
 36 
     | 
    
         
            +
                  it "should list comments for a user's review branches, if requested" do
         
     | 
| 
      
 37 
     | 
    
         
            +
                    GitTopic.work_on  'krakens'
         
     | 
| 
      
 38 
     | 
    
         
            +
                    GitTopic.done
         
     | 
| 
      
 39 
     | 
    
         
            +
                    git_remote_branches.should            include "review/#{@user}/krakens"
         
     | 
| 
      
 40 
     | 
    
         
            +
                    GitTopic.should_receive( :git ) do |cmd|
         
     | 
| 
      
 41 
     | 
    
         
            +
                      cmd.should =~ /log/
         
     | 
| 
      
 42 
     | 
    
         
            +
                      cmd.should =~ %r{origin/master\.\.}
         
     | 
| 
      
 43 
     | 
    
         
            +
                      cmd.should =~ /--no-standard-notes/
         
     | 
| 
      
 44 
     | 
    
         
            +
                      cmd.should =~ %r{--show-notes=refs/notes/reviews/#{@user}/krakens}
         
     | 
| 
      
 45 
     | 
    
         
            +
                    end
         
     | 
| 
      
 46 
     | 
    
         
            +
                    GitTopic.comments "krakens"
         
     | 
| 
      
 47 
     | 
    
         
            +
                  end
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
       36 
49 
     | 
    
         
             
                  it "should strip partially qualified namespaces" do
         
     | 
| 
       37 
50 
     | 
    
         
             
                    git_branch.should                     == 'master'
         
     | 
| 
       38 
51 
     | 
    
         
             
                    GitTopic.should_receive( :git ) do |cmd|
         
     | 
| 
         @@ -142,6 +142,22 @@ describe GitTopic do 
     | 
|
| 
       142 
142 
     | 
    
         
             
                    ).should                          == '44ffd9c9c8b52b201659e3ad318cdad6ec836b46'
         
     | 
| 
       143 
143 
     | 
    
         
             
                  end
         
     | 
| 
       144 
144 
     | 
    
         | 
| 
      
 145 
     | 
    
         
            +
                  it "should work when HEAD points to a commit downstream of master" do
         
     | 
| 
      
 146 
     | 
    
         
            +
                    GitTopic.work_on  'new-topic'
         
     | 
| 
      
 147 
     | 
    
         
            +
                    dirty_branch!
         
     | 
| 
      
 148 
     | 
    
         
            +
                    system "git add . && git commit -q -a -m 'Non-FF' "
         
     | 
| 
      
 149 
     | 
    
         
            +
             
     | 
| 
      
 150 
     | 
    
         
            +
                    git_remote_branches.should        include( "rejected/#{@user}/krakens" )
         
     | 
| 
      
 151 
     | 
    
         
            +
                    GitTopic.work_on    'krakens'
         
     | 
| 
      
 152 
     | 
    
         
            +
                    git_branch.should                 == "wip/#{@user}/krakens"
         
     | 
| 
      
 153 
     | 
    
         
            +
                    git_remote_branches.should_not    include( "rejected/#{@user}/krakens" )
         
     | 
| 
      
 154 
     | 
    
         
            +
                    git_remote_branches.should        include( "wip/#{@user}/krakens" )
         
     | 
| 
      
 155 
     | 
    
         
            +
                    git_head.should                   == '44ffd9c9c8b52b201659e3ad318cdad6ec836b46'
         
     | 
| 
      
 156 
     | 
    
         
            +
                    git_remote(
         
     | 
| 
      
 157 
     | 
    
         
            +
                      "wip/#{@user}/krakens"
         
     | 
| 
      
 158 
     | 
    
         
            +
                    ).should                          == '44ffd9c9c8b52b201659e3ad318cdad6ec836b46'
         
     | 
| 
      
 159 
     | 
    
         
            +
                  end
         
     | 
| 
      
 160 
     | 
    
         
            +
             
     | 
| 
       145 
161 
     | 
    
         
             
                  it "
         
     | 
| 
       146 
162 
     | 
    
         
             
                    should report the presence of comments to the user, when the topic has
         
     | 
| 
       147 
163 
     | 
    
         
             
                    been rejected.
         
     | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    
    
        data/spec/template/origin/config
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -5,9 +5,8 @@ version: !ruby/object:Gem::Version 
     | 
|
| 
       5 
5 
     | 
    
         
             
              segments: 
         
     | 
| 
       6 
6 
     | 
    
         
             
              - 0
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 2
         
     | 
| 
       8 
     | 
    
         
            -
              -  
     | 
| 
       9 
     | 
    
         
            -
               
     | 
| 
       10 
     | 
    
         
            -
              version: 0.2.6.1
         
     | 
| 
      
 8 
     | 
    
         
            +
              - 7
         
     | 
| 
      
 9 
     | 
    
         
            +
              version: 0.2.7
         
     | 
| 
       11 
10 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       12 
11 
     | 
    
         
             
            authors: 
         
     | 
| 
       13 
12 
     | 
    
         
             
            - David J. Hamilton
         
     | 
| 
         @@ -15,7 +14,7 @@ autorequire: 
     | 
|
| 
       15 
14 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       16 
15 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       17 
16 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
            date: 2010-10- 
     | 
| 
      
 17 
     | 
    
         
            +
            date: 2010-10-21 00:00:00 -07:00
         
     | 
| 
       19 
18 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       20 
19 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       21 
20 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     |