gitenv 1.0.0 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87bcb09a6b7469ac950d386e5ee36a1e2fac55ab278bedc2f46c9efbd1c094d8
4
- data.tar.gz: f34839c0178019d9964b289cc5d10c5756501758c2b8824fd6b6a0e875e21e39
3
+ metadata.gz: b4d133584750e57a1bf6b8e5bc1f642607fba22f68d892005512b8583de1b676
4
+ data.tar.gz: 0a9b20396dbcc9fa44a2806c994571c0fce138a22dc5a1d4a2bb53d485231cb1
5
5
  SHA512:
6
- metadata.gz: 4cd49bccc5029f75f8c41be61dd83aac0b965d009121131e68c51c11425a2deb151a549303773bc85238bc7e0566933d02ef0b5f3a24bc34011398d009a7ed52
7
- data.tar.gz: 957f08d7a63d1085f4b320c4d138ed09816b20d22143279c4eacfd07a9279c8431d4e0ffd6342175ccaeed6066f5af190d06583722620551326e47f0214ca15c
6
+ metadata.gz: a3a7efbb5ff8f3b3db7efbac8f57b72881d4bd122b5e6f984124d45df1b0c38476d68b4c420f7016bf27aacda184405d56d0b76ede57c7fa3fa2a570a4f4c196
7
+ data.tar.gz: 43e962d0973fa761cf13a890e1e12096cc5802e0f9e2bd938712b08243eb0c90a4e105b9d264347ce90efc91271fb7ccd1aa29ee92cc0d0075d98b6e4148179f
data/Gemfile CHANGED
@@ -1,20 +1,19 @@
1
1
  source "https://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
2
 
6
- gem 'paint', '~> 2.1'
7
- gem 'commander', '~> 4.2'
3
+ gem 'paint', '~> 2.2'
4
+ gem 'commander', '~> 4.6'
8
5
 
9
- # Add dependencies to develop your gem here.
10
- # Include everything needed to run rake, tests, features, etc.
11
6
  group :development do
12
- require 'pp' # https://github.com/fakefs/fakefs/issues/99
13
- gem 'rake', '~> 12.3'
14
- gem 'rspec', '~> 3.1'
15
- gem 'rspec-its', '~> 1.1'
16
- gem 'fakefs', '~> 0.20.1', :require => 'fakefs/safe'
7
+ gem 'rake', '~> 13.0'
17
8
  gem 'jeweler', '~> 2.0'
18
9
  gem 'rake-version', '~> 1.0'
