look_like 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 805d536b479806302c0657fa21ba62e9f1d84483
4
- data.tar.gz: b52581daaa7d94f11db3eb0ff4fb3f101a4907c4
3
+ metadata.gz: 30c8bf48faff83448fad65838553ef43e87d3285
4
+ data.tar.gz: 98cc4782efaeba8e1427211a82e6da25e6a3c298
5
5
  SHA512:
6
- metadata.gz: 2a209e5a1cfb866b1bac218f52a8a3e6c1ef0883c9835065c2402049928e4bab474411c6a3255a4786c488a2fd1385cd504e773e26f5405a76ac8296154d71b4
7
- data.tar.gz: 2e46cc8d3b2443bca01039c59b99b8a424a456bc2a55b331bd34c99804d62a226f2cc4152eaf1f6085bb882b83f88dfe6f5fc5ef2bbee93396ff173434014fa1
6
+ metadata.gz: 56c5892df4fa6b0a76075e58e556d7556710d87f2689c7ea72f75fcd1770651e55f06c6874cbef2da8032261691ca3adf065f024cd986dcf4e43e1135e2a7512
7
+ data.tar.gz: 66706fc360b1511128f102f631cb67c812a27ea14f9677b10d8e9cd154f9cd804f107c1fd719b9220386424dc9bf6e49801958ecd69a8c969b5933fd1f85e8c7
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: look_like
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - nishant
@@ -60,23 +60,7 @@ executables: []
60
60
  extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
- - ".gitignore"
64
- - ".rspec"
65
- - ".travis.yml"
66
- - CODE_OF_CONDUCT.md
67
- - Gemfile
68
- - LICENSE.txt
69
- - README.md
70
- - Rakefile
71
- - bin/console
72
- - bin/setup
73
- - lib/look_like.rb
74
- - lib/look_like/matcher.rb
75
- - lib/look_like/version.rb
76
- - lib/matchers/equality.rb
77
- - lib/matchers/rspec-matcher.rb
78
- - look_like.gemspec
79
- - look_like.iml
63
+ - "./lib/look_like.rb"
80
64
  homepage: http://amoeba.social
81
65
  licenses:
82
66
  - MIT
