hoe-bundler 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -0
- data/{README.rdoc → LICENSE} +1 -40
- data/Manifest.txt +3 -2
- data/README.md +53 -0
- data/Rakefile +12 -4
- data/lib/hoe/bundler.rb +17 -22
- data/test/fixture_project/Gemfile +2 -2
- data/test/fixture_project/Rakefile +1 -0
- data/test/test_hoe_bundler.rb +7 -4
- metadata +67 -18
- data/CHANGELOG.rdoc +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0093e4cb1a127c8a4d151317f3e926268e0d931a'
|
4
|
+
data.tar.gz: 8366b6057d76601d1e276736a3c4346a654ab4e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cdf2091038c60cb73c8a0eff6d5afe7206bb8e7a14dcce8d33655a2be0efa46c575b07b7b800686b070028ff1d244e2dd10e33d5a715ed00eb510f7aac26faf
|
7
|
+
data.tar.gz: 1c904d7f0a87c2ff17db67bcae7938cd29a1b58878951e808eeff2c6765083c0c793fdea74c9746a48b9dc7a007aa8a1f6e4849898c9e2b553ee29517dd885cb
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 1.4.0 / 2018-03-28
|
4
|
+
|
5
|
+
Enhancements:
|
6
|
+
|
7
|
+
* Handle multiple version specs in development dependencies. (Thanks, @larskanis!)
|
8
|
+
|
9
|
+
|
10
|
+
## 1.3.0 / 2016-06-06
|
11
|
+
|
12
|
+
Enhancements:
|
13
|
+
|
14
|
+
* Add support for multiple version specs.
|
15
|
+
|
16
|
+
|
17
|
+
## 1.2.0 / 2012-09-26
|
18
|
+
|
19
|
+
Enhancements:
|
20
|
+
|
21
|
+
* Gracefully handle duplicate dependency declarations the way Gem::Specification does.
|
22
|
+
|
23
|
+
|
24
|
+
## 1.1.0 / 2011-03-20
|
25
|
+
|
26
|
+
Enhancements:
|
27
|
+
|
28
|
+
* Warning message ("Do not edit") in the generated Gemfile. (thanks to phiggins)
|
29
|
+
* Infer version ">=0" when people don't specify a version in their Hoe config. (thanks to phiggins)
|
30
|
+
|
31
|
+
|
32
|
+
## 1.0.0 / 2010-07-21
|
33
|
+
|
34
|
+
1 major enhancement
|
35
|
+
|
36
|
+
* Birthday!
|
37
|
+
|
data/{README.rdoc → LICENSE}
RENAMED
@@ -1,45 +1,6 @@
|
|
1
|
-
= hoe-bundler
|
2
|
-
|
3
|
-
* http://github.com/flavorjones/hoe-bundler
|
4
|
-
|
5
|
-
== DESCRIPTION:
|
6
|
-
|
7
|
-
Generate a Gemfile based on a Hoe spec's declared dependencies.
|
8
|
-
|
9
|
-
== FEATURES/PROBLEMS:
|
10
|
-
|
11
|
-
Creates a rake task to generate a bundler Gemfile based on your declared hoe dependencies.
|
12
|
-
|
13
|
-
* `bundler:gemfile`
|
14
|
-
|
15
|
-
Why would you want to do this? I mean, why would anyone want to use bundler to test their gem?
|
16
|
-
|
17
|
-
* to make sure you've declared all your dependencies in your Hoe.spec.
|
18
|
-
* to make sure you're testing against the exact versions of dependencies that you're claiming in your Hoe.spec.
|
19
|
-
|
20
|
-
== SYNOPSIS:
|
21
|
-
|
22
|
-
Just add the following line to your Rakefile before you call `Hoe.spec`:
|
23
|
-
|
24
|
-
Hoe.plugin :bundler
|
25
|
-
|
26
|
-
And then run the following command to generate a Gemfile:
|
27
|
-
|
28
|
-
rake bundler:gemfile
|
29
|
-
|
30
|
-
== REQUIREMENTS:
|
31
|
-
|
32
|
-
* hoe >= 2.2.0
|
33
|
-
|
34
|
-
== INSTALL:
|
35
|
-
|
36
|
-
* gem install hoe-bundler
|
37
|
-
|
38
|
-
== LICENSE:
|
39
|
-
|
40
1
|
(The MIT License)
|
41
2
|
|
42
|
-
Copyright (c) 2010 Mike Dalessio
|
3
|
+
Copyright (c) 2010-2018 Mike Dalessio
|
43
4
|
|
44
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
45
6
|
a copy of this software and associated documentation files (the
|
data/Manifest.txt
CHANGED
data/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# hoe-bundler
|
2
|
+
|
3
|
+
http://github.com/flavorjones/hoe-bundler
|
4
|
+
|
5
|
+
[![Concourse CI](https://ci.nokogiri.org/api/v1/teams/nokogiri-core/pipelines/hoe-bundler/jobs/ruby-2.5/badge)](https://ci.nokogiri.org/teams/nokogiri-core/pipelines/hoe-bundler)
|
6
|
+
|
7
|
+
|
8
|
+
## Description
|
9
|
+
|
10
|
+
Generate a Gemfile based on a Hoe spec's declared dependencies.
|
11
|
+
|
12
|
+
|
13
|
+
## Features/Problems
|
14
|
+
|
15
|
+
Creates a rake task to generate a bundler Gemfile based on your declared hoe dependencies.
|
16
|
+
|
17
|
+
* `bundler:gemfile`
|
18
|
+
|
19
|
+
Why would you want to do this? I mean, why would anyone want to use bundler to test their gem?
|
20
|
+
|
21
|
+
* to make sure you've declared all your dependencies in your Hoe.spec.
|
22
|
+
* to make sure you're testing against the exact versions of dependencies that you're claiming in your Hoe.spec.
|
23
|
+
|
24
|
+
|
25
|
+
## Synopsis
|
26
|
+
|
27
|
+
Just add the following line to your Rakefile before you call `Hoe.spec`:
|
28
|
+
|
29
|
+
Hoe.plugin :bundler
|
30
|
+
|
31
|
+
And then run the following command to generate a Gemfile:
|
32
|
+
|
33
|
+
rake bundler:gemfile
|
34
|
+
|
35
|
+
|
36
|
+
## Requirements
|
37
|
+
|
38
|
+
* hoe >= 2.2.0
|
39
|
+
|
40
|
+
|
41
|
+
## Installation
|
42
|
+
|
43
|
+
* gem install hoe-bundler
|
44
|
+
|
45
|
+
|
46
|
+
## Related gems
|
47
|
+
|
48
|
+
Generate a gem spec using [hoe-gemspec](http://github.com/flavorjones/hoe-gemspec).
|
49
|
+
|
50
|
+
|
51
|
+
## License
|
52
|
+
|
53
|
+
Distributed under the MIT license. See `LICENSE` file for details.
|
data/Rakefile
CHANGED
@@ -4,17 +4,25 @@ require 'rubygems'
|
|
4
4
|
require 'hoe'
|
5
5
|
|
6
6
|
Hoe.plugin :git
|
7
|
+
Hoe.plugin :gemspec
|
7
8
|
|
8
9
|
Hoe.spec 'hoe-bundler' do
|
9
10
|
developer('Mike Dalessio', 'mike.dalessio@gmail.com')
|
10
11
|
|
11
12
|
self.extra_rdoc_files = FileList["*.rdoc"]
|
12
|
-
self.history_file = "CHANGELOG.
|
13
|
-
self.readme_file = "README.
|
13
|
+
self.history_file = "CHANGELOG.md"
|
14
|
+
self.readme_file = "README.md"
|
14
15
|
self.test_globs = ["test/test_*.rb"]
|
16
|
+
self.license "MIT"
|
15
17
|
|
16
|
-
|
17
|
-
extra_dev_deps << ["
|
18
|
+
extra_dev_deps << ["minitest", "~> 5.11"]
|
19
|
+
extra_dev_deps << ["hoe-git", ">=0"]
|
20
|
+
extra_dev_deps << ["hoe-gemspec", ">=0"]
|
21
|
+
extra_dev_deps << ["concourse", "~> 0.18"]
|
18
22
|
end
|
19
23
|
|
24
|
+
require "concourse"
|
25
|
+
|
26
|
+
Concourse.new("hoe-bundler").create_tasks!
|
27
|
+
|
20
28
|
# vim: syntax=ruby
|
data/lib/hoe/bundler.rb
CHANGED
@@ -5,7 +5,7 @@ class Hoe #:nodoc:
|
|
5
5
|
# * <tt>bundler:gemfile</tt>
|
6
6
|
#
|
7
7
|
module Bundler
|
8
|
-
VERSION = "1.
|
8
|
+
VERSION = "1.4.0" #:nodoc:
|
9
9
|
|
10
10
|
def define_bundler_tasks
|
11
11
|
desc "generate a bundler Gemfile from your Hoe.spec dependencies"
|
@@ -25,33 +25,28 @@ class Hoe #:nodoc:
|
|
25
25
|
gemfile.puts "source \"https://rubygems.org/\""
|
26
26
|
gemfile.puts
|
27
27
|
|
28
|
-
extra_deps
|
29
|
-
self.
|
28
|
+
hoe_bundler_add_dependencies(self.extra_deps, gemfile)
|
29
|
+
hoe_bundler_add_dependencies(self.extra_dev_deps, gemfile, ", :group => [:development, :test]")
|
30
|
+
gemfile.puts "# vim: syntax=ruby"
|
31
|
+
|
32
|
+
gemfile.rewind
|
33
|
+
gemfile.read
|
34
|
+
end
|
35
|
+
|
36
|
+
def hoe_bundler_add_dependencies(deps, gemfile, postfix=nil)
|
37
|
+
deps2 = {}
|
38
|
+
deps.each do |name, version|
|
30
39
|
version ||= ">=0"
|
31
|
-
|
40
|
+
deps2[name] = version unless deps2.key?(name)
|
32
41
|
end
|
33
|
-
|
42
|
+
deps2.each do |name, version|
|
34
43
|
output = [%Q{gem "#{name}"}]
|
35
|
-
Array(version).each do |
|
36
|
-
output << %Q{"#{
|
44
|
+
Array(version).each do |ver|
|
45
|
+
output << %Q{"#{ver.gsub(/ /,'')}"}
|
37
46
|
end
|
38
|
-
gemfile.puts output.join(", ")
|
47
|
+
gemfile.puts %Q{#{output.join(", ")}#{postfix}}
|
39
48
|
end
|
40
49
|
gemfile.puts
|
41
|
-
|
42
|
-
extra_dev_deps = {}
|
43
|
-
self.extra_dev_deps.each do |name, version|
|
44
|
-
version ||= ">=0"
|
45
|
-
extra_dev_deps[name] = version unless extra_dev_deps.key?(name)
|
46
|
-
end
|
47
|
-
extra_dev_deps.each do |name, version|
|
48
|
-
gemfile.puts %Q{gem "#{name}", "#{version.gsub(/ /,'')}", :group => [:development, :test]}
|
49
|
-
end
|
50
|
-
gemfile.puts
|
51
|
-
gemfile.puts "# vim: syntax=ruby"
|
52
|
-
|
53
|
-
gemfile.rewind
|
54
|
-
gemfile.read
|
55
50
|
end
|
56
51
|
end
|
57
52
|
end
|
@@ -8,10 +8,10 @@ gem "xxx", ">=0"
|
|
8
8
|
gem "yyy", ">=0"
|
9
9
|
gem "zzz", "<1.5.0"
|
10
10
|
|
11
|
-
gem "rdoc", "~>4.0", :group => [:development, :test]
|
12
11
|
gem "aaa", ">=0", :group => [:development, :test]
|
13
12
|
gem "bbb", ">=2.2.0", :group => [:development, :test]
|
14
13
|
gem "ccc", ">=0", :group => [:development, :test]
|
15
|
-
gem "
|
14
|
+
gem "rdoc", ">=4.0", "<6", :group => [:development, :test]
|
15
|
+
gem "hoe", "~>3.17", :group => [:development, :test]
|
16
16
|
|
17
17
|
# vim: syntax=ruby
|
@@ -4,6 +4,7 @@ $: << File.expand_path(File.join(File.dirname(__FILE__),"../../lib"))
|
|
4
4
|
Hoe.plugin :bundler
|
5
5
|
Hoe.spec "fixture_project" do
|
6
6
|
developer("MCA","mca@example.com")
|
7
|
+
license "fixture license"
|
7
8
|
extra_deps << ["xxx"]
|
8
9
|
extra_deps << ["yyy", ">=0"]
|
9
10
|
extra_deps << ["zzz", "< 1.5.0"]
|
data/test/test_hoe_bundler.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
require "
|
1
|
+
require "minitest/autorun"
|
2
2
|
require "fileutils"
|
3
3
|
|
4
4
|
require "hoe"
|
5
5
|
Hoe.plugin :bundler
|
6
6
|
|
7
|
-
class TestHoeBundler < Test
|
7
|
+
class TestHoeBundler < Minitest::Test
|
8
8
|
def test_output
|
9
9
|
gemfile = nil
|
10
10
|
Dir.chdir(File.join(File.dirname(__FILE__), "fixture_project")) do
|
@@ -32,6 +32,7 @@ class TestHoeBundler < Test::Unit::TestCase
|
|
32
32
|
Dir.chdir(File.join(File.dirname(__FILE__), "fixture_project")) do
|
33
33
|
hoe = Hoe.spec "foo" do
|
34
34
|
developer("MCA","mca@example.com")
|
35
|
+
license "fixture license"
|
35
36
|
extra_deps << ["yyy", ">=0"]
|
36
37
|
extra_deps << ["yyy", ">=1"]
|
37
38
|
extra_dev_deps << ["bbb", ">= 1"]
|
@@ -50,12 +51,14 @@ class TestHoeBundler < Test::Unit::TestCase
|
|
50
51
|
Dir.chdir(File.join(File.dirname(__FILE__), "fixture_project")) do
|
51
52
|
hoe = Hoe.spec "foo" do
|
52
53
|
developer "MCA", "mca@example.com"
|
54
|
+
license "fixture license"
|
53
55
|
dependency "foo", [">= 0.8", "< 12.0"]
|
56
|
+
dependency "bar", [">= 1.8", "< 3.0"], :dev
|
54
57
|
end
|
55
58
|
|
56
59
|
lines = hoe.hoe_bundler_contents.split("\n")
|
57
|
-
|
58
|
-
assert_equal %Q{gem "
|
60
|
+
assert_equal %Q{gem "foo", ">=0.8", "<12.0"}, lines.grep(/foo/).first
|
61
|
+
assert_equal %Q{gem "bar", ">=1.8", "<3.0", :group => [:development, :test]}, lines.grep(/bar/).first
|
59
62
|
end
|
60
63
|
end
|
61
64
|
end
|
metadata
CHANGED
@@ -1,71 +1,120 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hoe-bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Dalessio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: minitest
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5.11'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '5.11'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hoe-git
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - ">="
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
type: :
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
42
|
+
name: hoe-gemspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: concourse
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
30
58
|
requirements:
|
31
59
|
- - "~>"
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
61
|
+
version: '0.18'
|
34
62
|
type: :development
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
66
|
- - "~>"
|
39
67
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
68
|
+
version: '0.18'
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
70
|
+
name: rdoc
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
44
72
|
requirements:
|
45
73
|
- - ">="
|
46
74
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
75
|
+
version: '4.0'
|
76
|
+
- - "<"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '6'
|
48
79
|
type: :development
|
49
80
|
prerelease: false
|
50
81
|
version_requirements: !ruby/object:Gem::Requirement
|
51
82
|
requirements:
|
52
83
|
- - ">="
|
53
84
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
85
|
+
version: '4.0'
|
86
|
+
- - "<"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '6'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: hoe
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '3.17'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '3.17'
|
55
103
|
description: Generate a Gemfile based on a Hoe spec's declared dependencies.
|
56
104
|
email:
|
57
105
|
- mike.dalessio@gmail.com
|
58
106
|
executables: []
|
59
107
|
extensions: []
|
60
108
|
extra_rdoc_files:
|
61
|
-
- CHANGELOG.
|
109
|
+
- CHANGELOG.md
|
62
110
|
- Manifest.txt
|
63
|
-
- README.
|
111
|
+
- README.md
|
64
112
|
files:
|
65
113
|
- ".autotest"
|
66
|
-
- CHANGELOG.
|
114
|
+
- CHANGELOG.md
|
115
|
+
- LICENSE
|
67
116
|
- Manifest.txt
|
68
|
-
- README.
|
117
|
+
- README.md
|
69
118
|
- Rakefile
|
70
119
|
- lib/hoe/bundler.rb
|
71
120
|
- test/fixture_project/Gemfile
|
@@ -83,7 +132,7 @@ metadata: {}
|
|
83
132
|
post_install_message:
|
84
133
|
rdoc_options:
|
85
134
|
- "--main"
|
86
|
-
- README.
|
135
|
+
- README.md
|
87
136
|
require_paths:
|
88
137
|
- lib
|
89
138
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -98,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
147
|
version: '0'
|
99
148
|
requirements: []
|
100
149
|
rubyforge_project:
|
101
|
-
rubygems_version: 2.
|
150
|
+
rubygems_version: 2.6.12
|
102
151
|
signing_key:
|
103
152
|
specification_version: 4
|
104
153
|
summary: Generate a Gemfile based on a Hoe spec's declared dependencies.
|
data/CHANGELOG.rdoc
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
=== 1.3.0 / 2016-06-06
|
2
|
-
|
3
|
-
Enhancements:
|
4
|
-
|
5
|
-
* Add support for multiple version specs.
|
6
|
-
|
7
|
-
|
8
|
-
=== 1.2.0 / 2012-09-26
|
9
|
-
|
10
|
-
* Enhancements:
|
11
|
-
|
12
|
-
* Gracefully handle duplicate dependency declarations the way Gem::Specification does.
|
13
|
-
|
14
|
-
|
15
|
-
=== 1.1.0 / 2011-03-20
|
16
|
-
|
17
|
-
* Enhancements:
|
18
|
-
|
19
|
-
* Warning message ("Do not edit") in the generated Gemfile. (thanks to phiggins)
|
20
|
-
* Infer version ">=0" when people don't specify a version in their Hoe config. (thanks to phiggins)
|
21
|
-
|
22
|
-
|
23
|
-
=== 1.0.0 / 2010-07-21
|
24
|
-
|
25
|
-
* 1 major enhancement
|
26
|
-
|
27
|
-
* Birthday!
|
28
|
-
|