addressable 2.2.3 → 2.7.0

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

Potentially problematic release.


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

@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/setup'
4
+ require 'rspec/its'
5
+
6
+ begin
7
+ require 'coveralls'
8
+ Coveralls.wear! do
9
+ add_filter "spec/"
10
+ add_filter "vendor/"
11
+ end
12
+ rescue LoadError
13
+ warn "warning: coveralls gem not found; skipping Coveralls"
14
+ require 'simplecov'
15
+ SimpleCov.start do
16
+ add_filter "spec/"
17
+ add_filter "vendor/"
18
+ end
19
+ end
20
+
21
+ RSpec.configure do |config|
22
+ config.warnings = true
23
+ config.filter_run_when_matching :focus
24
+ end
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  desc "Remove all build products"
2
4
  task "clobber"
@@ -1,4 +1,6 @@
1
- require "rake/gempackagetask"
1
+ # frozen_string_literal: true
2
+
3
+ require "rubygems/package_task"
2
4
 
3
5
  namespace :gem do
4
6
  GEM_SPEC = Gem::Specification.new do |s|
@@ -10,28 +12,28 @@ namespace :gem do
10
12
  s.files = PKG_FILES.to_a
11
13
 
12
14
  s.has_rdoc = true
13
- s.extra_rdoc_files = %w( README )
14
- s.rdoc_options.concat ["--main", "README"]
15
+ s.extra_rdoc_files = %w( README.md )
16
+ s.rdoc_options.concat ["--main", "README.md"]
15
17
 
16
18
  if !s.respond_to?(:add_development_dependency)
17
19
  puts "Cannot build Gem with this version of RubyGems."
18
20
  exit(1)
19
21
  end
20
22
 
21
- s.add_development_dependency("rake", ">= 0.7.3")
22
- s.add_development_dependency("rspec", ">= 1.0.8")
23
- s.add_development_dependency("launchy", ">= 0.3.2")
24
- s.add_development_dependency("diff-lcs", ">= 1.1.2")
23
+ s.required_ruby_version = ">= 2.0"
24
+
25
+ s.add_runtime_dependency "public_suffix", ">= 2.0.2", "< 5.0"
26
+ s.add_development_dependency "bundler", ">= 1.0", "< 3.0"
25
27
 
26
28
  s.require_path = "lib"
27
29
 
28
30
  s.author = "Bob Aman"
29
31
  s.email = "bob@sporkmonger.com"
30
- s.homepage = RUBY_FORGE_URL
31
- s.rubyforge_project = RUBY_FORGE_PROJECT
32
+ s.homepage = "https://github.com/sporkmonger/addressable"
33
+ s.license = "Apache-2.0"
32
34
  end
33
35
 
34
- Rake::GemPackageTask.new(GEM_SPEC) do |p|
36
+ Gem::PackageTask.new(GEM_SPEC) do |p|
35
37
  p.gem_spec = GEM_SPEC
36
38
  p.need_tar = true
37
39
  p.need_zip = true
@@ -40,15 +42,8 @@ namespace :gem do
40
42
  desc "Generates .gemspec file"
41
43
  task :gemspec do
42
44
  spec_string = GEM_SPEC.to_ruby
43
-
44
- begin
45
- Thread.new { eval("$SAFE = 3\n#{spec_string}", binding) }.join
46
- rescue
47
- abort "unsafe gemspec: #{$!}"
48
- else
49
- File.open("#{GEM_SPEC.name}.gemspec", 'w') do |file|
50
- file.write spec_string
51
- end
45
+ File.open("#{GEM_SPEC.name}.gemspec", "w") do |file|
46
+ file.write spec_string
52
47
  end
53
48
  end
54
49
 
@@ -76,9 +71,23 @@ namespace :gem do
76
71
 
77
72
  desc "Reinstall the gem"
78
73
  task :reinstall => [:uninstall, :install]
74
+
75
+ desc "Package for release"
76
+ task :release => ["gem:package", "gem:gemspec"] do |t|
77
+ v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z"
78
+ abort "Versions don't match #{v} vs #{PROJ.version}" if v != PKG_VERSION
79
+ pkg = "pkg/#{GEM_SPEC.full_name}"
80
+
81
+ changelog = File.open("CHANGELOG.md") { |file| file.read }
82
+
83
+ puts "Releasing #{PKG_NAME} v. #{PKG_VERSION}"
84
+ Rake::Task["git:tag:create"].invoke
85
+ end
79
86
  end
