Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@ on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.3', '3.4', '4.0']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- run: bundle install
- run: bundle exec rspec
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
ruby-version: '4.0'
bundler-cache: true
- run: bundle install
- run: bundle exec rubocop
8 changes: 4 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
require:
- rubocop-performance

AllCops:
NewCops: enable
TargetRubyVersion: 2.6
SuggestExtensions: false

plugins:
- rubocop-performance
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.2
4.0.1
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

## [1.1.0] - 2026-02-11

### Breaking Changes
- Now requires Faraday 2.x (previously supported Faraday 1.x)
- Dropped support for Ruby versions older than 3.3. Officially supported versions are Ruby 3.3, 3.4, and 4.0.
11 changes: 11 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.0', '< 5.0'
gem 'debug', '~> 1.0'
gem 'dotenv', '~> 2.7'
gem 'rake', '~> 13.0'
gem 'rspec', '~> 3.0'
gem 'rubocop', '~> 1.0'
gem 'rubocop-performance', '~> 1.0'
gem 'webmock', '~> 3.0'
end
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Ruby client for interacting with the [ActionNetwork REST API](https://actionnetw

[![CI Status](https://github.com/controlshift/action-network-rest/actions/workflows/ci.yml/badge.svg)](https://github.com/controlshift/action-network-rest/actions/workflows/ci.yml)

## Requirements

- Ruby 3.3, 3.4, or 4.0
- Faraday ~> 2.0

## Installation

Add this line to your application's Gemfile:
Expand Down
18 changes: 6 additions & 12 deletions action_network_rest.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ require 'action_network_rest/version'
Gem::Specification.new do |spec|
spec.name = 'action_network_rest'
spec.version = ActionNetworkRest::VERSION
spec.authors = ['Grey Moore']
spec.email = ['grey@controlshiftlabs.com']
spec.authors = ['Grey Moore', 'Owens Ehimen', 'Diego Marcet']
spec.email = ['talk@controlshiftlabs.com']

spec.summary = 'Ruby client for interacting with the ActionNetwork REST API'
spec.homepage = 'https://github.com/controlshift/action-network-rest'
Expand All @@ -21,17 +21,11 @@ Gem::Specification.new do |spec|
end
spec.require_paths = ['lib']

spec.required_ruby_version = '>= 2.6'
spec.required_ruby_version = ['>= 3.3', '< 5.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'

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
1 change: 0 additions & 1 deletion bin/rake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion bin/rspec
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions lib/action_network_rest.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

require 'vertebrae'
require 'faraday/mashify'

module ActionNetworkRest
extend Vertebrae::Base
Expand Down
4 changes: 0 additions & 4 deletions lib/action_network_rest/advocacy_campaigns.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

module ActionNetworkRest
class AdvocacyCampaigns < Base
def initialize(client:)
super(client: client)
end

def base_path
'advocacy_campaigns/'
end
Expand Down
4 changes: 0 additions & 4 deletions lib/action_network_rest/campaigns.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/action_network_rest/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions lib/action_network_rest/forms.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

module ActionNetworkRest
class Forms < Base
def initialize(client:)
super(client: client)
end

def base_path
'forms/'
end
Expand Down
2 changes: 1 addition & 1 deletion lib/action_network_rest/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ActionNetworkRest
VERSION = '1.0.1'
VERSION = '1.1.0'
end
4 changes: 2 additions & 2 deletions spec/people_spec.rb
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To fix a rubocop error

Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
{
_embedded: {
'osdi:people': [
identifiers: ["action_network:#{person_id}"]
{ identifiers: ["action_network:#{person_id}"] }
]
}
}.to_json
Expand Down Expand Up @@ -265,7 +265,7 @@
{
_embedded: {
'osdi:people': [
identifiers: ["action_network:#{person_id}"]
{ identifiers: ["action_network:#{person_id}"] }
]
}
}.to_json
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down