librarianp 0.6.3 → 0.6.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11c125c2dd54a4c4d8e2c201d83e47575f74f28e
4
- data.tar.gz: 0702df2d225e4ad32a73a5fd392848bcf2c5847b
3
+ metadata.gz: 84c696d0444d434da7b13dd4b358eb4aa1c33f96
4
+ data.tar.gz: 3222e657cf5e567d49fdcd3b7d99ef1f921edb6c
5
5
  SHA512:
6
- metadata.gz: 084ff6e04992a0a4e2b27ca80e3b073ebb83024b02ac5adca0448052b2120e3afbf99097be175f8c04210061ef61ed0c60154c8c4aa9f3ec1edf1247d5e18a9f
7
- data.tar.gz: 3ee1697ff16421ea291221867e836dc4ac134b0e8e762d3e7a3ad31c4773ad9dca30c12566d50fd282abb7ccb19e5bb77ac7aa7fe63d0c92c17ce89c9fa0566a
6
+ metadata.gz: ebd2cbd00d9d86a3e6620ff0e4ca2f2e952e5a80a22854be6e18ed24bec09a45b837b42540a21dec6b3066113cc9af85ff1c22fe694e277e98328b7d0025d099
7
+ data.tar.gz: 7c5a7ca4d12c20780e4dc6c9955cb8c59e3625735265c687191fd80413088e9a05b4d1c0a51a7a7f8eb081b95707196cb8587e9dd67da0a3d1c0c9e460ecb37a
data/.rspec CHANGED
@@ -1 +1,2 @@
1
1
  --color
2
+ --format documentation
@@ -2,10 +2,14 @@ sudo: false
2
2
  language: ruby
3
3
  script: bundle exec rake
4
4
  rvm:
5
- - '2.2'
6
- - '2.1'
5
+ - '2.3.5'
6
+ - '2.2.8'
7
+ - '2.1.9'
7
8
  - '2.0'
8
- - '1.9'
9
- - '1.8'
10
- - jruby-19mode
11
- - jruby-18mode
9
+ deploy:
10
+ provider: rubygems
11
+ api_key:
12
+ secure: "HkdoYaLek2mCT+e7pW0pHMLiIuikUMihfqzspltzmN673HBvMCMZqk4sIm4b3Zi+RMtNTb4dnMxxhehKyyzF88UIRHqV9OUPT3LQLE/BgHThxLD1+CSbVS1SZKY7UfTIcqW3/otORBCI5YAXiycEnRFIe2R/S3n0c/gD9dBcobg="
13
+ gem: librarianp
14
+ on:
15
+ tags: true
@@ -1,5 +1,28 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.6.4
4
+
5
+ * Add support for r10k Puppetfile's opts
6
+ * Fix deprecation warnings
7
+ * Fix compatibility with git 2.14.0
8
+
9
+ ## 0.6.3
10
+
11
+ * Prevent losing specfile path when metadata doesn't exist
12
+
13
+ ## 0.6.2
14
+
15
+ * Fix bad variable name
16
+
17
+ ## 0.6.1
18
+
19
+ * Fix dependencies not being fetched
20
+
21
+ ## 0.6.0
22
+
23
+ * Merge duplicated dependencies in spec
24
+ * Always fetch the commit SHA from rev-parse
25
+
3
26
  ## 0.5.0
4
27
 
