addressable 2.4.0 → 2.9.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.
data/spec/spec_helper.rb DELETED
@@ -1,21 +0,0 @@
1
- require 'bundler/setup'
2
- require 'rspec/its'
3
-
4
- begin
5
- require 'coveralls'
6
- Coveralls.wear! do
7
- add_filter "spec/"
8
- add_filter "vendor/"
9
- end
10
- rescue LoadError
11
- warn "warning: coveralls gem not found; skipping Coveralls"
12
- require 'simplecov'
13
- SimpleCov.start do
14
- add_filter "spec/"
15
- add_filter "vendor/"
16
- end
17
- end
18
-
19
- RSpec.configure do |config|
20
- config.warnings = true
21
- end
data/tasks/clobber.rake DELETED
@@ -1,2 +0,0 @@
1
- desc "Remove all build products"
2
- task "clobber"
data/tasks/gem.rake DELETED
@@ -1,97 +0,0 @@
1
- require "rubygems/package_task"
2
-
3
- namespace :gem do
4
- GEM_SPEC = Gem::Specification.new do |s|
5
- s.name = PKG_NAME
6
- s.version = PKG_VERSION
7
- s.summary = PKG_SUMMARY
8
- s.description = PKG_DESCRIPTION
9
-
10
- s.files = PKG_FILES.to_a
11
-
12
- s.has_rdoc = true
13
- s.extra_rdoc_files = %w( README.md )
14
- s.rdoc_options.concat ["--main", "README.md"]
15
-
16
- if !s.respond_to?(:add_development_dependency)
17
- puts "Cannot build Gem with this version of RubyGems."
18
- exit(1)
19
- end
20
-
21
- s.required_ruby_version = '>= 1.9.0'
22
-
23
- s.add_development_dependency 'bundler', '~> 1.0'
24
-
25
- s.require_path = "lib"
26
-
27
- s.author = "Bob Aman"
28
- s.email = "bob@sporkmonger.com"
29
- s.homepage = "https://github.com/sporkmonger/addressable"
30
- s.license = "Apache-2.0"
31
- end
32
-
33
- Gem::PackageTask.new(GEM_SPEC) do |p|
34
- p.gem_spec = GEM_SPEC
35
- p.need_tar = true
36
- p.need_zip = true
37
- end
38
-
39
- desc "Generates .gemspec file"
40
- task :gemspec do
41
- spec_string = GEM_SPEC.to_ruby
42
-
43
- begin
44
- Thread.new { eval("$SAFE = 3\n#{spec_string}", binding) }.join
45
- rescue
46
- abort "unsafe gemspec: #{$!}"
47
- else
48
- File.open("#{GEM_SPEC.name}.gemspec", 'w') do |file|
49
- file.write spec_string
50
- end
51
- end
52
- end
53
-
54
- desc "Show information about the gem"
55
- task :debug do
56
- puts GEM_SPEC.to_ruby
57
- end
58
-
59
- desc "Install the gem"
60
- task :install => ["clobber", "gem:package"] do
61
- sh "#{SUDO} gem install --local pkg/#{GEM_SPEC.full_name}"
62
- end
63
-
64
- desc "Uninstall the gem"
65
- task :uninstall do
66
- installed_list = Gem.source_index.find_name(PKG_NAME)
67
- if installed_list &&
68
- (installed_list.collect { |s| s.version.to_s}.include?(PKG_VERSION))
69
- sh(
70
- "#{SUDO} gem uninstall --version '#{PKG_VERSION}' " +
71
- "--ignore-dependencies --executables #{PKG_NAME}"
72
- )
73
- end
74
- end
75
-
76
- desc "Reinstall the gem"
77
- task :reinstall => [:uninstall, :install]
78
-
79
- desc 'Package for release'
80
- task :release => ["gem:package", "gem:gemspec"] do |t|
81
- v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
82
- abort "Versions don't match #{v} vs #{PROJ.version}" if v != PKG_VERSION
83
- pkg = "pkg/#{GEM_SPEC.full_name}"
84
-
85
- changelog = File.open("CHANGELOG.md") { |file| file.read }
86
-
87
- puts "Releasing #{PKG_NAME} v. #{PKG_VERSION}"
88
- Rake::Task["git:tag:create"].invoke
89
- end
90
- end
91
-
92
- desc "Alias to gem:package"
93
- task "gem" => "gem:package"
94
-
95
- task "gem:release" => "gem:gemspec"
96
-
97
- task "clobber" => ["gem:clobber_package"]
data/tasks/git.rake DELETED
@@ -1,45 +0,0 @@
1
- namespace :git do
2
- namespace :tag do
3
- desc "List tags from the Git repository"
4
- task :list do
5
- tags = `git tag -l`
6
- tags.gsub!("\r", "")
7
- tags = tags.split("\n").sort {|a, b| b <=> a }
8
- puts tags.join("\n")
9
- end
10
-
11
- desc "Create a new tag in the Git repository"
12
- task :create do
13
- changelog = File.open("CHANGELOG.md", "r") { |file| file.read }
14
- puts "-" * 80
15
- puts changelog
16
- puts "-" * 80
17
- puts
18
-
19
- v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z"
20
- abort "Versions don't match #{v} vs #{PKG_VERSION}" if v != PKG_VERSION
21
-
22
- git_status = `git status`
23
- if git_status !~ /^nothing to commit/
24
- abort "Working directory isn't clean."
25
- end
26
-
27
- tag = "#{PKG_NAME}-#{PKG_VERSION}"
28
- msg = "Release #{PKG_NAME}-#{PKG_VERSION}"
29
-
30
- existing_tags = `git tag -l #{PKG_NAME}-*`.split('\n')
31
- if existing_tags.include?(tag)
32
- warn("Tag already exists, deleting...")
33
- unless system "git tag -d #{tag}"
34
- abort "Tag deletion failed."
35
- end
36
- end
37
- puts "Creating git tag '#{tag}'..."
38
- unless system "git tag -a -m \"#{msg}\" #{tag}"
39
- abort "Tag creation failed."
40
- end
41
- end
42
- end
43
- end
44
-
45
- task "gem:release" => "git:tag:create"
data/tasks/metrics.rake DELETED
@@ -1,22 +0,0 @@
1
- namespace :metrics do
2
- task :lines do
3
- lines, codelines, total_lines, total_codelines = 0, 0, 0, 0
4
- for file_name in FileList["lib/**/*.rb"]
5
- f = File.open(file_name)
6
- while line = f.gets
7
- lines += 1
8
- next if line =~ /^\s*$/
9
- next if line =~ /^\s*#/
10
- codelines += 1
11
- end
12
- puts "L: #{sprintf("%4d", lines)}, " +
13
- "LOC #{sprintf("%4d", codelines)} | #{file_name}"
14
- total_lines += lines
15
- total_codelines += codelines
16
-
17
- lines, codelines = 0, 0
18
- end
19
-
20
- puts "Total: Lines #{total_lines}, LOC #{total_codelines}"
21
- end
22
- end
data/tasks/rspec.rake DELETED
@@ -1,21 +0,0 @@
1
- require "rspec/core/rake_task"
2
-
3
- namespace :spec do
4
- RSpec::Core::RakeTask.new(:simplecov) do |t|
5
- t.pattern = FileList['spec/**/*_spec.rb']
6
- t.rspec_opts = ['--color', '--format', 'documentation']
7
- end
8
-
9
- namespace :simplecov do
10
- desc "Browse the code coverage report."
11
- task :browse => "spec:simplecov" do
12
- require "launchy"
13
- Launchy.open("coverage/index.html")
14
- end
15
- end
16
- end
17
-
18
- desc "Alias to spec:simplecov"
19
- task "spec" => "spec:simplecov"
20
-
21
- task "clobber" => ["spec:clobber_simplecov"]
data/tasks/yard.rake DELETED
@@ -1,27 +0,0 @@
1
- require "rake"
2
-
3
- begin
4
- require "yard"
5
- require "yard/rake/yardoc_task"
6
-
7
- namespace :doc do
8
- desc "Generate Yardoc documentation"
9
- YARD::Rake::YardocTask.new do |yardoc|
10
- yardoc.name = "yard"
11
- yardoc.options = ["--verbose", "--markup", "markdown"]
12
- yardoc.files = FileList[
13
- "lib/**/*.rb", "ext/**/*.c",
14
- "README.md", "CHANGELOG.md", "LICENSE.txt"
15
- ].exclude(/idna/)
16
- end
17
- end
18
-
19
- task "clobber" => ["doc:clobber_yard"]
20
-
21
- desc "Alias to doc:yard"
22
- task "doc" => "doc:yard"
23
- rescue LoadError
24
- # If yard isn't available, it's not the end of the world
25
- desc "Alias to doc:rdoc"
26
- task "doc" => "doc:rdoc"
27
- end