picobox 0.3.41 → 0.3.52

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: dfb7fa90a0141bb909aa2a67f83dc2fe829b5945
4
- data.tar.gz: 1003f7fd5983b422cf8ab79184c0144e87814cc7
3
+ metadata.gz: 4cec22d0f2fb1a73b84e33438ccaba3a2152bb97
4
+ data.tar.gz: 90bc3839758d3a7184ed99ab86154f283e898b3b
5
5
  SHA512:
6
- metadata.gz: fb8e1c474de7430e417059b52102b86d1b9cede8d9ec0703015e45a842eff4d34c76b6a2383d3994285ef0e8e50bdd2ca65058c15460df66561bc63bdb09deef
7
- data.tar.gz: 02d7a28c43d3fa2cab4eac5aa5d892f34a02a8e5f3e28722b16b2f894438ea1a4c9c8f48ce889d212734357576bebdb3687f202f280682649ce1e69ec5b3f258
6
+ metadata.gz: 0c905b22f26df3d228720a4b8dbc828ac38180862d03887d59779712d5afe79aea00b962f87ed786502908632446903221bad230e5e1524cb85a8ff33c5c940c
7
+ data.tar.gz: 9bfaaa3410d93a5264751b5e80c39b71ea7c7ff52401592c36d3af99a9cc1d0a7087207c801b2374cb00a7005a9416fff711a364e89920ab20a114a9103212f7
data/README.md CHANGED
@@ -103,7 +103,7 @@ Options:
103
103
 
104
104
  To run the tests you'll need ruby 2.3 since we are using the <<~EOS operator (un-indented multiline strings)
105
105
 
106
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
106
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
107
107
 
108
108
  To use without installing, use:
109
109
 
@@ -131,11 +131,10 @@ $ gem install pkg/picobox-x.x.x.gem
131
131
 
132
132
  **debug during an aruba test run**
133
133
 
134
- spec/support/aruba.rb
134
+
135
135
  ```ruby
136
- require 'byebug/core'
137
- Byebug.wait_connection = true
138
- Byebug.start_server('localhost', 8989)
136
+ export REMOTE_DEBUG=true
137
+ guard -g wip
139
138
  ```
140
139
  then connect using:
