Skip to content

Commit 7bfa9aa

Browse files
author
childish-sambino
authored
chore: clean up and upgrade dev dependencies (#497)
1 parent 4ec3a9b commit 7bfa9aa

File tree

6 files changed

+11
-77
lines changed

6 files changed

+11
-77
lines changed

.rubocop.yml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Layout/LineLength:
1818
Metrics/BlockLength:
1919
Exclude:
2020
- 'spec/**/*'
21+
- twilio-ruby.gemspec
2122

2223
Layout/HeredocIndentation:
2324
Enabled: false

Gemfile

-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,2 @@
11
source 'https://rubygems.org'
2-
32
gemspec
4-
5-
group :test do
6-
gem 'equivalent-xml', '~> 0.6'
7-
gem 'fakeweb', '~> 1.3'
8-
gem 'rack', '~> 1.3'
9-
gem 'rake', '~> 10.1'
10-
gem 'rspec', '~> 3.0'
11-
end

Makefile

+5-14
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,24 @@
1-
.PHONY: githooks test lint-changed lint docs
1+
.PHONY: githooks install test lint docs docker-build docker-push
22

3-
CHANGED_RUBY_FILES = $(shell git status --porcelain | grep ".rb" | awk -F ' ' '{print $2}' | tr '\n' ' ')
3+
githooks:
4+
ln -sf ../../githooks/pre-commit .git/hooks/pre-commit
45

56
install: githooks
67
bundle install; bundle exec rake install
78

8-
test-install:
9-
bundle install
10-
119
test: lint
1210
bundle exec rake spec
1311

14-
docs:
15-
yard doc --output-dir ./doc
16-
1712
lint:
1813
rubocop --cache true --parallel
1914

20-
githooks:
21-
cp githooks/pre-commit .git/hooks/pre-commit
22-
chmod +x .git/hooks/pre-commit
15+
docs:
16+
yard doc --output-dir ./doc
2317

2418
authors:
2519
echo "Authors\n=======\n\nA huge thanks to all of our contributors:\n\n" > AUTHORS.md
2620
git log --raw | grep "^Author: " | cut -d ' ' -f2- | cut -d '<' -f1 | sed 's/^/- /' | sort | uniq >> AUTHORS.md
2721

28-
gem:
29-
bundle exec rake build | sed -e 's/.*pkg/pkg/g' | sed -e "s/\.$$//g" | xargs gem push
30-
3122
API_DEFINITIONS_SHA=$(shell git log --oneline | grep Regenerated | head -n1 | cut -d ' ' -f 5)
3223
docker-build:
3324
docker build -t twilio/twilio-ruby .

Rakefile

-54
Original file line numberDiff line numberDiff line change
@@ -8,57 +8,3 @@ RSpec::Core::RakeTask.new(:spec)
88

99
task default: :spec
1010
task test: :spec
11-
12-
task :authors do
13-
`make authors`
14-
end
15-
16-
task :deploy, [:version] => [:spec, :authors] do |t, args|
17-
current_version = Twilio::VERSION
18-
19-
if args.version.nil?
20-
version = Twilio::VERSION
21-
version_parts = version.split('.')
22-
increment = version_parts.pop
23-
increment_prefix = increment.split(/\d/)[0]
24-
25-
increment = increment[increment_prefix.length..-1] if increment_prefix
26-
27-
increment = increment.to_i + 1
28-
increment = "#{increment_prefix}#{increment}" if increment_prefix
29-
30-
version = [*version_parts, increment].join('.')
31-
else
32-
version = args.version
33-
end
34-
35-
puts("Deploying #{version}")
36-
37-
# Update version.rb
38-
version_file = <<SRC
39-
module Twilio
40-
VERSION = '#{version}'
41-
end
42-
SRC
43-
File.write('lib/twilio-ruby/version.rb', version_file)
44-
45-
# Update README.md
46-
current_readme = File.read('README.md')
47-
new_readme = current_readme.gsub(Regexp.new(current_version.gsub('.', '\.')), version)
48-
File.write('README.md', new_readme)
49-
50-
# Make a git commit
51-
`git commit -am "Bumping to version #{version}"`
52-
53-
# Do the gem deployment
54-
`make gem`
55-
56-
# Push the branch back up
57-
`git push`
58-
59-
# Tag the branch
60-
`git tag #{version}`
61-
62-
# Push the tags
63-
`git push --tags`
64-
end

githooks/pre-commit

100644100755
File mode changed.

twilio-ruby.gemspec

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ Gem::Specification.new do |spec|
3131
spec.add_dependency('rubysl') if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
3232

3333
spec.add_development_dependency 'bundler', '>= 1.5', '< 3.0'
34+
spec.add_development_dependency 'equivalent-xml', '~> 0.6'
35+
spec.add_development_dependency 'fakeweb', '~> 1.3'
36+
spec.add_development_dependency 'rack', '~> 2.0'
37+
spec.add_development_dependency 'rake', '~> 13.0'
38+
spec.add_development_dependency 'rspec', '~> 3.0'
3439
spec.add_development_dependency 'rubocop', '~> 0.80.0'
3540
spec.add_development_dependency 'yard', '~> 0.9.9'
3641
end

0 commit comments

Comments
 (0)