trk 0.1.0 → 0.1.2

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 (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -17
  3. data/lib/trk/cli.rb +17 -3
  4. data/lib/trk/version.rb +3 -1
  5. metadata +3 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d9dafa98a2c8d46cff81670bbf19e5ff8c36a8b7b0c48cd696dcc8c2a482a98
4
- data.tar.gz: 0ee99829cf45f0b9e75d5d166585ceaa3d8d2c00403c59ef3205cfdc0c403582
3
+ metadata.gz: fd46a8acc59cf493ef72f27108f32ea902754d943d86aff7b1bc6ee96dcc7453
4
+ data.tar.gz: aa149d09d6eda868df63ccc6c698cc002d4e73bad80d85c74d8cd75cefba67b6
5
5
  SHA512:
6
- metadata.gz: 21574478b17e80ad0dc970ed93a2ecc86bf156a4d3292086969ff96545428e257eb85243de71c71e35f21f69b2ec195c4f51ac174535c0637b567cbe64ca2e33
7
- data.tar.gz: 7fa7f6ad18a6c5891065465a6345b3678a3159f2d2b1fb2b111586cf55173c6ce0eceda6eb48d0d9ea5623b6b934e0ee91d5aa649f1c33cc9a4e859bd49c1b0b
6
+ metadata.gz: b523a13bfd29f256750acc592b9b4a00ba008304e80fb2e6d1dc352c3292329145da0a5a7aaf2059dd9eb3cfc29943d679c122acd59fd2523589573ecf59878e
7
+ data.tar.gz: ef658fdca2465572c9fb6d69e299527740fee04e42fbf943b4a940335072332380d80c77e465917d2f37c5724dae7d666c98ed2c62c9082d4f5bc05603f24113
data/README.md CHANGED
@@ -34,46 +34,51 @@ For other files we need to link to specific file
34
34
  # config/initializers/result.rb
35
35
  ```
36
36
 
37
- # Development
38
-
39
- Run without installing the gem
40
- ```
41
- bundle exec exe/trk pull
42
- ```
43
-
44
37
  ## Installation
45
38
 
46
- ```
47
- gem build trk.gemspec
48
- gem install trk-0.1.0.gem
49
- ```
50
-
51
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
52
-
53
39
  Install the gem and add to the application's Gemfile by executing:
54
40
 
55
41
  ```bash
56
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
42
+ bundle add trk
57
43
  ```
58
44
 
59
45
  If bundler is not being used to manage dependencies, install the gem by executing:
60
46
 
61
47
  ```bash
62
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
48
+ gem install trk
63
49
  ```
64
50
 
65
51
  ## Usage
66
52
 
67
- TODO: Write usage instructions here
53
+ Pull code in all repos under `~/trk.tools/*/*`
54
+ ```
55
+ trk pull
56
+ ```
68
57
 
69
58
  ## Development
70
59
 
60
+ Run without installing the gem
61
+ ```
62
+ bundle exec exe/trk pull
63
+ ```
64
+
71
65
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
72
66
 
73
67
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
74
68
 
75
69
  ## Contributing
76
70
 
71
+ Build
72
+
73
+ ```
74
+ gem build trk.gemspec
75
+ ```
76
+ install locally and publish
77
+ ```
78
+ gem install trk-0.1.0.gem
79
+ gem push trk-0.1.0.gem
80
+ ```
81
+
77
82
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/trk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/trk/blob/main/CODE_OF_CONDUCT.md).
78
83
 
79
84
  ## License
data/lib/trk/cli.rb CHANGED
@@ -17,16 +17,30 @@ module Trk
17
17
  _stdout, stderr, status = Open3.capture3("git pull")
18
18
 
19
19
  if status.success?
20
- puts "✅ Git pull successful in: #{dir}"
20
+ _stdout, stderr, status = Open3.capture3("git push")
21
+ if status.success?
22
+ stdout, stderr, _status = Open3.capture3("git status --porcelain")
23
+ if stdout.empty?
24
+ puts "#{CHECK_ICON} Git pull push successful in: #{dir}"
25
+ else
26
+ puts "#{UNCHECK_ICON} Git status --porcelain failed in: #{dir}\n#{stdout}\n#{stderr}"
27
+ puts "Opening shell for manual fix. Type 'exit' when done."
28
+ system('PS1="trk pull paused on [$(basename $(pwd))]$ " bash --norc')
29
+ end
30
+ else
31
+ puts "#{UNCHECK_ICON} Git push failed in: #{dir}\n#{stderr}"
32
+ puts "Opening shell for manual fix. Type 'exit' when done."
33
+ system('PS1="trk pull paused on [$(basename $(pwd))]$ " bash --norc')
34
+ end
21
35
  else
22
- puts " Git pull failed in: #{dir}\n#{stderr}"
36
+ puts "#{UNCHECK_ICON} Git pull failed in: #{dir}\n#{stderr}"
23
37
  puts "Opening shell for manual fix. Type 'exit' when done."
24
38
  system('PS1="trk pull paused on [$(basename $(pwd))]$ " bash --norc')
25
39
  end
26
40
  end
27
41
  end
28
42
 
29
- puts "\n All done!"
43
+ puts "\n#{CHECK_ICON} All done!"
30
44
  end
31
45
  end
32
46
  end
data/lib/trk/version.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Trk
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.2"
5
+ CHECK_ICON = "✅ "
6
+ UNCHECK_ICON = "❌ "
5
7
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dusan Orlovic
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-03-04 00:00:00.000000000 Z
10
+ date: 2025-03-11 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: thor
@@ -49,7 +48,6 @@ licenses:
49
48
  metadata:
50
49
  homepage_uri: https://trk.tools
51
50
  source_code_uri: https://trk.tools/app/trk-readme-source-links
52
- post_install_message:
53
51
  rdoc_options: []
54
52
  require_paths:
55
53
  - lib
@@ -64,8 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
62
  - !ruby/object:Gem::Version
65
63
  version: '0'
66
64
  requirements: []
67
- rubygems_version: 3.5.16
68
- signing_key:
65
+ rubygems_version: 3.6.2
69
66
  specification_version: 4
70
67
  summary: CLI tools to manipulate https://trk.tools README files and projects.
71
68
  test_files: []