80
87
 
81
88
  desc "Alias to gem:package"
82
89
  task "gem" => "gem:package"
83
90
 
91
+ task "gem:release" => "gem:gemspec"
92
+
84
93
  task "clobber" => ["gem:clobber_package"]
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  namespace :git do
2
4
  namespace :tag do
3
5
  desc "List tags from the Git repository"
@@ -10,7 +12,7 @@ namespace :git do
10
12
 
11
13
  desc "Create a new tag in the Git repository"
12
14
  task :create do
13
- changelog = File.open("CHANGELOG", "r") { |file| file.read }
15
+ changelog = File.open("CHANGELOG.md", "r") { |file| file.read }
14
16
  puts "-" * 80
15
17
  puts changelog
16
18
  puts "-" * 80
@@ -19,10 +21,15 @@ namespace :git do
19
21
  v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z"
20
22
  abort "Versions don't match #{v} vs #{PKG_VERSION}" if v != PKG_VERSION
21
23
 
24
+ git_status = `git status`
25
+ if git_status !~ /^nothing to commit/
26
+ abort "Working directory isn't clean."
27
+ end
28
+
22
29
  tag = "#{PKG_NAME}-#{PKG_VERSION}"
23
30
  msg = "Release #{PKG_NAME}-#{PKG_VERSION}"
24
31
 
25
- existing_tags = `git tag -l instrument-*`.split("\n")
32
+ existing_tags = `git tag -l #{PKG_NAME}-*`.split('\n')
26
33
  if existing_tags.include?(tag)
27
34
  warn("Tag already exists, deleting...")
28
35
  unless system "git tag -d #{tag}"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  namespace :metrics do
2
4
  task :lines do
3
5
  lines, codelines, total_lines, total_codelines = 0, 0, 0, 0
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rspec/core/rake_task"
4
+
5
+ namespace :spec do
6
+ RSpec::Core::RakeTask.new(:simplecov) do |t|
7
+ t.pattern = FileList['spec/**/*_spec.rb']
8
+ t.rspec_opts = ['--color', '--format', 'documentation']
9
+ end
10
+
11
+ namespace :simplecov do
12
+ desc "Browse the code coverage report."
13
+ task :browse => "spec:simplecov" do
14
+ require "launchy"
15
+ Launchy.open("coverage/index.html")
16
+ end
17
+ end
18
+ end
19
+
20
+ desc "Alias to spec:simplecov"
21
+ task "spec" => "spec:simplecov"
22
+
23
+ task "clobber" => ["spec:clobber_simplecov"]
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rake"
2
4
 
3
5
  begin
@@ -8,10 +10,11 @@ begin
8
10
  desc "Generate Yardoc documentation"
9
11
  YARD::Rake::YardocTask.new do |yardoc|
10
12
  yardoc.name = "yard"
11
- yardoc.options = ["--verbose"]
12
- yardoc.files = [
13
- "lib/**/*.rb", "ext/**/*.c", "README", "CHANGELOG", "LICENSE"
14
- ]
13
+ yardoc.options = ["--verbose", "--markup", "markdown"]
14
+ yardoc.files = FileList[
15
+ "lib/**/*.rb", "ext/**/*.c",
16
+ "README.md", "CHANGELOG.md", "LICENSE.txt"
17
+ ].exclude(/idna/)
15
18
  end
16
19
  end
17
20
 
metadata CHANGED
@@ -1,154 +1,115 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: addressable
3
- version: !ruby/object:Gem::Version
4
- hash: 1
5
- prerelease:
6
- segments:
7
- - 2
8
- - 2
9
- - 3
10
- version: 2.2.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.7.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Bob Aman
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2011-01-20 00:00:00 -08:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- name: rake
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
11
+ date: 2019-08-31 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: public_suffix
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
27
17
  - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 5
30
- segments:
31
- - 0
32
- - 7
33
- - 3
34
- version: 0.7.3
35
- type: :development
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: rspec
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.2
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '5.0'
23
+ type: :runtime
39
24
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
43
27
  - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 7