141
140
  ```bash
@@ -84,5 +84,5 @@ Wisper.subscribe(
84
84
  scope: Picobox::Utils::DomainEventPublisher
85
85
  )
86
86
 
87
- Picobox.set_verbosity(false)
87
+ Picobox.set_verbosity(true)
88
88
 
@@ -6,7 +6,7 @@ module Picobox
6
6
  end
7
7
 
8
8
  def list
9
- result = Dir.glob("#{Picobox.box_packages_dir}/*").select {|f| File.directory? f}
9
+ result = Dir.glob("#{os.box_packages_dir}/*").select {|f| File.directory? f}
10
10
  result.map {|r| strip_path(r) }.sort!
11
11
  end
12
12
 
@@ -48,7 +48,7 @@ module Picobox
48
48
  attr_reader :os, :type
49
49
 
50
50
  def package_dir
51
- "#{Picobox.box_packages_dir}/#{type}"
51
+ "#{os.box_packages_dir}/#{type}"
52
52
  end
53
53
 
54
54
  def strip_path(file)
@@ -56,4 +56,4 @@ module Picobox
56
56
  end
57
57
  end
58
58
  end
59
- end
59
+ end
@@ -4,7 +4,7 @@ module Picobox
4
4
  long_desc <<-LONGDESC
5
5
  LONGDESC
6
6
  def build(service = nil)
7
- Picobox.set_verbosity options[:verbose]
7
+ Picobox.set_verbosity !options[:silent]
8
8
 
9
9
  Service.new(Os::CurrentOs.get).build service
10
10
  rescue SignalException
@@ -16,7 +16,7 @@ module Picobox
16
16
  long_desc <<-LONGDESC
17
17
  LONGDESC
18
18
  def add(*services)
19
- Picobox.set_verbosity options[:verbose]
19
+ Picobox.set_verbosity !options[:silent]
20
20
 
21
21
  Service.new(Os::CurrentOs.get).add services
22
22
  rescue SignalException
@@ -28,7 +28,7 @@ module Picobox
28
28
  long_desc <<-LONGDESC
29
29
  LONGDESC
30
30
  def remove(service)
31
- Picobox.set_verbosity options[:verbose]
31
+ Picobox.set_verbosity !options[:silent]
32
32
 
33
33
  Service.new(Os::CurrentOs.get).remove service
34
34
  rescue SignalException
@@ -59,7 +59,7 @@ module Picobox
59
59
  class CLI < Thor
60
60
  include Utils::Output
61
61
 
62
- class_option :verbose, desc: 'Verbose debugging output', type: :boolean
62
+ class_option :silent, desc: 'Silence output', type: :boolean
63
63
 
64
64
  #desc 'dns SUBCOMMAND', 'do things with the DNS'
65
65
  #long_desc <<-LONGDESC
@@ -86,7 +86,7 @@ module Picobox
86
86
  long_desc <<-LONGDESC
87
87
  LONGDESC
88
88
  def install
89
- Picobox.set_verbosity options[:verbose]
89
+ Picobox.set_verbosity !options[:silent]
90
90
  System.new(Os::CurrentOs.get).install
91
91
  rescue SignalException
92
92
  exit 1
@@ -97,7 +97,7 @@ module Picobox
97
97
  long_desc <<-LONGDESC
98
98
  LONGDESC
99
99
  def update
100
- Picobox.set_verbosity options[:verbose]
100
+ Picobox.set_verbosity !options[:silent]
101
101
  System.new(Os::CurrentOs.get).install
102
102
  rescue SignalException
103
103
  exit 1
@@ -108,7 +108,7 @@ module Picobox
108
108
  long_desc <<-LONGDESC
109
109
  LONGDESC
110
110
  def uninstall
111
- Picobox.set_verbosity options[:verbose]
111
+ Picobox.set_verbosity !options[:silent]
112
112
  System.new(Os::CurrentOs.get).uninstall
113
113
  rescue SignalException
114
114
  exit 1
@@ -119,7 +119,7 @@ module Picobox
119
119
  long_desc <<-LONGDESC
120
120
  LONGDESC
121
121
  def init(box)
122
- Picobox.set_verbosity options[:verbose]
122
+ Picobox.set_verbosity !options[:silent]
123
123
 
124
124
  os = Os::CurrentOs.get
125
125
 
@@ -136,7 +136,7 @@ module Picobox
136
136
  long_desc <<-LONGDESC
137
137
  LONGDESC
138
138
  def start()
139
- Picobox.set_verbosity options[:verbose]
139
+ Picobox.set_verbosity !options[:silent]
140
140
  System.new(Os::CurrentOs.get).start
141
141
  rescue SignalException
142
142
  exit 1
@@ -147,7 +147,7 @@ module Picobox
147
147
  long_desc <<-LONGDESC
148
148
  LONGDESC
149
149
  def stop()
150
- Picobox.set_verbosity options[:verbose]
150
+ Picobox.set_verbosity !options[:silent]
151
151
  System.new(Os::CurrentOs.get).stop
152
152
  rescue SignalException
153
153
  exit 1
@@ -158,7 +158,7 @@ module Picobox
158
158
  long_desc <<-LONGDESC
159
159
  LONGDESC
160
160
  def restart()
161
- Picobox.set_verbosity options[:verbose]
161
+ Picobox.set_verbosity !options[:silent]
162
162
  System.new(Os::CurrentOs.get).restart
163
163
  rescue SignalException
164
164
  exit 1
@@ -207,4 +207,4 @@ module Picobox
207
207
  exit 1
208
208
  end
209
209
  end
210
- end
210
+ end
@@ -8,7 +8,7 @@ module Picobox
8
8
  def visit_darwin subject
9
9
  publish_event :build_service_start, service
10
10
  system "docker-compose build #{service} #{Picobox.output}"
11
- publish_event :build_service_stop
11
+ publish_event :build_service_stop
12
12
  end
13
13
 
14
14
 
@@ -20,4 +20,4 @@ module Picobox
20
20
  attr_reader :service
21
21
  end
22
22
  end
23
- end
23
+ end
@@ -11,9 +11,9 @@ module Picobox
11
11
 
12
12
  filename = packages.download
13
13
 
14
- system("rm -rf #{Picobox.packages_dir}")
15
- system("mkdir #{Picobox.packages_dir}")
16
- system("tar xvf #{filename} -C #{Picobox.packages_dir} --strip-components=1 #{Picobox.output}")
14
+ system("rm -rf #{os.packages_dir}")
15
+ system("mkdir #{os.packages_dir}")
16
+ system("tar xvf #{filename} -C #{os.packages_dir} --strip-components=1 #{Picobox.output}")
17
17
 
18
18
  Shell::IniFile.get(os)[:packages] = { version: packages.current_version, last_update: Time.now.to_i }
19
19
 
@@ -32,9 +32,9 @@ module Picobox
32
32
 
33
33
  filename = packages.download
34
34
 
35
- system("sudo rm -rf #{Picobox.packages_dir}")
36
- system("sudo mkdir #{Picobox.packages_dir}")
37
- system("sudo tar xvf #{filename} -C #{Picobox.packages_dir} --strip-components=1 #{Picobox.output}")
35
+ system("sudo rm -rf #{os.packages_dir}")
36
+ system("sudo mkdir #{os.packages_dir}")
37
+ system("sudo tar xvf #{filename} -C #{os.packages_dir} --strip-components=1 #{Picobox.output}")
38
38
 
39
39
  Shell::IniFile.get(os)[:packages] = { version: packages.current_version, last_update: Time.now.to_i }
40
40
 
@@ -43,4 +43,4 @@ module Picobox
43
43
  end
44
44
  end
45
45
  end
46
- end
46
+ end
@@ -1,6 +1,6 @@
1
1
  module Picobox
2
2
  # names for files / directories
3
- VERSION = '0.3.41'
3
+ VERSION = '0.3.52'
4
4
  HOMEPAGE = 'https://github.com/surzycki/picobox'
5
5
  PACKAGES_INFO_URL = 'https://api.github.com/repos/picobox/packages/releases/latest'
6
6
  CONFIG_DIR = '.picobox'
@@ -10,11 +10,7 @@ module Picobox
10
10
 
11
11
 
12
12
  module_function
13
- def root() File.expand_path('../../..', __FILE__) end
14
- def packages_dir() "#{Picobox.root}/packages" end
15
- def box_packages_dir() "#{packages_dir}/boxes" end
16
- def service_packages_dir() "#{packages_dir}/services" end
17
- def extensions_dir() "#{packages_dir}/shell" end
13
+ def root() File.expand_path('../../..', __FILE__) end
18
14
 
19
15
  def output() @output end
20
16
  def verbose?() @verbose end
@@ -27,4 +23,4 @@ module Picobox
27
23
  @output = '> /dev/null 2>&1'
28
24
  end
29
25
  end
30
- end
26
+ end
@@ -5,9 +5,14 @@ module Picobox
5
5
  def tmp_dir() '/tmp' end
6
6
  def home_dir() "#{ENV['HOME']}" end
7
7
  def current_dir() `pwd`.strip end
8
- def config_dir() "#{home_dir}/#{Picobox::CONFIG_DIR}" end
9
8
 
10
- def shell_extensions() "#{config_dir}/#{Picobox::SHELL_EXTENSIONS}" end
9
+ def config_dir() "#{home_dir}/#{Picobox::CONFIG_DIR}" end
10
+ def packages_dir() "#{config_dir}/packages" end
11
+ def box_packages_dir() "#{packages_dir}/boxes" end
12
+ def service_packages_dir() "#{packages_dir}/services" end
13
+ def extensions_dir() "#{packages_dir}/shell" end
14
+ def shell_extensions() "#{extensions_dir}/#{Picobox::SHELL_EXTENSIONS}" end
15
+
11
16
  def user() "#{ENV['USER']}" end
12
17
  def user_shell() "#{ENV['SHELL']}" end
13
18
 
@@ -32,4 +37,4 @@ module Picobox
32
37
  end
33
38
  end
34
39
  end
35
- end
40
+ end
@@ -38,4 +38,4 @@ module Picobox
38
38
  attr_reader :os, :manifest
39
39
  end
40
40
  end
41
- end
41
+ end
@@ -6,7 +6,7 @@ module Picobox
6
6
  end
7
7
 
8
8
  def list
9
- result = Dir.glob("#{Picobox.service_packages_dir}/*").select {|f| File.directory? f}
9
+ result = Dir.glob("#{os.service_packages_dir}/*").select {|f| File.directory? f}
10
10
  result.map {|r| strip_path(r) }.sort!
11
11
  end
12
12
 
@@ -35,7 +35,7 @@ module Picobox
35
35
  end
36
36
 
37
37
  def package_dir
38
- "#{Picobox.service_packages_dir}/#{type}"
38
+ "#{os.service_packages_dir}/#{type}"
39
39
  end
40
40
 
41
41
  def strip_path(file)
@@ -47,4 +47,4 @@ module Picobox
47
47
  end
48
48
  end
49
49
  end
50
- end
50
+ end
@@ -21,7 +21,7 @@ module Picobox
21
21
  end
22
22
 
23
23
  def install_extensions
24
- source = "#{Picobox.extensions_dir}/extensions.bash"
24
+ source = "#{os.extensions_dir}/extensions.bash"
25
25
  dest = os.shell_extensions
26
26
 
27
27
  TTY::File.copy_file source, dest
@@ -45,13 +45,9 @@ module Picobox
45
45
  end
46
46
 
47
47
  private
48
- def source_file
49
- "~/#{Picobox::CONFIG_DIR}/#{Picobox::SHELL_EXTENSIONS}"
50
- end
51
-
52
48
  def extension
53
- "# added by picobox\nsource #{source_file}"
49
+ "# added by picobox\nsource #{os.shell_extensions}"
54
50
  end
55
51
  end
56
52
  end
57
- end
53
+ end
@@ -66,4 +66,4 @@ module Picobox
66
66
  exit 1
67
67
  end
68
68
  end
69
- end
69
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picobox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.41
4
+ version: 0.3.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Surzycki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-21 00:00:00.000000000 Z
11
+ date: 2018-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -420,7 +420,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
420
420
  version: '0'
421
421
  requirements: []
422
422
  rubyforge_project:
423
- rubygems_version: 2.6.13
423
+ rubygems_version: 2.5.2.3
424
424
  signing_key:
425
425
  specification_version: 4
426
426
  summary: Docker development environment for humans