molinillo 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 27a5127f777d4d2241afc7f5c7835805688f3735
4
- data.tar.gz: 59355f73e74c7ecb33ffae6d07eebb865efa2126
3
+ metadata.gz: bf1021f8076e5f81d17109e67bdd2b8bc0af0ae5
4
+ data.tar.gz: 610060ef298653c630392db49fb9904b6de1fb16
5
5
  SHA512:
6
- metadata.gz: e6a5abe9e0e3b9a15e7dc26d03a77e9710cddcc58c53b3a572e93925711d52481e422dc9e8436a0629e1170bde42dabe9181831465d915e884bfbe5f807f4043
7
- data.tar.gz: 56c23925d436aa33cb9ac8998abf464b4bb72e6c6b3b6404916ae76632e7ec347e1a9975993a21ca7d69dd85c3215a52641c688a2e14bc0452de218086230971
6
+ metadata.gz: 6a37000600b685b1ced6443cfab3bd9531cd3375ac47fa6eaf30c9fe60f67895be8277909cca92e0a45131bd281870adaba1d026ca418c6e1b8aea4d8f84ea21
7
+ data.tar.gz: 2e131077cdd99f9d3a9464080b077c5456c2913e9d3c4b1fb27f8516ab80e1c409525d4ded8d6b99192992bc246c4ae7a0bade39fbad979734ce6942026e1f6e
data/lib/molinillo.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'molinillo/gem_metadata'
2
3
  require 'molinillo/errors'
3
4
  require 'molinillo/resolver'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'set'
2
3
  require 'tsort'
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Molinillo
2
3
  # An error that occurred during the resolution process
3
4
  class ResolverError < StandardError; end
@@ -1,4 +1,5 @@
1
+ # frozen_string_literal: true
1
2
  module Molinillo
2
3
  # The version of Molinillo.
3
- VERSION = '0.4.2'.freeze
4
+ VERSION = '0.4.3'.freeze
4
5
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Molinillo
2
3
  # Provides information about specifcations and dependencies to the resolver,
3
4
  # allowing the {Resolver} class to remain generic while still providing power
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Molinillo
2
3
  # Conveys information about the resolution process to a user.
3
4
  module UI
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Molinillo
2
3
  class Resolver
3
4
  # A specific resolution from a given {Resolver}
@@ -362,6 +363,7 @@ module Molinillo
362
363
  if !dep_names.include?(succ.name) && !succ.root? && succ.predecessors.to_a == [vertex]
363
364
  debug(depth) { "Removing orphaned spec #{succ.name} after swapping #{name}" }
364
365
  activated.detach_vertex_named(succ.name)
366
+ requirements.delete_if { |r| name_for(r) == succ.name }
365
367
  end
366
368
  end
367
369
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'molinillo/dependency_graph'
2
3
 
3
4
  module Molinillo
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Molinillo
2
3
  # A state that a {Resolution} can be in
3
4
  # @attr [String] name the name of the current requirement
@@ -4,7 +4,7 @@ require 'json'
4
4
  require 'open-uri'
5
5
  require 'set'
6
6
 
7
- GEMS = %w(rails capybara bundler mail).freeze
7
+ GEMS = %w(rails capybara bundler github-linguist).freeze
8
8
 
9
9
  VERSION_PATTERN = /\A
10
10
  [0-9]+\.[0-9]+\.[0-9]+ (?# Number component)
@@ -33,7 +33,7 @@ end
33
33
 
34
34
  def coerce_dependencies_to_semver(deps)
35
35
  dependencies = {}
36
- deps.each do |name, req|
36
+ deps.sort_by(&:first).each do |name, req|
37
37
  dependencies[name] = req.split(',').map { |r| coerce_to_semver(r) }.join(',')
38
38
  end
39
39
  dependencies
@@ -63,7 +63,7 @@ specs = specs.group_by { |s| s['name'] }.values.map do |spec|
63
63
  {
64
64
  'name' => s['name'],
65
65
  'version' => coerce_to_semver(s['number']),
66
- 'dependencies' => coerce_dependencies_to_semver(s['dependencies'].sort_by(&:first))
66
+ 'dependencies' => coerce_dependencies_to_semver(s['dependencies'])
67
67
  }
68
68
  end.uniq { |s| s['version'] }.sort_by { |s| Gem::Version.new(s['version']) }
69
69
  ]
@@ -71,6 +71,6 @@ end
71
71
 
72
72
  specs = Hash[specs]
73
73
 
74
- json = JSON.pretty_generate(specs)
74
+ json = JSON.generate(specs)
75
75
 
76
- File.open('index/rubygems.json', 'w') { |f| f.write json }
76
+ File.open("index/rubygems-#{Date.today}.json", 'w') { |f| f.write json }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: molinillo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel E. Giddins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-30 00:00:00.000000000 Z
11
+ date: 2016-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  requirements: []
86
86
  rubyforge_project:
87
- rubygems_version: 2.5.1
87
+ rubygems_version: 2.5.2
88
88
  signing_key:
89
89
  specification_version: 4
90
90
  summary: Provides support for dependency resolution