19
- gem 'simplecov', '~> 0.16.1'
10
+ end
11
+
12
+ group :test do
13
+ gem 'codecov', '~> 0.5.2', require: false
14
+ gem 'fakefs', '~> 1.3', require: 'fakefs/safe'
15
+ gem 'rspec', '~> 3.10'
16
+ gem 'rspec-collection_matchers', '~> 1.2'
17
+ gem 'rspec-its', '~> 1.1'
18
+ gem 'simplecov', '~> 0.21.2'
20
19
  end
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011-2019 Simon Oulevay (Alpha Hydrae)
1
+ Copyright (c) 2011-2021 Simon Oulevay (Alpha Hydrae)
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -3,9 +3,8 @@
3
3
  Creates symlinks to your configuration files in a git repository (<a href="https://github.com/AlphaHydrae/env">like mine</a>).
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/gitenv.svg)](http://badge.fury.io/rb/gitenv)
6
- [![Dependency Status](https://gemnasium.com/AlphaHydrae/gitenv.svg)](https://gemnasium.com/AlphaHydrae/gitenv)
7
- [![Build Status](https://travis-ci.org/AlphaHydrae/gitenv.svg?branch=master)](http://travis-ci.org/AlphaHydrae/gitenv)
8
- [![Coverage Status](https://coveralls.io/repos/AlphaHydrae/gitenv/badge.svg)](https://coveralls.io/r/AlphaHydrae/gitenv)
6
+ [![Build](https://github.com/AlphaHydrae/gitenv/actions/workflows/build.yml/badge.svg)](https://github.com/AlphaHydrae/gitenv/actions/workflows/build.yml)
7
+ [![Code Coverage](https://codecov.io/gh/AlphaHydrae/gitenv/branch/master/graph/badge.svg?token=PHYTXEW2MG)](https://codecov.io/gh/AlphaHydrae/gitenv)
9
8
 
10
9
  Run gitenv without arguments to check the symlink configuration. First-time users will be prompted to enter the path to their environment repository so gitenv can set up its own config file.
11
10
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.4
data/lib/gitenv.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  require 'paint'
3
3
 
4
4
  module Gitenv
5
- VERSION = '1.0.0'
5
+ VERSION = '1.0.4'
6
6
  end
7
7
 
8
8
  Dir[File.join File.dirname(__FILE__), File.basename(__FILE__, '.*'), '*.rb'].each{ |lib| require lib }
data/lib/gitenv/config.rb CHANGED
@@ -47,6 +47,18 @@ module Gitenv
47
47
  @context.ignores
48
48
  end
49
49
 
50
+ def include other_config_file, optional: false
51
+ raise "Only absolute paths can be included" unless Pathname.new(other_config_file).absolute?
52
+ absolute_path = File.expand_path(other_config_file)
53
+ unless File.exists?(absolute_path)
54
+ raise "Cannot find file to include #{absolute_path}" unless optional
55
+ return
56
+ end
57
+
58
+ contents = File.open(absolute_path, 'r').read
59
+ self.instance_eval contents, absolute_path
60
+ end
61
+
50
62
  private
51
63
 
52
64
  def matcher file, options = {}
@@ -6,7 +6,7 @@ module Gitenv
6
6
  attr_accessor :ignores
7
7
 
8
8
  def initialize config, options = {}
9
- @config, @from, @ignores = config, options[:from], options[:ignores]
9
+ @config, @from = config, options[:from]
10
10
 
11
11
  @to ||= File.expand_path('~')
12
12
 
@@ -1,8 +1,5 @@
1
-
2
1
  module Gitenv
3
-
4
2
  class FilesMatcher
5
-
6
3
  def initialize options = {}
7
4
  @options = options
8
5
  @ignores = options[:ignores] ? [ options[:ignores] ].flatten : []
@@ -1,8 +1,5 @@
1
-
2
1
  module Gitenv
3
-
4
2
  class OneFile < FilesMatcher
5
-
6
3
  def initialize file, options = {}
7
4
  super options
8
5
  @file = file
@@ -1,10 +1,13 @@
1
-
2
1
  module Gitenv
3
-
4
2
  class Repository
3
+ attr_reader :path
5
4
 
6
5
  def initialize path
7
6
  @path = path
8
7
  end
8
+
9
+ def == other
10
+ other.path == path
11
+ end
9
12
  end
10
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitenv
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Oulevay (Alpha Hydrae)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-25 00:00:00.000000000 Z
11
+ date: 2021-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paint
@@ -16,84 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.1'
19
+ version: '2.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.1'
26
+ version: '2.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: commander
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '4.2'
33
+ version: '4.6'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '4.2'
40
+ version: '4.6'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '12.3'
47
+ version: '13.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '12.3'
55
- - !ruby/object:Gem::Dependency
56
- name: rspec
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '3.1'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '3.1'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec-its
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.1'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.1'
83
- - !ruby/object:Gem::Dependency
84
- name: fakefs
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 0.20.1
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 0.20.1
54
+ version: '13.0'
97
55
  - !ruby/object:Gem::Dependency
98
56
  name: jeweler
99
57
  requirement: !ruby/object:Gem::Requirement
@@ -122,20 +80,6 @@ dependencies:
122
80
  - - "~>"
123
81
  - !ruby/object:Gem::Version
124
82
  version: '1.0'
125
- - !ruby/object:Gem::Dependency
126
- name: simplecov
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: 0.16.1
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: 0.16.1
139
83
  description: Gitenv sets up symlinks to your configuration files in a git repository.
140
84
  email: git@alphahydrae.com
141
85
  executables:
@@ -185,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
129
  - !ruby/object:Gem::Version
186
130
  version: '0'
187
131
  requirements: []
188
- rubygems_version: 3.0.3
132
+ rubygems_version: 3.2.15
189
133
  signing_key:
190
134
  specification_version: 4
191
135
  summary: Symlink manager for git repositories with configuration files.