elm_install 0.3.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.reek +4 -0
- data/.rspec +1 -0
- data/.rubocop.yml +4 -0
- data/Gemfile.lock +30 -25
- data/Rakefile +2 -2
- data/Readme.md +85 -23
- data/bin/elm-install +5 -2
- data/elm_install.gemspec +2 -0
- data/lib/elm_install.rb +18 -1
- data/lib/elm_install/base.rb +3 -46
- data/lib/elm_install/dependency.rb +37 -0
- data/lib/elm_install/directory_source.rb +66 -0
- data/lib/elm_install/ext.rb +23 -0
- data/lib/elm_install/git_source.rb +173 -0
- data/lib/elm_install/identifier.rb +133 -0
- data/lib/elm_install/installer.rb +38 -96
- data/lib/elm_install/populator.rb +54 -75
- data/lib/elm_install/repository.rb +82 -0
- data/lib/elm_install/resolver.rb +48 -118
- data/lib/elm_install/source.rb +18 -0
- data/lib/elm_install/types.rb +43 -0
- data/lib/elm_install/utils.rb +14 -20
- data/lib/elm_install/version.rb +1 -1
- data/package.json +1 -1
- data/packaging/Gemfile +1 -1
- data/packaging/Gemfile.lock +8 -4
- data/scripts/install.js +4 -4
- data/scripts/run.js +4 -4
- data/spec/directory_source_spec.rb +37 -0
- data/spec/{eml_install_spec.rb → elm_install_spec.rb} +6 -3
- data/spec/git_source_spec.rb +115 -0
- data/spec/identifer_spec.rb +53 -0
- data/spec/installer_spec.rb +57 -26
- data/spec/repository_spec.rb +44 -0
- data/spec/resolver_spec.rb +0 -73
- data/spec/spec_helper.rb +3 -1
- data/spec/utils_spec.rb +10 -15
- metadata +43 -17
- data/docs/How it works.md +0 -54
- data/lib/elm_install/cache.rb +0 -52
- data/lib/elm_install/elm_package.rb +0 -119
- data/lib/elm_install/git_resolver.rb +0 -129
- data/lib/elm_install/graph_builder.rb +0 -73
- data/spec/elm_package_spec.rb +0 -73
- data/spec/fixtures/cache.json +0 -8
- data/spec/fixtures/elm-package.json +0 -12
- data/spec/fixtures/invalid-elm-package.json +0 -6
- data/spec/fixtures/mismatched-elm-package.json +0 -9
- data/spec/fixtures/ref-cache.json +0 -4
- data/spec/git_resolver_spec.rb +0 -103
- data/spec/graph_builder_spec.rb +0 -36
- data/spec/populator_spec.rb +0 -44
data/spec/populator_spec.rb
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe ElmInstall::Populator do
|
4
|
-
let(:git_resolver) { ElmInstall::GitResolver.new directory: CACHE_DIRECTORY }
|
5
|
-
|
6
|
-
let(:solution) do
|
7
|
-
{
|
8
|
-
'https://github.com/base/core' => '1.0.0',
|
9
|
-
'https://github.com/test/repo' => '1.0.0+development'
|
10
|
-
}
|
11
|
-
end
|
12
|
-
|
13
|
-
let(:repo) { double :repository, checkout: true }
|
14
|
-
|
15
|
-
subject { described_class.new git_resolver }
|
16
|
-
|
17
|
-
it 'should populate elm-stuff' do
|
18
|
-
expect(git_resolver)
|
19
|
-
.to receive(:repository)
|
20
|
-
.exactly(2).times
|
21
|
-
.and_return repo
|
22
|
-
|
23
|
-
expect(ElmInstall::Logger)
|
24
|
-
.to receive(:dot)
|
25
|
-
.exactly(2)
|
26
|
-
.times
|
27
|
-
|
28
|
-
expect(FileUtils)
|
29
|
-
.to receive(:cp_r)
|
30
|
-
.with(
|
31
|
-
'spec/fixtures/cache/github.com/base/core/.',
|
32
|
-
'elm-stuff/packages/base/core/1.0.0'
|
33
|
-
)
|
34
|
-
|
35
|
-
expect(FileUtils)
|
36
|
-
.to receive(:cp_r)
|
37
|
-
.with(
|
38
|
-
'spec/fixtures/cache/github.com/test/repo/.',
|
39
|
-
'elm-stuff/packages/test/repo/1.0.0'
|
40
|
-
)
|
41
|
-
|
42
|
-
subject.populate(solution)
|
43
|
-
end
|
44
|
-
end
|