gemirro 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of gemirro might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9da9030e0d14e4a42aa1b4bd5c2d807ad671b9fa
4
- data.tar.gz: 8635986b3ca41c6d5a086edc019a92df0b748386
3
+ metadata.gz: 78f6c247eadc49dc2b5f32d05dc0e0d7ebf0adf0
4
+ data.tar.gz: 495c49a190ec3116a566fc26fb20bfe597e1037b
5
5
  SHA512:
6
- metadata.gz: 615913c7fb85dbc0151366f901f7ba95f9abd9682cade0d2a89e9b67359320a8cdcbe10262e769f6a09ea3a0a5ddb18d47c7386b9db3e38eb1b57f2f94261d33
7
- data.tar.gz: ef79683054df6adf27951b2e7b9118253fefdaf78e7ed4dac531eb86429c71b192cb6787597d784affea8938829c52be7717400c30f30e5ecdad1e0eb9cf960e
6
+ metadata.gz: 826a05555760d61213e65965f8d0dc52ebfaebbf80b5628da365d1da4abfdcf0c7ef1b81ce3b7aeadb54782fe68c4a308f0d2c93decb51e9c9e45a85c7f2c7d3
7
+ data.tar.gz: 262edd87484dda4c5dff3345c489863499c608bbf7d41f369f2655f44c7aa495e14b9e74ec011e406d70747203209ded2078dbd0524e3a4720822bf51273dfd4
@@ -14,8 +14,13 @@ module Gemirro
14
14
  class Server < Sinatra::Base
15
15
  attr_accessor :versions_fetcher, :gems_fetcher
16
16
 
17
- Logger.class_eval { alias_method :write, :'<<' }
18
- access_logger = Logger.new(Gemirro.configuration.server.access_log)
17
+ # rubocop:disable Metrics/LineLength
18
+ access_logger = Logger.new(Gemirro.configuration.server.access_log).tap do |logger|
19
+ ::Logger.class_eval { alias_method :write, :'<<' }
20
+ logger.level = ::Logger::INFO
21
+ end
22
+ # rubocop:enable Metrics/LineLength
23
+
19
24
  error_logger = File.new(Gemirro.configuration.server.error_log, 'a+')
20
25
  error_logger.sync = true
21
26
 
@@ -125,7 +130,7 @@ module Gemirro
125
130
  def fetch_gem(resource)
126
131
  name = File.basename(resource)
127
132
  # rubocop:disable Metrics/LineLength
128
- regexp = /^(.*)-(\d+(?:\.\d+){,4})(-x86-((mswin|mingw)(32|64))*)\.gem(?:spec\.rz)?$/
133
+ regexp = /^(.*)-(\d+(?:\.\d+){,4})(-x86-((mswin|mingw)(32|64))*)?\.gem(?:spec\.rz)?$/
129
134
  # rubocop:enable Metrics/LineLength
130
135
  result = name.match(regexp)
131
136
  return unless result
@@ -139,7 +144,7 @@ module Gemirro
139
144
 
140
145
  logger.info("Try to download #{gem_name} with version #{gem_version}")
141
146
  gems_fetcher.source.gems.clear
142
- gems_fetcher.source.gems.push(Gemirro::Gem.new(gem_name, gem_version))
147
+ gems_fetcher.source.gems.push(gem)
143
148
  gems_fetcher.fetch
144
149
 
145
150
  update_indexes
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Gemirro Version
3
3
  module Gemirro
4
- VERSION = '0.10.1'
4
+ VERSION = '0.10.2'
5
5
  end
@@ -123,8 +123,9 @@ module Gemirro
123
123
  versions_fetcher = Gemirro::VersionsFetcher.new(source)
124
124
  allow(versions_fetcher).to receive(:fetch).once.and_return(true)
125
125
 
126
- gems_fetcher = Gemirro::VersionsFetcher.new(source)
126
+ gems_fetcher = Gemirro::GemsFetcher.new(source, versions_fetcher)
127
127
  allow(gems_fetcher).to receive(:fetch).once.and_return(true)
128
+ allow(gems_fetcher).to receive(:gem_exists?).once.and_return(true)
128
129
 
129
130
  Struct.new('GemIndexer')
130
131
  gem_indexer = Struct::GemIndexer.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemirro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Rambaud