elm_install 1.4.0 → 1.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6753505568057e569cff705a38accbd6641a47fc
4
- data.tar.gz: 9a2483e784b77e78b3a8070e5666d7adb1166ad4
3
+ metadata.gz: 2eef6ee3e76e1ac9e302cc1a1a2776925f3bd553
4
+ data.tar.gz: 3e139982a61ea46d381a7dcc3183ff14fd207062
5
5
  SHA512:
6
- metadata.gz: e66fd1640e01cfe0091a26c926a1d91aaa349a204aa64481483d77f2700e08b459a4f4014c06519200999d9b4ca5ba0a9c5d9e3c2dc88464d006a1d5024b6a58
7
- data.tar.gz: 52dfad317dd623806187cd0ba96e0f9690fb8ea39e43fa4a00d71ec6e98f9737197607487899359b826b4a7e15b30d8c39413546a8ecfe2337d8fa322048d5c1
6
+ metadata.gz: ad1ad2907b5d3d41e8d09466460cdd2d808664ded82bfffde02f9e477afc21e4432ac6e2af7ea59c71b3ce4eb78a5a909cd185c08bb3f62b89f886e35244ec03
7
+ data.tar.gz: 821de6566529eb7223913d51c88609b26dfece98a0bdceccbdebc60b3624afe8aaaf34033f48a5c7be38740da4b0e6549dee3658ba60964c6f20d97246d0efe1
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- elm_install (1.4.0)
4
+ elm_install (1.5.0)
5
5
  adts (~> 0.1.2)
6
6
  commander (~> 4.4, >= 4.4.2)
7
7
  contracts (~> 0.16.0)
@@ -68,6 +68,18 @@ module ElmInstall
68
68
  nil
69
69
  end
70
70
 
71
+ Contract String => String
72
+ # Returns the supported Elm version the given ref.
73
+ #
74
+ # @param ref [String] The ref
75
+ #
76
+ # @return [Array] The version
77
+ def elm_version_of(ref)
78
+ @@elm_versions ||= {}
79
+ @@elm_versions[url] ||= {}
80
+ @@elm_versions[url][ref] ||= identifier.elm_version(fetch(ref))
81
+ end
82
+
71
83
  Contract ArrayOf[Solve::Constraint], String => ArrayOf[Semverse::Version]
72
84
  # Returns the available versions for a repository
73
85
  #
@@ -101,7 +113,7 @@ module ElmInstall
101
113
  repository
102
114
  .versions
103
115
  .select do |version|
104
- identifier.elm_version(fetch(version.to_s)) == elm_version &&
116
+ elm_version_of(version.to_s) == elm_version &&
105
117
  constraints.all? { |constraint| constraint.satisfies?(version) }
106
118
  end
107
119
  .sort
@@ -1,4 +1,4 @@
1
1
  module ElmInstall
2
2
  # The version of ElmInstall
3
- VERSION = '1.4.0'.freeze
3
+ VERSION = '1.5.0'.freeze
4
4
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elm-github-install",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Install Elm packages directly from Git repositories",
5
5
  "scripts": {
6
6
  "install": "node scripts/install.js",
@@ -5,7 +5,7 @@ GEM
5
5
  commander (4.4.3)
6
6
  highline (~> 1.7.2)
7
7
  contracts (0.16.0)
8
- elm_install (1.3.0)
8
+ elm_install (1.4.0)
9
9
  adts (~> 0.1.2)
10
10
  commander (~> 4.4, >= 4.4.2)
11
11
  contracts (~> 0.16.0)
@@ -32,7 +32,7 @@ PLATFORMS
32
32
  ruby
33
33
 
34
34
  DEPENDENCIES
35
- elm_install (= 1.3.0)
35
+ elm_install (= 1.4.0)
36
36
 
37
37
  RUBY VERSION
38
38
  ruby 2.2.2p95
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elm_install
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusztáv Szikszai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-17 00:00:00.000000000 Z
11
+ date: 2017-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git