Skip to content

Commit

Permalink
👮 📝 fix rubocop issues and edit readme and gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
adham90 committed Jun 15, 2017
1 parent d015272 commit c4da134
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 40 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
AllCops:
Exclude:
- 'elasticsearch_reader.gemspec'
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# ElasticsearchReader

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/elasticsearch_reader`. To experiment with that code, run `bin/console` for an interactive prompt.

TODO: Delete this and the text above, and describe your gem
ElasticsearchReader is an ODM for Elasticsearch and query DSL in a OO style.

## Installation

Expand Down Expand Up @@ -32,7 +30,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/elasticsearch_reader. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
Bug reports and pull requests are welcome on GitHub at https://github.com/adham90/elasticsearch_reader. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.


## License
Expand Down
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "bundler/gem_tasks"
require "rspec/core/rake_task"
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec)

task :default => :spec
task default: :spec
6 changes: 3 additions & 3 deletions bin/console
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby

require "bundler/setup"
require "elasticsearch_reader"
require 'bundler/setup'
require 'elasticsearch_reader'

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
Expand All @@ -10,5 +10,5 @@ require "elasticsearch_reader"
# require "pry"
# Pry.start

require "irb"
require 'irb'
IRB.start(__FILE__)
36 changes: 14 additions & 22 deletions elasticsearch_reader.gemspec
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@
# coding: utf-8

lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'elasticsearch_reader/version'

Gem::Specification.new do |spec|
spec.name = "elasticsearch_reader"
spec.name = 'elasticsearch_reader'
spec.version = ElasticsearchReader::VERSION
spec.authors = ["adham90"]
spec.email = ["adham.eldeeb90@gmail.com"]

spec.summary = %q{TODO: Write a short summary, because Rubygems requires one.}
spec.description = %q{TODO: Write a longer description or delete this line.}
spec.homepage = "TODO: Put your gem's website or public repo URL here."
spec.license = "MIT"
spec.authors = ['adham90']
spec.email = ['adham.eldeeb90@gmail.com']

# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
# to allow pushing to a single host or delete this section to allow pushing to any host.
if spec.respond_to?(:metadata)
spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
else
raise "RubyGems 2.0 or newer is required to protect against " \
"public gem pushes."
end
spec.summary = 'Read-Only Elasticsearch ODM clinet wrapper'
spec.description = 'ElasticsearchReader ODM (Object Document Mapper) provides functionality for chainable query DSL in a OO style'
spec.homepage = 'https://github.com/adham90/elasticsearch_reader'
spec.license = 'MIT'

spec.files = `git ls-files -z`.split("\x0").reject do |f|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})
end
spec.bindir = "exe"
spec.bindir = 'exe'
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.require_paths = ['lib']

spec.add_development_dependency "bundler", "~> 1.14"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency 'bundler', '~> 1.14'
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'rspec', '~> 3.0'
end
2 changes: 1 addition & 1 deletion lib/elasticsearch_reader.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "elasticsearch_reader/version"
require 'elasticsearch_reader/version'

module ElasticsearchReader
# Your code goes here...
Expand Down
2 changes: 1 addition & 1 deletion lib/elasticsearch_reader/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ElasticsearchReader
VERSION = "0.1.0"
VERSION = '0.1.0'.freeze
end
6 changes: 3 additions & 3 deletions spec/elasticsearch_reader_spec.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
require "spec_helper"
require 'spec_helper'

RSpec.describe ElasticsearchReader do
it "has a version number" do
it 'has a version number' do
expect(ElasticsearchReader::VERSION).not_to be nil
end

it "does something useful" do
it 'does something useful' do
expect(false).to eq(true)
end
end
6 changes: 3 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
require "bundler/setup"
require "elasticsearch_reader"
require 'bundler/setup'
require 'elasticsearch_reader'

RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
config.example_status_persistence_file_path = ".rspec_status"
config.example_status_persistence_file_path = '.rspec_status'

config.expect_with :rspec do |c|
c.syntax = :expect
Expand Down

0 comments on commit c4da134

Please sign in to comment.