46
- segments:
47
- - 1
48
- - 0
49
- - 8
50
- version: 1.0.8
51
- type: :development
52
- version_requirements: *id002
53
- - !ruby/object:Gem::Dependency
54
- name: launchy
55
- prerelease: false
56
- requirement: &id003 !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
28
+ - !ruby/object:Gem::Version
29
+ version: 2.0.2
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '5.0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: bundler
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
59
37
  - - ">="
60
- - !ruby/object:Gem::Version
61
- hash: 23
62
- segments:
63
- - 0
64
- - 3
65
- - 2
66
- version: 0.3.2
38
+ - !ruby/object:Gem::Version
39
+ version: '1.0'
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '3.0'
67
43
  type: :development
68
- version_requirements: *id003
69
- - !ruby/object:Gem::Dependency
70
- name: diff-lcs
71
44
  prerelease: false
72
- requirement: &id004 !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
75
47
  - - ">="
76
- - !ruby/object:Gem::Version
77
- hash: 23
78
- segments:
79
- - 1
80
- - 1
81
- - 2
82
- version: 1.1.2
83
- type: :development
84
- version_requirements: *id004
48
+ - !ruby/object:Gem::Version
49
+ version: '1.0'
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '3.0'
85
53
  description: |
86
- Addressable is a replacement for the URI implementation that is part of
87
- Ruby's standard library. It more closely conforms to the relevant RFCs and
88
- adds support for IRIs and URI templates.
89
-
54
+ Addressable is an alternative implementation to the URI implementation that is
55
+ part of Ruby's standard library. It is flexible, offers heuristic parsing, and
56
+ additionally provides extensive support for IRIs and URI templates.
90
57
  email: bob@sporkmonger.com
91
58
  executables: []
92
-
93
59
  extensions: []
94
-
95
- extra_rdoc_files:
96
- - README
97
- files:
60
+ extra_rdoc_files:
61
+ - README.md
62
+ files:
63
+ - CHANGELOG.md
64
+ - Gemfile
65
+ - LICENSE.txt
66
+ - README.md
67
+ - Rakefile
68
+ - data/unicode.data
69
+ - lib/addressable.rb
98
70
  - lib/addressable/idna.rb
71
+ - lib/addressable/idna/native.rb
72
+ - lib/addressable/idna/pure.rb
99
73
  - lib/addressable/template.rb
100
74
  - lib/addressable/uri.rb
101
75
  - lib/addressable/version.rb
102
76
  - spec/addressable/idna_spec.rb
77
+ - spec/addressable/net_http_compat_spec.rb
78
+ - spec/addressable/rack_mount_compat_spec.rb
79
+ - spec/addressable/security_spec.rb
103
80
  - spec/addressable/template_spec.rb
104
81
  - spec/addressable/uri_spec.rb
82
+ - spec/spec_helper.rb
105
83
  - tasks/clobber.rake
106
84
  - tasks/gem.rake
107
85
  - tasks/git.rake
108
86
  - tasks/metrics.rake
109
- - tasks/rdoc.rake
110
- - tasks/rubyforge.rake
111
- - tasks/spec.rake
87
+ - tasks/rspec.rake
112
88
  - tasks/yard.rake
113
- - website/index.html
114
- - CHANGELOG
115
- - LICENSE
116
- - Rakefile
117
- - README
118
- has_rdoc: true
119
- homepage: http://addressable.rubyforge.org/
120
- licenses: []
121
-
89
+ homepage: https://github.com/sporkmonger/addressable
90
+ licenses:
91
+ - Apache-2.0
92
+ metadata: {}
122
93
  post_install_message:
123
- rdoc_options:
124
- - --main
125
- - README
126
- require_paths:
94
+ rdoc_options:
95
+ - "--main"
96
+ - README.md
97
+ require_paths:
127
98
  - lib
128
- required_ruby_version: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
99
+ required_ruby_version: !ruby/object:Gem::Requirement
100
+ requirements:
131
101
  - - ">="
132
- - !ruby/object:Gem::Version
133
- hash: 3
134
- segments:
135
- - 0
136
- version: "0"
137
- required_rubygems_version: !ruby/object:Gem::Requirement
138
- none: false
139
- requirements:
102
+ - !ruby/object:Gem::Version
103
+ version: '2.0'
104
+ required_rubygems_version: !ruby/object:Gem::Requirement
105
+ requirements:
140
106
  - - ">="
141
- - !ruby/object:Gem::Version
142
- hash: 3
143
- segments:
144
- - 0
145
- version: "0"
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
146
109
  requirements: []
