funky-mock 0.1.0
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 +2 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +43 -0
- data/README.md +63 -0
- data/Rakefile +13 -0
- data/funky-mock.gemspec +23 -0
- data/lib/version.rb +5 -0
- metadata +80 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5c6b71a9ee2552c0f24b36ef37e55776ae7cb562
|
4
|
+
data.tar.gz: 79fe75b672b4029a4fb4f824a1fb52d26a292e5e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bae6e39a29017cb7d18cc24391bc599e35bab351103c5cfc73a170110d0e48f2377b0220c6a0852c11ba1a4a524381f3ae344b010705da6c68fa839c08befe5a
|
7
|
+
data.tar.gz: c554ffa03bd2d15cdfaa7115d4acd6173cf1abcee28b26375f80eaacc2e4cfb6be32bcaf50765edd06ee55c1e0487d55cffed3532851592235d7821ac2a8d08e
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
funky-mock (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
archive-zip (0.12.0)
|
10
|
+
io-like (~> 0.3.0)
|
11
|
+
cloudwalk (1.14.3)
|
12
|
+
bundler
|
13
|
+
rake
|
14
|
+
cloudwalk_handshake (1.8.1)
|
15
|
+
funky-simplehttp (~> 0.6)
|
16
|
+
da_funk (3.12.4)
|
17
|
+
archive-zip (~> 0.5)
|
18
|
+
bundler
|
19
|
+
cloudwalk_handshake
|
20
|
+
funky-emv
|
21
|
+
posxml_parser
|
22
|
+
rake
|
23
|
+
funky-emv (1.2.1)
|
24
|
+
funky-tlv (~> 0.2)
|
25
|
+
funky-simplehttp (0.6.0)
|
26
|
+
funky-tlv (0.2.3)
|
27
|
+
io-like (0.3.0)
|
28
|
+
posxml_parser (2.24.1)
|
29
|
+
funky-emv (~> 1)
|
30
|
+
rake (10.5.0)
|
31
|
+
|
32
|
+
PLATFORMS
|
33
|
+
ruby
|
34
|
+
|
35
|
+
DEPENDENCIES
|
36
|
+
bundler (~> 2.0)
|
37
|
+
cloudwalk
|
38
|
+
da_funk (~> 3)
|
39
|
+
funky-mock!
|
40
|
+
rake (~> 10.0)
|
41
|
+
|
42
|
+
BUNDLED WITH
|
43
|
+
2.0.2
|
data/README.md
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# Funky Mock
|
2
|
+
|
3
|
+
Simple mock implementation to run on DaFunk ecosystem. Copied from [mruby-mock](git@github.com:iij/mruby-mock.git).
|
4
|
+
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
# 1. Creating mock
|
10
|
+
mock = FunkyMock::Mock.new
|
11
|
+
mock.stubs(:code).returns("200")
|
12
|
+
mock.stubs(:body).returns("success")
|
13
|
+
mock.code
|
14
|
+
# => "200"
|
15
|
+
mock.body
|
16
|
+
# => "success"
|
17
|
+
|
18
|
+
# 2. Stubing methods
|
19
|
+
class B
|
20
|
+
def code
|
21
|
+
"300"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
b = B.new
|
26
|
+
b.stubs(:code).returns("200")
|
27
|
+
|
28
|
+
b.code
|
29
|
+
# => "200"
|
30
|
+
|
31
|
+
class A
|
32
|
+
def self.a
|
33
|
+
false
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
A.stubs(:a).returns(true)
|
38
|
+
A.a
|
39
|
+
# => true
|
40
|
+
|
41
|
+
```
|
42
|
+
|
43
|
+
|
44
|
+
## Setup
|
45
|
+
|
46
|
+
```
|
47
|
+
bundle install
|
48
|
+
bundle exec rake # compiling
|
49
|
+
bundle exec test # testing
|
50
|
+
```
|
51
|
+
|
52
|
+
|
53
|
+
## Contributing
|
54
|
+
|
55
|
+
1. Fork it
|
56
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
57
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
58
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
59
|
+
5. Create new Pull Request
|
60
|
+
|
61
|
+
# License
|
62
|
+
|
63
|
+
This project is released under the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/funky-mock.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'version.rb'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "funky-mock"
|
8
|
+
spec.version = FunkyMock::version
|
9
|
+
spec.authors = ["Thiago Scalone"]
|
10
|
+
spec.email = ["thiago@cloudwalk.io"]
|
11
|
+
spec.summary = "Funky Mock"
|
12
|
+
spec.description = "Mock implementation to run on DaFunk ecosystem"
|
13
|
+
spec.homepage = "https://github.com/cloudwalkio/funky-mock"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.files = %w(.gitignore Gemfile Gemfile.lock README.md Rakefile funky-mock.gemspec lib/version.rb out/funky-mock/main.mrb)
|
16
|
+
spec.extensions = []
|
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_development_dependency "bundler", "~> 2.0"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
end
|
data/lib/version.rb
ADDED
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: funky-mock
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Thiago Scalone
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-12-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
description: Mock implementation to run on DaFunk ecosystem
|
42
|
+
email:
|
43
|
+
- thiago@cloudwalk.io
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- Gemfile
|
50
|
+
- Gemfile.lock
|
51
|
+
- README.md
|
52
|
+
- Rakefile
|
53
|
+
- funky-mock.gemspec
|
54
|
+
- lib/version.rb
|
55
|
+
- out/funky-mock/main.mrb
|
56
|
+
homepage: https://github.com/cloudwalkio/funky-mock
|
57
|
+
licenses:
|
58
|
+
- MIT
|
59
|
+
metadata: {}
|
60
|
+
post_install_message:
|
61
|
+
rdoc_options: []
|
62
|
+
require_paths:
|
63
|
+
- lib
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
requirements: []
|
75
|
+
rubyforge_project:
|
76
|
+
rubygems_version: 2.6.14
|
77
|
+
signing_key:
|
78
|
+
specification_version: 4
|
79
|
+
summary: Funky Mock
|
80
|
+
test_files: []
|