rigit 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/lib/rigit/rig.rb +16 -0
- data/lib/rigit/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: 191f04f34e7debb617f20816fa03f4f02beac4e3ab582542d56fba351d1132af
|
4
|
+
data.tar.gz: ffc4b29dfef9aa611e79af752f55bdc528d3714541bfc37104ecdaf30058a7f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c815d832ef57a36aefdd7be9a0eed9393e3e7aba681d187fcef3988cb4df4b6d6e1df6d7eba0d2c36dbeeb20a95b449dd982983b6252e9a77a0f25d5564fcce4
|
7
|
+
data.tar.gz: 96762113e02254019bf149af50aff41afc0e45972a39b640de360f216a93dd6c21f4b1df7f9f18d0f218d96b77bb11274a41c0476e42089190455ef04a7f44f3
|
data/README.md
CHANGED
@@ -227,6 +227,13 @@ after:
|
|
227
227
|
"Install Dependencies": "bundle install"
|
228
228
|
"Initialize git repo": "git init"
|
229
229
|
|
230
|
+
# Specify file patterns that should be copoied as is (without variable
|
231
|
+
# replacements).
|
232
|
+
binaries:
|
233
|
+
- "*.png"
|
234
|
+
- "*.pdf"
|
235
|
+
- "some-binary-file"
|
236
|
+
|
230
237
|
# Parameters to collect on scaffolding
|
231
238
|
params:
|
232
239
|
name:
|
data/lib/rigit/rig.rb
CHANGED
@@ -99,9 +99,25 @@ module Rigit
|
|
99
99
|
end
|
100
100
|
|
101
101
|
def get_file_content(file, arguments)
|
102
|
+
if binary? file
|
103
|
+
File.read file
|
104
|
+
else
|
105
|
+
eval_file_content file, arguments
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
def eval_file_content(file, arguments)
|
102
110
|
File.read(file) % arguments
|
103
111
|
rescue ArgumentError, KeyError => e
|
104
112
|
raise TemplateError.new file, e.message
|
105
113
|
end
|
114
|
+
|
115
|
+
def binary?(file)
|
116
|
+
return false unless config.binaries
|
117
|
+
config.binaries.each do |pattern|
|
118
|
+
return true if File.fnmatch pattern, file
|
119
|
+
end
|
120
|
+
false
|
121
|
+
end
|
106
122
|
end
|
107
123
|
end
|
data/lib/rigit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rigit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: super_docopt
|