git-gsub 0.0.10 → 0.0.11

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: 1761e19baa8ec8e6b1048f3b97b9105ad77ecff1e55344b56bb423d11a331592
4
- data.tar.gz: 54e0aa6a0eb250ad59fe0dfef27e1754a7d8bf58acd07fd60ab514c1c2913874
3
+ metadata.gz: cdbaa36daf4b1b651664f8e2c6249c926b7da18813a523e5acef6ba9110298ea
4
+ data.tar.gz: ab255f1a554458c5f4725714015630b154fc9483a278fc246ffce967b4175837
5
5
  SHA512:
6
- metadata.gz: 0e9dfb67a8a5b421e7d1617ee9af327e3617ee612ca0b2a6ecb5ccc16214af15aee8bca53ae978c18b7801268f97b2875675a075a87b7db3c06cb45b7dbd2953
7
- data.tar.gz: 037f71d052977c09399c3e107883dd27241e079d8f5db524668a2758975e47e319580a69991395e52114e017331b112d1271ba2ac167f9eb989981395482407f
6
+ metadata.gz: 3808ba02a0ed1ad307f657e566fb1bb2b2bb94653097f091280af21dae04bd795a1da01062285cd66ea1435272bb8d2aa091c838db2a14f74fc46d8c0ddc1d67
7
+ data.tar.gz: 32254b23f90248771eb31fca3c440c532fd2fce80668baba104e06ad0a4c85fb53e49fb52a04fb57d77bb0d2443fb86e58ff1d42eed13af5d7e00700fe2cc803
@@ -1,6 +1,11 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [0.0.11]
5
+ ### Changed
6
+ - Support newer and safer activesupport ([#13](https://github.com/fujimura/git-gsub/pull/13))
7
+ - Add deprecation message on installation ([#13](https://github.com/fujimura/git-gsub/pull/13))
8
+
4
9
  ## [0.0.10]
5
10
  ### Changed
6
11
  - Support activesupport >= 4 & < 6 ([#12](https://github.com/fujimura/git-gsub/pull/12)) Thanks @hanachin!
@@ -3,23 +3,26 @@ lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'git/gsub/version'
5
5
 
6
+ GIT_GSUB_RUBY_IS_DEPRECATED = %q{git-gsub: Newer version is written in Go and Ruby implementation is deprecated. See https://github.com/fujimura/git-gsub}
7
+
6
8
  Gem::Specification.new do |spec|
7
9
  spec.name = "git-gsub"
8
10
  spec.version = Git::Gsub::VERSION
9
11
  spec.authors = ["Fujimura Daisuke"]
10
12
  spec.email = ["me@fujimuradaisuke.com"]
11
- spec.summary = %q{A Git subcommand to do gsub in a repository}
12
- spec.description = %q{A Git subcommand to do gsub in a repository}
13
+ spec.summary = GIT_GSUB_RUBY_IS_DEPRECATED
14
+ spec.description = GIT_GSUB_RUBY_IS_DEPRECATED
13
15
  spec.homepage = "https://github.com/fujimura/git-gsub"
14
16
  spec.license = "MIT"
17
+ spec.post_install_message = GIT_GSUB_RUBY_IS_DEPRECATED
15
18
 
16
19
  spec.files = `git ls-files -z`.split("\x0")
17
20
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
21
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.add_dependency "activesupport", ">= 4", "< 6"
22
+ spec.add_dependency "activesupport", ">= 6.0.3.1"
20
23
  spec.require_paths = ["lib"]
21
24
 
22
- spec.add_development_dependency "bundler", "~> 1.5"
25
+ spec.add_development_dependency "bundler"
23
26
  spec.add_development_dependency "rake"
24
27
  spec.add_development_dependency "rspec"
25
28
  spec.add_development_dependency "pry"
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module Gsub
3
- VERSION = '0.0.10'.freeze
3
+ VERSION = '0.0.11'.freeze
4
4
  end
5
5
  end
@@ -29,97 +29,109 @@ describe 'git-gsub' do
29
29
  `git commit -m 'Add #{name}'`
30
30
  end
31
31
 
32
+ let!(:git_gsub_path) {
33
+ if ENV['USE_RUBY']
34
+ File.expand_path("../../bin/git-gsub-ruby", __FILE__)
35
+ else
36
+ File.expand_path("../../bin/git-gsub", __FILE__)
37
+ end
38
+ }
39
+
32
40
  around do |example|
33
41
  run_in_tmp_repo do
34
42
  example.run
35
43
  end
36
44
  end
37
45
 
38
- it 'should substitute files' do
39
- commit_file 'README.md', 'Git Subversion Bzr'
40
- Git::Gsub.run %w[Bzr Mercurial]
46
+ describe 'Substituting' do
47
+ it 'should substitute files' do
48
+ commit_file 'README.md', 'Git Subversion Bzr'
49
+ `#{git_gsub_path} Bzr Mercurial`
41
50
 
42
- expect(File.read('README.md')).to eq 'Git Subversion Mercurial'
43
- end
51
+ expect(File.read('README.md')).to eq 'Git Subversion Mercurial'
52
+ end
44
53
 
45
- it 'should substitute files with case conversion' do
46
- commit_file 'README.md', 'GitGsub git_gsub git-gsub'
47
- Git::Gsub.run %w[GitGsub SvnGsub --camel --kebab --snake]
54
+ it 'should substitute files with case conversion' do
55
+ commit_file 'README.md', 'GitGsub git_gsub git-gsub'
56
+ `#{git_gsub_path} GitGsub SvnGsub --camel --kebab --snake`
48
57
 
49
- expect(File.read('README.md')).to eq 'SvnGsub svn_gsub svn-gsub'
50
- end
58
+ expect(File.read('README.md')).to eq 'SvnGsub svn_gsub svn-gsub'
59
+ end
51
60
 
52
- it 'should escape well' do
53
- commit_file 'README.md', %(<h1 class="foo">)
54
- Git::Gsub.run [%(<h1 class="foo">), %(<h1 class="bar">)]
61
+ it 'should escape well' do
62
+ commit_file 'README.md', %(<h1 class="foo">)
63
+ `#{git_gsub_path} '<h1 class="foo">' '<h1 class="bar">'`
55
64
 
56
- expect(File.read('README.md')).to eq %(<h1 class="bar">)
57
- end
65
+ expect(File.read('README.md')).to eq %(<h1 class="bar">)
66
+ end
58
67
 
59
- it 'should substutute @' do
60
- commit_file 'README.md', %(foo@example.com)
61
- Git::Gsub.run [%(@example), %(bar@example)]
68
+ it 'should substutute @' do
69
+ commit_file 'README.md', %(foo@example.com)
70
+ `#{git_gsub_path} @example bar@example`
62
71
 
63
- expect(File.read('README.md')).to eq %(foobar@example.com)
64
- end
72
+ expect(File.read('README.md')).to eq %(foobar@example.com)
73
+ end
65
74
 
66
- it 'should substitute consequenting @' do
67
- commit_file 'README.md', %(Hello this is @git)
68
- Git::Gsub.run [%(@git), %(@@svn)]
75
+ it 'should substitute consequenting @' do
76
+ commit_file 'README.md', %(Hello this is @git)
77
+ `#{git_gsub_path} @git @@svn`
69
78
 
70
- expect(File.read('README.md')).to eq %(Hello this is @@svn)
71
- end
79
+ expect(File.read('README.md')).to eq %(Hello this is @@svn)
80
+ end
72
81
 
73
- it %(should substitute " to ') do
74
- commit_file 'README.md', %(Hello this is "git")
75
- Git::Gsub.run [%("git"), %('svn')]
82
+ it %(should substitute " to ') do
83
+ commit_file 'README.md', %(Hello this is "git")
84
+ `#{git_gsub_path} '"git"' "'svn'"`
76
85
 
77
- expect(File.read('README.md')).to eq %(Hello this is 'svn')
78
- end
86
+ expect(File.read('README.md')).to eq %(Hello this is 'svn')
87
+ end
79
88
 
80
- it %(should substitute ' to ") do
81
- commit_file 'README.md', %(Hello this is 'git')
82
- Git::Gsub.run [%('git'), %("svn")]
89
+ it %(should substitute ' to ") do
90
+ commit_file 'README.md', %(Hello this is 'git')
91
+ `#{git_gsub_path} "'git'" '"svn"'`
83
92
 
84
- expect(File.read('README.md')).to eq %(Hello this is "svn")
85
- end
93
+ expect(File.read('README.md')).to eq %(Hello this is "svn")
94
+ end
86
95
 
87
- it 'should substitute text including { and }'do
88
- commit_file 'README.md', %({git{svn})
89
- Git::Gsub.run [%({git{svn}), %({hg{svn})]
96
+ it 'should substitute text including { and }'do
97
+ commit_file 'README.md', %({git{svn})
98
+ `#{git_gsub_path} {git{svn} {hg{svn}}`
90
99
 
91
- expect(File.read('README.md')).to eq %({hg{svn})
92
- end
100
+ expect(File.read('README.md')).to eq %({hg{svn}})
101
+ end
93
102
 
94
- it 'should not create backup file' do
95
- commit_file 'README.md', 'Git Subversion Bzr'
96
- Git::Gsub.run %w[Bzr Darcs]
103
+ it 'should not create backup file' do
104
+ commit_file 'README.md', 'Git Subversion Bzr'
105
+ `#{git_gsub_path} Bzr Darcs`
97
106
 
98
- expect(`ls`).to eql "README.md\n"
107
+ expect(`ls`).to eql "README.md\n"
108
+ end
99
109
  end
100
110
 
101
- it 'should rename with --rename' do
102
- commit_file 'README-git_gsub.md', 'GitGsub git_gsub git-gsub'
103
- Git::Gsub.run %w[GitGsub SvnGsub --snake --rename]
111
+ describe 'Renaming' do
112
+ it 'should rename with --rename' do
113
+ commit_file 'README-git_gsub.md', 'GitGsub git_gsub git-gsub'
114
+ `#{git_gsub_path} GitGsub SvnGsub --snake --rename`
104
115
 
105
- expect(`ls`).to eql "README-svn_gsub.md\n"
106
- expect(File.read('README-svn_gsub.md')).to eq 'SvnGsub svn_gsub git-gsub'
107
- end
116
+ expect(`ls`).to eql "README-svn_gsub.md\n"
117
+ expect(File.read('README-svn_gsub.md')).to eq 'SvnGsub svn_gsub git-gsub'
118
+ end
108
119
 
109
- it 'should rename with --rename' do
110
- commit_file 'lib/git.rb', 'puts "Git"'
111
- Git::Gsub.run %w[git svn --camel --rename]
120
+ it 'should rename with --rename' do
121
+ commit_file 'lib/git.rb', 'puts "Git"'
122
+ `#{git_gsub_path} git svn --camel --rename`
112
123
 
113
- expect(`ls lib`).to eql "svn.rb\n"
114
- expect(File.read('lib/svn.rb')).to eq 'puts "Svn"'
115
- end
124
+ expect(`ls lib`).to eql "svn.rb\n"
125
+ expect(File.read('lib/svn.rb')).to eq 'puts "Svn"'
126
+ end
116
127
 
117
- it 'should do nothing if no file found' do
118
- commit_file 'README-git_gsub.md', 'GitGsub git_gsub git-gsub'
128
+ it 'should do nothing if no file found' do
129
+ commit_file 'README-git_gsub.md', 'GitGsub git_gsub git-gsub'
119
130
 
120
- expect {
121
- Git::Gsub.run %w[Atlanta Chicago --snake --rename]
122
- }.not_to raise_error
131
+ expect {
132
+ `#{git_gsub_path} Atlanta Chicago --snake --rename`
133
+ }.not_to raise_error
134
+ end
123
135
  end
124
136
 
125
137
  it 'should output command with dry-run' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-gsub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fujimura Daisuke
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-25 00:00:00.000000000 Z
11
+ date: 2020-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,34 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '6'
19
+ version: 6.0.3.1
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: '4'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '6'
26
+ version: 6.0.3.1
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: bundler
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
- - - "~>"
31
+ - - ">="
38
32
  - !ruby/object:Gem::Version
39
- version: '1.5'
33
+ version: '0'
40
34
  type: :development
41
35
  prerelease: false
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
- - - "~>"
38
+ - - ">="
45
39
  - !ruby/object:Gem::Version
46
- version: '1.5'
40
+ version: '0'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: rake
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -86,7 +80,8 @@ dependencies:
86
80
  - - ">="
87
81
  - !ruby/object:Gem::Version
88
82
  version: '0'
89
- description: A Git subcommand to do gsub in a repository
83
+ description: 'git-gsub: Newer version is written in Go and Ruby implementation is
84
+ deprecated. See https://github.com/fujimura/git-gsub'
90
85
  email:
91
86
  - me@fujimuradaisuke.com
92
87
  executables:
@@ -110,7 +105,8 @@ homepage: https://github.com/fujimura/git-gsub
110
105
  licenses:
111
106
  - MIT
112
107
  metadata: {}
113
- post_install_message:
108
+ post_install_message: 'git-gsub: Newer version is written in Go and Ruby implementation
109
+ is deprecated. See https://github.com/fujimura/git-gsub'
114
110
  rdoc_options: []
115
111
  require_paths:
116
112
  - lib
@@ -125,10 +121,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
121
  - !ruby/object:Gem::Version
126
122
  version: '0'
127
123
  requirements: []
128
- rubyforge_project:
129
- rubygems_version: 2.7.6
130
- signing_key:
124
+ rubygems_version: 3.0.3
125
+ signing_key:
131
126
  specification_version: 4
132
- summary: A Git subcommand to do gsub in a repository
127
+ summary: 'git-gsub: Newer version is written in Go and Ruby implementation is deprecated.
128
+ See https://github.com/fujimura/git-gsub'
133
129
  test_files:
134
130
  - spec/git_gsub_spec.rb