addressable 2.3.7 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

@@ -1,8 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/setup'
1
4
  require 'rspec/its'
2
5
 
3
6
  begin
4
7
  require 'coveralls'
5
- Coveralls.wear!
8
+ Coveralls.wear! do
9
+ add_filter "spec/"
10
+ add_filter "vendor/"
11
+ end
6
12
  rescue LoadError
7
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
8
24
  end
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  desc "Remove all build products"
2
4
  task "clobber"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rubygems/package_task"
2
4
 
3
5
  namespace :gem do
@@ -18,18 +20,17 @@ namespace :gem do
18
20
  exit(1)
19
21
  end
20
22
 
21
- s.add_development_dependency 'rake', '~> 0.7', '>= 0.7.3'
22
- s.add_development_dependency 'rspec', '~> 3.0'
23
- s.add_development_dependency 'rspec-its', '~> 1.1'
24
- s.add_development_dependency 'launchy', '~> 0.3', '>= 0.3.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.license = "Apache License 2.0"
32
+ s.homepage = "https://github.com/sporkmonger/addressable"
33
+ s.license = "Apache-2.0"
33
34
  end
34
35
 
35
36
  Gem::PackageTask.new(GEM_SPEC) do |p|
@@ -41,15 +42,8 @@ namespace :gem do
41
42
  desc "Generates .gemspec file"
42
43
  task :gemspec do
43
44
  spec_string = GEM_SPEC.to_ruby
44
-
45
- begin
46
- Thread.new { eval("$SAFE = 3\n#{spec_string}", binding) }.join
47
- rescue
48
- abort "unsafe gemspec: #{$!}"
49
- else
50
- File.open("#{GEM_SPEC.name}.gemspec", 'w') do |file|
51
- file.write spec_string
52
- end
45
+ File.open("#{GEM_SPEC.name}.gemspec", "w") do |file|
46
+ file.write spec_string
53
47
  end
54
48
  end
55
49
 
@@ -77,6 +71,18 @@ namespace :gem do
77
71
 
78
72
  desc "Reinstall the gem"
79
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
80
86
  end
81
87
 
82
88
  desc "Alias to gem: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"
@@ -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
@@ -1,43 +1,23 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rspec/core/rake_task"
2
4
 
3
5
  namespace :spec do
4
- RSpec::Core::RakeTask.new(:rcov) do |t|
5
- t.pattern = FileList['spec/**/*_spec.rb']
6
- t.rspec_opts = ['--color', '--format', 'documentation']
7
- end
8
-
9
- RSpec::Core::RakeTask.new(:normal) do |t|
10
- t.pattern = FileList['spec/**/*_spec.rb'].exclude(/compat/)
11
- t.rspec_opts = ['--color', '--format', 'documentation']
12
- end
13
-
14
- RSpec::Core::RakeTask.new(:all) do |t|
6
+ RSpec::Core::RakeTask.new(:simplecov) do |t|
15
7
  t.pattern = FileList['spec/**/*_spec.rb']
16
8
  t.rspec_opts = ['--color', '--format', 'documentation']
17
9
  end
18
10
 
19
- desc "Generate HTML Specdocs for all specs"
20
- RSpec::Core::RakeTask.new(:specdoc) do |t|
21
- specdoc_path = File.expand_path(
22
- File.join(File.dirname(__FILE__), '..', 'documentation')
23
- )
24
- Dir.mkdir(specdoc_path) if !File.exist?(specdoc_path)
25
-
26
- output_file = File.join(specdoc_path, 'index.html')
27
- t.pattern = FileList['spec/**/*_spec.rb']
28
- t.fail_on_error = false
29
- end
30
-
31
- namespace :rcov do
11
+ namespace :simplecov do
32
12
  desc "Browse the code coverage report."
33
- task :browse => "spec:rcov" do
13
+ task :browse => "spec:simplecov" do
34
14
  require "launchy"
35
- Launchy::Browser.run("coverage/index.html")
15
+ Launchy.open("coverage/index.html")
36
16
  end
37
17
  end
38
18
  end
39
19
 
40
- desc "Alias to spec:normal"
41
- task "spec" => "spec:normal"
20
+ desc "Alias to spec:simplecov"
21
+ task "spec" => "spec:simplecov"
42
22
 
43
- task "clobber" => ["spec:clobber_rcov"]
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
metadata CHANGED
@@ -1,87 +1,59 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: addressable
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.7
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Aman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-05 00:00:00.000000000 Z
11
+ date: 2019-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rake
14
+ name: public_suffix
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '0.7'
20
17
  - - ">="
21
18
  - !ruby/object:Gem::Version
