diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89d3af6..78319ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1 + ruby-version: 4.0 bundler-cache: true - run: bundle install - run: bundle exec rspec @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1 + ruby-version: 4.0 bundler-cache: true - run: bundle install - run: bundle exec rubocop diff --git a/.rubocop.yml b/.rubocop.yml index bcfe7df..099c0e3 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,9 +1,10 @@ -require: - - rubocop-performance - AllCops: NewCops: enable - TargetRubyVersion: 2.6 + TargetRubyVersion: 4.0 + SuggestExtensions: false + +plugins: + - rubocop-performance Metrics/AbcSize: Enabled: false Metrics/BlockLength: @@ -16,3 +17,5 @@ Naming/MemoizedInstanceVariableName: Enabled: false Style/Documentation: Enabled: false +Style/HashAsLastArrayItem: + Enabled: false diff --git a/.ruby-version b/.ruby-version index be94e6f..1454f6e 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.2.2 +4.0.1 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..17f7bef --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +## [1.1.0] - 2026-02-11 + +### Added +- Added `faraday ~> 2.0` as explicit runtime dependency +- Added `faraday-mashify ~> 1.0` as explicit runtime dependency +- Added `require 'faraday/mashify'` to main library file + +### Upgrades +- Upgraded from Ruby 3.2.2 to Ruby 4.0.1 +- Updated vertebrae dependency to >= 1.0.5 +- Updated bundler development dependency to >= 2.1 (from ~> 2.1) \ No newline at end of file diff --git a/Gemfile b/Gemfile index 6d0d94f..5b7b722 100644 --- a/Gemfile +++ b/Gemfile @@ -6,3 +6,14 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } # Specify your gem's dependencies in action_network_rest.gemspec gemspec + +group :development do + gem 'bundler', '>= 2.1' + gem 'debug', '> 0' + gem 'dotenv', '~> 2.7' + gem 'rake', '~> 13.0' + gem 'rspec', '~> 3.0' + gem 'rubocop', '> 0' + gem 'rubocop-performance', '> 0' + gem 'webmock', '~> 3.8.3' +end diff --git a/action_network_rest.gemspec b/action_network_rest.gemspec index e11399d..b42fb80 100644 --- a/action_network_rest.gemspec +++ b/action_network_rest.gemspec @@ -21,17 +21,11 @@ Gem::Specification.new do |spec| end spec.require_paths = ['lib'] - spec.required_ruby_version = '>= 2.6' + spec.required_ruby_version = '>= 4.0.0' - spec.add_runtime_dependency 'vertebrae', '>= 1.0.0' + spec.add_dependency 'faraday', '~> 2.0' + spec.add_dependency 'faraday-mashify', '~> 1.0' + spec.add_dependency 'vertebrae', '>= 1.0.5' - spec.add_development_dependency 'bundler', '~> 2.1' - spec.add_development_dependency 'debug', '> 0' - spec.add_development_dependency 'dotenv', '~> 2.7' - spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rspec', '~> 3.0' - spec.add_development_dependency 'rubocop', '> 0' - spec.add_development_dependency 'rubocop-performance', '> 0' - spec.add_development_dependency 'webmock', '~> 3.8.3' spec.metadata['rubygems_mfa_required'] = 'true' end diff --git a/bin/rake b/bin/rake index 9c4fca6..ed705ab 100755 --- a/bin/rake +++ b/bin/rake @@ -8,7 +8,6 @@ # this file is here to facilitate running it. # -require 'pathname' ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', Pathname.new(__FILE__).realpath) diff --git a/bin/rspec b/bin/rspec index e6dd588..956b1d8 100755 --- a/bin/rspec +++ b/bin/rspec @@ -8,7 +8,6 @@ # this file is here to facilitate running it. # -require 'pathname' ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', Pathname.new(__FILE__).realpath) diff --git a/lib/action_network_rest.rb b/lib/action_network_rest.rb index 309c8c9..34f508d 100644 --- a/lib/action_network_rest.rb +++ b/lib/action_network_rest.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'vertebrae' +require 'faraday/mashify' module ActionNetworkRest extend Vertebrae::Base diff --git a/lib/action_network_rest/advocacy_campaigns.rb b/lib/action_network_rest/advocacy_campaigns.rb index 34d4aec..2f3ae6c 100644 --- a/lib/action_network_rest/advocacy_campaigns.rb +++ b/lib/action_network_rest/advocacy_campaigns.rb @@ -2,10 +2,6 @@ module ActionNetworkRest class AdvocacyCampaigns < Base - def initialize(client:) - super(client: client) - end - def base_path 'advocacy_campaigns/' end diff --git a/lib/action_network_rest/campaigns.rb b/lib/action_network_rest/campaigns.rb index 1bd36d7..20dc28c 100644 --- a/lib/action_network_rest/campaigns.rb +++ b/lib/action_network_rest/campaigns.rb @@ -4,10 +4,6 @@ module ActionNetworkRest class Campaigns < Base attr_accessor :campaign_id - def initialize(client:) - super(client: client) - end - def base_path 'campaigns/' end diff --git a/lib/action_network_rest/client.rb b/lib/action_network_rest/client.rb index b243e89..265c082 100644 --- a/lib/action_network_rest/client.rb +++ b/lib/action_network_rest/client.rb @@ -4,9 +4,9 @@ module ActionNetworkRest class Client < API attr_accessor :api_key - def initialize(options = {}, &block) + def initialize(options = {}, &) self.api_key = options[:api_key] - super(options, &block) + super end def default_options diff --git a/lib/action_network_rest/forms.rb b/lib/action_network_rest/forms.rb index 0a1de37..80de9e5 100644 --- a/lib/action_network_rest/forms.rb +++ b/lib/action_network_rest/forms.rb @@ -2,10 +2,6 @@ module ActionNetworkRest class Forms < Base - def initialize(client:) - super(client: client) - end - def base_path 'forms/' end diff --git a/lib/action_network_rest/version.rb b/lib/action_network_rest/version.rb index b0c4dfb..f51ed95 100644 --- a/lib/action_network_rest/version.rb +++ b/lib/action_network_rest/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ActionNetworkRest - VERSION = '1.0.1' + VERSION = '1.1.0' end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 102adb9..158d6ef 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,7 +5,7 @@ require 'webmock/rspec' # Require everything in the `support` directory -Dir[File.join(File.dirname(__FILE__), 'support', '**', '*.rb')].sort.each { |f| require f } +Dir[File.join(File.dirname(__FILE__), 'support', '**', '*.rb')].each { |f| require f } RSpec.configure do |config| # Enable flags like --only-failures and --next-failure