git_fonky 0.6.1 → 1.0

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: e1516c39e50aca297c6e2c139f13245b60914aba3662ea6397ba2d9d2ef7d5db
4
- data.tar.gz: 52a1d3640058e59cae1f8132d0d4cae38fc591b61843d18caeee178e1b7abd0c
3
+ metadata.gz: e688a3ce844aecf4af83b0850e10e82d3f50aa127f66f0b73bfcd969887f9c67
4
+ data.tar.gz: bf65a0369992d28e5fe62c05f72a1ab0f086e93af7eab5219ab55f3e9dd69aa5
5
5
  SHA512:
6
- metadata.gz: 56bc8c0f3a9f97dc4eacc85004d4e80f9feea66d1411d776dbf8df08f3f09f8f3f6c2db5d5943024dd9a2f242915859010c0018baf5e13f4370a7664b021c5e8
7
- data.tar.gz: a840d2fe9739e6c36057b3bc1bd92e805ada22cbc284afd19f3ec1d048bbf0599e466cb285da02372dfffce30f2fd25547f208d33880b40f849bfeedf62aebc7
6
+ metadata.gz: f51ff47b202cfafa08de450730d7e5e9d97bba9d81a64ab363da2ab7ac14d694620576be7c0ac3889d700ce937604e36667e7a1211a979c73f675c2e64016c66
7
+ data.tar.gz: ae6856b4ef69e6936752c1667810de703e5ef2b3a814db3de370e951ac446b1ba77048b1500b6cc9d61794cca2cfbb78ba3f4c2e40fa326d8cf36ead24e79e8c
data/README.md CHANGED
@@ -1,24 +1,31 @@
1
1
  # GitFonky
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
4
-
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/git_fonky`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Time to GitFonky! What do we do here you ask? Well, if you're like us, you have numerous repositories that you work on with others and keeping them all up-to-date can be a real drag.
4
+ That's where we come in with the funk! We take care of pulling in all the latest code for each repository you tell us by running one command!
6
5
 
7
6
  ## Installation
8
7
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_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.
8
+ `gem install git_fonky`
10
9
 
11
- Install the gem and add to the application's Gemfile by executing:
10
+ ## Usage
12
11
 
13
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
12
+ GitFonky uses two environment variables in order to do its thing - `GFONK_DIR` and `GFONK_REPOS`.
14
13
 
15
- If bundler is not being used to manage dependencies, install the gem by executing:
14
+ ### `GFONK_DIR`
16
15
 
17
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
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
+ 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
- ## Usage
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
20
+ stop faking the funk with.
20
21
 
21
- TODO: Write usage instructions here
22
+ ### GFONK_REPOS
23
+
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
+ only by commas (NO SPACES!):
26
+ ```bash
27
+ export GFONK_REPOS="repo1,repo2,repo3"
28
+ ```
22
29
 
23
30
  ## Development
24
31
 
@@ -28,12 +35,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
28
35
 
29
36
  ## Contributing
30
37
 
31
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/git_fonky. 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]/git_fonky/blob/main/CODE_OF_CONDUCT.md).
38
+ Bug reports and pull requests are welcome on the [GitHub page](https://github.com/cjilbert504/git_fonky.) for the gem.
32
39
 
33
40
  ## License
34
41
 
35
42
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
36
-
37
- ## Code of Conduct
38
-
39
- Everyone interacting in the GitFonky project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/git_fonky/blob/main/CODE_OF_CONDUCT.md).
@@ -1,3 +1,11 @@
1
1
  module GitFonky
2
- REPO_NAMES = %w[gr hatchbox-v2 jumpstart-marketing jumpstart-pro-rails noticed pay]
2
+
3
+ begin
4
+ REPO_NAMES = ENV["GFONK_REPOS"].split(",")
5
+ rescue NoMethodError
6
+ puts "The $GFONK_REPOS environment variable is not set."
7
+ puts "Please set the variable to point to a string list of repository names separated only by commas (NO SPACES):"
8
+ puts "export GFONK_REPOS='repo1,repo2,repo3'"
9
+ exit 1
10
+ end
3
11
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitFonky
4
- VERSION = "0.6.1"
4
+ VERSION = "1.0"
5
5
  end
data/lib/git_fonky.rb CHANGED
@@ -7,11 +7,13 @@ require_relative "git_fonky/repo_names"
7
7
  module GitFonky
8
8
  class Error < StandardError; end
9
9
 
10
+ GFONK_DIR = ENV["GFONK_DIR"] || "#{Dir.home}/code"
11
+
10
12
  def self.sync_repos
11
- Dir.chdir "#{Dir.home}/code" do
13
+ Dir.chdir(GFONK_DIR)do
12
14
  REPO_NAMES.each do |dir|
13
15
  RepoDir.sync(dir)
14
- puts "\n\n\n"
16
+ puts "\n" * 3
15
17
  end
16
18
  end
17
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: 0.6.1
4
+ version: '1.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Collin Jilbert
@@ -55,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
55
  - !ruby/object:Gem::Version
56
56
  version: '0'
57
57
  requirements: []
58
- rubygems_version: 3.6.9
58
+ rubygems_version: 3.7.2
59
59
  specification_version: 4
60
60
  summary: Sync all of your git repos with one command.
61
61
  test_files: []