addressable 2.3.7 → 2.3.8

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 531a87b0fdf38663665568cd7e14775397618665
4
- data.tar.gz: 88cc34caa61da92564835b0cf34a6e1ab8b7bb9c
3
+ metadata.gz: 42b16f73eeb6e9fe31be8acca16028ec89e5a083
4
+ data.tar.gz: 988538325db6737260f2ac394e84d349fdbe2f79
5
5
  SHA512:
6
- metadata.gz: c6e81bbd48d26f2df9b2291e2fa8210d467172696e6e8cf9007326eab8efb5b9687cc6db21d40e96005006b3f2ce0b25abdd2bb26143c5f6833156e1f01b6a97
7
- data.tar.gz: 05d5510dba6d0a581372c226bb5bc6d1e3f451b4a3b99e47f0ca26558368789706c5250dd3f755f0052a307f3e1562b343abfc33904b8cefd8d4a7f6f6f5e412
6
+ metadata.gz: be930a660ee582f6d780ab759085489652f9c5a68d51177247b1aff10e06df0e95a2d149f0c37206e1d5e4b2dc63fca24b6e46aaed3082c26e3b2ee9e3c718d8
7
+ data.tar.gz: 03eba1032a368e484693085431a5890cbec4c09290c69d06b71a5c59d088bd1be11632d9d32581f2f20d37939b466bcbc98dcfc1a870f086feb6267a8755eacf
@@ -1,3 +1,8 @@
1
+ # Addressable 2.3.8
2
+ - fix warnings
3
+ - update dependency gems
4
+ - support for 1.8.x officially deprecated
5
+
1
6
  # Addressable 2.3.7
2
7
  - fix scenario in which invalid URIs don't get an exception until inspected
3
8
  - handle hostnames with two adjacent periods correctly
data/Gemfile CHANGED
@@ -1,14 +1,17 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ gemspec
4
+
3
5
  group :development do
4
- gem 'launchy'
5
6
  gem 'yard'
6
7
  gem 'redcarpet', :platform => :mri_19
7
8
  gem 'rubyforge'
8
9
  end
9
10
 
10
11
  group :test, :development do
11
- gem 'coveralls', :require => false
12
+ gem 'coveralls', :require => false, :platforms => [
13
+ :ruby_19, :ruby_20, :ruby_21, :rbx, :jruby
14
+ ]
12
15
  end
13
16
 
14
17
  gem 'idn', :platform => :mri_18
@@ -16,11 +19,9 @@ gem 'idn-ruby', :platform => :mri_19
16
19
 
17
20
  platforms :ruby_18 do
18
21
  gem 'mime-types', '~> 1.25'
19
- gem 'rest-client', '~> 1.6.0'
22
+ gem 'rest-client', '~> 1.6.8'
20
23
  end
21
24
 
22
25
  platforms :rbx do
23
- gem 'rubysl-openssl', '2.1.0'
26
+ gem 'rubysl-openssl', '2.2.1'
24
27
  end
25
-
26
- gemspec
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <dl>
4
4
  <dt>Homepage</dt><dd><a href="http://addressable.rubyforge.org/">addressable.rubyforge.org</a></dd>
5
5
  <dt>Author</dt><dd><a href="mailto:bob@sporkmonger.com">Bob Aman</a></dd>
6
- <dt>Copyright</dt><dd>Copyright © 2006-2014 Bob Aman</dd>
6
+ <dt>Copyright</dt><dd>Copyright © 2006-2015 Bob Aman</dd>
7
7
  <dt>License</dt><dd>Apache 2.0</dd>
8
8
  </dl>
9
9
 
@@ -73,7 +73,7 @@ template.partial_expand({"one" => "1", "three" => 3}).pattern
73
73
  #=> "http://example.com/?one=1{&two}&three=3"
74
74
 
75
75
  template = Addressable::Template.new(
76
- "http://{host}{/segments}/{?one,two,bogus}{#fragment}"
76
+ "http://{host}{/segments*}/{?one,two,bogus}{#fragment}"
77
77
  )
