Browse Source

gem: adopt frozen string literals

tags/v2.2.0
cn 2 years ago
parent
commit
b597ecb15e
  1. 3
      .rubocop.yml
  2. 1
      CHANGELOG.md
  3. 2
      Gemfile
  4. 2
      Rakefile
  5. 1
      dyndnsd.gemspec
  6. 2
      exe/dyndnsd
  7. 2
      lib/dyndnsd.rb
  8. 1
      lib/dyndnsd/database.rb
  9. 1
      lib/dyndnsd/generator/bind.rb
  10. 1
      lib/dyndnsd/helper.rb
  11. 1
      lib/dyndnsd/responder/dyndns_style.rb
  12. 1
      lib/dyndnsd/responder/rest_style.rb
  13. 1
      lib/dyndnsd/textfile_reporter.rb
  14. 1
      lib/dyndnsd/updater/command_with_bind_zone.rb
  15. 3
      lib/dyndnsd/version.rb
  16. 4
      spec/daemon_spec.rb
  17. 6
      spec/spec_helper.rb
  18. 1
      spec/support/dummy_database.rb
  19. 1
      spec/support/dummy_updater.rb

3
.rubocop.yml

@ -53,9 +53,6 @@ Style/Documentation:
Style/FormatStringToken:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/GuardClause:
Enabled: false

1
CHANGELOG.md

@ -5,6 +5,7 @@
IMPROVEMENTS:
- Refactor gemspec based on [recommendations](https://piotrmurach.com/articles/writing-a-ruby-gem-specification/) so tests are now excluded from gem and binaries move to `./exe` directory
- Adopt Ruby 2.3 frozen string literals for source code potentially reducing memory consumption
## 2.1.1 (March 1, 2020)

2
Gemfile

@ -1,3 +1,5 @@
# frozen_string_literal: true
source 'https://rubygems.org'
gemspec

2
Rakefile

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'

1
dyndnsd.gemspec

@ -1,3 +1,4 @@
# frozen_string_literal: true
require_relative 'lib/dyndnsd/version'

2
exe/dyndnsd

@ -1,3 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'dyndnsd'

2
lib/dyndnsd.rb

@ -1,4 +1,4 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'etc'
require 'logger'

1
lib/dyndnsd/database.rb

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'forwardable'

1
lib/dyndnsd/generator/bind.rb

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Dyndnsd
module Generator

1
lib/dyndnsd/helper.rb

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'ipaddr'

1
lib/dyndnsd/responder/dyndns_style.rb

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Dyndnsd
module Responder

1
lib/dyndnsd/responder/rest_style.rb

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Dyndnsd
module Responder

1
lib/dyndnsd/textfile_reporter.rb

@ -1,3 +1,4 @@
# frozen_string_literal: true
# Adapted from https://github.com/eric/metriks-graphite/blob/master/lib/metriks/reporter/graphite.rb

1
lib/dyndnsd/updater/command_with_bind_zone.rb

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Dyndnsd
module Updater

3
lib/dyndnsd/version.rb

@ -1,4 +1,5 @@
# frozen_string_literal: true
module Dyndnsd
VERSION = '2.1.1'.freeze
VERSION = '2.1.1'
end

4
spec/daemon_spec.rb

@ -1,4 +1,6 @@
require 'spec_helper'
# frozen_string_literal: true
require_relative 'spec_helper'
describe Dyndnsd::Daemon do
include Rack::Test::Methods

6
spec/spec_helper.rb

@ -1,8 +1,10 @@
# frozen_string_literal: true
require 'rubygems'
require 'bundler/setup'
require 'rack/test'
require 'dyndnsd'
require 'support/dummy_database'
require 'support/dummy_updater'
require_relative 'support/dummy_database'
require_relative 'support/dummy_updater'

1
spec/support/dummy_database.rb

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'forwardable'

1
spec/support/dummy_updater.rb

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Dyndnsd
module Updater

Loading…
Cancel
Save