lolcommits 0.6.1 → 0.6.2.pre1
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.
- checksums.yaml +8 -8
- data/.travis.yml +2 -1
- data/CHANGELOG.md +5 -0
- data/Rakefile +1 -1
- data/bin/lolcommits +2 -3
- data/features/bugs.feature +0 -10
- data/features/step_definitions/lolcommits_steps.rb +1 -1
- data/features/support/path_helpers.rb +1 -1
- data/lib/lolcommits/capturer/capture_linux_animated.rb +1 -1
- data/lib/lolcommits/capturer/capture_mac_animated.rb +5 -4
- data/lib/lolcommits/cli/timelapse_gif.rb +1 -1
- data/lib/lolcommits/configuration.rb +2 -2
- data/lib/lolcommits/installation.rb +2 -0
- data/lib/lolcommits/platform.rb +1 -1
- data/lib/lolcommits/plugins/dot_com.rb +1 -1
- data/lib/lolcommits/plugins/lol_slack.rb +1 -1
- data/lib/lolcommits/plugins/lol_tumblr.rb +5 -8
- data/lib/lolcommits/plugins/lol_twitter.rb +6 -13
- data/lib/lolcommits/plugins/lol_yammer.rb +7 -10
- data/lib/lolcommits/plugins/tranzlate.rb +1 -2
- data/lib/lolcommits/plugins/uploldz.rb +8 -6
- data/lib/lolcommits/runner.rb +0 -12
- data/lib/lolcommits/version.rb +1 -1
- data/lolcommits.gemspec +9 -7
- metadata +34 -6
    
        checksums.yaml
    CHANGED
    
    | @@ -1,15 +1,15 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            !binary "U0hBMQ==":
         | 
| 3 3 | 
             
              metadata.gz: !binary |-
         | 
| 4 | 
            -
                 | 
| 4 | 
            +
                MTRkY2JjMDgwMmZlYzczM2VlOTRlOGU2NDdiYmQwMjJjNGVhYmI1OA==
         | 
| 5 5 | 
             
              data.tar.gz: !binary |-
         | 
| 6 | 
            -
                 | 
| 6 | 
            +
                NDQ5NmEzMTk2NDhiNWM0OTVkZDk4MGFmZTQ5M2MxNDVlMDhiYjU3ZA==
         | 
| 7 7 | 
             
            SHA512:
         | 
| 8 8 | 
             
              metadata.gz: !binary |-
         | 
| 9 | 
            -
                 | 
| 10 | 
            -
                 | 
| 11 | 
            -
                 | 
| 9 | 
            +
                NmQwY2I1OTQ1MGVkZjVkZTU3YWY2YjRiNWJmNmZjOWQxYjY4NjhlMDJjOTBj
         | 
| 10 | 
            +
                ZTRhMjdlMTVlMTFhNjY0MjdhMjQ3YTQ5ODU1MjQ3ZmRmYjZiNGU2NjUwZWNi
         | 
| 11 | 
            +
                ODViNjgwYzI2ZDI0OGZjNjY5M2QxNjc2MGM4ZWQyYzBkZTAxMGE=
         | 
| 12 12 | 
             
              data.tar.gz: !binary |-
         | 
| 13 | 
            -
                 | 
| 14 | 
            -
                 | 
| 15 | 
            -
                 | 
| 13 | 
            +
                MWE3Y2JmMGI1MGFmZWI2OTM4MWY0YzlmMWYwZmE1NTUzNzMyZjg1Y2FiNGE4
         | 
| 14 | 
            +
                MTliZTg4MzIzYjE2NjI1NjQ4MmJlYWFiOTNmMmI0ZjA5NzgzNDU0MDBlZTky
         | 
| 15 | 
            +
                YTEyNzVhYmI3NGNmYTE2MWZiYTg3MjY5NDU2MWE2M2NjMTZhZDE=
         | 
    
        data/.travis.yml
    CHANGED
    
    
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -3,6 +3,11 @@ | |
| 3 3 | 
             
            0.7.0 (WIP)
         | 
| 4 4 | 
             
              * extract plugins to seperate gems ...
         | 
| 5 5 |  | 
| 6 | 
            +
            0.6.2 (21 February 2016)
         | 