data/.gitignore DELETED
@@ -1,11 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- .idea
11
- *.iml
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.1.4
5
- before_install: gem install bundler -v 1.13.0.rc.1
data/CODE_OF_CONDUCT.md DELETED
@@ -1,3 +0,0 @@
1
- # Do WTF you want to
2
-
3
- ## when you do it wrong, you will be told so.
data/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in look_like.gemspec
4
- gem "rspec"
5
- gem "rake"
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2016 nishant
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 DELETED
@@ -1,58 +0,0 @@
1
- # look_like matcher
2
- This gem is a collection of rspec matchers, for writing wireframe tests.
3
- These are useful for writing sanity tests in higher environments where we cannot control the data consumed by an app.
4
- This can also be used in a production environment.
5
- You can reuse your code/specs for regression tests.
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'look_like'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle install
18
-
19
- ## Usage
20
- Following will result in error :
21
- ```ruby
22
- it "single word is different than two words" do
23
- expect("Sam").to look_like("Sam Dam")
24
- end
25
-
26
- # results in error
27
- # expected "Sam" (one word),
28
- # to look like "Sam Dam" (two words)
29
-
30
- ```
31
- ## Custom Matchers
32
- ```ruby
33
-
34
- LookLike::Matchers.define({
35
- :name => :single_word,
36
- :desc => "single word",
37
- :priority => 7,
38
- :select => lambda{|keyword|},
39
- :match => lambda{|actual, expected|}
40
- })
41
- ```
42
-
43
-
44
- ## Development
45
-
46
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
47
-
48
- 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).
49
-
50
- ## Contributing
51
-
52
- Bug reports and pull requests are welcome on GitHub at https://github.com/[nishants]/look_like.
53
-
54
-
55
- ## License
56
-
57
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
58
-
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "look_like"
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/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,27 +0,0 @@
1
-
2
- module LookLike
3
- class Matcher
4
- attr_accessor :name
5
- attr_accessor :desc
6
- attr_accessor :priority
7
- attr_accessor :select
8
- attr_accessor :match
9
-
10
- def initialize(config)
11
- @name = config[:name]
12
- @desc = config[:desc]
13
- @priority = config[:priority]
14
- @selector = config[:select]
15
- @matcher = config[:match]
16
- end
17
-
18
- def match(actual, expected)
19
- @matcher.call(actual, expected)
20
- end
21
-
22
- def apply(key)
23
- @selector.call(key)
24
- end
25
-
26
- end
27
- end
@@ -1,3 +0,0 @@
1
- module LookLike
2
- VERSION = "0.1.3"
3
- end
@@ -1,12 +0,0 @@
1
- LookLike::Matchers.define({
2
- :name => :equality,
3
- :desc => "",
4
- :priority => 6,
5
- :select => lambda{|keyword|
6
- true
7
- },
8
- :match => lambda{|actual, expected|
9
- actual == expected
10
- }
11
- })
12
-
@@ -1,15 +0,0 @@
1
- RSpec::Matchers.define :look_like do |expected|
2
- messages = {}
3
-
4
- match do |actual|
5
- messages[actual] = LookLike::Matchers.find(expected).match(actual, expected)
6
- end
7
-
8
- def method_name(actual, actual_desc, expected, expected_desc)
9
- "expected \"#{actual}\" (#{actual_desc}), \nto look like \"#{expected}\" (#{expected_desc})"
10
- end
11
-
12
- failure_message do |actual|
13
- messages[actual]
14
- end
15
- end
data/look_like.gemspec DELETED
@@ -1,28 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'look_like/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "look_like"
8
- spec.version = LookLike::VERSION
9
- spec.authors = ["nishant"]
10
- spec.email = ["nishant.singh87@gmail.com"]
11
-
12
- spec.summary = "an rspec matcher for comparing visually similar strings"
13
- spec.description = "use as expect('a long paragraph with words').to look_like('another long paragraph with words') "
14
- spec.homepage = "http://amoeba.social"
15
- spec.license = "MIT"
16
-
17
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
- f.match(%r{^(test|spec|features)/})
19
- end
20
-
21
- spec.bindir = "exe"
22
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
- spec.require_paths = ["lib"]
24
-
25
- spec.add_development_dependency "bundler", "~> 1.13.a"
26
- spec.add_development_dependency "rake", "~> 10.0"
27
- spec.add_development_dependency "rspec", "~> 3.0"
28
- end
data/look_like.iml DELETED
@@ -1,28 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="RUBY_MODULE" version="4">
3
- <component name="FacetManager">
4
- <facet type="gem" name="Ruby Gem">
5
- <configuration>
6
- <option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
7
- <option name="GEM_APP_TEST_PATH" value="$MODULE_DIR$/test" />
8
- <option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
9
- </configuration>
10
- </facet>
11
- </component>
12
- <component name="NewModuleRootManager" inherit-compiler-output="true">
13
- <exclude-output />
14
- <content url="file://$MODULE_DIR$">
15
- <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
16
- </content>
17
- <orderEntry type="jdk" jdkName="rbenv: 2.1.4" jdkType="RUBY_SDK" />
18
- <orderEntry type="sourceFolder" forTests="false" />
19
- <orderEntry type="library" scope="PROVIDED" name="bundler (v1.13.0.rc.1, rbenv: 2.1.4) [gem]" level="application" />
20
- <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.5, rbenv: 2.1.4) [gem]" level="application" />
21
- <orderEntry type="library" scope="PROVIDED" name="rake (v11.2.2, rbenv: 2.1.4) [gem]" level="application" />
22
- <orderEntry type="library" scope="PROVIDED" name="rspec (v3.5.0, rbenv: 2.1.4) [gem]" level="application" />
23
- <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.5.3, rbenv: 2.1.4) [gem]" level="application" />
24
- <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.5.0, rbenv: 2.1.4) [gem]" level="application" />
25
- <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.5.0, rbenv: 2.1.4) [gem]" level="application" />
26
- <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.5.0, rbenv: 2.1.4) [gem]" level="application" />
27
- </component>
28
- </module>