github-copywriter 1.2.3 → 1.2.4
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 +4 -4
- data/bin/github-copywriter +5 -0
- data/lib/github-copywriter.rb +4 -1
- data/lib/github-copywriter/regex.rb +1 -1
- data/lib/github-copywriter/version.rb +1 -1
- data/spec/copyright_regex_spec.rb +9 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 866ea8fd4ae24c3bbfef341fe187e3bb63812dac
|
|
4
|
+
data.tar.gz: 09cd9dcea3875d2fda00b26f4010dc0b49bcfd9b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6712b4eef61d46b591c0726f59a2f6792f789750fe66dc2d0cd3b03a0eceb26c3028e63b8e9af577d103b01dbf53a736bc97ea4b17e07593d306de9cffa816a8
|
|
7
|
+
data.tar.gz: bbf207de4211f381239ebd7306a88e362b015fead89663f07a8e085c1f0fdc4dc5a744d157732d5a6deb4de55a1f0ff285fa32202605e809e9dde21e1b982671
|
data/bin/github-copywriter
CHANGED
|
@@ -43,12 +43,17 @@ Usage: #{executable_name} [repos...]
|
|
|
43
43
|
options[:skip_forks] = true
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
+
opts.on("-n", "--dry-run", "Don't actually write to any repos.") do
|
|
47
|
+
options[:dry_run] = true
|
|
48
|
+
end
|
|
49
|
+
|
|
46
50
|
opts.on("-b", "--branches branch1,branch2", "Update specific branches only.") do |comma_separated_branches|
|
|
47
51
|
options[:branches] = comma_separated_branches.split(",").map(&:strip)
|
|
48
52
|
end
|
|
49
53
|
|
|
50
54
|
opts.on_tail("-h","--help", "Show this message.") do
|
|
51
55
|
puts opts
|
|
56
|
+
puts ""
|
|
52
57
|
exit
|
|
53
58
|
end
|
|
54
59
|
|
data/lib/github-copywriter.rb
CHANGED
|
@@ -41,6 +41,7 @@ class Copywriter
|
|
|
41
41
|
options = {
|
|
42
42
|
all_repos: false,
|
|
43
43
|
skip_forks: false,
|
|
44
|
+
dry_run: false,
|
|
44
45
|
year: nil,
|
|
45
46
|
branches: nil
|
|
46
47
|
}.merge(options)
|
|
@@ -139,8 +140,10 @@ class Copywriter
|
|
|
139
140
|
else
|
|
140
141
|
print " Committing #{@modified_files.size} files..."
|
|
141
142
|
end
|
|
143
|
+
|
|
142
144
|
commit_files(repo_name, ref, "100644", @modified_files, COMMIT_MSG)
|
|
143
|
-
|
|
145
|
+
|
|
146
|
+
puts " done! #{options[:dry_run] ? '(dry run)' : ''}"
|
|
144
147
|
else
|
|
145
148
|
puts " No files needed to be commited."
|
|
146
149
|
end
|
|
@@ -59,7 +59,15 @@ copyrights = [
|
|
|
59
59
|
{
|
|
60
60
|
:old => "This is my paragraph. Blah blah blah... Copyright 2001.\nCopyright (C) 2001,2003,2006,2008,2010-2013\n",
|
|
61
61
|
:new => "This is my paragraph. Blah blah blah... Copyright 2014.\nCopyright (C) 2001,2003,2006,2008,2010-2014\n"
|
|
62
|
-
}
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
# Case-insensitive-ness tests
|
|
65
|
+
{ :old => "COPYRIGHT (C) 2010", :new => "COPYRIGHT (C) 2014" },
|
|
66
|
+
{ :old => "copyright (C) 2010", :new => "copyright (C) 2014" },
|
|
67
|
+
{ :old => "CoPyRiGhT (C) 2010", :new => "CoPyRiGhT (C) 2014" },
|
|
68
|
+
{ :old => "cOpYrIgHt (C) 2010", :new => "cOpYrIgHt (C) 2014" },
|
|
69
|
+
{ :old => "COPYright (C) 2010", :new => "COPYright (C) 2014" },
|
|
70
|
+
{ :old => "copyRIGHT (C) 2010", :new => "copyRIGHT (C) 2014" }
|
|
63
71
|
]
|
|
64
72
|
|
|
65
73
|
garbage_text = [
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: github-copywriter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Jacobs
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-01-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
141
141
|
version: '0'
|
|
142
142
|
requirements: []
|
|
143
143
|
rubyforge_project:
|
|
144
|
-
rubygems_version: 2.
|
|
144
|
+
rubygems_version: 2.5.1
|
|
145
145
|
signing_key:
|
|
146
146
|
specification_version: 4
|
|
147
147
|
summary: github-copywriter updates your copyrights... so you don't have to!
|