sortable_answer 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.travis.yml +6 -0
- data/Gemfile +4 -0
- data/Guardfile +77 -0
- data/LICENSE.txt +22 -0
- data/README.md +38 -0
- data/Rakefile +2 -0
- data/bin/SortableAnswer +18 -0
- data/lib/sortable_answer.rb +81 -0
- data/lib/sortable_answer/version.rb +3 -0
- data/sortable_answer.gemspec +34 -0
- data/spec/fixtures/listings_test.txt +1 -0
- data/spec/fixtures/product_test.txt +1 -0
- data/spec/sortable_answer_spec.rb +148 -0
- data/spec/spec_helper.rb +4 -0
- metadata +231 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 243d0d122f9404cd67c92d95e8fb5fd0ec93c92a
|
4
|
+
data.tar.gz: 4291a3593089acc95e6ce0993ebc59cf1bb8d195
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bcf5df4cbcdb0dfc87a0b073e3969825d0b40d428c9a1b1a35ad39caca783ac2a99a59aeaf9904af10a8c8dba5d2b521c1cdf97c950ef15bb32ddecd837b4027
|
7
|
+
data.tar.gz: fa75ead175fac8d30f615fb799e94fa28e24d9d7703821a73db8a4643a3ab7dba1b070cca3d3da8cb8a12deae4ce8c79e7bb0f709298bbd4392b906d04bb9dee
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
## Uncomment and set this to only include directories you want to watch
|
5
|
+
# directories %w(app lib config test spec features)
|
6
|
+
|
7
|
+
## Uncomment to clear the screen before every task
|
8
|
+
# clearing :on
|
9
|
+
|
10
|
+
## Guard internally checks for changes in the Guardfile and exits.
|
11
|
+
## If you want Guard to automatically start up again, run guard in a
|
12
|
+
## shell loop, e.g.:
|
13
|
+
##
|
14
|
+
## $ while bundle exec guard; do echo "Restarting Guard..."; done
|
15
|
+
##
|
16
|
+
## Note: if you are using the `directories` clause above and you are not
|
17
|
+
## watching the project directory ('.'), then you will want to move
|
18
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
19
|
+
#
|
20
|
+
# $ mkdir config
|
21
|
+
# $ mv Guardfile config/
|
22
|
+
# $ ln -s config/Guardfile .
|
23
|
+
#
|
24
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
25
|
+
|
26
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
27
|
+
# rspec may be run, below are examples of the most common uses.
|
28
|
+
# * bundler: 'bundle exec rspec'
|
29
|
+
# * bundler binstubs: 'bin/rspec'
|
30
|
+
# * spring: 'bin/rspec' (This will use spring if running and you have
|
31
|
+
# installed the spring binstubs per the docs)
|
32
|
+
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
33
|
+
# * 'just' rspec: 'rspec'
|
34
|
+
|
35
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
36
|
+
require "guard/rspec/dsl"
|
37
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
38
|
+
|
39
|
+
# Feel free to open issues for suggestions and improvements
|
40
|
+
|
41
|
+
# RSpec files
|
42
|
+
rspec = dsl.rspec
|
43
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
44
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
45
|
+
watch(rspec.spec_files)
|
46
|
+
|
47
|
+
# Ruby files
|
48
|
+
ruby = dsl.ruby
|
49
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
50
|
+
|
51
|
+
# Rails files
|
52
|
+
rails = dsl.rails(view_extensions: %w(erb haml slim))
|
53
|
+
dsl.watch_spec_files_for(rails.app_files)
|
54
|
+
dsl.watch_spec_files_for(rails.views)
|
55
|
+
|
56
|
+
watch(rails.controllers) do |m|
|
57
|
+
[
|
58
|
+
rspec.spec.("routing/#{m[1]}_routing"),
|
59
|
+
rspec.spec.("controllers/#{m[1]}_controller"),
|
60
|
+
rspec.spec.("acceptance/#{m[1]}")
|
61
|
+
]
|
62
|
+
end
|
63
|
+
|
64
|
+
# Rails config changes
|
65
|
+
watch(rails.spec_helper) { rspec.spec_dir }
|
66
|
+
watch(rails.routes) { "#{rspec.spec_dir}/routing" }
|
67
|
+
watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
|
68
|
+
|
69
|
+
# Capybara features specs
|
70
|
+
watch(rails.view_dirs) { |m| rspec.spec.("features/#{m[1]}") }
|
71
|
+
|
72
|
+
# Turnip features and steps
|
73
|
+
watch(%r{^spec/acceptance/(.+)\.feature$})
|
74
|
+
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
|
75
|
+
Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
|
76
|
+
end
|
77
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Whatisinternet
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# SortableAnswer
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/sortable_answer.svg)](http://badge.fury.io/rb/sortable_answer)
|
4
|
+
[![Build Status](https://travis-ci.org/whatisinternet/sortable_answer.svg?branch=master)](https://travis-ci.org/whatisinternet/sortable_answer)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/whatisinternet/sortable_answer/badges/gpa.svg)](https://codeclimate.com/github/whatisinternet/sortable_answer)
|
6
|
+
[![Test Coverage](https://codeclimate.com/github/whatisinternet/sortable_answer/badges/coverage.svg)](https://codeclimate.com/github/whatisinternet/sortable_answer)
|
7
|
+
|
8
|
+
This is a simple ruby implementation for the sortable code challenge.
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add this line to your application's Gemfile:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem 'sortable_answer'
|
16
|
+
```
|
17
|
+
|
18
|
+
And then execute:
|
19
|
+
|
20
|
+
$ bundle
|
21
|
+
|
22
|
+
Or install it yourself as:
|
23
|
+
|
24
|
+
$ gem install sortable_answer
|
25
|
+
|
26
|
+
## Usage
|
27
|
+
|
28
|
+
```
|
29
|
+
SortableAnswer products.txt listings.txt |>out.txt
|
30
|
+
```
|
31
|
+
|
32
|
+
## Contributing
|
33
|
+
|
34
|
+
1. Fork it ( https://github.com/whatisinternet/sortable_answer/fork )
|
35
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
36
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
37
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
38
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/SortableAnswer
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'sortable_answer'
|
4
|
+
|
5
|
+
def main
|
6
|
+
|
7
|
+
if ARGV[0].nil? || ARGV[1].nil?
|
8
|
+
puts "ERROR:\n\n You need to specify the files.\n\n\n usage:\n SortableAnswer file1.txt file2.txt \n\n To output to file SortableAnswer file1.txt file2.txt |>file3.txt\n\n"
|
9
|
+
exit(-1)
|
10
|
+
else
|
11
|
+
sortable = SortableAnswer::Answer.new("#{Dir.pwd}/#{ARGV[0].to_s}", "#{Dir.pwd}/#{ARGV[1].to_s}" )
|
12
|
+
sortable.find_all_matches
|
13
|
+
puts sortable.jsonfiy
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
main
|
@@ -0,0 +1,81 @@
|
|
1
|
+
require "sortable_answer/version"
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module SortableAnswer
|
5
|
+
class Answer
|
6
|
+
attr_accessor :products, :listings, :matches
|
7
|
+
|
8
|
+
def initialize(product_file, listing_file)
|
9
|
+
self.products = File.readlines(product_file)
|
10
|
+
self.listings = File.readlines(listing_file)
|
11
|
+
self.matches = []
|
12
|
+
end
|
13
|
+
|
14
|
+
def hashify(json)
|
15
|
+
json.map { |j| JSON.parse(j) }
|
16
|
+
end
|
17
|
+
|
18
|
+
def make_regex(str)
|
19
|
+
Regexp.new("#{str}", Regexp::IGNORECASE)
|
20
|
+
end
|
21
|
+
|
22
|
+
def make_title_match(product_hash, challenge_hash)
|
23
|
+
make_regex(product_hash["manufacturer"]).match(challenge_hash["title"])
|
24
|
+
end
|
25
|
+
|
26
|
+
def make_match(product_hash, challenge_hash)
|
27
|
+
make_regex(product_hash["manufacturer"]).match(challenge_hash["manufacturer"])
|
28
|
+
end
|
29
|
+
|
30
|
+
def model_match(product_hash, challenge_hash)
|
31
|
+
if product_hash["model"].length <= 4
|
32
|
+
Regexp.new("\b#{product_hash["model"]}[[:space:]|[:alpha:]|\"]", Regexp::EXTENDED | Regexp::IGNORECASE) =~ challenge_hash["title"]
|
33
|
+
else
|
34
|
+
Regexp.new("#{product_hash["model"]}[[:space:]|[:alpha:]|\"]", Regexp::EXTENDED | Regexp::IGNORECASE) =~ challenge_hash["title"]
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def eqal_product(product_hash, challenge_hash)
|
39
|
+
"#{product_hash["product_name"].downcase.tr('_', ' ')}" == challenge_hash["title"].downcase
|
40
|
+
end
|
41
|
+
|
42
|
+
def product_matcher(product_hash, challenge_hash)
|
43
|
+
if make_match(product_hash, challenge_hash)
|
44
|
+
if make_title_match(product_hash, challenge_hash) &&
|
45
|
+
model_match(product_hash, challenge_hash)
|
46
|
+
return challenge_hash
|
47
|
+
elsif eqal_product(product_hash, challenge_hash)
|
48
|
+
return challenge_hash
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def find_product_match(product, listings)
|
54
|
+
products_and_listings = {product_name: product["product_name"], listings: []}
|
55
|
+
listings.each do |listing|
|
56
|
+
match = product_matcher(product, listing)
|
57
|
+
products_and_listings[:listings].push(match) unless match.nil?
|
58
|
+
end
|
59
|
+
products_and_listings
|
60
|
+
end
|
61
|
+
|
62
|
+
def find_all_matches
|
63
|
+
products = hashify(self.products)
|
64
|
+
listings = hashify(self.listings)
|
65
|
+
self.matches = products.map do |product|
|
66
|
+
find_product_match(product, listings)
|
67
|
+
end
|
68
|
+
self.matches.last[:listings].each { |rm| listings.delete(rm) }
|
69
|
+
end
|
70
|
+
|
71
|
+
def jsonfiy
|
72
|
+
out_str = ""
|
73
|
+
self.matches.each do |match|
|
74
|
+
out_str += "#{match.to_json}\n"
|
75
|
+
end
|
76
|
+
out_str
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'sortable_answer/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "sortable_answer"
|
8
|
+
spec.version = SortableAnswer::VERSION
|
9
|
+
spec.authors = "Josh Teeter"
|
10
|
+
spec.email = "joshteeter@gmail.com"
|
11
|
+
spec.summary = "Really only useful for the Sortable application"
|
12
|
+
spec.description = "Sortable application"
|
13
|
+
spec.homepage = "http://github.com/whatisinternet/sortable_answer"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "json", "~> 1.8.2"
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
spec.add_development_dependency "rspec", "~> 3"
|
26
|
+
spec.add_development_dependency "rspec-expectations", "~> 3"
|
27
|
+
spec.add_development_dependency "rspec-nc", "~> 0.2"
|
28
|
+
spec.add_development_dependency "guard", "~> 2.12"
|
29
|
+
spec.add_development_dependency "guard-rspec", "~> 4.5"
|
30
|
+
spec.add_development_dependency "pry", "~> 0.10"
|
31
|
+
spec.add_development_dependency "pry-remote", "~> 0.1"
|
32
|
+
spec.add_development_dependency "pry-nav", "~> 0.2"
|
33
|
+
spec.add_development_dependency 'codeclimate-test-reporter','~> 0.4'
|
34
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
{"title":"Canon PowerShot SD1300IS 12 MP Digital Camera (Blue) + 16GB Deluxe Accessory Kit","manufacturer":"Canon","currency":"USD","price":"177.95"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"product_name":"Canon_PowerShot_SD1300_IS","manufacturer":"Canon","model":"SD1300IS","family":"PowerShot","announced-date":"2010-02-07T19:00:00.000-05:00"}
|
@@ -0,0 +1,148 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
describe SortableAnswer do
|
5
|
+
|
6
|
+
products = "#{Dir.pwd}/spec/fixtures/product_test.txt"
|
7
|
+
listings = "#{Dir.pwd}/spec/fixtures/listings_test.txt"
|
8
|
+
|
9
|
+
before :each do
|
10
|
+
@sortable = SortableAnswer::Answer.new(products, listings)
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "initialize" do
|
14
|
+
it "should assign products to an array" do
|
15
|
+
expect(@sortable.products).to be_a(Array)
|
16
|
+
end
|
17
|
+
it "should assign listings to an array" do
|
18
|
+
expect(@sortable.listings).to be_a(Array)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "hashify" do
|
23
|
+
it "should turn json into a hash" do
|
24
|
+
expect(@sortable.hashify(@sortable.products)[0]).to be_a(Hash)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "regexes" do
|
29
|
+
|
30
|
+
describe "make_regex" do
|
31
|
+
it "should return a regex" do
|
32
|
+
expect(@sortable.make_regex("test")).to be_a(Regexp)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe "regex_model" do
|
37
|
+
it "should match the model it's based off" do
|
38
|
+
test_data = @sortable.hashify(@sortable.products)[0]
|
39
|
+
expect(@sortable.make_regex(test_data["model"])
|
40
|
+
.match(test_data["model"])).to be_truthy
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
describe "regex_manufacturer" do
|
45
|
+
it "should match the manufacturer it's based off" do
|
46
|
+
test_data = @sortable.hashify(@sortable.products)[0]
|
47
|
+
expect(@sortable.make_regex(test_data["manufacturer"])
|
48
|
+
.match(test_data["manufacturer"])).to be_truthy
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "model_match" do
|
55
|
+
it "should match model > 4" do
|
56
|
+
test_product = @sortable.hashify(@sortable.products)[0]
|
57
|
+
test_data = @sortable.hashify(@sortable.listings)[0]
|
58
|
+
expect(@sortable.model_match(test_product, test_data)).to be_a(Integer)
|
59
|
+
end
|
60
|
+
it "should match model len <= 4" do
|
61
|
+
test_product = @sortable.hashify(@sortable.products)[0]
|
62
|
+
test_product["model"] = test_product["model"][0..2]
|
63
|
+
test_data = @sortable.hashify(@sortable.listings)[0]
|
64
|
+
expect(@sortable.model_match(test_product, test_data)).to be_nil
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
|
69
|
+
describe "make_title_match" do
|
70
|
+
it "should match make" do
|
71
|
+
test_product = @sortable.hashify(@sortable.products)[0]
|
72
|
+
test_data = @sortable.hashify(@sortable.listings)[0]
|
73
|
+
expect(@sortable.make_title_match(test_product, test_data)).to be_a(MatchData)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe "make_match" do
|
78
|
+
it "should match make" do
|
79
|
+
test_product = @sortable.hashify(@sortable.products)[0]
|
80
|
+
test_data = @sortable.hashify(@sortable.listings)[0]
|
81
|
+
expect(@sortable.make_match(test_product, test_data)).to be_a(MatchData)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
describe "equal_product" do
|
86
|
+
it "should return a falsy value" do
|
87
|
+
test_product = @sortable.hashify(@sortable.products)[0]
|
88
|
+
test_data = @sortable.hashify(@sortable.listings)[0]
|
89
|
+
expect(@sortable.eqal_product(test_product, test_data)).to be_falsy
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
describe "product_matcher" do
|
94
|
+
it "should return an array of all matches" do
|
95
|
+
test_product = @sortable.hashify(@sortable.products)[0]
|
96
|
+
test_data = @sortable.hashify(@sortable.listings)[0]
|
97
|
+
expect(@sortable.product_matcher(test_product, test_data)).to equal(test_data)
|
98
|
+
end
|
99
|
+
#This test is brittle.
|
100
|
+
it "should return an array of all matches" do
|
101
|
+
test_product = @sortable.hashify(@sortable.products)[0]
|
102
|
+
test_product["model"] = "fake"
|
103
|
+
test_product["product_name"] = "equal"
|
104
|
+
test_data = @sortable.hashify(@sortable.listings)[0]
|
105
|
+
test_data["title"] = "equal"
|
106
|
+
expect(@sortable.product_matcher(test_product, test_data)).to be_truthy
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
|
111
|
+
describe "find_product_match" do
|
112
|
+
it "should return a hash of a match" do
|
113
|
+
test_product = @sortable.hashify(@sortable.products)[0]
|
114
|
+
test_data = @sortable.hashify(@sortable.listings)
|
115
|
+
test = @sortable.find_product_match(test_product, test_data)
|
116
|
+
expect(test).to be_a(Hash)
|
117
|
+
expect(test).to include(:product_name)
|
118
|
+
expect(test).to include(:listings)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
describe "find_all_matches" do
|
123
|
+
it "should return a hashmap of matches" do
|
124
|
+
@sortable.find_all_matches
|
125
|
+
expect(@sortable.matches[0]).to be_a(Hash)
|
126
|
+
end
|
127
|
+
it "should return a hash with key product" do
|
128
|
+
@sortable.find_all_matches
|
129
|
+
expect(@sortable.matches[0]).to include(:product_name)
|
130
|
+
end
|
131
|
+
it "should return a hash with key listings" do
|
132
|
+
@sortable.find_all_matches
|
133
|
+
expect(@sortable.matches[0]).to include(:listings)
|
134
|
+
end
|
135
|
+
it "should have listings being an array" do
|
136
|
+
@sortable.find_all_matches
|
137
|
+
expect(@sortable.matches[0][:listings]).to be_a(Array)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
describe "jsonify" do
|
142
|
+
it "should return a string of json data" do
|
143
|
+
@sortable.find_all_matches
|
144
|
+
expect(@sortable.jsonfiy).to be_a(String)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,231 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sortable_answer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.6
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Josh Teeter
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-03-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: json
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.8.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.8.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.7'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.7'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec-expectations
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec-nc
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.2'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.2'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: guard
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2.12'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2.12'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: guard-rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '4.5'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '4.5'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: pry
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.10'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.10'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: pry-remote
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.1'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.1'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: pry-nav
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.2'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0.2'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: codeclimate-test-reporter
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0.4'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0.4'
|
181
|
+
description: Sortable application
|
182
|
+
email: joshteeter@gmail.com
|
183
|
+
executables:
|
184
|
+
- SortableAnswer
|
185
|
+
extensions: []
|
186
|
+
extra_rdoc_files: []
|
187
|
+
files:
|
188
|
+
- ".gitignore"
|
189
|
+
- ".travis.yml"
|
190
|
+
- Gemfile
|
191
|
+
- Guardfile
|
192
|
+
- LICENSE.txt
|
193
|
+
- README.md
|
194
|
+
- Rakefile
|
195
|
+
- bin/SortableAnswer
|
196
|
+
- lib/sortable_answer.rb
|
197
|
+
- lib/sortable_answer/version.rb
|
198
|
+
- sortable_answer.gemspec
|
199
|
+
- spec/fixtures/listings_test.txt
|
200
|
+
- spec/fixtures/product_test.txt
|
201
|
+
- spec/sortable_answer_spec.rb
|
202
|
+
- spec/spec_helper.rb
|
203
|
+
homepage: http://github.com/whatisinternet/sortable_answer
|
204
|
+
licenses:
|
205
|
+
- MIT
|
206
|
+
metadata: {}
|
207
|
+
post_install_message:
|
208
|
+
rdoc_options: []
|
209
|
+
require_paths:
|
210
|
+
- lib
|
211
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
217
|
+
requirements:
|
218
|
+
- - ">="
|
219
|
+
- !ruby/object:Gem::Version
|
220
|
+
version: '0'
|
221
|
+
requirements: []
|
222
|
+
rubyforge_project:
|
223
|
+
rubygems_version: 2.4.3
|
224
|
+
signing_key:
|
225
|
+
specification_version: 4
|
226
|
+
summary: Really only useful for the Sortable application
|
227
|
+
test_files:
|
228
|
+
- spec/fixtures/listings_test.txt
|
229
|
+
- spec/fixtures/product_test.txt
|
230
|
+
- spec/sortable_answer_spec.rb
|
231
|
+
- spec/spec_helper.rb
|