Skip to content

Commit

Permalink
Add changelog url to flipper gemspecs
Browse files Browse the repository at this point in the history
* gemspecs accept metadata for displaying links on RubyGems. This adds
a link to the changelog so RubyGems users can easily link to flipper's
changelog.

* For now we've decided to add the same changelog url to every gemspec,
but in the future it would be nice to have a separate changelog for each
gemspec
  • Loading branch information
AlexWheeler committed Jun 3, 2018
1 parent d759204 commit 2b4d3da
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flipper-active_record.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/flipper/version', __FILE__)
require File.expand_path('../lib/flipper/metadata', __FILE__)

flipper_active_record_files = lambda do |file|
file =~ /active_record/
Expand All @@ -22,6 +23,7 @@ Gem::Specification.new do |gem|
gem.name = 'flipper-active_record'
gem.require_paths = ['lib']
gem.version = Flipper::VERSION
gem.metadata = Flipper::METADATA

gem.add_dependency 'flipper', "~> #{Flipper::VERSION}"
gem.add_dependency 'activerecord', '>= 3.2', '< 6'
Expand Down
2 changes: 2 additions & 0 deletions flipper-active_support_cache_store.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/flipper/version', __FILE__)
require File.expand_path('../lib/flipper/metadata', __FILE__)

flipper_active_support_cache_store_files = lambda do |file|
file =~ /active_support_cache_store/
Expand All @@ -18,6 +19,7 @@ Gem::Specification.new do |gem|
gem.name = 'flipper-active_support_cache_store'
gem.require_paths = ['lib']
gem.version = Flipper::VERSION
gem.metadata = Flipper::METADATA

gem.add_dependency 'flipper', "~> #{Flipper::VERSION}"
gem.add_dependency 'activesupport', '>= 3.2', '< 6'
Expand Down
2 changes: 2 additions & 0 deletions flipper-api.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/flipper/version', __FILE__)
require File.expand_path('../lib/flipper/metadata', __FILE__)

flipper_api_files = lambda do |file|
file =~ %r{(flipper)[\/-]api}
Expand All @@ -17,6 +18,7 @@ Gem::Specification.new do |gem|
gem.name = 'flipper-api'
gem.require_paths = ['lib']
gem.version = Flipper::VERSION
gem.metadata = Flipper::METADATA

gem.add_dependency 'rack', '>= 1.4', '< 3'
gem.add_dependency 'flipper', "~> #{Flipper::VERSION}"
Expand Down
2 changes: 2 additions & 0 deletions flipper-cloud.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/flipper/version', __FILE__)
require File.expand_path('../lib/flipper/metadata', __FILE__)

flipper_cloud_files = lambda do |file|
file =~ /cloud/
Expand All @@ -21,6 +22,7 @@ Gem::Specification.new do |gem|
gem.name = 'flipper-cloud'
gem.require_paths = ['lib']
gem.version = Flipper::VERSION
gem.metadata = Flipper::METADATA

gem.add_dependency 'flipper', "~> #{Flipper::VERSION}"
end
2 changes: 2 additions & 0 deletions flipper-dalli.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/flipper/version', __FILE__)
require File.expand_path('../lib/flipper/metadata', __FILE__)

flipper_dalli_files = lambda do |file|
file =~ /dalli/
Expand All @@ -18,6 +19,7 @@ Gem::Specification.new do |gem|
gem.name = 'flipper-dalli'
gem.require_paths = ['lib']
gem.version = Flipper::VERSION
gem.metadata = Flipper::METADATA

gem.add_dependency 'flipper', "~> #{Flipper::VERSION}"
gem.add_dependency 'dalli', '>= 2.0', '< 3'
Expand Down
2 changes: 2 additions & 0 deletions flipper-mongo.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/flipper/version', __FILE__)
require File.expand_path('../lib/flipper/metadata', __FILE__)

flipper_mongo_files = lambda do |file|
file =~ /mongo/
Expand All @@ -18,6 +19,7 @@ Gem::Specification.new do |gem|
gem.name = 'flipper-mongo'
gem.require_paths = ['lib']
gem.version = Flipper::VERSION
gem.metadata = Flipper::METADATA

gem.add_dependency 'flipper', "~> #{Flipper::VERSION}"
gem.add_dependency 'mongo', '~> 2.0'
Expand Down
2 changes: 2 additions & 0 deletions flipper-redis.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/flipper/version', __FILE__)
require File.expand_path('../lib/flipper/metadata', __FILE__)

flipper_redis_files = lambda do |file|
file =~ /redis/
Expand All @@ -18,6 +19,7 @@ Gem::Specification.new do |gem|
gem.name = 'flipper-redis'
gem.require_paths = ['lib']
gem.version = Flipper::VERSION
gem.metadata = Flipper::METADATA

gem.add_dependency 'flipper', "~> #{Flipper::VERSION}"
gem.add_dependency 'redis', '>= 2.2', '< 4.1.0'
Expand Down
2 changes: 2 additions & 0 deletions flipper-rollout.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/flipper/version', __FILE__)
require File.expand_path('../lib/flipper/metadata', __FILE__)

flipper_rollout_files = lambda do |file|
file =~ /rollout/
Expand All @@ -18,6 +19,7 @@ Gem::Specification.new do |gem|
gem.name = 'flipper-rollout'
gem.require_paths = ['lib']
gem.version = Flipper::VERSION
gem.metadata = Flipper::METADATA

gem.add_dependency 'flipper', "~> #{Flipper::VERSION}"
gem.add_dependency 'redis', '>= 2.2', '< 4.1.0'
Expand Down
2 changes: 2 additions & 0 deletions flipper-sequel.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/flipper/version', __FILE__)
require File.expand_path('../lib/flipper/metadata', __FILE__)

flipper_sequel_files = ->(file) { file =~ /sequel/ }

Expand All @@ -19,6 +20,7 @@ Gem::Specification.new do |gem|
gem.name = 'flipper-sequel'
gem.require_paths = ['lib']
gem.version = Flipper::VERSION
gem.metadata = Flipper::METADATA

gem.add_dependency 'flipper', "~> #{Flipper::VERSION}"
gem.add_dependency 'sequel', '>= 4.0.0', '< 5'
Expand Down
2 changes: 2 additions & 0 deletions flipper-ui.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/flipper/version', __FILE__)
require File.expand_path('../lib/flipper/metadata', __FILE__)

flipper_ui_files = lambda do |file|
file =~ %r{(docs|examples|flipper)[\/-]ui}
Expand All @@ -18,6 +19,7 @@ Gem::Specification.new do |gem|
gem.name = 'flipper-ui'
gem.require_paths = ['lib']
gem.version = Flipper::VERSION
gem.metadata = Flipper::METADATA

gem.add_dependency 'rack', '>= 1.4', '< 3'
gem.add_dependency 'rack-protection', '>= 1.5.3', '< 2.1.0'
Expand Down
2 changes: 2 additions & 0 deletions flipper.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/flipper/version', __FILE__)
require File.expand_path('../lib/flipper/metadata', __FILE__)

plugin_files = []
plugin_test_files = []
Expand Down Expand Up @@ -34,4 +35,5 @@ Gem::Specification.new do |gem|
gem.name = 'flipper'
gem.require_paths = ['lib']
gem.version = Flipper::VERSION
gem.metadata = Flipper::METADATA
end
5 changes: 5 additions & 0 deletions lib/flipper/metadata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module Flipper
METADATA = {
'changelog_uri' => 'https://github.com/jnunemaker/flipper/blob/master/Changelog.md',
}.freeze
end

0 comments on commit 2b4d3da

Please sign in to comment.