22
- version: 0.7.3
23
- type: :development
19
+ version: 2.0.2
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '5.0'
23
+ type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '0.7'
30
27
  - - ">="
31
28
  - !ruby/object:Gem::Version
32
- version: 0.7.3
29
+ version: 2.0.2
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '5.0'
33
33
  - !ruby/object:Gem::Dependency
34
- name: rspec
34
+ name: bundler
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '3.0'
40
- type: :development
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
39
+ version: '1.0'
40
+ - - "<"
45
41
  - !ruby/object:Gem::Version
46
42
  version: '3.0'
47
- - !ruby/object:Gem::Dependency
48
- name: rspec-its
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '1.1'
54
43
  type: :development
55
44
  prerelease: false
56
45
  version_requirements: !ruby/object:Gem::Requirement
57
46
  requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '1.1'
61
- - !ruby/object:Gem::Dependency
62
- name: launchy
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '0.3'
68
47
  - - ">="
69
48
  - !ruby/object:Gem::Version
70
- version: 0.3.2
71
- type: :development
72
- prerelease: false
73
- version_requirements: !ruby/object:Gem::Requirement
74
- requirements:
75
- - - "~>"
76
- - !ruby/object:Gem::Version
77
- version: '0.3'
78
- - - ">="
49
+ version: '1.0'
50
+ - - "<"
79
51
  - !ruby/object:Gem::Version
80
- version: 0.3.2
52
+ version: '3.0'
81
53
  description: |
82
- Addressable is a replacement for the URI implementation that is part of
83
- Ruby's standard library. It more closely conforms to the relevant RFCs and
84
- adds support for IRIs and URI templates.
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.
85
57
  email: bob@sporkmonger.com
86
58
  executables: []
87
59
  extensions: []
@@ -94,6 +66,7 @@ files:
94
66
  - README.md
95
67
  - Rakefile
96
68
  - data/unicode.data
69
+ - lib/addressable.rb
97
70
  - lib/addressable/idna.rb
98
71
  - lib/addressable/idna/native.rb
99
72
  - lib/addressable/idna/pure.rb
@@ -102,6 +75,8 @@ files:
102
75
  - lib/addressable/version.rb
103
76
  - spec/addressable/idna_spec.rb
104
77
  - spec/addressable/net_http_compat_spec.rb
78
+ - spec/addressable/rack_mount_compat_spec.rb
79
+ - spec/addressable/security_spec.rb
105
80
  - spec/addressable/template_spec.rb
106
81
  - spec/addressable/uri_spec.rb
107
82
  - spec/spec_helper.rb
@@ -110,12 +85,10 @@ files:
110
85
  - tasks/git.rake
111
86
  - tasks/metrics.rake
112
87
  - tasks/rspec.rake
113
- - tasks/rubyforge.rake
114
88
  - tasks/yard.rake
115
- - website/index.html
116
- homepage: http://addressable.rubyforge.org/
89
+ homepage: https://github.com/sporkmonger/addressable
117
90
  licenses:
118
- - Apache License 2.0
91
+ - Apache-2.0
119
92
  metadata: {}
120
93
  post_install_message:
121
94
  rdoc_options:
@@ -127,15 +100,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
100
  requirements:
128
101
  - - ">="
129
102
  - !ruby/object:Gem::Version
130
- version: '0'
103
+ version: '2.0'
131
104
  required_rubygems_version: !ruby/object:Gem::Requirement
132
105
  requirements:
133
106
  - - ">="
134
107
  - !ruby/object:Gem::Version
135
108
  version: '0'
136
109
  requirements: []
137
- rubyforge_project: addressable
138
- rubygems_version: 2.4.1
110
+ rubyforge_project:
111
+ rubygems_version: 2.5.2.3
139
112
  signing_key:
140
113
  specification_version: 4
141
114
  summary: URI Implementation
