dorian-pw 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/bin/pw +4 -0
  3. data/lib/dorian/pw.rb +20 -0
  4. metadata +48 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4f854329e395df57e86edc503c033b50a63e6064fab60d150defcccd0e034e8a
4
+ data.tar.gz: 697a0c84eca9e5a7b347252c1857c6f85c090a1b49f44e1ddb8ee635ce04cadd
5
+ SHA512:
6
+ metadata.gz: 1345bd3fbf491fac19fbd271834349317be4ef1748e493f1a0a647f22662e36afa0159480dc4e02fb39c8661a517714be1aa29dd0014edee5b9a96e8eb4d4c22
7
+ data.tar.gz: b35de5dbd89ff957d10041143226f8d0223ed504812b697b5805d7fd452b6abb92ddef7f5e9cc262492c8095ffa3e14fc57671765d73136a33d5e029c4322a48
data/bin/pw ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'dorian/pw'
4
+ Dorian::Pw.run
data/lib/dorian/pw.rb ADDED
@@ -0,0 +1,20 @@
1
+ require "shellwords"
2
+
3
+ module Dorian
4
+ class Pw
5
+ def self.run
6
+ if ARGV.size < 1
7
+ puts "USAGE: pw [FILES...]"
8
+ exit
9
+ end
10
+
11
+ system(
12
+ [
13
+ "prettier",
14
+ "--write",
15
+ *ARGV.map { |arg| arg.split(":").first }
16
+ ].shelljoin
17
+ )
18
+ end
19
+ end
20
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dorian-pw
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Dorian Marié
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-11-19 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: |-
14
+ `prettier --write [FILES...]` that allows line numbers
15
+
16
+ e.g. `pw app/models/user.rb:34` and `pw spec/spec_helper.rb`
17
+ email: dorian@dorianmarie.fr
18
+ executables:
19
+ - pw
20
+ extensions: []
21
+ extra_rdoc_files: []
22
+ files:
23
+ - bin/pw
24
+ - lib/dorian/pw.rb
25
+ homepage: https://github.com/dorianmariefr/pw
26
+ licenses:
27
+ - MIT
28
+ metadata: {}
29
+ post_install_message:
30
+ rdoc_options: []
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ requirements: []
44
+ rubygems_version: 3.2.22
45
+ signing_key:
46
+ specification_version: 4
47
+ summary: "`prettier --write [FILES...]` that allows line numbers"
48
+ test_files: []