Skip to content

Commit

Permalink
Merge pull request #3 from TailorBrands/api-v2
Browse files Browse the repository at this point in the history
Api v2
  • Loading branch information
nadavshatz committed Dec 9, 2015
2 parents cf175df + 63216ff commit b39f213
Show file tree
Hide file tree
Showing 12 changed files with 293 additions and 53 deletions.
2 changes: 2 additions & 0 deletions .hound.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ruby:
config_file: .ruby-style.yml
233 changes: 233 additions & 0 deletions .ruby-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
AllCops:
Exclude:
- "vendor/**/*"
- "db/schema.rb"
UseCache: false
Style/CollectionMethods:
Description: Preferred collection methods.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
Enabled: true
PreferredMethods:
collect: map
collect!: map!
find: detect
find_all: select
reduce: inject
Style/DotPosition:
Description: Checks the position of the dot in multi-line method calls.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
Enabled: true
EnforcedStyle: trailing
SupportedStyles:
- leading
- trailing
Style/FileName:
Description: Use snake_case for source file names.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
Enabled: false
Exclude: []
Style/GuardClause:
Description: Check for conditionals that can be replaced with guard clauses
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
Enabled: false
MinBodyLength: 1
Style/IfUnlessModifier:
Description: Favor modifier if/unless usage when you have a single-line body.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
Enabled: false
MaxLineLength: 120
Style/OptionHash:
Description: Don't use option hashes when you can use keyword arguments.
Enabled: false
Style/PercentLiteralDelimiters:
Description: Use `%`-literal delimiters consistently
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
Enabled: false
PreferredDelimiters:
"%": "()"
"%i": "()"
"%q": "()"
"%Q": "()"
"%r": "{}"
"%s": "()"
"%w": "()"
"%W": "()"
"%x": "()"
Style/PredicateName:
Description: Check the names of predicate methods.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
Enabled: true
NamePrefix:
- is_
- has_
- have_
NamePrefixBlacklist:
- is_
Exclude:
- spec/**/*
Style/RaiseArgs:
Description: Checks the arguments passed to raise/fail.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
Enabled: false
EnforcedStyle: exploded
SupportedStyles:
- compact
- exploded
Style/SignalException:
Description: Checks for proper usage of fail and raise.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
Enabled: false
EnforcedStyle: semantic
SupportedStyles:
- only_raise
- only_fail
- semantic
Style/SingleLineBlockParams:
Description: Enforces the names of some block params.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
Enabled: false
Methods:
- reduce:
- a
- e
- inject:
- a
- e
Style/SingleLineMethods:
Description: Avoid single-line methods.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
Enabled: false
AllowIfMethodIsEmpty: true
Style/StringLiterals:
Description: Checks if uses of quotes match the configured preference.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
Enabled: true
EnforcedStyle: double_quotes
SupportedStyles:
- single_quotes
- double_quotes
Style/StringLiteralsInInterpolation:
Description: Checks if uses of quotes inside expressions in interpolated strings
match the configured preference.
Enabled: true
EnforcedStyle: single_quotes
SupportedStyles:
- single_quotes
- double_quotes
Style/TrailingComma:
Description: Checks for trailing comma in parameter lists and literals.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
Enabled: false
EnforcedStyleForMultiline: no_comma
SupportedStyles:
- comma
- no_comma
Metrics/AbcSize:
Description: A calculated magnitude based on number of assignments, branches, and
conditions.
Enabled: false
Max: 15
Metrics/ClassLength:
Description: Avoid classes longer than 100 lines of code.
Enabled: false
CountComments: false
Max: 100
Metrics/ModuleLength:
CountComments: false
Max: 100
Description: Avoid modules longer than 100 lines of code.
Enabled: false
Metrics/CyclomaticComplexity:
Description: A complexity metric that is strongly correlated to the number of test
cases needed to validate a method.
Enabled: false
Max: 6
Metrics/MethodLength:
Description: Avoid methods longer than 10 lines of code.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
Enabled: false
CountComments: false
Max: 10
Metrics/ParameterLists:
Description: Avoid parameter lists longer than three or four parameters.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
Enabled: false
Max: 5
CountKeywordArgs: true
Metrics/PerceivedComplexity:
Description: A complexity metric geared towards measuring complexity for a human
reader.
Enabled: false
Max: 7
Lint/AssignmentInCondition:
Description: Don't use assignment in conditions.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
Enabled: false
AllowSafeAssignment: true
Style/InlineComment:
Description: Avoid inline comments.
Enabled: false
Style/AccessorMethodName:
Description: Check the naming of accessor methods for get_/set_.
Enabled: false
Style/Alias:
Description: Use alias_method instead of alias.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
Enabled: false
Style/Documentation:
Description: Document classes and non-namespace modules.
Enabled: false
Style/DoubleNegation:
Description: Checks for uses of double negation (!!).
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
Enabled: false
Style/EachWithObject:
Description: Prefer `each_with_object` over `inject` or `reduce`.
Enabled: false
Style/EmptyLiteral:
Description: Prefer literals to Array.new/Hash.new/String.new.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
Enabled: false
Style/ModuleFunction:
Description: Checks for usage of `extend self` in modules.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
Enabled: false
Style/OneLineConditional:
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
Enabled: false
Style/PerlBackrefs:
Description: Avoid Perl-style regex back references.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
Enabled: false
Style/Send:
Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
may overlap with existing methods.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
Enabled: false
Style/SpecialGlobalVars:
Description: Avoid Perl-style global variables.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
Enabled: false
Style/VariableInterpolation:
Description: Don't interpolate global, instance and class variables directly in
strings.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
Enabled: false
Style/WhenThen:
Description: Use when x then ... for one-line cases.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
Enabled: false
Lint/EachWithObjectArgument:
Description: Check for immutable argument given to each_with_object.
Enabled: true
Lint/HandleExceptions:
Description: Don't suppress exception.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
Enabled: false
Lint/LiteralInCondition:
Description: Checks of literals used in conditions.
Enabled: false
Lint/LiteralInInterpolation:
Description: Checks for literals used in interpolation.
Enabled: false
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.2.3
6 changes: 3 additions & 3 deletions .semver
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
:major: 0
:minor: 1
:patch: 4
:major: 1
:minor: 0
:patch: 0
:special: ''
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: ruby
jdk:
- oraclejdk8
rvm:
- "1.9.3"
- "2.2.3"
- "jruby-9.0.4.0"
- rbx
notifications:
email: false
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ gem 'faker', group: :test
gem 'rake', group: :test
gem 'rspec', group: :test
gem 'pry', group: :development
gem 'semver'
gem 'semver', group: :development

