Sha256: 0755941e6652e990098e5956a3528b3667df31fb823c7e1a064952b515648cfd

Contents?: true

Size: 768 Bytes

Versions: 8

Compression:

Stored size: 768 Bytes

Contents

module Konacha
  module Chai
    module Matchers
      class Collector

        def update_libraries
          modules = collect_libraries

          modules.each(&:update)
          modules.each(&:vendor)

          File.open('VERSIONS', 'w') do |f|
            modules.each do |m|
              f.puts "#{m.name}: #{m.version}"
            end
          end
        end

        private

        def collect_libraries
          libs = []
          File.open('.gitmodules') do |f|
            contents = f.read
            contents.each_line do |line|
              if matches = /\[submodule "(.*)"\]/.match(line)
                libs << Library.new(matches[1])
              end
            end
          end
          libs
        end

      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
konacha-chai-matchers-0.1.7 lib/konacha-chai-matchers/collector.rb
konacha-chai-matchers-0.1.6 lib/konacha-chai-matchers/collector.rb
konacha-chai-matchers-0.1.5 lib/konacha-chai-matchers/collector.rb
konacha-chai-matchers-0.1.4 lib/konacha-chai-matchers/collector.rb
konacha-chai-matchers-0.1.3 lib/konacha-chai-matchers/collector.rb
konacha-chai-matchers-0.1.2 lib/konacha-chai-matchers/collector.rb
konacha-chai-matchers-0.1.1 lib/konacha-chai-matchers/collector.rb
konacha-chai-matchers-0.1.0 lib/konacha-chai-matchers/collector.rb