| 7 | 
            +
              * Avoid invoking ruby if in a rebase (@jhawthorn #286)
         | 
| 8 | 
            +
              * Slow gif problem on mac (@a06kin #289)
         | 
| 9 | 
            +
              * Peg RuboCop gem to 0.37.2 and fix cop issues (@matthutchinson #292)
         | 
| 10 | 
            +
             | 
| 6 11 | 
             
            0.6.1 (16 September 2015)
         | 
| 7 12 | 
             
              * Optional http auth header user/password in uploldz plugin (@felixroos #283)
         | 
| 8 13 | 
             
              * Slack plugin added (@yasakbulut #284)
         | 
    
        data/Rakefile
    CHANGED
    
    | @@ -32,7 +32,7 @@ Rake::TestTask.new do |t| | |
| 32 32 | 
             
            end
         | 
| 33 33 |  | 
| 34 34 | 
             
            Rake::FileUtilsExt.verbose(false)
         | 
| 35 | 
            -
            CUKE_RESULTS = 'results.html'
         | 
| 35 | 
            +
            CUKE_RESULTS = 'results.html'.freeze
         | 
| 36 36 | 
             
            CLEAN << CUKE_RESULTS
         | 
| 37 37 | 
             
            Cucumber::Rake::Task.new(:features) do |t|
         | 
| 38 38 | 
             
              optstr = "features --format html -o #{CUKE_RESULTS} --format Fivemat -x"
         | 
    
        data/bin/lolcommits
    CHANGED
    
    | @@ -95,7 +95,7 @@ def do_capture | |
| 95 95 | 
             
                  }
         | 
| 96 96 |  | 
| 97 97 | 
             
                  # fire off runner with the overriden fake commit metadata
         | 
| 98 | 
            -
                  runner = Lolcommits::Runner.new(capture_options.merge | 
| 98 | 
            +
                  runner = Lolcommits::Runner.new(capture_options.merge(override_text))
         | 
| 99 99 | 
             
                  runner.run
         | 
| 100 100 |  | 
| 101 101 | 
             
                  # automatically open so user can see the test image results immediately
         | 
| @@ -322,8 +322,7 @@ elsif Choice.choices[:plugins] | |
| 322 322 | 
             
              configuration.puts_plugins
         | 
| 323 323 | 
             
            elsif Choice.choices[:devices]
         | 
| 324 324 | 
             
              puts Platform.device_list
         | 
| 325 | 
            -
              puts  | 
| 326 | 
            -
                'or set the LOLCOMMITS_DEVICE env variable'
         | 
| 325 | 
            +
              puts 'Specify a device with --device="{device name}" or set the LOLCOMMITS_DEVICE env variable'
         | 
| 327 326 | 
             
            elsif Choice.choices[:last]
         | 
| 328 327 | 
             
              do_last
         | 
| 329 328 | 
             
            elsif Choice.choices[:browse]
         | 
    
        data/features/bugs.feature
    CHANGED
    
    | @@ -26,16 +26,6 @@ Feature: Bug regression testing | |
| 26 26 | 
             
                # Then there should be 4 commit entries in the git log
         | 
| 27 27 | 
             
                Then there should be exactly 6 jpgs in "../.lolcommits/yuh8history"
         | 
| 28 28 |  | 
| 29 | 
            -
              #
         | 
| 30 | 
            -
              # issue #80, https://github.com/mroth/lolcommits/issues/80
         | 
| 31 | 
            -
              #
         | 
| 32 | 
            -
              Scenario: don't warn about system_timer (on MRI 1.8.7)
         | 
| 33 | 
            -
                When I successfully run `lolcommits`
         | 
| 34 | 
            -
                Then the output should not contain:
         | 
| 35 | 
            -
                """
         | 
| 36 | 
            -
                Faraday: you may want to install system_timer for reliable timeouts
         | 
| 37 | 
            -
                """
         | 
| 38 | 
            -
             | 
| 39 29 | 
             
              #
         | 
| 40 30 | 
             
              # issue #81, https://github.com/mroth/lolcommits/issues/81
         | 
| 41 31 | 
             
              #
         | 
| @@ -88,7 +88,7 @@ Given(/^a loldir named "(.*?)" with (\d+) lolimages$/) do |repo, num_images| | |
| 88 88 | 
             
              loldir = absolute_path("~/.lolcommits/#{repo}")
         | 
| 89 89 | 
             
              FileUtils.mkdir_p loldir
         | 
| 90 90 | 
             
              num_images.to_i.times do
         | 
| 91 | 
            -
                hex =  | 
| 91 | 
            +
                hex = format('%011x', (rand * 0xfffffffffff)).to_s
         | 
| 92 92 | 
             
                FileUtils.cp 'test/images/test_image.jpg', File.join(loldir, "#{hex}.jpg")
         | 
| 93 93 | 
             
              end
         | 
| 94 94 | 
             
            end
         | 
| @@ -6,7 +6,7 @@ require 'lolcommits/platform' | |
| 6 6 | 
             
            module PathHelpers
         | 
| 7 7 | 
             
              def reject_paths_with_cmd(cmd)
         | 
| 8 8 | 
             
                # make a new subdir that still contains cmds
         | 
| 9 | 
            -
                tmpbindir = File.expand_path(File.join | 
| 9 | 
            +
                tmpbindir = File.expand_path(File.join(@dirs, 'bin'))
         | 
| 10 10 | 
             
                FileUtils.mkdir_p tmpbindir
         | 
| 11 11 |  | 
| 12 12 | 
             
                preseve_cmds_in_path(%w(git mplayer), tmpbindir)
         | 
| @@ -9,14 +9,15 @@ module Lolcommits | |
| 9 9 | 
             
                  # capture the raw video with videosnap
         | 
| 10 10 | 
             
                  system_call "#{executable_path} -s 240 #{capture_device_string}#{capture_delay_string}-t #{animated_duration} --no-audio #{video_location} > /dev/null"
         | 
| 11 11 | 
             
                  return unless File.exist?(video_location)
         | 
| 12 | 
            +
                  # get fps for ffmpeg output stream configuration
         | 
| 13 | 
            +
                  fps = video_fps(video_location)
         | 
| 12 14 | 
             
                  # convert raw video to png frames with ffmpeg
         | 
| 13 | 
            -
                  system_call "ffmpeg -v quiet -i #{video_location} -t #{animated_duration} #{frames_location}/%09d.png"
         | 
| 15 | 
            +
                  system_call "ffmpeg -v quiet -i #{video_location} -t #{animated_duration} -r #{fps} #{frames_location}/%09d.png"
         | 
| 14 16 |  | 
| 15 17 | 
             
                  # use fps to set delay and number of frames to skip (for lower filesized gifs)
         | 
| 16 | 
            -
                  fps   = video_fps(video_location)
         | 
| 17 18 | 
             
                  skip  = frame_skip(fps)
         | 
| 18 19 | 
             
                  delay = frame_delay(fps, skip)
         | 
| 19 | 
            -
                  debug "Capturer:  | 
| 20 | 
            +
                  debug "Capturer: animated gif choosing every #{skip} frames with a frame delay of #{delay}"
         | 
| 20 21 |  | 
| 21 22 | 
             
                  # create the looping animated gif from frames (picks nth frame with seq)
         | 
| 22 23 | 
             
                  seq_command = "seq -f #{frames_location}/%09g.png 1 #{skip} #{Dir["#{frames_location}/*"].length}"
         | 
| @@ -49,7 +50,7 @@ module Lolcommits | |
| 49 50 |  | 
| 50 51 | 
             
                def frame_skip(fps)
         | 
| 51 52 | 
             
                  # of frames to skip depends on movie fps
         | 
| 52 | 
            -
                  case  | 
| 53 | 
            +
                  case fps
         | 
| 53 54 | 
             
                  when 0..15
         | 
| 54 55 | 
             
                    2
         | 
| 55 56 | 
             
                  when 16..28
         | 
| @@ -36,7 +36,7 @@ module Lolcommits | |
| 36 36 | 
             
                    gif = MiniMagick::Image.new File.join @configuration.archivedir, filename
         | 
| 37 37 |  | 
| 38 38 | 
             
                    # This is for ruby 1.8.7, *lolimages just doesn't work with ruby 187
         | 
| 39 | 
            -
                    gif.run_command('convert', *['-delay', '50', '-loop', '0', lolimages,  | 
| 39 | 
            +
                    gif.run_command('convert', *['-delay', '50', '-loop', '0', lolimages, gif.path.to_s].flatten)
         | 
| 40 40 |  | 
| 41 41 | 
             
                    puts "*** #{gif.path} generated."
         | 
| 42 42 | 
             
                  end
         | 
| @@ -35,11 +35,11 @@ module Lolcommits | |
| 35 35 | 
             
                end
         | 
| 36 36 |  | 
| 37 37 | 
             
                def most_recent
         | 
| 38 | 
            -
                  Dir.glob(File.join | 
| 38 | 
            +
                  Dir.glob(File.join(loldir, '*.{jpg,gif}')).max_by { |f| File.mtime(f) }
         | 
| 39 39 | 
             
                end
         | 
| 40 40 |  | 
| 41 41 | 
             
                def jpg_images
         | 
| 42 | 
            -
                  Dir.glob(File.join | 
| 42 | 
            +
                  Dir.glob(File.join(loldir, '*.jpg')).sort_by { |f| File.mtime(f) }
         | 
| 43 43 | 
             
                end
         | 
| 44 44 |  | 
| 45 45 | 
             
                def jpg_images_today
         | 
    
        data/lib/lolcommits/platform.rb
    CHANGED
    
    
| @@ -7,9 +7,9 @@ require 'tumblr_client' | |
| 7 7 |  | 
| 8 8 | 
             
            module Lolcommits
         | 
| 9 9 | 
             
              class LolTumblr < Plugin
         | 
| 10 | 
            -
                TUMBLR_API_ENDPOINT    = 'https://www.tumblr.com'
         | 
| 11 | 
            -
                TUMBLR_CONSUMER_KEY    = '2FtMEDpEPkxjoUdkpHh42h9wqTu9IVS7Ra0QyNZGixdCvhllN2'
         | 
| 12 | 
            -
                TUMBLR_CONSUMER_SECRET = 'qWuvxgFUR2YyWKtbWOkDTMAiBEbj7ZGaNLaNQPba0PI1N4JpBs'
         | 
| 10 | 
            +
                TUMBLR_API_ENDPOINT    = 'https://www.tumblr.com'.freeze
         | 
| 11 | 
            +
                TUMBLR_CONSUMER_KEY    = '2FtMEDpEPkxjoUdkpHh42h9wqTu9IVS7Ra0QyNZGixdCvhllN2'.freeze
         | 
| 12 | 
            +
                TUMBLR_CONSUMER_SECRET = 'qWuvxgFUR2YyWKtbWOkDTMAiBEbj7ZGaNLaNQPba0PI1N4JpBs'.freeze
         | 
| 13 13 |  | 
| 14 14 | 
             
                def run_postcapture
         | 
| 15 15 | 
             
                  return unless valid_configuration?
         | 
| @@ -29,11 +29,8 @@ module Lolcommits | |
| 29 29 | 
             
                  # ask user to configure tokens if enabling
         | 
| 30 30 | 
             
                  if options['enabled']
         | 
| 31 31 | 
             
                    auth_config = configure_auth!
         | 
| 32 | 
            -
                     | 
| 33 | 
            -
             | 
| 34 | 
            -
                    else
         | 
| 35 | 
            -
                      return # return nil if configure_auth failed
         | 
| 36 | 
            -
                    end
         | 
| 32 | 
            +
                    return unless auth_config
         | 
| 33 | 
            +
                    options = options.merge(auth_config).merge(configure_tumblr_name)
         | 
| 37 34 | 
             
                  end
         | 
| 38 35 | 
             
                  options
         | 
| 39 36 | 
             
                end
         | 
| @@ -1,20 +1,16 @@ | |
| 1 1 | 
             
            # -*- encoding : utf-8 -*-
         | 
| 2 2 | 
             
            require 'yaml'
         | 
| 3 3 | 
             
            require 'oauth'
         | 
| 4 | 
            -
             | 
| 5 | 
            -
            # twitter gem currently spams stdout when activated, surpress warnings just during the inital require
         | 
| 6 | 
            -
            original_verbose, $VERBOSE = $VERBOSE, nil # Supress warning messages.
         | 
| 7 4 | 
             
            require 'twitter'
         | 
| 8 | 
            -
            $VERBOSE = original_verbose # activate warning messages again.
         | 
| 9 5 |  | 
| 10 6 | 
             
            module Lolcommits
         | 
| 11 7 | 
             
              class LolTwitter < Plugin
         | 
| 12 | 
            -
                TWITTER_API_ENDPOINT    = 'https://api.twitter.com'
         | 
| 13 | 
            -
                TWITTER_CONSUMER_KEY    = 'qc096dJJCxIiqDNUqEsqQ'
         | 
| 14 | 
            -
                TWITTER_CONSUMER_SECRET = 'rvjNdtwSr1H0TvBvjpk6c4bvrNydHmmbvv7gXZQI'
         | 
| 8 | 
            +
                TWITTER_API_ENDPOINT    = 'https://api.twitter.com'.freeze
         | 
| 9 | 
            +
                TWITTER_CONSUMER_KEY    = 'qc096dJJCxIiqDNUqEsqQ'.freeze
         | 
| 10 | 
            +
                TWITTER_CONSUMER_SECRET = 'rvjNdtwSr1H0TvBvjpk6c4bvrNydHmmbvv7gXZQI'.freeze
         | 
| 15 11 | 
             
                TWITTER_RETRIES         = 2
         | 
| 16 12 | 
             
                TWITTER_PIN_REGEX       = /^\d{4,}$/ # 4 or more digits
         | 
| 17 | 
            -
                DEFAULT_SUFFIX          = '#lolcommits'
         | 
| 13 | 
            +
                DEFAULT_SUFFIX          = '#lolcommits'.freeze
         | 
| 18 14 |  | 
| 19 15 | 
             
                def run_postcapture
         | 
| 20 16 | 
             
                  return unless valid_configuration?
         | 
| @@ -54,11 +50,8 @@ module Lolcommits | |
| 54 50 | 
             
                  # ask user to configure tokens if enabling
         | 
| 55 51 | 
             
                  if options['enabled']
         | 
| 56 52 | 
             
                    auth_config = configure_auth!
         | 
| 57 | 
            -
                     | 
| 58 | 
            -
             | 
| 59 | 
            -
                    else
         | 
| 60 | 
            -
                      return # return nil if configure_auth failed
         | 
| 61 | 
            -
                    end
         | 
| 53 | 
            +
                    return unless auth_config
         | 
| 54 | 
            +
                    options = options.merge(auth_config).merge(configure_prefix_suffix)
         | 
| 62 55 | 
             
                  end
         | 
| 63 56 | 
             
                  options
         | 
| 64 57 | 
             
                end
         | 
| @@ -3,9 +3,9 @@ require 'yammer' | |
| 3 3 | 
             
            require 'rest_client'
         | 
| 4 4 |  | 
| 5 5 | 
             
            # https://developer.yammer.com/oauth2-quickstart/
         | 
| 6 | 
            -
            YAMMER_CLIENT_ID        = 'bgORyeKtnjZJSMwp8oln9g'
         | 
| 7 | 
            -
            YAMMER_CLIENT_SECRET    = 'oer2WdGzh74a5QBbW3INUxblHK3yg9KvCZmiBa2r0'
         | 
| 8 | 
            -
            YAMMER_ACCESS_TOKEN_URL = 'https://www.yammer.com/oauth2/access_token.json'
         | 
| 6 | 
            +
            YAMMER_CLIENT_ID        = 'bgORyeKtnjZJSMwp8oln9g'.freeze
         | 
| 7 | 
            +
            YAMMER_CLIENT_SECRET    = 'oer2WdGzh74a5QBbW3INUxblHK3yg9KvCZmiBa2r0'.freeze
         | 
| 8 | 
            +
            YAMMER_ACCESS_TOKEN_URL = 'https://www.yammer.com/oauth2/access_token.json'.freeze
         | 
| 9 9 | 
             
            YAMMER_RETRY_COUNT      = 2
         | 
| 10 10 |  | 
| 11 11 | 
             
            module Lolcommits
         | 
| @@ -28,7 +28,7 @@ module Lolcommits | |
| 28 28 | 
             
                  print 'Enter code param from the redirected URL, then press enter: '
         | 
| 29 29 | 
             
                  code = STDIN.gets.to_s.strip
         | 
| 30 30 |  | 
| 31 | 
            -
                  url =  | 
| 31 | 
            +
                  url = YAMMER_ACCESS_TOKEN_URL
         | 
| 32 32 | 
             
                  debug "access_token url: #{url}"
         | 
| 33 33 | 
             
                  params = {
         | 
| 34 34 | 
             
                    'client_id' => YAMMER_CLIENT_ID,
         | 
| @@ -47,11 +47,8 @@ module Lolcommits | |
| 47 47 | 
             
                  # ask user to configure tokens if enabling
         | 
| 48 48 | 
             
                  if options['enabled']
         | 
| 49 49 | 
             
                    auth_config = configure_access_token
         | 
| 50 | 
            -
                     | 
| 51 | 
            -
             | 
| 52 | 
            -
                    else
         | 
| 53 | 
            -
                      return # return nil if configure_auth failed
         | 
| 54 | 
            -
                    end
         | 
| 50 | 
            +
                    return unless auth_config
         | 
| 51 | 
            +
                    options.merge!(auth_config)
         | 
| 55 52 | 
             
                  end
         | 
| 56 53 | 
             
                  options
         | 
| 57 54 | 
             
                end
         | 
| @@ -75,7 +72,7 @@ module Lolcommits | |
| 75 72 | 
             
                    lolimage = File.new(runner.main_image)
         | 
| 76 73 | 
             
                    response = client.create_message(post, :attachment1 => lolimage)
         | 
| 77 74 | 
             
                    debug response.body.inspect
         | 
| 78 | 
            -
                    puts "\t--> Status posted!"  | 
| 75 | 
            +
                    puts "\t--> Status posted!" if response
         | 
| 79 76 | 
             
                  rescue => e
         | 
| 80 77 | 
             
                    retries -= 1
         | 
| 81 78 | 
             
                    retry if retries > 0
         | 
| @@ -27,7 +27,6 @@ module Lolspeak | |
| 27 27 | 
             
                /want/             => %w(wants),
         | 
| 28 28 | 
             
                /ead\b/            => %w(edd),
         | 
| 29 29 | 
             
                /ck/               => %w(kk kkk),
         | 
| 30 | 
            -
                /sion/             => %w(shun),
         | 
| 31 30 | 
             
                /cat|kitten|kitty/ => %w(kitteh kittehz cat fuzzeh fuzzyrumpus foozles fuzzbut fluffernutter beast mew),
         | 
| 32 31 | 
             
                /eak/              => %w(ekk),
         | 
| 33 32 | 
             
                /age/              => %w(uj),
         | 
| @@ -79,7 +78,7 @@ module Lolspeak | |
| 79 78 | 
             
                /can\si\s(?:ple(?:a|e)(?:s|z)e?)?\s?have\sa/ => ['i can haz'],
         | 
| 80 79 | 
             
                /(?:hello|\bhi\b|\bhey\b|howdy|\byo\b),?/    => ['oh hai,'],
         | 
| 81 80 | 
             
                /(?:god\b|allah|buddah?|diety|lord)/         => ['ceiling cat']
         | 
| 82 | 
            -
              }
         | 
| 81 | 
            +
              }.freeze
         | 
| 83 82 |  | 
| 84 83 | 
             
              def tranzlate(str)
         | 
| 85 84 | 
             
                lolstr = str.dup
         | 
| @@ -8,12 +8,14 @@ module Lolcommits | |
| 8 8 |  | 
| 9 9 | 
             
                def initialize(runner)
         | 
| 10 10 | 
             
                  super
         | 
| 11 | 
            -
                  options.concat( | 
| 12 | 
            -
                     | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 11 | 
            +
                  options.concat(
         | 
| 12 | 
            +
                    %w(
         | 
| 13 | 
            +
                      endpoint
         | 
| 14 | 
            +
                      optional_key
         | 
| 15 | 
            +
                      optional_http_auth_username
         | 
| 16 | 
            +
                      optional_http_auth_password
         | 
| 17 | 
            +
                    )
         | 
| 18 | 
            +
                  )
         | 
| 17 19 | 
             
                end
         | 
| 18 20 |  | 
| 19 21 | 
             
                def run_postcapture
         | 
    
        data/lib/lolcommits/runner.rb
    CHANGED
    
    | @@ -24,9 +24,6 @@ module Lolcommits | |
| 24 24 | 
             
                # this used to be handled with ActiveSupport::Callbacks, but
         | 
| 25 25 | 
             
                # now we're just using a simple procedural list
         | 
| 26 26 | 
             
                def run
         | 
| 27 | 
            -
                  # abort if we are in a rebase
         | 
| 28 | 
            -
                  die_if_rebasing!
         | 
| 29 | 
            -
             | 
| 30 27 | 
             
                  # do things that need to happen before capture and plugins
         | 
| 31 28 |  | 
| 32 29 | 
             
                  # do native plugins that need to happen before capture
         | 
| @@ -110,15 +107,6 @@ module Lolcommits | |
| 110 107 |  | 
| 111 108 | 
             
              protected
         | 
| 112 109 |  | 
| 113 | 
            -
              def die_if_rebasing!
         | 
| 114 | 
            -
                debug "Runner: Making sure user isn't rebasing"
         | 
| 115 | 
            -
                return unless git_info && !git_info.repo_internal_path.nil?
         | 
| 116 | 
            -
                mergeclue = File.join git_info.repo_internal_path, 'rebase-merge'
         | 
| 117 | 
            -
                return unless File.directory? mergeclue
         | 
| 118 | 
            -
                debug 'Runner: Rebase detected, silently exiting!'
         | 
| 119 | 
            -
                exit 0
         | 
| 120 | 
            -
              end
         | 
| 121 | 
            -
             | 
| 122 110 | 
             
              def resize_snapshot!
         | 
| 123 111 | 
             
                debug 'Runner: resizing snapshot'
         | 
| 124 112 | 
             
                image = MiniMagick::Image.open(snapshot_loc)
         | 
    
        data/lib/lolcommits/version.rb
    CHANGED
    
    
    
        data/lolcommits.gemspec
    CHANGED
    
    | @@ -28,12 +28,14 @@ Gem::Specification.new do |s| | |
| 28 28 | 
             
              s.requirements << 'a webcam'
         | 
| 29 29 |  | 
| 30 30 | 
             
              # hold back upgrading (and why)
         | 
| 31 | 
            -
              s.add_runtime_dependency('rest-client', '~> 1.6.7') | 
| 32 | 
            -
              s.add_runtime_dependency('mini_magick', '~> 3.8.1') | 
| 33 | 
            -
              s.add_runtime_dependency('mime-types', '~> 1.25') | 
| 34 | 
            -
              s.add_runtime_dependency('httparty', '~> 0.11.0') | 
| 35 | 
            -
              s.add_runtime_dependency('git', '=1.2.8') | 
| 36 | 
            -
              s.add_development_dependency('cucumber', '=1.3.19') | 
| 31 | 
            +
              s.add_runtime_dependency('rest-client', '~> 1.6.7')   # yam gem requires uses this older version
         | 
| 32 | 
            +
              s.add_runtime_dependency('mini_magick', '~> 3.8.1')   # ~> 4+ fails with JRuby
         | 
| 33 | 
            +
              s.add_runtime_dependency('mime-types', '~> 1.25')     # ~> 2+ requires Ruby >= 1.9.2
         | 
| 34 | 
            +
              s.add_runtime_dependency('httparty', '~> 0.11.0')     # ~> 0.13+ requires Ruby >= 1.9.3
         | 
| 35 | 
            +
              s.add_runtime_dependency('git', '=1.2.8')             # ~> 1.2.9 has issues with Ruby 1.8.7
         | 
| 36 | 
            +
              s.add_development_dependency('cucumber', '=1.3.19')   # ~> 2+ requries Ruby >= 1.9.3
         | 
| 37 | 
            +
              s.add_development_dependency('tins', '=1.6.0')        # ~> 1.6+ requries Ruby >= 2.0
         | 
| 38 | 
            +
              s.add_development_dependency('addressable', '=2.3.8') # ~> 2.3+ requries Ruby >= 2.0
         | 
| 37 39 |  | 
| 38 40 | 
             
              # core
         | 
| 39 41 | 
             
              s.add_runtime_dependency('choice', '~> 0.1.6')
         | 
| @@ -60,6 +62,6 @@ Gem::Specification.new do |s| | |
| 60 62 |  | 
| 61 63 | 
             
              if RUBY_VERSION >= '1.9.3'
         | 
| 62 64 | 
             
                s.add_development_dependency('travis', '~> 1.7.4')
         | 
| 63 | 
            -
                s.add_development_dependency('rubocop', '~> 0. | 
| 65 | 
            +
                s.add_development_dependency('rubocop', '~> 0.37.2')
         | 
| 64 66 | 
             
              end
         | 
| 65 67 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: lolcommits
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.6. | 
| 4 | 
            +
              version: 0.6.2.pre1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Matthew Rothenberg
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date:  | 
| 12 | 
            +
            date: 2016-02-20 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: rest-client
         | 
| @@ -95,6 +95,34 @@ dependencies: | |
| 95 95 | 
             
                - - '='
         | 
| 96 96 | 
             
                  - !ruby/object:Gem::Version
         | 
| 97 97 | 
             
                    version: 1.3.19
         | 
| 98 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 99 | 
            +
              name: tins
         | 
| 100 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 101 | 
            +
                requirements:
         | 
| 102 | 
            +
                - - '='
         | 
| 103 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 104 | 
            +
                    version: 1.6.0
         | 
| 105 | 
            +
              type: :development
         | 
| 106 | 
            +
              prerelease: false
         | 
| 107 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 108 | 
            +
                requirements:
         | 
| 109 | 
            +
                - - '='
         | 
| 110 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 111 | 
            +
                    version: 1.6.0
         | 
| 112 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 113 | 
            +
              name: addressable
         | 
| 114 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 115 | 
            +
                requirements:
         | 
| 116 | 
            +
                - - '='
         | 
| 117 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 118 | 
            +
                    version: 2.3.8
         | 
| 119 | 
            +
              type: :development
         | 
| 120 | 
            +
              prerelease: false
         | 
| 121 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 122 | 
            +
                requirements:
         | 
| 123 | 
            +
                - - '='
         | 
| 124 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 125 | 
            +
                    version: 2.3.8
         | 
| 98 126 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 99 127 | 
             
              name: choice
         | 
| 100 128 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -353,14 +381,14 @@ dependencies: | |
| 353 381 | 
             
                requirements:
         | 
| 354 382 | 
             
                - - ~>
         | 
| 355 383 | 
             
                  - !ruby/object:Gem::Version
         | 
| 356 | 
            -
                    version:  | 
| 384 | 
            +
                    version: 0.37.2
         | 
| 357 385 | 
             
              type: :development
         | 
| 358 386 | 
             
              prerelease: false
         | 
| 359 387 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 360 388 | 
             
                requirements:
         | 
| 361 389 | 
             
                - - ~>
         | 
| 362 390 | 
             
                  - !ruby/object:Gem::Version
         | 
| 363 | 
            -
                    version:  | 
| 391 | 
            +
                    version: 0.37.2
         | 
| 364 392 | 
             
            description: ! "  lolcommits takes a snapshot with your webcam every time you git
         | 
| 365 393 | 
             
              commit code,\n  and archives a lolcat style image with it. It's selfies for software\n
         | 
| 366 394 | 
             
              \ developers. `git blame` has never been so much fun.\n"
         | 
| @@ -452,9 +480,9 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 452 480 | 
             
                  version: 1.8.7
         | 
| 453 481 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 454 482 | 
             
              requirements:
         | 
| 455 | 
            -
              - - ! ' | 
| 483 | 
            +
              - - ! '>'
         | 
| 456 484 | 
             
                - !ruby/object:Gem::Version
         | 
| 457 | 
            -
                  version:  | 
| 485 | 
            +
                  version: 1.3.1
         | 
| 458 486 | 
             
            requirements:
         | 
| 459 487 | 
             
            - imagemagick
         | 
| 460 488 | 
             
            - a webcam
         |