147
-
148
- rubyforge_project: addressable
149
- rubygems_version: 1.4.1
110
+ rubyforge_project:
111
+ rubygems_version: 2.5.2.3
150
112
  signing_key:
151
- specification_version: 3
113
+ specification_version: 4
152
114
  summary: URI Implementation
153
115
  test_files: []
154
-
data/CHANGELOG DELETED
@@ -1,101 +0,0 @@
1
- === Addressable 2.2.3
2
- - added :flat_array notation for query strings
3
-
4
- === Addressable 2.2.2
5
- - fixed issue with percent escaping of '+' character in query strings
6
-
7
- === Addressable 2.2.1
8
- - added support for application/x-www-form-urlencoded.
9
-
10
- === Addressable 2.2.0
11
- - added site methods
12
- - improved documentation
13
-
14
- === Addressable 2.1.2
15
- - added HTTP request URI methods
16
- - better handling of Windows file paths
17
- - validation_deferred boolean replaced with defer_validation block
18
- - normalization of percent-encoded paths should now be correct
19
- - fixed issue with constructing URIs with relative paths
20
- - fixed warnings
21
-
22
- === Addressable 2.1.1
23
- - more type checking changes
24
- - fixed issue with unicode normalization
25
- - added method to find template defaults
26
- - symbolic keys are now allowed in template mappings
27
- - numeric values and symbolic values are now allowed in template mappings
28
-
29
- === Addressable 2.1.0
30
- - refactored URI template support out into its own class
31
- - removed extract method due to being useless and unreliable
32
- - removed Addressable::URI.expand_template
33
- - removed Addressable::URI#extract_mapping
34
- - added partial template expansion
35
- - fixed minor bugs in the parse and heuristic_parse methods
36
- - fixed incompatibility with Ruby 1.9.1
37
- - fixed bottleneck in Addressable::URI#hash and Addressable::URI#to_s
38
- - fixed unicode normalization exception
39
- - updated query_values methods to better handle subscript notation
40
- - worked around issue with freezing URIs
41
- - improved specs
42
-
43
- === Addressable 2.0.2
44
- - fixed issue with URI template expansion
45
- - fixed issue with percent escaping characters 0-15
46
-
47
- === Addressable 2.0.1
48
- - fixed issue with query string assignment
49
- - fixed issue with improperly encoded components
50
-
51
- === Addressable 2.0.0
52
- - the initialize method now takes an options hash as its only parameter
53
- - added query_values method to URI class
54
- - completely replaced IDNA implementation with pure Ruby
55
- - renamed Addressable::ADDRESSABLE_VERSION to Addressable::VERSION
56
- - completely reworked the Rakefile
57
- - changed the behavior of the port method significantly
58
- - Addressable::URI.encode_segment, Addressable::URI.unencode_segment renamed
59
- - documentation is now in YARD format
60
- - more rigorous type checking
61
- - to_str method implemented, implicit conversion to Strings now allowed
62
- - Addressable::URI#omit method added, Addressable::URI#merge method replaced
63
- - updated URI Template code to match v 03 of the draft spec
64
- - added a bunch of new specifications
65
-
66
- === Addressable 1.0.4
67
- - switched to using RSpec's pending system for specs that rely on IDN
68
- - fixed issue with creating URIs with paths that are not prefixed with '/'
69
-
70
- === Addressable 1.0.3
71
- - implemented a hash method
72
-
73
- === Addressable 1.0.2
74
- - fixed minor bug with the extract_mapping method
75
-
76
- === Addressable 1.0.1
77
- - fixed minor bug with the extract_mapping method
78
-
79
- === Addressable 1.0.0
80
- - heuristic parse method added
81
- - parsing is slightly more strict
82
- - replaced to_h with to_hash
83
- - fixed routing methods
84
- - improved specifications
85
- - improved heckle rake task
86
- - no surviving heckle mutations
87
-
88
- === Addressable 0.1.2
89
- - improved normalization
90
- - fixed bug in joining algorithm
91
- - updated specifications
92
-
93
- === Addressable 0.1.1
94
- - updated documentation
95
- - added URI Template variable extraction
96
-
97
- === Addressable 0.1.0
98
- - initial release
99
- - implementation based on RFC 3986, 3987
100
- - support for IRIs via libidn
101
- - support for the URI Template draft spec