gem 'rspec_junit_formatter', github: 'circleci/rspec_junit_formatter', group: :test
gem 'codeclimate-test-reporter', group: :test, require: nil
50 changes: 21 additions & 29 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,33 +1,23 @@
GIT
remote: git://github.com/circleci/rspec_junit_formatter.git
revision: 7b098c8ab2ac5e5f78190b51629ed6d67a9de4d1
specs:
rspec_junit_formatter (0.2.0)
builder (< 4)
rspec (>= 2, < 4)
rspec-core (!= 2.12.0)

GEM
remote: http://rubygems.org/
specs:
builder (3.2.2)
codeclimate-test-reporter (0.4.7)
codeclimate-test-reporter (0.4.8)
simplecov (>= 0.7.1, < 1.0.0)
coderay (1.1.0)
diff-lcs (1.2.5)
docile (1.1.5)
domain_name (0.5.24)
domain_name (0.5.25)
unf (>= 0.0.5, < 1.0.0)
faker (1.4.3)
faker (1.6.1)
i18n (~> 0.5)
http-cookie (1.0.2)
domain_name (~> 0.5)
i18n (0.7.0)
json (1.8.3)
method_source (0.8.2)
mime-types (2.6.1)
netrc (0.10.3)
pry (0.10.1)
mime-types (2.99)
netrc (0.11.0)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
Expand All @@ -36,21 +26,21 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rspec (3.2.0)
rspec-core (~> 3.2.0)
rspec-expectations (~> 3.2.0)
rspec-mocks (~> 3.2.0)
rspec-core (3.2.3)
rspec-support (~> 3.2.0)
rspec-expectations (3.2.1)
rspec (3.4.0)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-core (3.4.1)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-mocks (3.2.1)
rspec-support (~> 3.4.0)
rspec-mocks (3.4.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-support (3.2.2)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
semver (1.0.1)
simplecov (0.10.0)
simplecov (0.11.1)
docile (~> 1.1.0)
json (~> 1.8)
simplecov-html (~> 0.10.0)
Expand All @@ -70,5 +60,7 @@ DEPENDENCIES
rake
rest-client
rspec
rspec_junit_formatter!
semver

BUNDLED WITH
1.10.6
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ The Meaning Cloud Ruby API Wrapper
A Ruby API wrapper for [Meaning Cloud](https://www.meaningcloud.com/) [API's](https://www.meaningcloud.com/developer/getting-started)

[![Gem Version](https://badge.fury.io/rb/meaning-cloud.svg)](http://badge.fury.io/rb/meaning-cloud)[![Dependency Status](https://gemnasium.com/TailorBrands/meaning-cloud.svg)](https://gemnasium.com/TailorBrands/meaning-cloud)
[![Circle CI](https://circleci.com/gh/TailorBrands/meaning-cloud/tree/master.svg?style=svg)](https://circleci.com/gh/TailorBrands/meaning-cloud/tree/master) [![Code Climate](https://codeclimate.com/github/TailorBrands/meaning-cloud/badges/gpa.svg)](https://codeclimate.com/github/TailorBrands/meaning-cloud) [![Test Coverage](https://codeclimate.com/github/TailorBrands/meaning-cloud/badges/coverage.svg)](https://codeclimate.com/github/TailorBrands/meaning-cloud)
[![Build Status](https://travis-ci.org/TailorBrands/meaning-cloud.svg)](https://travis-ci.org/TailorBrands/meaning-cloud) [![Code Climate](https://codeclimate.com/github/TailorBrands/meaning-cloud/badges/gpa.svg)](https://codeclimate.com/github/TailorBrands/meaning-cloud) [![Test Coverage](https://codeclimate.com/github/TailorBrands/meaning-cloud/badges/coverage.svg)](https://codeclimate.com/github/TailorBrands/meaning-cloud)

```rb
gem "meaning-cloud", "~> 0.1.4"
gem "meaning-cloud", "~> 1.0.0"
```

## Missing
Expand All @@ -34,7 +34,7 @@ end
```rb
result = MeaningCloud::Topics.extract_topics(txt: 'The most amazing text in the world') # Returns a hash of the parsed JSON result.
```
Source [source](https://www.meaningcloud.com/developer/topics-extraction/doc/1.2/examples)
Source [source](https://www.meaningcloud.com/developer/topics-extraction/doc/2.0/examples)

## Disclaimer

Expand Down
9 changes: 0 additions & 9 deletions circle.yml

This file was deleted.

Loading

0 comments on commit b39f213

Please sign in to comment.