inflect 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +78 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/inflect +5 -0
- data/bin/setup +7 -0
- data/inflect.gemspec +37 -0
- data/lib/generators/service_generator.rb +18 -0
- data/lib/generators/templates/service.tt +20 -0
- data/lib/inflect/abstract_service.rb +51 -0
- data/lib/inflect/configuration.rb +24 -0
- data/lib/inflect/director.rb +32 -0
- data/lib/inflect/i18n.rb +12 -0
- data/lib/inflect/inflector.rb +13 -0
- data/lib/inflect/loader.rb +34 -0
- data/lib/inflect/locale/en.yml +5 -0
- data/lib/inflect/response.rb +64 -0
- data/lib/inflect/responsive.rb +39 -0
- data/lib/inflect/version.rb +3 -0
- data/lib/inflect.rb +18 -0
- metadata +142 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 53be0693b9edb25da2858481d98e9320a8ee773e
|
4
|
+
data.tar.gz: cb1efab2840feceaf9b8f4119295b10f343239df
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 59c2e062d1e474d70c7fb041ddf8a1d53012ad5cdcb8ae2d1ce5e7f58a7016f3c9dcaa006bce78f959bf8704326e71c7d9603b3ccf30ef5f71e06be392d56b9f
|
7
|
+
data.tar.gz: 6377e0c791fcdea3f0d41720f32fed16109c6f9e43768bd1c78fc0fa94778b2b8531d3c1c6eb8f29047f9838e843e7336ebf64498a8b5a952d395fe2de2a9376
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Santiago Figueiras
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
# Inflect
|
2
|
+
|
3
|
+
The micro-framework for service integration.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'inflect'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install inflect
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
Generate your Service:
|
24
|
+
|
25
|
+
$ bin/inflect generate:service weather
|
26
|
+
|
27
|
+
Implement at least the ServiceWeather#handle method:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
class WeatherService < Inflect::AbstractService
|
31
|
+
def initialize
|
32
|
+
@priority = 2
|
33
|
+
@words = %W[WEATHER TODAY]
|
34
|
+
end
|
35
|
+
|
36
|
+
def handle(words)
|
37
|
+
respond "Weather for today is... very hot."
|
38
|
+
end
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
42
|
+
Call Inflect with the array of words.
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
words = %W[WEATHER TODAY]
|
46
|
+
|
47
|
+
Inflect.handle(words) # Return Response object with weather for today
|
48
|
+
```
|
49
|
+
|
50
|
+
## Development
|
51
|
+
|
52
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
53
|
+
|
54
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
55
|
+
|
56
|
+
## Contributing
|
57
|
+
|
58
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/inflect.
|
59
|
+
We follow the Ruby best practices and community-driven standards well explained in bbatsov's ruby-style-guide, see https://github.com/bbatsov/ruby-style-guide.
|
60
|
+
|
61
|
+
## Docs
|
62
|
+
|
63
|
+
To generate docs run (if not installed):
|
64
|
+
|
65
|
+
```ruby
|
66
|
+
gem install yard
|
67
|
+
```
|
68
|
+
Then to generate the docs:
|
69
|
+
|
70
|
+
$ yardoc
|
71
|
+
|
72
|
+
To run doc server:
|
73
|
+
|
74
|
+
$ yard server
|
75
|
+
|
76
|
+
## License
|
77
|
+
|
78
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "inflect"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/inflect
ADDED
data/bin/setup
ADDED
data/inflect.gemspec
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'inflect/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "inflect"
|
8
|
+
spec.version = Inflect::VERSION
|
9
|
+
spec.authors = ["Santiago Figueiras",
|
10
|
+
"Gastón Ambrogi"]
|
11
|
+
spec.email = ["santi.figueiras95@gmail.com",
|
12
|
+
"gastom.ambrogi@gmail.com"]
|
13
|
+
|
14
|
+
spec.summary = %q{Backend service API support for the inflect-client app.}
|
15
|
+
spec.description = %q{Integrate service API's by following a simple and modular interface.}
|
16
|
+
spec.license = "MIT"
|
17
|
+
spec.homepage = "https://github.com/InflectProject/inflect"
|
18
|
+
|
19
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
20
|
+
# delete this section to allow pushing this gem to any host.
|
21
|
+
if spec.respond_to?(:metadata)
|
22
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
23
|
+
else
|
24
|
+
raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
25
|
+
end
|
26
|
+
|
27
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
28
|
+
spec.bindir = "bin"
|
29
|
+
spec.executables = ["inflect"]
|
30
|
+
spec.require_paths = ["lib"]
|
31
|
+
|
32
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
33
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
34
|
+
spec.add_development_dependency "minitest", "~> 5.8"
|
35
|
+
spec.add_development_dependency "pry", "~> 0.10.1"
|
36
|
+
spec.add_runtime_dependency "thor", "~> 0.19.1"
|
37
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require "thor"
|
2
|
+
|
3
|
+
class ServiceGenerator < Thor::Group
|
4
|
+
include Thor::Actions
|
5
|
+
|
6
|
+
def self.source_root
|
7
|
+
File.join(File.dirname(__FILE__), 'templates')
|
8
|
+
end
|
9
|
+
|
10
|
+
argument :name
|
11
|
+
def generate
|
12
|
+
template('service.tt', "lib/services/#{name}_service.rb")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
class CLI < Thor
|
17
|
+
register ServiceGenerator, "generate:service", "generate:service <service_name>", "Generates a service skeleton."
|
18
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class <%=name.capitalize%>Service < Inflect::AbstractService
|
2
|
+
# A WORDS Array constant with the key words of the Service.
|
3
|
+
# @example Array for New York Times service
|
4
|
+
# words = %W[ NEWS TODAY NEW\ YORK\ TIMES]
|
5
|
+
|
6
|
+
# In case there are modules that provide similar contents the
|
7
|
+
# one with most PRIORITY is picked.
|
8
|
+
# Float::Infinity is the lowest priority.
|
9
|
+
def initialize
|
10
|
+
@priority = Float::INFINITY
|
11
|
+
@words = %W[]
|
12
|
+
end
|
13
|
+
|
14
|
+
# This is method is the only one needed for Inflect to work.
|
15
|
+
# Implements how the service responds at the translated words.
|
16
|
+
# Returns a Inflect::Response with retrieved data.
|
17
|
+
def handle(words)
|
18
|
+
super
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'singleton'
|
2
|
+
require 'inflect/responsive'
|
3
|
+
|
4
|
+
module Inflect
|
5
|
+
# Acts as an specification or standard required for a Service
|
6
|
+
# Class to be consumed by the application. A Service Class is
|
7
|
+
# just a wrapper for any possible service you'd like to give
|
8
|
+
# support to, just by having four prerequisites.
|
9
|
+
class AbstractService
|
10
|
+
include Comparable
|
11
|
+
include Singleton
|
12
|
+
include Responsive
|
13
|
+
|
14
|
+
# A +words+ Array constant with the key +words+ of the Service.
|
15
|
+
# @example Array for New York Times service
|
16
|
+
# words = %W[ NEWS TODAY NEW\ YORK\ TIMES]
|
17
|
+
attr_reader :words
|
18
|
+
|
19
|
+
# In case there are modules that provide similar contents the
|
20
|
+
# one with most +priority+ is picked.
|
21
|
+
attr_reader :priority
|
22
|
+
|
23
|
+
def initialize
|
24
|
+
@priority = 0
|
25
|
+
@words = []
|
26
|
+
end
|
27
|
+
|
28
|
+
# Implement Comparable in order to be sortable.
|
29
|
+
def <=> (other_service)
|
30
|
+
priority <=> other_service.priority
|
31
|
+
end
|
32
|
+
|
33
|
+
# Receives an Array of words and returns true or false depending
|
34
|
+
# if the Service can handle the request given by the words.
|
35
|
+
#
|
36
|
+
# @param words [Array] an Array of strings with key words.
|
37
|
+
# @return [Boolean]
|
38
|
+
def valid?(words)
|
39
|
+
(@words & words).any?
|
40
|
+
end
|
41
|
+
|
42
|
+
# Returns a Hash with retrieved data.
|
43
|
+
#
|
44
|
+
# @param words [Array] an Array of strings with key words.
|
45
|
+
def handle(words)
|
46
|
+
message = "#{self.class} must implement handle method,
|
47
|
+
for more information see AbstractService class."
|
48
|
+
raise NoMethodError.new message
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Inflect
|
2
|
+
class << self
|
3
|
+
attr_reader :configuration
|
4
|
+
end
|
5
|
+
|
6
|
+
def self.configuration
|
7
|
+
@configuration ||= Configuration.new
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.configure
|
11
|
+
yield configuration if block_given?
|
12
|
+
end
|
13
|
+
|
14
|
+
# The class in charge of centralizing the application's
|
15
|
+
# configuration.
|
16
|
+
class Configuration
|
17
|
+
attr_reader :services_path, :locale_path
|
18
|
+
|
19
|
+
def initialize
|
20
|
+
@services_path = File.join(__dir__, 'services')
|
21
|
+
@locale_path = File.join(File.dirname(__FILE__), 'locale/en.yml')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'inflect/loader'
|
2
|
+
require 'inflect/configuration'
|
3
|
+
|
4
|
+
module Inflect
|
5
|
+
# The class in charge of managing the access
|
6
|
+
# and selection of the services.
|
7
|
+
class Director
|
8
|
+
attr_reader :services
|
9
|
+
|
10
|
+
# @param services_path [String]
|
11
|
+
def initialize(services_path = nil)
|
12
|
+
@services = Loader.services(
|
13
|
+
services_path || Inflect.configuration.services_path
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
# Finds the first Service that is able
|
18
|
+
# to handle the request and lets him do
|
19
|
+
# the work.
|
20
|
+
# @param words [Array<String, Symbol>]
|
21
|
+
def handle(words)
|
22
|
+
selected_service = select_service(words)
|
23
|
+
selected_service.handle(words) unless selected_service.nil?
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def select_service(words)
|
29
|
+
services.find { |service| service.valid?(words) }
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/inflect/i18n.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'inflect/loader'
|
2
|
+
|
3
|
+
module Inflect
|
4
|
+
# Responsible of internationalization logic in the app.
|
5
|
+
module I18n
|
6
|
+
# @param +key+ [Symbol, String] The key to error message.
|
7
|
+
# @return [String] Translation of the error message.
|
8
|
+
def self.errors(key)
|
9
|
+
Loader::locale['errors'][key.to_s]
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Inflect
|
2
|
+
module Inflector
|
3
|
+
# Redefine String methods in the context of the current
|
4
|
+
# scope, adding utility String methods such as #camelize.
|
5
|
+
refine String do
|
6
|
+
SNAKE_SEPARATOR = '_'
|
7
|
+
|
8
|
+
def camelize
|
9
|
+
self.split(SNAKE_SEPARATOR).map(&:capitalize!).join
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require 'inflect/inflector'
|
3
|
+
require 'inflect/configuration'
|
4
|
+
|
5
|
+
module Inflect
|
6
|
+
# Responsable for loading all the services for Inflect
|
7
|
+
# to comunicate with them and decide wich one will handle
|
8
|
+
# the request.
|
9
|
+
#
|
10
|
+
module Loader
|
11
|
+
using Inflector
|
12
|
+
# Loads all the services from the given path, sorted by
|
13
|
+
# PRIORITY from lowest (1) to highest (INFINITY).
|
14
|
+
#
|
15
|
+
# @param path [String] A String indicating the path to
|
16
|
+
# the services directory.
|
17
|
+
# @return [Array] The Service Classes sorted by PRIORITY.
|
18
|
+
def self.services(path)
|
19
|
+
services = []
|
20
|
+
|
21
|
+
Dir["#{path}/*.rb"].each do |file|
|
22
|
+
require "#{file}"
|
23
|
+
|
24
|
+
filename = File.basename(file, '.rb')
|
25
|
+
services << Inflect.const_get(filename.camelize).instance
|
26
|
+
end
|
27
|
+
services.sort
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.locale(path = nil)
|
31
|
+
@@locale ||= YAML.load_file(path || Inflect.configuration.locale_path)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'inflect/loader'
|
2
|
+
require 'inflect/i18n'
|
3
|
+
|
4
|
+
module Inflect
|
5
|
+
#Responsible of encapsulate all the content of the service response
|
6
|
+
class Response
|
7
|
+
attr_reader :content, :attributes, :timestamp, :errors
|
8
|
+
|
9
|
+
# @param content [String, Hash] The response of the service. Required.
|
10
|
+
# @param description [Hash] Contains all the description of service response.
|
11
|
+
# @option description [Class] :served_by Handler Service. Instance of AbstractService. Required.
|
12
|
+
# @option description [Array<String>] :query_words The list of words received on the request. Required.
|
13
|
+
# @option description [String] :handled_word The handled word by the service. Required.
|
14
|
+
# @return [Inflect::Response]
|
15
|
+
def initialize(content=nil, description={})
|
16
|
+
@content = content
|
17
|
+
@timestamp = Time.now
|
18
|
+
@errors = {}
|
19
|
+
@attributes = extract_attributes(description)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.attribute_keys
|
23
|
+
@@attribute_keys = [:served_by, :query_words]
|
24
|
+
end
|
25
|
+
|
26
|
+
attribute_keys.each do |key|
|
27
|
+
define_method :"valid_attribute_#{key}" do
|
28
|
+
if attributes[key].nil?
|
29
|
+
errors[key] = I18n.errors(key)
|
30
|
+
return false
|
31
|
+
end
|
32
|
+
true
|
33
|
+
end
|
34
|
+
private :"valid_attribute_#{key}"
|
35
|
+
end
|
36
|
+
|
37
|
+
# Validates required attributes for a valid response.
|
38
|
+
# @return [true, false]
|
39
|
+
def valid?
|
40
|
+
private_methods.grep(/valid_attribute/).collect do |method_name|
|
41
|
+
self.send method_name
|
42
|
+
end.all?
|
43
|
+
end
|
44
|
+
|
45
|
+
private
|
46
|
+
|
47
|
+
def valid_attribute_content
|
48
|
+
unless [String, Hash].include? content.class
|
49
|
+
errors[:content] = I18n.errors('content')
|
50
|
+
return false
|
51
|
+
end
|
52
|
+
true
|
53
|
+
end
|
54
|
+
|
55
|
+
def extract_attributes(description={})
|
56
|
+
attributes = {}
|
57
|
+
|
58
|
+
self.class.attribute_keys.each do |key|
|
59
|
+
attributes.store key, description[key]
|
60
|
+
end
|
61
|
+
attributes
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'inflect/response'
|
2
|
+
|
3
|
+
module Inflect
|
4
|
+
# Allows services to respond an Inflect::Response instance.
|
5
|
+
module Responsive
|
6
|
+
|
7
|
+
# Method that creates Response instance.
|
8
|
+
# @param content [String, Hash] the response of the service.
|
9
|
+
# @return [Inflect::Response, nil] Returns nil if response is not valid.
|
10
|
+
def respond(content, options = {})
|
11
|
+
opts = merge_options(options)
|
12
|
+
validate_response(Inflect::Response.new(content, opts))
|
13
|
+
end
|
14
|
+
|
15
|
+
# Method that creates Response instance, skipping response validation.
|
16
|
+
# @param content [String, Hash] the response of the service.
|
17
|
+
# @return [Inflect::Response]
|
18
|
+
def respond!(content, options = {})
|
19
|
+
opts = merge_options(options)
|
20
|
+
Inflect::Response.new(content, opts)
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def validate_response(response)
|
26
|
+
response.valid? ? response : nil
|
27
|
+
end
|
28
|
+
|
29
|
+
def merge_options(options)
|
30
|
+
default_options.merge(options)
|
31
|
+
end
|
32
|
+
|
33
|
+
# Set a Hash with required +option+ parameters for Inflect::Response.
|
34
|
+
# @return [Hash]
|
35
|
+
def default_options
|
36
|
+
{served_by: self.class}
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/lib/inflect.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require "inflect/version"
|
2
|
+
require "inflect/director"
|
3
|
+
require "inflect/configuration"
|
4
|
+
require "inflect/abstract_service"
|
5
|
+
|
6
|
+
module Inflect
|
7
|
+
class << self
|
8
|
+
def handle(words)
|
9
|
+
director.handle(words)
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def director
|
15
|
+
@@director ||= Director.new(self.configuration.services_path)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: inflect
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Santiago Figueiras
|
8
|
+
- Gastón Ambrogi
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2016-03-02 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.10'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '1.10'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rake
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '10.0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '10.0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: minitest
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '5.8'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '5.8'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: pry
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 0.10.1
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 0.10.1
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: thor
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 0.19.1
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 0.19.1
|
84
|
+
description: Integrate service API's by following a simple and modular interface.
|
85
|
+
email:
|
86
|
+
- santi.figueiras95@gmail.com
|
87
|
+
- gastom.ambrogi@gmail.com
|
88
|
+
executables:
|
89
|
+
- inflect
|
90
|
+
extensions: []
|
91
|
+
extra_rdoc_files: []
|
92
|
+
files:
|
93
|
+
- ".gitignore"
|
94
|
+
- ".travis.yml"
|
95
|
+
- Gemfile
|
96
|
+
- LICENSE.txt
|
97
|
+
- README.md
|
98
|
+
- Rakefile
|
99
|
+
- bin/console
|
100
|
+
- bin/inflect
|
101
|
+
- bin/setup
|
102
|
+
- inflect.gemspec
|
103
|
+
- lib/generators/service_generator.rb
|
104
|
+
- lib/generators/templates/service.tt
|
105
|
+
- lib/inflect.rb
|
106
|
+
- lib/inflect/abstract_service.rb
|
107
|
+
- lib/inflect/configuration.rb
|
108
|
+
- lib/inflect/director.rb
|
109
|
+
- lib/inflect/i18n.rb
|
110
|
+
- lib/inflect/inflector.rb
|
111
|
+
- lib/inflect/loader.rb
|
112
|
+
- lib/inflect/locale/en.yml
|
113
|
+
- lib/inflect/response.rb
|
114
|
+
- lib/inflect/responsive.rb
|
115
|
+
- lib/inflect/version.rb
|
116
|
+
homepage: https://github.com/InflectProject/inflect
|
117
|
+
licenses:
|
118
|
+
- MIT
|
119
|
+
metadata:
|
120
|
+
allowed_push_host: https://rubygems.org
|
121
|
+
post_install_message:
|
122
|
+
rdoc_options: []
|
123
|
+
require_paths:
|
124
|
+
- lib
|
125
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
requirements: []
|
136
|
+
rubyforge_project:
|
137
|
+
rubygems_version: 2.4.8
|
138
|
+
signing_key:
|
139
|
+
specification_version: 4
|
140
|
+
summary: Backend service API support for the inflect-client app.
|
141
|
+
test_files: []
|
142
|
+
has_rdoc:
|