gemirro 0.10.0 → 0.10.1

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: 4546e4ecf735f60e1aad1d47afddbe9a2538355b
4
- data.tar.gz: b5f0b6f5bb9e017c251a9843faa6492b8f510505
3
+ metadata.gz: 9da9030e0d14e4a42aa1b4bd5c2d807ad671b9fa
4
+ data.tar.gz: 8635986b3ca41c6d5a086edc019a92df0b748386
5
5
  SHA512:
6
- metadata.gz: 3fc2c772a2f5e4ac9c75106503d646ad1225855fd0547bbae0515a6b507f0603f323674715c5a02c6634fc1111cc3c6afe83801ee6c8089edb7e3a68f337f129
7
- data.tar.gz: 8ce9b6f65744607f5f4b704283e790a8966f4de2ce9c2a2728c95bb6ab5ed634dabbd9d7a6ab008556f43777d65d50747ef333d293ca58289eb457651c1695e5
6
+ metadata.gz: 615913c7fb85dbc0151366f901f7ba95f9abd9682cade0d2a89e9b67359320a8cdcbe10262e769f6a09ea3a0a5ddb18d47c7386b9db3e38eb1b57f2f94261d33
7
+ data.tar.gz: ef79683054df6adf27951b2e7b9118253fefdaf78e7ed4dac531eb86429c71b192cb6787597d784affea8938829c52be7717400c30f30e5ecdad1e0eb9cf960e
@@ -14,12 +14,8 @@ 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, :'<<' }
17
18
  access_logger = Logger.new(Gemirro.configuration.server.access_log)
18
- .tap do |logger|
19
- ::Logger.class_eval { alias_method :write, :'<<' }
20
- logger.level = ::Logger::INFO
21
- end
22
-
23
19
  error_logger = File.new(Gemirro.configuration.server.error_log, 'a+')
24
20
  error_logger.sync = true
25
21
 
@@ -137,17 +133,19 @@ module Gemirro
137
133
  gem_name, gem_version = result.captures
138
134
  return unless gem_name && gem_version
139
135
 
140
- logger.info("Try to download #{gem_name} with version #{gem_version}")
141
-
142
136
  begin
137
+ gem = Gemirro::Gem.new(gem_name, gem_version)
138
+ return if gems_fetcher.gem_exists?(gem.filename(gem_version))
139
+
140
+ logger.info("Try to download #{gem_name} with version #{gem_version}")
143
141
  gems_fetcher.source.gems.clear
144
142
  gems_fetcher.source.gems.push(Gemirro::Gem.new(gem_name, gem_version))
145
143
  gems_fetcher.fetch
144
+
145
+ update_indexes
146
146
  rescue StandardError => e
147
147
  logger.error(e.message)
148
148
  end
149
-
150
- update_indexes
151
149
  end
152
150
 
153
151
  ##
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Gemirro Version
3
3
  module Gemirro
4
- VERSION = '0.10.0'
4
+ VERSION = '0.10.1'
5
5
  end
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.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Rambaud