modulorails 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +5 -5
- data/lib/generators/gitlabci_generator.rb +3 -1
- data/lib/modulorails.rb +1 -1
- data/lib/modulorails/data.rb +2 -1
- data/lib/modulorails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 265c1a8a801aa9cd51479b23756c2b2631e9ac0d6fbd7634ce2fa572e0489ac9
|
4
|
+
data.tar.gz: 251ec334d918a84982b3573e0ad610dc28eca31b77250ea2305caa46c5792951
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3dc837963f657c14c3ee2541fc7778de4ead2d2cb8216feb8908897b3c26400331ea07020c348ee88d11167f02c52ef8334bf6a4e9934cdcf3f22951a51f31d3
|
7
|
+
data.tar.gz: 724b94a6b281027be0e5c36a9d93b66e1c8207e24e31d165f10ca04bf828461f019f689c29c983f377145d589a5dc90069ad9dda8bc1633f51e1ad25a1e13653
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
modulorails (0.2.
|
4
|
+
modulorails (0.2.1)
|
5
5
|
git (~> 1.7, >= 1.7.0)
|
6
6
|
httparty
|
7
7
|
i18n
|
@@ -38,21 +38,21 @@ GEM
|
|
38
38
|
concurrent-ruby (1.1.7)
|
39
39
|
crass (1.0.6)
|
40
40
|
diff-lcs (1.4.4)
|
41
|
-
erubi (1.
|
42
|
-
git (1.
|
41
|
+
erubi (1.10.0)
|
42
|
+
git (1.8.1)
|
43
43
|
rchardet (~> 1.8)
|
44
44
|
httparty (0.18.1)
|
45
45
|
mime-types (~> 3.0)
|
46
46
|
multi_xml (>= 0.5.2)
|
47
47
|
i18n (1.8.5)
|
48
48
|
concurrent-ruby (~> 1.0)
|
49
|
-
loofah (2.
|
49
|
+
loofah (2.8.0)
|
50
50
|
crass (~> 1.0.2)
|
51
51
|
nokogiri (>= 1.5.9)
|
52
52
|
method_source (1.0.0)
|
53
53
|
mime-types (3.3.1)
|
54
54
|
mime-types-data (~> 3.2015)
|
55
|
-
mime-types-data (3.2020.
|
55
|
+
mime-types-data (3.2020.1104)
|
56
56
|
mini_portile2 (2.4.0)
|
57
57
|
minitest (5.14.1)
|
58
58
|
multi_xml (0.6.0)
|
@@ -50,6 +50,8 @@ class GitlabciGenerator < Rails::Generators::Base
|
|
50
50
|
|
51
51
|
# Create file to avoid this generator on next modulorails launch
|
52
52
|
create_keep_file
|
53
|
+
rescue StandardError => e
|
54
|
+
$stderr.puts("[Modulorails] Error: cannot generate CI configuration: #{e.message}")
|
53
55
|
end
|
54
56
|
|
55
57
|
private
|
@@ -106,7 +108,7 @@ class GitlabciGenerator < Rails::Generators::Base
|
|
106
108
|
when 'postgres', 'postgresql'
|
107
109
|
{ header: POSTGRES_DOCKER_DB, host: 'postgres', adapter: 'postgresql' }
|
108
110
|
else
|
109
|
-
raise
|
111
|
+
raise "Unknown database adapter `#{database}`: either mysql or postgres"
|
110
112
|
end
|
111
113
|
end
|
112
114
|
|
data/lib/modulorails.rb
CHANGED
@@ -84,7 +84,7 @@ module Modulorails
|
|
84
84
|
# went wrong with an `errors` field. We do not want to raise since the gem's user is not
|
85
85
|
# (necessarily) responsible for the error but we still need to display it somewhere to warn
|
86
86
|
# the user something went wrong.
|
87
|
-
puts("Modulorails
|
87
|
+
puts("[Modulorails] Error: #{response['errors'].join(', ')}") if response.code == 400
|
88
88
|
|
89
89
|
# Return the response to allow users to do some more
|
90
90
|
response
|
data/lib/modulorails/data.rb
CHANGED
@@ -23,7 +23,8 @@ module Modulorails
|
|
23
23
|
# or return nil if the database does not exist
|
24
24
|
db_connection = begin
|
25
25
|
ActiveRecord::Base.connection
|
26
|
-
rescue ActiveRecord::NoDatabaseError
|
26
|
+
rescue ActiveRecord::NoDatabaseError => e
|
27
|
+
$stderr.puts("[Modulorails] Error: #{e.message}")
|
27
28
|
nil
|
28
29
|
end
|
29
30
|
# Get the gem's specifications to fetch the versions of critical gems
|
data/lib/modulorails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modulorails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthieu Ciappara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|