pcb-init 0.1.0 → 0.1.3

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -2
  3. data/lib/pcb_init.rb +14 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87b0d377a4260f18b23001b19e2e9b4ed27f2abebdeba3ca71ac5a521e0b3830
4
- data.tar.gz: ed072439bae0bebc68e61d835640e3d1bdf04c931f6222777b03a0b7b3b1b984
3
+ metadata.gz: c5ccae2f003fde78d33f81753995131253461eb6d80392ffc27f55e6ceae0ba2
4
+ data.tar.gz: 4e750f008c59a7b463566c9f3bb3aaad81717df09811e2445c761068e65ccd1e
5
5
  SHA512:
6
- metadata.gz: b59a1209267600c90ae363eb36306c149a2ec75d8227c955cf68a7721239c6cf2cf664c281f6e9a4730044a8acd0e7bb22b17d748b01262ce06b44065421e167
7
- data.tar.gz: 034504d8b77f5bbd0d6508713ec545ebd9564f21595613a7bd97fc23f3746c673e916f4f1419124e0be833bba20d6124ee13e67df38cc8bc53c3ae7f88907653
6
+ metadata.gz: c1fcab63d5e75d86e7095a5f8b62607b1983712e9d90238dbf1b24f794cf4de7b655cfb04164e6fd467583316f163b3df4be50e014f59e6de2012f94ed6b9016
7
+ data.tar.gz: 01472e392507d11f86578fcb42aed5c191667696ecdd9494f5dd6d10d9c95b14da7ca20d0c5677456889d4a463d074a7bfa91d5312e611e70b0319258c25c482
data/README.md CHANGED
@@ -5,8 +5,7 @@ A Ruby CLI tool that scaffolds a **best-practice KiCad PCB project structure**.
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- gem build pcb-init.gemspec
9
- gem install ./pcb-init-0.1.0.gem
8
+ gem install pcb-init
10
9
  ```
11
10
 
12
11
  ## Usage
data/lib/pcb_init.rb CHANGED
@@ -1,11 +1,18 @@
1
1
  require 'fileutils'
2
2
 
3
3
  class PcbInit
4
+ VERSION = '0.1.3'
5
+
4
6
  def self.run(argv)
5
7
  new.run(argv)
6
8
  end
7
9
 
8
10
  def run(argv)
11
+ if argv.include?('--version') || argv.include?('-v')
12
+ show_version
13
+ return
14
+ end
15
+
9
16
  if argv.empty? || argv.include?('--help') || argv.include?('-h')
10
17
  show_help
11
18
  return
@@ -26,6 +33,10 @@ class PcbInit
26
33
 
27
34
  private
28
35
 
36
+ def show_version
37
+ puts "pcb-init #{VERSION}"
38
+ end
39
+
29
40
  def show_help
30
41
  puts <<~HELP
31
42
  pcb-init - Scaffold a best-practice KiCad PCB project structure
@@ -34,7 +45,8 @@ class PcbInit
34
45
  pcb-init PROJECT_NAME
35
46
 
36
47
  Options:
37
- -h, --help Show this help message
48
+ -h, --help Show this help message
49
+ -v, --version Show version number
38
50
 
39
51
  Example:
40
52
  pcb-init my-awesome-board
@@ -45,6 +57,7 @@ class PcbInit
45
57
  directories = [
46
58
  "#{project_name}/docs",
47
59
  "#{project_name}/schematic",
60
+ "#{project_name}/kicad_project",
48
61
  "#{project_name}/pcb",
49
62
  "#{project_name}/libraries/symbols",
50
63
  "#{project_name}/libraries/footprints",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pcb-init
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colthedeveloper