Permalink
Browse files

Ruby 2.4 support

  • Loading branch information...
1 parent 5f4ef61 commit 767fc360fc56f955942ab55185786b67a3b63b52 @distler distler committed Jan 4, 2017
Showing 319 changed files with 9,906 additions and 4,944 deletions.
View
@@ -6,15 +6,15 @@ gem "thin"
gem "rubyzip", '~> 0.9.9'
gem "RedCloth", ">=4.0.0"
gem "erubis"
-gem "nokogiri", '~>1.6.8'
+gem "nokogiri", '~>1.7.0'
gem "rake", '~>10.4.0'
gem "rdoc"
gem "json"
gem "abstract", "~> 1.0.0"
gem "rails_xss", "~> 0.4.0"
gem "file_signature", "~> 1.2.0"
gem "syntax", "~> 1.1.0"
-gem "maruku", :git => 'git://github.com/distler/maruku.git', :branch => 'nokogiri'
-gem 'iconv', :platforms => [:ruby_20, :ruby_21, :ruby_22, :ruby_23, :x64_mingw, :mingw_23]
+gem "maruku", :git => 'https://github.com/distler/maruku.git', :branch => 'nokogiri'
+gem 'iconv', :platforms => [:ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24, :x64_mingw, :mingw_23, :mingw_24]
gem 'rdoc-data', :platforms => :ruby_18
gem 'test-unit', '~> 2.5.5'
Binary file not shown.
Binary file not shown.
@@ -1,120 +0,0 @@
-# This configuration was generated by
-# `rubocop --auto-gen-config`
-# on 2015-11-21 00:03:12 -0600 using RuboCop version 0.35.1.
-# The point is for the user to remove these configuration records
-# one by one as the offenses are removed from the code base.
-# Note that changes in the inspected code, or installation of new
-# versions of RuboCop, may require this file to be generated again.
-
-# Offense count: 4
-Lint/Eval:
- Exclude:
- - 'lib/bundler.rb'
- - 'lib/bundler/endpoint_specification.rb'
- - 'spec/support/streams.rb'
-
-# Offense count: 5
-Lint/HandleExceptions:
- Exclude:
- - 'lib/bundler/fetcher/dependency.rb'
- - 'lib/bundler/installer.rb'
- - 'lib/bundler/psyched_yaml.rb'
- - 'lib/bundler/vendored_persistent.rb'
-
-# Offense count: 1
-Lint/NestedMethodDefinition:
- Exclude:
- - 'lib/bundler/graph.rb'
-
-# Offense count: 5
-Lint/RescueException:
- Exclude:
- - 'lib/bundler/cli.rb'
- - 'lib/bundler/dsl.rb'
- - 'lib/bundler/friendly_errors.rb'
- - 'lib/bundler/rubygems_integration.rb'
- - 'lib/bundler/worker.rb'
-
-# Offense count: 7
-Lint/UselessAssignment:
- Exclude:
- - 'lib/bundler/graph.rb'
- - 'lib/bundler/index.rb'
- - 'lib/bundler/installer.rb'
-
-# Offense count: 1031
-# Configuration parameters: AllowURI, URISchemes.
-Metrics/LineLength:
- Max: 207
-
-# Offense count: 2
-# Configuration parameters: CountKeywordArgs.
-Metrics/ParameterLists:
- Max: 6
-
-# Offense count: 50
-Metrics/PerceivedComplexity:
- Max: 54
-
-# Offense count: 1
-Style/AccessorMethodName:
- Exclude:
- - 'lib/bundler/source/git.rb'
-
-# Offense count: 3
-Style/CaseEquality:
- Exclude:
- - 'lib/bundler/dsl.rb'
- - 'lib/bundler/match_platform.rb'
- - 'lib/bundler/rubygems_ext.rb'
-
-# Offense count: 22
-# Configuration parameters: EnforcedStyle, SupportedStyles.
-Style/ClassAndModuleChildren:
- Enabled: false
-
-# Offense count: 119
-# Configuration parameters: Exclude.
-Style/Documentation:
- Enabled: false
-
-# Offense count: 1
-# Configuration parameters: Exclude.
-Style/FileName:
- Exclude:
- - 'lib/bundler/templates/Executable'
-
-# Offense count: 4
-# Configuration parameters: AllowedVariables.
-Style/GlobalVars:
- Exclude:
- - 'lib/bundler/cli.rb'
- - 'spec/spec_helper.rb'
- - 'spec/support/helpers.rb'
-
-# Offense count: 32
-# Configuration parameters: MinBodyLength.
-Style/GuardClause:
- Enabled: false
-
-# Offense count: 2
-Style/ModuleFunction:
- Exclude:
- - 'lib/bundler/shared_helpers.rb'
- - 'spec/support/path.rb'
-
-# Offense count: 8
-# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
-Style/PredicateName:
- Exclude:
- - 'lib/bundler/definition.rb'
- - 'lib/bundler/installer/parallel_installer.rb'
- - 'lib/bundler/settings.rb'
- - 'lib/bundler/source/git.rb'
- - 'lib/bundler/source/git/git_proxy.rb'
- - 'lib/bundler/source/path.rb'
-
-# Offense count: 7
-# Configuration parameters: EnforcedStyle, SupportedStyles.
-Style/RaiseArgs:
- Enabled: false
@@ -1,20 +0,0 @@
-#!/usr/bin/env ruby
-
-# Exit cleanly from an early interrupt
-Signal.trap("INT") { exit 1 }
-
-require "bundler"
-# Check if an older version of bundler is installed
-$LOAD_PATH.each do |path|
- next unless path =~ %r{/bundler-0\.(\d+)} && $1.to_i < 9
- err = "Looks like you have a version of bundler that's older than 0.9.\n"
- err << "Please remove your old versions.\n"
- err << "An easy way to do this is by running `gem cleanup bundler`."
- abort(err)
-end
-
-require "bundler/friendly_errors"
-Bundler.with_friendly_errors do
- require "bundler/cli"
- Bundler::CLI.start(ARGV, :debug => true)
-end
@@ -1,20 +0,0 @@
-#!/usr/bin/env ruby
-
-# Exit cleanly from an early interrupt
-Signal.trap("INT") { exit 1 }
-
-require "bundler"
-# Check if an older version of bundler is installed
-$LOAD_PATH.each do |path|
- next unless path =~ %r{/bundler-0\.(\d+)} && $1.to_i < 9
- err = "Looks like you have a version of bundler that's older than 0.9.\n"
- err << "Please remove your old versions.\n"
- err << "An easy way to do this is by running `gem cleanup bundler`."
- abort(err)
-end
-
-require "bundler/friendly_errors"
-Bundler.with_friendly_errors do
- require "bundler/cli"
- Bundler::CLI.start(ARGV, :debug => true)
-end
@@ -1,51 +0,0 @@
-require "bundler/current_ruby"
-
-module Bundler
- class CLI::Exec
- attr_reader :options, :args, :cmd
-
- def initialize(options, args)
- @options = options
- @cmd = args.shift
- @args = args
-
- if Bundler.current_ruby.ruby_2? && !Bundler.current_ruby.jruby?
- @args << { :close_others => !options.keep_file_descriptors? }
- elsif options.keep_file_descriptors?
- Bundler.ui.warn "Ruby version #{RUBY_VERSION} defaults to keeping non-standard file descriptors on Kernel#exec."
- end
- end
-
- def run
- ui = Bundler.ui
- raise ArgumentError if cmd.nil?
-
- # First, try to exec directly to something in PATH
- SharedHelpers.set_bundle_environment
- bin_path = Bundler.which(@cmd)
- if bin_path
- Bundler.ui = nil
- Kernel.exec(bin_path, *args)
- end
-
- # If that didn't work, set up the whole bundle
- Bundler.definition.validate_ruby!
- Bundler.load.setup_environment
- Bundler.ui = nil
- Kernel.exec(@cmd, *args)
- rescue Errno::EACCES, Errno::ENOEXEC
- Bundler.ui = ui
- Bundler.ui.error "bundler: not executable: #{cmd}"
- exit 126
- rescue Errno::ENOENT
- Bundler.ui = ui
- Bundler.ui.error "bundler: command not found: #{cmd}"
- Bundler.ui.warn "Install missing gem executables with `bundle install`"
- exit 127
- rescue ArgumentError
- Bundler.ui = ui
- Bundler.ui.error "bundler: exec needs a command to run"
- exit 128
- end
- end
-end
@@ -1,32 +0,0 @@
-module Bundler
- class CLI::Inject
- attr_reader :options, :name, :version, :gems
- def initialize(options, name, version, gems)
- @options = options
- @name = name
- @version = version
- @gems = gems
- end
-
- def run
- # The required arguments allow Thor to give useful feedback when the arguments
- # are incorrect. This adds those first two arguments onto the list as a whole.
- gems.unshift(version).unshift(name)
-
- # Build an array of Dependency objects out of the arguments
- deps = []
- gems.each_slice(2) do |gem_name, gem_version|
- deps << Bundler::Dependency.new(gem_name, gem_version)
- end
-
- added = Injector.inject(deps)
-
- if added.any?
- Bundler.ui.confirm "Added to Gemfile:"
- Bundler.ui.confirm added.map {|g| " #{g}" }.join("\n")
- else
- Bundler.ui.confirm "All injected gems were already present in the Gemfile"
- end
- end
- end
-end
@@ -1,86 +0,0 @@
-require "bundler/cli/common"
-
-module Bundler
- class CLI::Outdated
- attr_reader :options, :gems
- def initialize(options, gems)
- @options = options
- @gems = gems
- end
-
- def run
- sources = Array(options[:source])
-
- gems.each do |gem_name|
- Bundler::CLI::Common.select_spec(gem_name)
- end
-
- Bundler.definition.validate_ruby!
- current_specs = Bundler.ui.silence { Bundler.load.specs }
- current_dependencies = {}
- Bundler.ui.silence { Bundler.load.dependencies.each {|dep| current_dependencies[dep.name] = dep } }
-
- if gems.empty? && sources.empty?
- # We're doing a full update
- definition = Bundler.definition(true)
- else
- definition = Bundler.definition(:gems => gems, :sources => sources)
- end
- options["local"] ? definition.resolve_with_cache! : definition.resolve_remotely!
-
- Bundler.ui.info ""
-
- out_count = 0
- # Loop through the current specs
- gemfile_specs, dependency_specs = current_specs.partition {|spec| current_dependencies.key? spec.name }
- [gemfile_specs.sort_by(&:name), dependency_specs.sort_by(&:name)].flatten.each do |current_spec|
- next if !gems.empty? && !gems.include?(current_spec.name)
-
- dependency = current_dependencies[current_spec.name]
-
- if options["strict"]
- active_spec = definition.specs.detect {|spec| spec.name == current_spec.name }
- else
- active_spec = definition.index[current_spec.name].sort_by(&:version)
- if !current_spec.version.prerelease? && !options[:pre] && active_spec.size > 1
- active_spec = active_spec.delete_if {|b| b.respond_to?(:version) && b.version.prerelease? }
- end
- active_spec = active_spec.last
- end
- next if active_spec.nil?
-
- gem_outdated = Gem::Version.new(active_spec.version) > Gem::Version.new(current_spec.version)
- git_outdated = current_spec.git_version != active_spec.git_version
- if gem_outdated || git_outdated
- if out_count == 0
- if options["pre"]
- Bundler.ui.info "Outdated gems included in the bundle (including pre-releases):"
- else
- Bundler.ui.info "Outdated gems included in the bundle:"
- end
- end
-
- spec_version = "#{active_spec.version}#{active_spec.git_version}"
- current_version = "#{current_spec.version}#{current_spec.git_version}"
- dependency_version = %(, requested #{dependency.requirement}) if dependency && dependency.specific?
-
- if dependency
- groups = dependency.groups.join(", ")
- pl = (dependency.groups.length > 1) ? "s" : ""
- groups = " in group#{pl} \"#{groups}\""
- end
-
- Bundler.ui.info " * #{active_spec.name} (newest #{spec_version}, installed #{current_version}#{dependency_version})#{groups}".rstrip
- out_count += 1
- end
- Bundler.ui.debug "from #{active_spec.loaded_from}"
- end
-
- if out_count.zero?
- Bundler.ui.info "Bundle up to date!\n"
- else
- exit 1
- end
- end
- end
-end
Oops, something went wrong.

0 comments on commit 767fc36

Please sign in to comment.