78
78
  uri = Addressable::URI.parse(
79
79
  "http://example.com/a/b/c/?one=1&two=2#foo"
data/Rakefile CHANGED
@@ -10,11 +10,6 @@ PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
10
10
 
11
11
  RELEASE_NAME = "REL #{PKG_VERSION}"
12
12
 
13
- RUBY_FORGE_PROJECT = PKG_NAME
14
- RUBY_FORGE_USER = "sporkmonger"
15
- RUBY_FORGE_PATH = "/var/www/gforge-projects/#{RUBY_FORGE_PROJECT}"
16
- RUBY_FORGE_URL = "http://#{RUBY_FORGE_PROJECT}.rubyforge.org/"
17
-
18
13
  PKG_SUMMARY = "URI Implementation"
19
14
  PKG_DESCRIPTION = <<-TEXT
20
15
  Addressable is a replacement for the URI implementation that is part of
@@ -0,0 +1,42 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # stub: addressable 2.3.8 ruby lib
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "addressable"
6
+ s.version = "2.3.8"
7
+
8
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
+ s.require_paths = ["lib"]
10
+ s.authors = ["Bob Aman"]
11
+ s.date = "2015-03-27"
12
+ s.description = "Addressable is a replacement for the URI implementation that is part of\nRuby's standard library. It more closely conforms to the relevant RFCs and\nadds support for IRIs and URI templates.\n"
13
+ s.email = "bob@sporkmonger.com"
14
+ s.extra_rdoc_files = ["README.md"]
15
+ s.files = ["CHANGELOG.md", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "addressable.gemspec", "data/unicode.data", "lib/addressable/idna.rb", "lib/addressable/idna/native.rb", "lib/addressable/idna/pure.rb", "lib/addressable/template.rb", "lib/addressable/uri.rb", "lib/addressable/version.rb", "spec/addressable/idna_spec.rb", "spec/addressable/net_http_compat_spec.rb", "spec/addressable/template_spec.rb", "spec/addressable/uri_spec.rb", "spec/spec_helper.rb", "tasks/clobber.rake", "tasks/gem.rake", "tasks/git.rake", "tasks/metrics.rake", "tasks/rspec.rake", "tasks/yard.rake", "website/index.html"]
16
+ s.homepage = "https://github.com/sporkmonger/addressable"
17
+ s.licenses = ["Apache License 2.0"]
18
+ s.rdoc_options = ["--main", "README.md"]
19
+ s.rubygems_version = "2.4.6"
20
+ s.summary = "URI Implementation"
21
+
22
+ if s.respond_to? :specification_version then
23
+ s.specification_version = 4
24
+
25
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
+ s.add_development_dependency(%q<rake>, [">= 10.4.2", "~> 10.4"])
27
+ s.add_development_dependency(%q<rspec>, ["~> 3.0"])
28
+ s.add_development_dependency(%q<rspec-its>, ["~> 1.1"])
29
+ s.add_development_dependency(%q<launchy>, [">= 2.4.3", "~> 2.4"])
30
+ else
31
+ s.add_dependency(%q<rake>, [">= 10.4.2", "~> 10.4"])
32
+ s.add_dependency(%q<rspec>, ["~> 3.0"])
33
+ s.add_dependency(%q<rspec-its>, ["~> 1.1"])
34
+ s.add_dependency(%q<launchy>, [">= 2.4.3", "~> 2.4"])
35
+ end
36
+ else
37
+ s.add_dependency(%q<rake>, [">= 10.4.2", "~> 10.4"])
38
+ s.add_dependency(%q<rspec>, ["~> 3.0"])
39
+ s.add_dependency(%q<rspec-its>, ["~> 1.1"])
40
+ s.add_dependency(%q<launchy>, [">= 2.4.3", "~> 2.4"])
41
+ end
42
+ end
@@ -1,6 +1,6 @@
1
1
  # encoding:utf-8
2
2
  #--
3
- # Copyright (C) 2006-2013 Bob Aman
3
+ # Copyright (C) 2006-2015 Bob Aman
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # encoding:utf-8
2
2
  #--
3
- # Copyright (C) 2006-2013 Bob Aman
3
+ # Copyright (C) 2006-2015 Bob Aman
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # encoding:utf-8
2
2
  #--
3
- # Copyright (C) 2006-2013 Bob Aman
3
+ # Copyright (C) 2006-2015 Bob Aman
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # encoding:utf-8
2
2
  #--
3
- # Copyright (C) 2006-2013 Bob Aman
3
+ # Copyright (C) 2006-2015 Bob Aman
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # encoding:utf-8
2
2
  #--
3
- # Copyright (C) 2006-2013 Bob Aman
3
+ # Copyright (C) 2006-2015 Bob Aman
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -19,6 +19,10 @@
19
19
  require "addressable/version"
20
20
  require "addressable/idna"
21
21
 
22
+ if RUBY_VERSION =~ /^1.8/
23
+ warn('Support for Ruby 1.8.x in Addressable is deprecated.')
24
+ end
25
+
22
26
  ##
23
27
  # Addressable is a library for processing links and URIs.
24
28
  module Addressable
@@ -262,7 +266,7 @@ module Addressable
262
266
  "/#{$1.downcase}:/"
263
267
  end
264
268
  uri.path.gsub!(/\\/, SLASH)
265
- if File.exists?(uri.path) &&
269
+ if File.exist?(uri.path) &&
266
270
  File.stat(uri.path).directory?
267
271
  uri.path.gsub!(/\/$/, EMPTY_STR)
268
272
  uri.path = uri.path + '/'
@@ -1501,7 +1505,8 @@ module Addressable
1501
1505
  # @param [Class] return_type The return type desired. Value must be either
1502
1506
  # `Hash` or `Array`.
1503
1507
  #
1504
- # @return [Hash, Array] The query string parsed as a Hash or Array object.
1508
+ # @return [Hash, Array, nil] The query string parsed as a Hash or Array
1509
+ # or nil if the query string is blank.
1505
1510
  #
1506
1511
  # @example
1507
1512
  # Addressable::URI.parse("?one=1&two=2&three=3").query_values
@@ -1510,6 +1515,10 @@ module Addressable
1510
1515
  # #=> [["one", "two"], ["one", "three"]]
1511
1516
  # Addressable::URI.parse("?one=two&one=three").query_values(Hash)
1512
1517
  # #=> {"one" => "three"}
1518
+ # Addressable::URI.parse("?").query_values
1519
+ # #=> {}
1520
+ # Addressable::URI.parse("").query_values
1521
+ # #=> nil
1513
1522
  def query_values(return_type=Hash)
1514
1523
  empty_accumulator = Array == return_type ? [] : {}
1515
1524
  if return_type != Hash && return_type != Array
@@ -1,6 +1,6 @@
1
1
  # encoding:utf-8
2
2
  #--
3
- # Copyright (C) 2006-2013 Bob Aman
3
+ # Copyright (C) 2006-2015 Bob Aman
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@ if !defined?(Addressable::VERSION)
22
22
  module VERSION
23
23
  MAJOR = 2
24
24
  MINOR = 3
25
- TINY = 7
25
+ TINY = 8
26
26
 
27
27
  STRING = [MAJOR, MINOR, TINY].join('.')
28
28
  end
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
- # Copyright (C) 2006-2013 Bob Aman
2
+ # Copyright (C) 2006-2015 Bob Aman
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
- # Copyright (C) 2006-2013 Bob Aman
2
+ # Copyright (C) 2006-2015 Bob Aman
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
- # Copyright (C) 2006-2013 Bob Aman
2
+ # Copyright (C) 2006-2015 Bob Aman
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
16
16
 
17
17
  require "spec_helper"
18
18
 
19
+ require "bigdecimal"
19
20
  require "addressable/template"
20
21
 
21
22
  shared_examples_for 'expands' do |tests|
@@ -75,8 +76,6 @@ describe "==" do
75
76
  end
76
77
 
77
78
  describe "Type conversion" do
78
- require "bigdecimal"
79
-
80
79
  subject {
81
80
  {
82
81
  :var => true,
@@ -749,7 +748,7 @@ describe Addressable::Template do
749
748
  }
750
749
  context "first uri with ExampleTwoProcessor" do
751
750
  subject {
752
- match = Addressable::Template.new(
751
+ Addressable::Template.new(
753
752
  "http://example.com/search/{query}/"
754
753
  ).match(uri, ExampleTwoProcessor)
755
754
  }
@@ -759,7 +758,7 @@ describe Addressable::Template do
759
758
 
760
759
  context "second uri with ExampleTwoProcessor" do
761
760
  subject {
762
- match = Addressable::Template.new(
761
+ Addressable::Template.new(
763
762
  "http://example.com/{first}/{+second}/"
764
763
  ).match(uri2, ExampleTwoProcessor)
765
764
  }
@@ -769,7 +768,7 @@ describe Addressable::Template do
769
768
 
770
769
  context "second uri with DumbProcessor" do
771
770
  subject {
772
- match = Addressable::Template.new(
771
+ Addressable::Template.new(
773
772
  "http://example.com/{first}/{+second}/"
774
773
  ).match(uri2, DumbProcessor)
775
774
  }
@@ -779,7 +778,7 @@ describe Addressable::Template do
779
778
 
780
779
  context "second uri" do
781
780
  subject {
782
- match = Addressable::Template.new(
781
+ Addressable::Template.new(
783
782
  "http://example.com/{first}{/second*}/"
784
783
  ).match(uri2)
785
784
  }
@@ -788,7 +787,7 @@ describe Addressable::Template do
788
787
  end
789
788
  context "third uri" do
790
789
  subject {
791
- match = Addressable::Template.new(
790
+ Addressable::Template.new(
792
791
  "http://example.com/{;hash*,first}"
793
792
  ).match(uri3)
794
793
  }
@@ -801,7 +800,7 @@ describe Addressable::Template do
801
800
  # Semantically, a separate key is more likely, but both are possible.
802
801
  context "fourth uri" do
803
802
  subject {
804
- match = Addressable::Template.new(
803
+ Addressable::Template.new(
805
804
  "http://example.com/{?hash*,first}"
806
805
  ).match(uri4)
807
806
  }
@@ -811,7 +810,7 @@ describe Addressable::Template do
811
810
  end
812
811
  context "fifth uri" do
813
812
  subject {
814
- match = Addressable::Template.new(
813
+ Addressable::Template.new(
815
814
  "http://example.com/{path}{?hash*,first}"
816
815
  ).match(uri5)
817
816
  }
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
- # Copyright (C) 2006-2013 Bob Aman
2
+ # Copyright (C) 2006-2015 Bob Aman
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -173,6 +173,28 @@ describe Addressable::URI, "when created with an invalid host" do
173
173
  end
174
174
  end
175
175
 
176
+ describe Addressable::URI, "when created with a host consisting of " +
177
+ "sub-delims characters" do
178
+ it "should not raise an error" do
179
+ expect(lambda do
180
+ Addressable::URI.new(
181
+ :host => Addressable::URI::CharacterClasses::SUB_DELIMS.gsub(/\\/, '')
182
+ )
183
+ end).not_to raise_error
184
+ end
185
+ end
186
+
187
+ describe Addressable::URI, "when created with a host consisting of " +
188
+ "unreserved characters" do
189
+ it "should not raise an error" do
190
+ expect(lambda do
191
+ Addressable::URI.new(
192
+ :host => Addressable::URI::CharacterClasses::UNRESERVED.gsub(/\\/, '')
193
+ )
194
+ end).not_to raise_error
195
+ end
196
+ end
197
+
176
198
  describe Addressable::URI, "when created from nil components" do
177
199
  before do
178
200
  @uri = Addressable::URI.new
@@ -6,3 +6,7 @@ begin
6
6
  rescue LoadError
7
7
  warn "warning: coveralls gem not found; skipping Coveralls"
8
8
  end
9
+
10
+ RSpec.configure do |config|
11
+ config.warnings = true
12
+ end
@@ -18,17 +18,16 @@ namespace :gem do
18
18
  exit(1)
19
19
  end
20
20
 
21
- s.add_development_dependency 'rake', '~> 0.7', '>= 0.7.3'
21
+ s.add_development_dependency 'rake', '~> 10.4', '>= 10.4.2'
22
22
  s.add_development_dependency 'rspec', '~> 3.0'
23
23
  s.add_development_dependency 'rspec-its', '~> 1.1'
24
- s.add_development_dependency 'launchy', '~> 0.3', '>= 0.3.2'
24
+ s.add_development_dependency 'launchy', '~> 2.4', '>= 2.4.3'
25
25
 
26
26
  s.require_path = "lib"
27
27
 
28
28
  s.author = "Bob Aman"
29
29
  s.email = "bob@sporkmonger.com"
30
- s.homepage = RUBY_FORGE_URL
31
- s.rubyforge_project = RUBY_FORGE_PROJECT
30
+ s.homepage = "https://github.com/sporkmonger/addressable"
32
31
  s.license = "Apache License 2.0"
33
32
  end
34
33
 
@@ -77,6 +76,18 @@ namespace :gem do
77
76
 
78
77
  desc "Reinstall the gem"
79
78
  task :reinstall => [:uninstall, :install]
79
+
80
+ desc 'Package for release'
81
+ task :release => ["gem:package", "gem:gemspec"] do |t|
82
+ v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
83
+ abort "Versions don't match #{v} vs #{PROJ.version}" if v != PKG_VERSION
84
+ pkg = "pkg/#{GEM_SPEC.full_name}"
85
+
86
+ changelog = File.open("CHANGELOG.md") { |file| file.read }
87
+
88
+ puts "Releasing #{PKG_NAME} v. #{PKG_VERSION}"
89
+ Rake::Task["git:tag:create"].invoke
90
+ end
80
91
  end
81
92
 
82
93
  desc "Alias to gem:package"
@@ -32,7 +32,7 @@ namespace :spec do
32
32
  desc "Browse the code coverage report."
33
33
  task :browse => "spec:rcov" do
34
34
  require "launchy"
35
- Launchy::Browser.run("coverage/index.html")
35
+ Launchy.open("coverage/index.html")
36
36
  end
37
37
  end
38
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
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.3.8
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: 2015-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: '10.4'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 0.7.3
22
+ version: 10.4.2
23
23
  type: :development
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: '0.7'
29
+ version: '10.4'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.7.3
32
+ version: 10.4.2
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rspec
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -64,20 +64,20 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '0.3'
67
+ version: '2.4'
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
- version: 0.3.2
70
+ version: 2.4.3
71
71
  type: :development
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: '0.3'
77
+ version: '2.4'
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
- version: 0.3.2
80
+ version: 2.4.3
81
81
  description: |
82
82
  Addressable is a replacement for the URI implementation that is part of
83
83
  Ruby's standard library. It more closely conforms to the relevant RFCs and
@@ -93,6 +93,7 @@ files:
93
93
  - LICENSE.txt
94
94
  - README.md
95
95
  - Rakefile
96
+ - addressable.gemspec
96
97
  - data/unicode.data
97
98
  - lib/addressable/idna.rb
98
99
  - lib/addressable/idna/native.rb
@@ -110,10 +111,9 @@ files:
110
111
  - tasks/git.rake
111
112
  - tasks/metrics.rake
112
113
  - tasks/rspec.rake
113
- - tasks/rubyforge.rake
114
114
  - tasks/yard.rake
115
115
  - website/index.html
116
- homepage: http://addressable.rubyforge.org/
116
+ homepage: https://github.com/sporkmonger/addressable
117
117
  licenses:
118
118
  - Apache License 2.0
119
119
  metadata: {}
@@ -134,8 +134,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  - !ruby/object:Gem::Version
135
135
  version: '0'
136
136
  requirements: []
137
- rubyforge_project: addressable
138
- rubygems_version: 2.4.1
137
+ rubyforge_project:
138
+ rubygems_version: 2.4.6
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  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