Low commit activity in last 3 years
No release in over a year
Copy specific files from another git repo by one command
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.14
>= 10.0
>= 3.0

Runtime

>= 0.8.1
>= 0.1.0
 Project Readme

git_repo_upgrader

Gem downloads License: MIT

Copy specific files from another git repository into your current project and provide (optional) automatic commits.

Useful for manually integrated files from another git project. Do upgrades by one command.

- early version, not to be meant for production use

Contents

  • Installation
  • Usage
  • Documentation
  • Contributing

Installation

Prerequisites

Git must be installed and bin directory must be included in PATH variable.

Add gem to your ruby project

Add this line to your application's Gemfile:

gem 'git_repo_upgrader'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install git_repo_upgrader

Common information

TODO

Usage

At best create a new rake task containing a options hash and then run #upgrade.

See the examples below for option hashes.

Examples

Basic

    options = {
        repo: {
            uri: 'https://github.com/username/project.git',
            branch: 'develop',
        },
        files_to_copy: {
            'dist/app.bundle.js' => 'web/js/lib/project/app.bundle.js',
            'dist/app.bundle.css' => 'web/js/lib/project/app.bundle.css',
            # copy a whole directory recursively
            'dist/img' => 'web/js/lib/project/img',
        },
        commit: 'prompt' # 'prompt' by default, other options: 'false','auto'
    }
    GitRepoUpgrader.upgrade options

Documentation

Check out the doc at RubyDoc https://www.rubydoc.info/gems/git_repo_upgrader

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/magynhard/git_repo_upgrader. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.