elm_install 0.3.1 → 1.0.0

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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.reek +4 -0
  3. data/.rspec +1 -0
  4. data/.rubocop.yml +4 -0
  5. data/Gemfile.lock +30 -25
  6. data/Rakefile +2 -2
  7. data/Readme.md +85 -23
  8. data/bin/elm-install +5 -2
  9. data/elm_install.gemspec +2 -0
  10. data/lib/elm_install.rb +18 -1
  11. data/lib/elm_install/base.rb +3 -46
  12. data/lib/elm_install/dependency.rb +37 -0
  13. data/lib/elm_install/directory_source.rb +66 -0
  14. data/lib/elm_install/ext.rb +23 -0
  15. data/lib/elm_install/git_source.rb +173 -0
  16. data/lib/elm_install/identifier.rb +133 -0
  17. data/lib/elm_install/installer.rb +38 -96
  18. data/lib/elm_install/populator.rb +54 -75
  19. data/lib/elm_install/repository.rb +82 -0
  20. data/lib/elm_install/resolver.rb +48 -118
  21. data/lib/elm_install/source.rb +18 -0
  22. data/lib/elm_install/types.rb +43 -0
  23. data/lib/elm_install/utils.rb +14 -20
  24. data/lib/elm_install/version.rb +1 -1
  25. data/package.json +1 -1
  26. data/packaging/Gemfile +1 -1
  27. data/packaging/Gemfile.lock +8 -4
  28. data/scripts/install.js +4 -4
  29. data/scripts/run.js +4 -4
  30. data/spec/directory_source_spec.rb +37 -0
  31. data/spec/{eml_install_spec.rb → elm_install_spec.rb} +6 -3
  32. data/spec/git_source_spec.rb +115 -0
  33. data/spec/identifer_spec.rb +53 -0
  34. data/spec/installer_spec.rb +57 -26
  35. data/spec/repository_spec.rb +44 -0
  36. data/spec/resolver_spec.rb +0 -73
  37. data/spec/spec_helper.rb +3 -1
  38. data/spec/utils_spec.rb +10 -15
  39. metadata +43 -17
  40. data/docs/How it works.md +0 -54
  41. data/lib/elm_install/cache.rb +0 -52
  42. data/lib/elm_install/elm_package.rb +0 -119
  43. data/lib/elm_install/git_resolver.rb +0 -129
  44. data/lib/elm_install/graph_builder.rb +0 -73
  45. data/spec/elm_package_spec.rb +0 -73
  46. data/spec/fixtures/cache.json +0 -8
  47. data/spec/fixtures/elm-package.json +0 -12
  48. data/spec/fixtures/invalid-elm-package.json +0 -6
  49. data/spec/fixtures/mismatched-elm-package.json +0 -9
  50. data/spec/fixtures/ref-cache.json +0 -4
  51. data/spec/git_resolver_spec.rb +0 -103
  52. data/spec/graph_builder_spec.rb +0 -36
  53. data/spec/populator_spec.rb +0 -44
@@ -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