@@ -1,73 +0,0 @@
1
- namespace :gem do
2
- desc 'Package and upload to RubyForge'
3
- task :release => ["gem:package", "gem:gemspec"] do |t|
4
- require 'rubyforge'
5
-
6
- v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
7
- abort "Versions don't match #{v} vs #{PROJ.version}" if v != PKG_VERSION
8
- pkg = "pkg/#{GEM_SPEC.full_name}"
9
-
10
- rf = RubyForge.new
11
- rf.configure
12
- puts 'Logging in...'
13
- rf.login
14
-
15
- c = rf.userconfig
16
- changelog = File.open("CHANGELOG.md") { |file| file.read }
17
- c['release_changes'] = changelog
18
- c['preformatted'] = true
19
-
20
- files = ["#{pkg}.tgz", "#{pkg}.zip", "#{pkg}.gem"]
21
-
22
- puts "Releasing #{PKG_NAME} v. #{PKG_VERSION}"
23
- rf.add_release RUBY_FORGE_PROJECT, PKG_NAME, PKG_VERSION, *files
24
- end
25
- end
26
-
27
- namespace :spec do
28
- desc "Publish specdoc to RubyForge"
29
- task :release => ["spec:specdoc"] do
30
- require "rake/contrib/sshpublisher"
31
- require "yaml"
32
-
33
- config = YAML.load(
34
- File.read(File.expand_path('~/.rubyforge/user-config.yml'))
35
- )
36
- host = "#{config['username']}@rubyforge.org"
37
- remote_dir = RUBY_FORGE_PATH + "/specdoc"
38
- local_dir = "specdoc"
39
- Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
40
- end
41
-
42
- namespace :rcov do
43
- desc "Publish coverage report to RubyForge"
44
- task :release => ["spec:rcov"] do
45
- require "rake/contrib/sshpublisher"
46
- require "yaml"
47
-
48
- config = YAML.load(
49
- File.read(File.expand_path('~/.rubyforge/user-config.yml'))
50
- )
51
- host = "#{config['username']}@rubyforge.org"
52
- remote_dir = RUBY_FORGE_PATH + "/coverage"
53
- local_dir = "coverage"
54
- Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
55
- end
56
- end
57
- end
58
-
59
- namespace :website do
60
- desc "Publish website to RubyForge"
61
- task :release => ["doc:release", "spec:release", "spec:rcov:release"] do
62
- require "rake/contrib/sshpublisher"
63
- require "yaml"
64
-
65
- config = YAML.load(
66
- File.read(File.expand_path('~/.rubyforge/user-config.yml'))
67
- )
68
- host = "#{config['username']}@rubyforge.org"
69
- remote_dir = RUBY_FORGE_PATH
70
- local_dir = "website"
71
- Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
72
- end
73
- end
@@ -1,110 +0,0 @@
1
- <!DOCTYPE html>
2
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3
- <head>
4
- <meta charset="utf-8"/>
5
- <title>Addressable</title>
6
- <style type="text/css">
7
- * {
8
- font-size: 100%;
9
- margin: 0;
10
- padding: 0;
11
- }
12
-
13
- body {
14
- font-family: lucida grande, verdana, sans-serif;
15
- margin: 1em;
16
- }
17
-
18
- a {
19
- color: #880000;
20
- }
21
-
22
- a:visited {
23
- color: #333333;
24
- }
25
-
26
- h1 {
27
- font-size: 2em;
28
- margin: 0 0 0.8em 0;
29
- text-align: center;
30
- }
31
-
32
- h2 {
33
- font-size: 1em;
34
- margin: 0.8em 0;
35
- }
36
-
37
- p {
38
- margin: 0.8em 0;
39
- }
40
-
41
- ul {
42
- font-size: 0.9em;
43
- margin: 0 0 0 1.5em;
44
- }
45
-
46
- div {
47
- width: 50%;
48
- margin: 0 auto;
49
- padding: 0.8em;
50
- background-color: #AA5852;
51
- border: 2px solid #C2645D;
52
- }
53
-
54
- @media print {
55
- body {
56
- font-size: 0.9em;
57
- }
58
-
59
- a {
60
- text-decoration: none;
61
- color: #000;
62
- }
63
- }
64
- </style>
65
- </head>
66
- <body>
67
- <h1>Addressable</h1>
68
- <div>
69
- <p>
70
- Addressable is a replacement for the URI implementation that is part
71
- of Ruby's standard library. It more closely conforms to the relevant
72
- RFCs and adds support for IRIs and URI templates.
73
- </p>
74
- <ul>
75
- <li>
76
- <a href="http://rubyforge.org/projects/addressable/">
77
- Project Page
78
- </a>
79
- </li>
80
- <li>
81
- <a href="http://github.com/sporkmonger/addressable">
82
- GitHub Page
83
- </a>
84
- </li>
85
- <li><a href="http://rubydoc.info/gems/addressable">API</a></li>
86
- <li><a href="/specdoc/">Specifications</a></li>
87
- <li><a href="/coverage/">Code Coverage</a></li>
88
- </ul>
89
- <p>
90
- You know what to do:
91
- </p>
92
- <p>
93
- <code>sudo gem install addressable</code>
94
- </p>
95
- <p>
96
- Alternatively, you can:
97
- </p>
98
- <p>
99
- <code>
100
- git submodule add
101
- git://github.com/sporkmonger/addressable.git
102
- vendor/gems/addressable
103
- </code>
104
- </p>
105
- <p>
106
- Addressable works in Ruby 1.8.x, 1.9.x, and JRuby.
107
- </p>
108
- </div>
109
- </body>
110
- </html>