Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.
Open
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
65 changes: 65 additions & 0 deletions .github/workflows/gem_push_beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: tire branch

on: [pull_request]

env:
BUNDLER_ACCESS_TOKEN: ${{ secrets.TECH_OPS_ACCESS_TOKEN }}

jobs:
build:
name: Test + Build + Publish
runs-on: ubuntu-16.04
env:
BUNDLER_ACCESS_TOKEN: ${{ secrets.TECH_OPS_ACCESS_TOKEN }}

services:
mongo:
image: mongo:2.4.14
ports:
- 27017:27017
redis:
image: redis:4-alpine
ports:
- 6379:6379

steps:
- uses: actions/checkout@v2

- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1

- name: Login To Google Container Registry
uses: azure/docker-login@v1
with:
login-server: gcr.io
username: _json_key
password: ${{ secrets.CONTAINER_REGISTRY_CREDENTIALS }}

- name: Start ElasticSearch
run: docker run -d -p 9200:9200 gcr.io/cn-reg/devops/elasticsearch:0.90.5-2-dev

- name: Configure Gem Cache
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-

- name: Setup Tests
run: |
gem install bundler:1.17.3
bundle config rubygems.pkg.github.com x-access-token:$BUNDLER_ACCESS_TOKEN
make setup

- name: Test
run: make test

- name: Publish to GPR
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: Bearer ${{ secrets.GITHUB_TOKEN }}\n" > $HOME/.gem/credentials
SC_PRERELEASE=true gem build *.gemspec
gem push -v --KEY github --host https://rubygems.pkg.github.com/sittercity *.gem
5 changes: 3 additions & 2 deletions .github/workflows/gem_push_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.5
uses: actions/setup-ruby@v1

- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1

- name: Publish to GPR
run: |
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.1
2.7.2
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
GEM_NAME = tire
GEM_SPEC = $(GEM_NAME).gemspec
GEM_VERSION = $(shell ruby -e 'puts Gem::Specification.load("$(GEM_SPEC)").version')
GEM = $(GEM_NAME)-$(GEM_VERSION).gem

dist: $(GEM)

$(GEM): $(GEM_SPEC)
gem build $(GEM_SPEC)

setup:
bundle install
mkdir -p log

.PHONY: setup

test:
bundle exec rspec

clean:
rm -f *.gem
4 changes: 2 additions & 2 deletions lib/tire/version.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module Tire
VERSION = "1.0.0"
VERSION = "2.0.0"

CHANGELOG =<<-END
IMPORTANT CHANGES LATELY:
UPDATE TO RUBY 2.5
UPDATE TO RUBY 2.7.2
END
end
8 changes: 7 additions & 1 deletion tire.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@
$:.push File.expand_path("../lib", __FILE__)
require "tire/version"

prerelease = ENV['SC_PRERELEASE'] == 'true'

Gem::Specification.new do |s|
s.name = "tire"
s.version = Tire::VERSION
s.version = if prerelease
"#{Tire::VERSION}.pre#{Time.now.to_i}"
else
Tire::VERSION
end
s.platform = Gem::Platform::RUBY
s.summary = "Ruby client for Elasticsearch"
s.homepage = "http://github.com/karmi/tire"
Expand Down