Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try to restructure fcm client #107

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
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
3 changes: 3 additions & 0 deletions .hound.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rubocop:
config_file: .rubocop.yml
fail_on_violations: true
37 changes: 37 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# default rule used by hound
# @see https://github.com/houndci/hound/blob/master/.rubocop.yml
require: rubocop-rspec

AllCops:
Exclude:
- spec/spec_helper.rb
- vendor/**/*
- fcm.gemspec
- Gemfile
- Rakefile
- lib/fcm.rb

Metrics/LineLength:
Description: 'Limit lines to 85 characters.'
StyleGuide: '#80-character-limits'
Max: 85
Enabled: true

Metrics/MethodLength:
Description: 'Avoid methods longer than 25 lines of code.'
StyleGuide: '#short-methods'
Max: 25
Enabled: true

Metrics/BlockLength:
Exclude:
- spec/fcm_spec.rb

RSpec/MultipleMemoizedHelpers:
Max: 10

RSpec/ExampleLength:
Max: 15

RSpec/MultipleMemoizedHelpers:
Max: 15
21 changes: 16 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
source "https://rubygems.org"
source 'https://rubygems.org'
gemspec

gem 'rake'
gem 'rspec'
gem 'webmock'
gem 'ci_reporter_rspec'
gem 'faraday'
gem 'faraday-retry'
gem 'faraday-typhoeus'
gem 'googleauth'
gem 'rake'

group :development, :test do
gem 'ci_reporter_rspec'
gem 'pry-byebug'
gem 'rspec'
gem 'rubocop'
gem 'rubocop-rspec', require: false
gem 'simplecov', require: false
gem 'webmock'
gem 'yard'
end
8 changes: 4 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
require 'rspec/core/rake_task'
require "bundler/gem_tasks"
require "rake/tasklib"
require 'bundler/gem_tasks'
require 'rake/tasklib'
require 'ci/reporter/rake/rspec'

RSpec::Core::RakeTask.new(:spec => ["ci:setup:rspec"]) do |t|
RSpec::Core::RakeTask.new(spec: ['ci:setup:rspec']) do |t|
t.pattern = 'spec/**/*_spec.rb'
end

Expand All @@ -12,4 +12,4 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
spec.rspec_opts = ['--format documentation']
end

task :default => :spec
task default: :spec
30 changes: 15 additions & 15 deletions fcm.gemspec
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

require 'fcm/version'

Gem::Specification.new do |s|
s.name = "fcm"
s.version = "1.0.8"
s.name = 'fcm'
s.version = Fcm::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Kashif Rasul", "Shoaib Burq"]
s.email = ["kashif@decision-labs.com", "shoaib@decision-labs.com"]
s.homepage = "https://github.com/decision-labs/fcm"
s.authors = ['Kashif Rasul', 'Shoaib Burq']
s.email = ['kashif@decision-labs.com', 'shoaib@decision-labs.com']
s.homepage = 'https://github.com/decision-labs/fcm'
s.summary = %q{Reliably deliver messages and notifications via FCM}
s.description = %q{fcm provides ruby bindings to Firebase Cloud Messaging (FCM) a cross-platform messaging solution that lets you reliably deliver messages and notifications at no cost to Android, iOS or Web browsers.}
s.license = "MIT"

s.required_ruby_version = ">= 2.4.0"
s.license = 'MIT'

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
s.require_paths = ["lib"]
s.required_ruby_version = '>= 2.4.0'

s.add_runtime_dependency("faraday", ">= 1.0.0", "< 3.0")
s.add_runtime_dependency("googleauth", "~> 1")
s.files = `git ls-files`.split('\n')
s.test_files = `git ls-files -- {test,spec,features}/*`.split('\n')
s.executables = `git ls-files -- bin/*`.split('\n').map { |f| File.basename(f) }
s.require_paths = ['lib']
end
Loading