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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd6b0df97b55e40058d3179a268b3014a5ce1a50
4
- data.tar.gz: d721d4298d832f6a4ea97e98b1f9cc2b452cb426
3
+ metadata.gz: '0093e4cb1a127c8a4d151317f3e926268e0d931a'
4
+ data.tar.gz: 8366b6057d76601d1e276736a3c4346a654ab4e5
5
5
  SHA512:
6
- metadata.gz: 741f956c110423a1fb202d58e29046af5c8a35fc6a6079ccdb11e94916b6b3a8bcedb65c722b97dbf40105ad79158f957439a028db57ee1b755eb0b55c0a5300
7
- data.tar.gz: 8d55f73c23ac57a8f3a2675ccacb2a671c9e1991e5fbaa5b8f9ce0bbb061e3ced5bbbf634bd22228694fbffcb8e45c0c1c3f2ff661a4a125194ac33605aa2bbd
6
+ metadata.gz: 1cdf2091038c60cb73c8a0eff6d5afe7206bb8e7a14dcce8d33655a2be0efa46c575b07b7b800686b070028ff1d244e2dd10e33d5a715ed00eb510f7aac26faf
7
+ data.tar.gz: 1c904d7f0a87c2ff17db67bcae7938cd29a1b58878951e808eeff2c6765083c0c793fdea74c9746a48b9dc7a007aa8a1f6e4849898c9e2b553ee29517dd885cb
@@ -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
+
@@ -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
@@ -1,7 +1,8 @@
1
1
  .autotest
2
- CHANGELOG.rdoc
2
+ CHANGELOG.md
3
+ LICENSE
3
4
  Manifest.txt
4
- README.rdoc
5
+ README.md
5
6
  Rakefile
6
7
  lib/hoe/bundler.rb
7
8
  test/fixture_project/Gemfile
@@ -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.rdoc"
13
- self.readme_file = "README.rdoc"
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
- extra_deps << ["hoe", ">=2.2.0"]
17
- extra_dev_deps << ["rake", ">=0"]
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
@@ -5,7 +5,7 @@ class Hoe #:nodoc:
5
5
  # * <tt>bundler:gemfile</tt>
6
6
  #
7
7
  module Bundler
8
- VERSION = "1.3.0" #:nodoc:
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.extra_deps.each do |name, version|
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
- extra_deps[name] = version unless extra_deps.key?(name)
40
+ deps2[name] = version unless deps2.key?(name)
32
41
  end
33
- extra_deps.each do |name, version|
42
+ deps2.each do |name, version|
34
43
  output = [%Q{gem "#{name}"}]
35
- Array(version).each do |version|
36
- output << %Q{"#{version.gsub(/ /,'')}"}
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 "hoe", "~>3.15", :group => [:development, :test]
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"]
@@ -1,10 +1,10 @@
1
- require "test/unit"
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::Unit::TestCase
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
- foo_decl = lines.grep(/foo/).first
58
- assert_equal %Q{gem "foo", ">=0.8", "<12.0"}, foo_decl
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.3.0
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: 2016-06-07 00:00:00.000000000 Z
11
+ date: 2018-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: hoe
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: 2.2.0
20
- type: :runtime
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: 2.2.0
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
- name: rdoc
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: '4.0'
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: '4.0'
68
+ version: '0.18'
41
69
  - !ruby/object:Gem::Dependency
42
- name: rake
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.rdoc
109
+ - CHANGELOG.md
62
110
  - Manifest.txt
63
- - README.rdoc
111
+ - README.md
64
112
  files:
65
113
  - ".autotest"
66
- - CHANGELOG.rdoc
114
+ - CHANGELOG.md
115
+ - LICENSE
67
116
  - Manifest.txt
68
- - README.rdoc
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.rdoc
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.5.1
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.
@@ -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
-