git_fonky 1.1.0 → 1.1.1

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
  SHA256:
3
- metadata.gz: 0deef2f35a250276eb51333666b35228b724a4e521165688d615348b08940add
4
- data.tar.gz: d63a6a52ae1b19d21b7db78aace3c800a8cfb943b63b0edbf882afec9aa63084
3
+ metadata.gz: eccc8024d2a7647279b20745e3391b414b457c855d7c15aac9b266e477728129
4
+ data.tar.gz: c3070a7b5cf6cf91383f128d0005d672b3abd3c4e485a6b2b3d610d9435d1df6
5
5
  SHA512:
6
- metadata.gz: 1a6f0aee6c476ae13227af2f4157794511a1bc9ff18a0071f73176eb19f0c04bbbcb7a7a3cf4c5495bc49844bd64abc9a6913fbd1185248a30704fcf68105d7f
7
- data.tar.gz: 54711e1932255d1eb6db2cf1c8c25cf96ed217ea6f49a09a7fca046cb37c12a24d31cd91b3a356fb6941fd257ae571f5fe5aa7ade9cf4a7354cdc84994b0f806
6
+ metadata.gz: 2b6970b50cf13f82a013a68ea477e44d0f482f8fa051297f6d6ea36b5eea5d78dad480d4ce924c1b006de643b7f7e10ecb30425e8e828a271c69690260496365
7
+ data.tar.gz: 31a75d1eff266a71b12923338d34316f15876526e70055f8ca997426c9fa79badb11c758ef15157bb6244223009f15da0020c7eca6ad5615ec636bc8476bc2f6
data/README.md CHANGED
@@ -16,10 +16,10 @@ GitFonky uses two environment variables in order to do its thing - `GFONK_DIR` a
16
16
  Set this environment variable if you wish to override the default directory that GitFonky uses to look for your repositories within. If you do not set this
17
17
  environment variable then the defualt is to use the current users HOME directory and then a directory called `/code`. This is would be something like `/Users/somebody/code` done via `"#{Dir.home}/code`.
18
18
 
19
- If you set the `GFONK_DIR` environment variable you should set it to the path to the directory that contains all of the repositories you want to
19
+ If you set the `GFONK_DIR` environment variable you should set it to the full path to the directory that contains all of the repositories you want to
20
20
  stop faking the funk with.
21
21
 
22
- ### GFONK_REPOS
22
+ ### `GFONK_REPOS`
23
23
 
24
24
  This environment variable must be set if you want any funk to happen! The value of this environment variable should be a string of repository names separated
25
25
  only by commas (NO SPACES!):
@@ -36,6 +36,14 @@ export GFONK_REPOS="repo1,repo2:main,repo3:staging"
36
36
  If you do not specify a branch for a repository then whatever the current branch is that you are on in a given
37
37
  repository directory is the branch that will be used to attempt to sync the repository between the remotes.
38
38
 
39
+
40
+ ### Running the fonk
41
+ The gem comes with a `bin` script that is used to kick off the process. To run the script, type the following in
42
+ your terminal:
43
+ ```bash
44
+ gfonk
45
+ ```
46
+
39
47
  ## Development
40
48
 
41
49
  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.
@@ -3,7 +3,7 @@ require_relative "reporter"
3
3
 
4
4
  module GitFonky
5
5
  class RepoDir
6
- def initialize(repo_name: nil, branch: nil, command: Command, reporter: Reporter)
6
+ def initialize(repo_name = nil, branch = nil, command: Command, reporter: Reporter)
7
7
  @repo_name = repo_name
8
8
  @command = command.new
9
9
  @branch = branch || get_current_branch
@@ -11,9 +11,9 @@ module GitFonky
11
11
  @reporter = reporter.new(@repo_name, @branch)
12
12
  end
13
13
 
14
- def self.sync(repo_name:, branch_name:)
14
+ def self.sync(repo_name, branch_name)
15
15
  Dir.chdir(repo_name.to_s) do
16
- new(repo_name: repo_name, branch: branch_name).sync
16
+ new(repo_name, branch_name).sync
17
17
  end
18
18
  end
19
19
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitFonky
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
data/lib/git_fonky.rb CHANGED
@@ -12,8 +12,8 @@ module GitFonky
12
12
 
13
13
  def self.sync_repos
14
14
  Dir.chdir(GFONK_DIR) do
15
- Repositories.parse_env.each do |repo, branch|
16
- RepoDir.sync(repo_name: repo, branch_name: branch)
15
+ Repositories.parse_env.each do |repo_name, branch_name|
16
+ RepoDir.sync(repo_name, branch_name)
17
17
  puts "\n" * 3
18
18
  end
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_fonky
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Collin Jilbert