pi_build_modifier 0.1.1.pre.alpha → 0.1.2.pre.alpha
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 +4 -4
- data/lib/pi_build_modifier/modifier_task.rb +2 -2
- data/lib/pi_build_modifier/net-tweaks/templates/wpa_supplicant.conf.erb +1 -3
- data/lib/pi_build_modifier/sys_tweaks/run_modifier.rb +15 -11
- data/lib/pi_build_modifier/sys_tweaks/ssh.rb +8 -1
- data/lib/pi_build_modifier/system/system_type.rb +1 -1
- data/lib/pi_build_modifier/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6fe3e70cdf359d53a82e7c18900c1d1f21cda2b6
|
|
4
|
+
data.tar.gz: 9505cbf31fe7f24d9b15209cf8e4210c6fe93b8e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a30469649affb4beff2b06060639ed1ad39de6a6b57c875a0d5acaa667e079fc1cc0a414ba2229aa2f8f21841c3ef0e8b16a5eecfe31efc6221f467cb1fdbee9
|
|
7
|
+
data.tar.gz: acb8a7ea0a5ba3056a8ab0ce8addd0c6b22c291e62e75f83438ddf2efe4af1e7a5920a03ef498dcf7e02af4163fb82180ec8a19373f0c6cd59957cec888caca5
|
|
@@ -37,8 +37,8 @@ module PiBuildModifier
|
|
|
37
37
|
|
|
38
38
|
@pi_modifier.with_mapper(ERBMapper.new(WPASupplicant.new, workspace))
|
|
39
39
|
@pi_modifier.with_mapper(System.new(workspace))
|
|
40
|
-
@pi_modifier.with_mapper(
|
|
41
|
-
@pi_modifier.with_mapper(RunModifier.new(workspace))
|
|
40
|
+
@pi_modifier.with_mapper(Ssh.new.mapper(workspace))
|
|
41
|
+
@pi_modifier.with_mapper(RunModifier.new.mapper(workspace))
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def execute
|
|
@@ -21,35 +21,39 @@
|
|
|
21
21
|
require 'fileutils'
|
|
22
22
|
require 'pi_build_modifier/modifier/mapper'
|
|
23
23
|
|
|
24
|
+
|
|
24
25
|
module PiBuildModifier
|
|
25
26
|
|
|
27
|
+
##
|
|
28
|
+
# RunModifier is a class which appends lines to the 'stage2/01-sys-tweaks/01-run.sh' file in the pi gen build repository
|
|
29
|
+
|
|
26
30
|
class RunModifier < Mapper
|
|
27
31
|
|
|
28
|
-
attr_reader :relative_output_path
|
|
32
|
+
attr_reader :relative_output_path, :appender
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
def initialize
|
|
35
|
+
@appender = Array.new
|
|
36
|
+
@workspace = nil
|
|
37
|
+
@relative_output_path = 'stage2/01-sys-tweaks/01-run.sh'
|
|
33
38
|
end
|
|
34
39
|
|
|
35
|
-
def
|
|
40
|
+
def mapper(workspace)
|
|
36
41
|
@workspace = workspace
|
|
37
|
-
|
|
42
|
+
self
|
|
38
43
|
end
|
|
39
44
|
|
|
40
|
-
def
|
|
41
|
-
|
|
45
|
+
def append(appender)
|
|
46
|
+
@appender << appender
|
|
42
47
|
end
|
|
43
48
|
|
|
44
49
|
def map(json_data)
|
|
45
50
|
end
|
|
46
51
|
|
|
47
52
|
def modify
|
|
48
|
-
puts @@append_lines.to_s
|
|
49
53
|
open("#{@workspace}/#{@relative_output_path}", 'a') do |f|
|
|
50
54
|
f.puts ''
|
|
51
|
-
|
|
52
|
-
f.puts "source #{@workspace}/#{a}"
|
|
55
|
+
@appender.each do |a|
|
|
56
|
+
f.puts "source #{@workspace}/#{a.append_line}"
|
|
53
57
|
end
|
|
54
58
|
end
|
|
55
59
|
end
|
|
@@ -34,7 +34,14 @@ module PiBuildModifier
|
|
|
34
34
|
@enable = 'enable'
|
|
35
35
|
@template_path = File.join(File.dirname(__FILE__), '/templates/ssh.sh.erb').to_s
|
|
36
36
|
@relative_output_path = 'stage2/01-sys-tweaks/ssh.sh'
|
|
37
|
-
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def mapper(workspace)
|
|
40
|
+
ERBMapper.new(self, workspace)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def append_line
|
|
44
|
+
"#{@relative_output_path}"
|
|
38
45
|
end
|
|
39
46
|
|
|
40
47
|
def map(json_data)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pi_build_modifier
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2.pre.alpha
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Beate Ottenwälder
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-11-
|
|
11
|
+
date: 2017-11-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|