elm_install 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: 2c6f2e9e7bc312adb591680f029bb8ffe931d9eb
4
- data.tar.gz: ae3e9b0a3d08c052f6dd9010fb36d55066e673b7
3
+ metadata.gz: 6753505568057e569cff705a38accbd6641a47fc
4
+ data.tar.gz: 9a2483e784b77e78b3a8070e5666d7adb1166ad4
5
5
  SHA512:
6
- metadata.gz: b1c8dc7e9c48edc0e89d300b24dda4f82c184d57b4c3eb6b3540c1a762a2649c1febab6acd0ce267157114a4e34d371b365f1bbfe02381d4b1792b7b9b015517
7
- data.tar.gz: abd5efb9133618afb67407f22fea9b554a31f88f706b572e803af6af2a67306903249ad69b6c4d838953a9d7344522be409667eda41294b28fcf02713e1df8c1
6
+ metadata.gz: e66fd1640e01cfe0091a26c926a1d91aaa349a204aa64481483d77f2700e08b459a4f4014c06519200999d9b4ca5ba0a9c5d9e3c2dc88464d006a1d5024b6a58
7
+ data.tar.gz: 52dfad317dd623806187cd0ba96e0f9690fb8ea39e43fa4a00d71ec6e98f9737197607487899359b826b4a7e15b30d8c39413546a8ecfe2337d8fa322048d5c1
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- elm_install (1.3.0)
4
+ elm_install (1.4.0)
5
5
  adts (~> 0.1.2)
6
6
  commander (~> 4.4, >= 4.4.2)
7
7
  contracts (~> 0.16.0)
@@ -133,23 +133,20 @@ module ElmInstall
133
133
  path = File.join(directory, 'elm-package.json')
134
134
  JSON.parse(File.read(path))
135
135
  rescue JSON::ParserError
136
- exit "Invalid JSON in file: #{path.bold}"
137
- {}
136
+ warn "Invalid JSON in file: #{path.bold}"
138
137
  rescue Errno::ENOENT
139
- exit "Could not find file: #{path.bold}"
140
- {}
138
+ warn "Could not find file: #{path.bold}"
141
139
  end
142
140
 
143
- Contract String => NilClass
141
+ Contract String => Hash
144
142
  # Exits the current process and logs a given message.
145
143
  #
146
144
  # @param message [String] The message
147
145
  #
148
- # @return nil
149
- def exit(message)
150
- Logger.arrow message
151
- Process.exit
152
- nil
146
+ # @return [Hash] An empty hash
147
+ def warn(message)
148
+ Logger.arrow message if @options[:vebose]
149
+ {}
153
150
  end
154
151
  end
155
152
  end
@@ -29,6 +29,7 @@ module ElmInstall
29
29
  nil
30
30
  rescue Solve::Errors::NoSolutionError => error
31
31
  Logger.arrow "No solution found: #{error}"
32
+ Process.abort
32
33
  end
33
34
 
34
35
  Contract None => ArrayOf[Dependency]
@@ -54,6 +54,7 @@ module ElmInstall
54
54
  repo
55
55
  .tags
56
56
  .map(&:name)
57
+ .select { |tag| tag =~ /(.*\..*\..*)/ }
57
58
  .map { |tag| Semverse::Version.try_new tag }
58
59
  .compact
59
60
  end
@@ -1,4 +1,4 @@
1
1
  module ElmInstall
2
2
  # The version of ElmInstall
3
- VERSION = '1.3.0'.freeze
3
+ VERSION = '1.4.0'.freeze
4
4
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elm-github-install",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Install Elm packages directly from Git repositories",
5
5
  "scripts": {
6
6
  "install": "node scripts/install.js",
@@ -2,4 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  ruby '2.2.2'
4
4
 
5
- gem 'elm_install', '1.3.0'
5
+ gem 'elm_install', '1.4.0'
@@ -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.2.0)
8
+ elm_install (1.3.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.2.0)
35
+ elm_install (= 1.3.0)
36
36
 
37
37
  RUBY VERSION
38
38
  ruby 2.2.2p95
@@ -4,7 +4,7 @@ CACHE_DIRECTORY = 'spec/cache'.freeze
4
4
 
5
5
  RSpec.configure do |config|
6
6
  config.before do
7
- allow(Process).to receive(:exit)
7
+ allow(Process).to receive(:abort)
8
8
  allow(ElmInstall::Logger).to receive(:puts)
9
9
  ElmInstall::Repository.class_variable_set('@@fetched', {})
10
10
  FileUtils.mkdir_p CACHE_DIRECTORY
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.3.0
4
+ version: 1.4.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-14 00:00:00.000000000 Z
11
+ date: 2017-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git