5
28
  * Allow defining exclusions in spec file
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- librarianp (0.6.3)
4
+ librarianp (0.6.4)
5
5
  thor (~> 0.15)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Librarian [![Build Status](https://secure.travis-ci.org/carlossg/librarian.png)](http://travis-ci.org/carlossg/librarian) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/carlossg/librarian)
1
+ Librarian [![Build Status](https://secure.travis-ci.org/voxpupuli/librarian.png)](https://travis-ci.org/voxpupuli/librarian) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/carlossg/librarian)
2
2
  =========
3
3
 
4
4
  This is a forked version published as `librarianp` with improvements in order to support `librarian-puppet`.
@@ -27,7 +27,7 @@ Ensure the gem dependencies are installed:
27
27
  Run the tests with the default rake task:
28
28
 
29
29
  $ [bundle exec] rake
30
-
30
+
31
31
  or directly with the rspec command:
32
32
 
33
33
  $ [bundle exec] rspec spec
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.3
1
+ 0.6.4
@@ -14,7 +14,7 @@ module Librarian
14
14
  include Local
15
15
 
16
16
  lock_name 'GIT'
17
- spec_options [:ref, :path]
17
+ spec_options [:ref, :branch, :tag, :commit, :path]
18
18
 
19
19
  DEFAULTS = {
20
20
  :ref => 'master'
@@ -23,13 +23,17 @@ module Librarian
23
23
  attr_accessor :environment
24
24
  private :environment=
25
25
 
26
- attr_accessor :uri, :ref, :sha, :path
27
- private :uri=, :ref=, :sha=, :path=
26
+ attr_accessor :uri, :ref, :branch, :tag, :commit, :sha, :path
27
+ private :uri=, :ref=, :branch=, :tag=, :commit=, :sha=, :path=
28
28
 
29
29
  def initialize(environment, uri, options)
30
+ validate_options(uri, options)
31
+
30
32
  self.environment = environment
31
33
  self.uri = uri
32
- self.ref = options[:ref] || DEFAULTS[:ref]
34
+ self.ref = options[:ref] || options[:branch] ||
35
+ options[:tag] || options[:commit] ||
36
+ DEFAULTS[:ref]
33
37
  self.sha = options[:sha]
34
38
  self.path = options[:path]
35
39
 
@@ -173,6 +177,13 @@ module Librarian
173
177
  @runtime_cache ||= environment.runtime_cache.keyspace(self.class.name)
174
178
  end
175
179
 
180
+ def validate_options(uri, options)
181
+ found = 0; [:ref, :branch, :tag, :commit].each do |opt|
182
+ found += 1 if options.has_key?(opt)
183
+ found > 1 and raise Error,
184
+ "at #{uri}, use only one of ref, branch, tag, or commit"
185
+ end
186
+ end
176
187
  end
177
188
  end
178
189
  end
@@ -21,7 +21,7 @@ module Librarian
21
21
  end
22
22
 
23
23
  def git_version
24
- command = %W[#{bin} version --silent]
24
+ command = %W[#{bin} version]
25
25
  Posix.run!(command).strip =~ /\Agit version (\d+(\.\d+)*)/ && $1
26
26
  end
27
27
  end
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |gem|
6
+ gem.name = "librarianp"
7
+ gem.version = File.read(File.expand_path("../VERSION", __FILE__)).strip
8
+ gem.authors = ["Jay Feldblum", "Carlos Sanchez"]
9
+ gem.email = ["y_feldblum@yahoo.com", "carlos@apache.org"]
10
+ gem.summary = %q{A Framework for Bundlers.}
11
+ gem.description = %q{A Framework for Bundlers, used by librarian-puppet.}
12
+ gem.homepage = "https://github.com/voxpupuli/librarian"
13
+ gem.license = "MIT"
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_dependency "thor", "~> 0.15"
21
+
22
+ gem.add_development_dependency "rake"
23
+ gem.add_development_dependency "rspec", "~> 2.14"
24
+ gem.add_development_dependency "json"
25
+ gem.add_development_dependency "fakefs", "~> 0.4.2"
26
+ end
@@ -108,7 +108,7 @@ describe Librarian::Source::Git::Repository do
108
108
  end
109
109
 
110
110
  it "should have a single remote for it" do
111
- expect(subject).to have(1).remote_names
111
+ expect(subject.remote_names.size).to eq 1
112
112
  end
113
113
 
114
114
  it "should have a remote with the expected name" do
@@ -36,6 +36,7 @@ module Librarian
36
36
 
37
37
  it "should merge duplicated dependencies" do
38
38
  Dependency.any_instance.stub(:manifests => [manifest])
39
+ Librarian::Logger.any_instance.stub(:info)
39
40
  action.stub(:persist_resolution)
40
41
  resolution = action.run
41
42
  expect(resolution.dependencies).to eq([dependency2])
@@ -45,7 +45,7 @@ module Librarian
45
45
  end
46
46
 
47
47
  it "should give a list of one dependency" do
48
- expect(resolution).to have(1).dependencies
48
+ expect(resolution.dependencies.size).to eq 1
49
49
  end
50
50
 
51
51
  it "should give a dependency with the expected name" do
@@ -69,7 +69,7 @@ module Librarian
69
69
  end
70
70
 
71
71
  it "should give a list of one manifest" do
72
- expect(resolution).to have(1).manifests
72
+ expect(resolution.manifests.size).to eq 1
73
73
  end
74
74
 
75
75
  it "should give a manifest with the expected name" do
@@ -125,7 +125,7 @@ module Librarian
125
125
  end
126
126
 
127
127
  it "should give a list of one dependency" do
128
- expect(resolution).to have(1).dependencies
128
+ expect(resolution.dependencies.size).to eq 1
129
129
  end
130
130
 
131
131
  it "should have the expected dependency" do
@@ -135,7 +135,7 @@ module Librarian
135
135
  end
136
136
 
137
137
  it "should give a list of all the manifests" do
138
- expect(resolution).to have(2).manifests
138
+ expect(resolution.manifests.size).to eq 2
139
139
  end
140
140
 
141
141
  it "should include all the expected manifests" do
@@ -29,7 +29,7 @@ module Librarian
29
29
  subject { resolution }
30
30
 
31
31
  it { should be_correct }
32
- it { should have(1).manifests }
32
+ it { expect(subject.manifests.size).to eq 1 }
33
33
  end
34
34
  end
35
35
 
@@ -12,7 +12,7 @@ module Librarian
12
12
  let(:source) { described_class.new(env, "source-a", {}) }
13
13
  subject { source }
14
14
 
15
- its(:environment) { should_not be_nil }
15
+ it { expect(subject.environment).to_not be_nil }
16
16
 
17
17
  end
18
18
 
@@ -94,7 +94,7 @@ module Librarian
94
94
  end
95
95
 
96
96
  it "should have the expected number of sources" do
97
- expect(spec).to have(2).sources
97
+ expect(spec.sources.size).to eq 2
98
98
  end
99
99
 
100
100
  let(:resolution) { resolver.resolve(spec) }
@@ -288,7 +288,7 @@ module Librarian
288
288
  it "loads the specfile with the __FILE__" do
289
289
  write! specfile_path, "src __FILE__"
290
290
  spec = env.dsl(specfile_path)
291
- expect(spec.sources).to have(1).item
291
+ expect(spec.sources.size).to eq 1
292
292
  source = spec.sources.first
293
293
  expect(source.name).to eq specfile_path.to_s
294
294
  end
@@ -17,11 +17,17 @@ module Librarian
17
17
 
18
18
  context "with an unknown option" do
19
19
  it "should raise" do
20
- expect { described_class.from_spec_args(env, "some://git/repo.git", :branch => "megapatches") }.
21
- to raise_error Error, "unrecognized options: branch"
20
+ expect { described_class.from_spec_args(env, "some://git/repo.git", :I_am_unknown => "megapatches") }.
21
+ to raise_error Error, "unrecognized options: I_am_unknown"
22
22
  end
23
23
  end
24
24
 
25
+ context "with invalid options" do
26
+ it "should raise" do
27
+ expect { described_class.from_spec_args(env, "some://git/repo.git", {:ref => "megapatches", :branch => "megapatches"}) }.
28
+ to raise_error Error, "at some://git/repo.git, use only one of ref, branch, tag, or commit"
29
+ end
30
+ end
25
31
  end
26
32
 
27
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: librarianp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Feldblum
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-20 00:00:00.000000000 Z
12
+ date: 2017-10-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -159,7 +159,7 @@ files:
159
159
  - lib/librarian/support/abstract_method.rb
160
160
  - lib/librarian/ui.rb
161
161
  - lib/librarian/version.rb
162
- - librarian.gemspec
162
+ - librarianp.gemspec
163
163
  - spec/functional/cli_spec.rb
164
164
  - spec/functional/posix_spec.rb
165
165
  - spec/functional/source/git/repository_spec.rb
@@ -190,7 +190,7 @@ files:
190
190
  - spec/unit/resolver_spec.rb
191
191
  - spec/unit/source/git_spec.rb
192
192
  - spec/unit/spec_change_set_spec.rb
193
- homepage: https://github.com/carlossg/librarian
193
+ homepage: https://github.com/voxpupuli/librarian
194
194
  licenses:
195
195
  - MIT
196
196
  metadata: {}
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  version: '0'
211
211
  requirements: []
212
212
  rubyforge_project:
213
- rubygems_version: 2.4.6
213
+ rubygems_version: 2.6.13
214
214
  signing_key:
215
215
  specification_version: 4
216
216
  summary: A Framework for Bundlers.
@@ -1,44 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- # stub: librarianp 0.6.3 ruby lib
3
-
4
- Gem::Specification.new do |s|
5
- s.name = "librarianp"
6
- s.version = "0.6.3"
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 = ["Jay Feldblum", "Carlos Sanchez"]
11
- s.date = "2015-05-20"
12
- s.description = "A Framework for Bundlers, used by librarian-puppet."
13
- s.email = ["y_feldblum@yahoo.com", "carlos@apache.org"]
14
- s.files = [".gitignore", ".rspec", ".travis.yml", "CHANGELOG.md", "Gemfile", "Gemfile.lock", "LICENSE.txt", "README.md", "Rakefile", "VERSION", "lib/librarian.rb", "lib/librarian/action.rb", "lib/librarian/action/base.rb", "lib/librarian/action/clean.rb", "lib/librarian/action/ensure.rb", "lib/librarian/action/install.rb", "lib/librarian/action/persist_resolution_mixin.rb", "lib/librarian/action/resolve.rb", "lib/librarian/action/update.rb", "lib/librarian/algorithms.rb", "lib/librarian/cli.rb", "lib/librarian/cli/manifest_presenter.rb", "lib/librarian/config.rb", "lib/librarian/config/database.rb", "lib/librarian/config/file_source.rb", "lib/librarian/config/hash_source.rb", "lib/librarian/config/source.rb", "lib/librarian/dependency.rb", "lib/librarian/dsl.rb", "lib/librarian/dsl/receiver.rb", "lib/librarian/dsl/target.rb", "lib/librarian/environment.rb", "lib/librarian/environment/runtime_cache.rb", "lib/librarian/error.rb", "lib/librarian/helpers.rb", "lib/librarian/linter/source_linter.rb", "lib/librarian/lockfile.rb", "lib/librarian/lockfile/compiler.rb", "lib/librarian/lockfile/parser.rb", "lib/librarian/logger.rb", "lib/librarian/manifest.rb", "lib/librarian/manifest/pre_release_version.rb", "lib/librarian/manifest/version.rb", "lib/librarian/manifest_set.rb", "lib/librarian/mock.rb", "lib/librarian/mock/cli.rb", "lib/librarian/mock/dsl.rb", "lib/librarian/mock/environment.rb", "lib/librarian/mock/extension.rb", "lib/librarian/mock/source.rb", "lib/librarian/mock/source/mock.rb", "lib/librarian/mock/source/mock/registry.rb", "lib/librarian/mock/version.rb", "lib/librarian/posix.rb", "lib/librarian/resolution.rb", "lib/librarian/resolver.rb", "lib/librarian/resolver/implementation.rb", "lib/librarian/rspec/support/cli_macro.rb", "lib/librarian/source.rb", "lib/librarian/source/basic_api.rb", "lib/librarian/source/git.rb", "lib/librarian/source/git/repository.rb", "lib/librarian/source/local.rb", "lib/librarian/source/path.rb", "lib/librarian/spec.rb", "lib/librarian/spec_change_set.rb", "lib/librarian/specfile.rb", "lib/librarian/support/abstract_method.rb", "lib/librarian/ui.rb", "lib/librarian/version.rb", "librarian.gemspec", "spec/functional/cli_spec.rb", "spec/functional/posix_spec.rb", "spec/functional/source/git/repository_spec.rb", "spec/functional/source/git_spec.rb", "spec/support/fakefs.rb", "spec/support/method_patch_macro.rb", "spec/support/project_path_macro.rb", "spec/support/with_env_macro.rb", "spec/unit/action/base_spec.rb", "spec/unit/action/clean_spec.rb", "spec/unit/action/ensure_spec.rb", "spec/unit/action/install_spec.rb", "spec/unit/action/resolve_spec.rb", "spec/unit/algorithms_spec.rb", "spec/unit/config/database_spec.rb", "spec/unit/dependency/requirement_spec.rb", "spec/unit/dependency_spec.rb", "spec/unit/dsl_spec.rb", "spec/unit/environment/runtime_cache_spec.rb", "spec/unit/environment_spec.rb", "spec/unit/lockfile/parser_spec.rb", "spec/unit/lockfile_spec.rb", "spec/unit/manifest/version_spec.rb", "spec/unit/manifest_set_spec.rb", "spec/unit/manifest_spec.rb", "spec/unit/mock/environment_spec.rb", "spec/unit/mock/source/mock_spec.rb", "spec/unit/resolver_spec.rb", "spec/unit/source/git_spec.rb", "spec/unit/spec_change_set_spec.rb"]
15
- s.homepage = "https://github.com/carlossg/librarian"
16
- s.licenses = ["MIT"]
17
- s.rubygems_version = "2.4.6"
18
- s.summary = "A Framework for Bundlers."
19
- s.test_files = ["spec/functional/cli_spec.rb", "spec/functional/posix_spec.rb", "spec/functional/source/git/repository_spec.rb", "spec/functional/source/git_spec.rb", "spec/support/fakefs.rb", "spec/support/method_patch_macro.rb", "spec/support/project_path_macro.rb", "spec/support/with_env_macro.rb", "spec/unit/action/base_spec.rb", "spec/unit/action/clean_spec.rb", "spec/unit/action/ensure_spec.rb", "spec/unit/action/install_spec.rb", "spec/unit/action/resolve_spec.rb", "spec/unit/algorithms_spec.rb", "spec/unit/config/database_spec.rb", "spec/unit/dependency/requirement_spec.rb", "spec/unit/dependency_spec.rb", "spec/unit/dsl_spec.rb", "spec/unit/environment/runtime_cache_spec.rb", "spec/unit/environment_spec.rb", "spec/unit/lockfile/parser_spec.rb", "spec/unit/lockfile_spec.rb", "spec/unit/manifest/version_spec.rb", "spec/unit/manifest_set_spec.rb", "spec/unit/manifest_spec.rb", "spec/unit/mock/environment_spec.rb", "spec/unit/mock/source/mock_spec.rb", "spec/unit/resolver_spec.rb", "spec/unit/source/git_spec.rb", "spec/unit/spec_change_set_spec.rb"]
20
-
21
- if s.respond_to? :specification_version then
22
- s.specification_version = 4
23
-
24
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
25
- s.add_runtime_dependency(%q<thor>, ["~> 0.15"])
26
- s.add_development_dependency(%q<rake>, [">= 0"])
27
- s.add_development_dependency(%q<rspec>, ["~> 2.14"])
28
- s.add_development_dependency(%q<json>, [">= 0"])
29
- s.add_development_dependency(%q<fakefs>, ["~> 0.4.2"])
30
- else
31
- s.add_dependency(%q<thor>, ["~> 0.15"])
32
- s.add_dependency(%q<rake>, [">= 0"])
33
- s.add_dependency(%q<rspec>, ["~> 2.14"])
34
- s.add_dependency(%q<json>, [">= 0"])
35
- s.add_dependency(%q<fakefs>, ["~> 0.4.2"])
36
- end
37
- else
38
- s.add_dependency(%q<thor>, ["~> 0.15"])
39
- s.add_dependency(%q<rake>, [">= 0"])
40
- s.add_dependency(%q<rspec>, ["~> 2.14"])
41
- s.add_dependency(%q<json>, [">= 0"])
42
- s.add_dependency(%q<fakefs>, ["~> 0.4.2"])
43
- end
44
- end