motherducker 0.0.1 → 0.0.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 +4 -4
- data/.gitignore +9 -0
- data/GEM_CHEATSHEET.md +52 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +29 -0
- data/README +1 -0
- data/Rakefile +2 -0
- data/bin/motherducker +2 -1
- data/lib/mother_ducker.rb +27 -5
- data/lib/mother_ducker/strategy_orchestrator.rb +12 -0
- data/lib/mother_ducker/user.rb +21 -0
- data/mother_ducker.gemspec +14 -0
- metadata +40 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e575a6aa905d32d0b5c3ba328dc2d6569433378ca4fc2b0b84b897fd6490236
|
4
|
+
data.tar.gz: 8cdbb932273fecc20c69df8be81a4b331e10ea5dc2a8af30efedc871272b059e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbb0584d94555c0a26f6a8270e198af726562ff45b95b48536a7bbfebd0cd9dbeb992d9ccfaa36e74847daf382a131ab60624bb68850b5b60af74ba7c18ff5c5
|
7
|
+
data.tar.gz: 325332a0d361e57487bd458c8c81b19e890efbac121731c14174d6f133caf31af5ccd733d311206cd7762f57538410a8d76e529a85b3aeede87466d79473994b
|
data/.gitignore
ADDED
data/GEM_CHEATSHEET.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Instructions for gem pushing
|
2
|
+
|
3
|
+
- code goes in lib/
|
4
|
+
- mother_ducker.gemspec # metainfo for gem
|
5
|
+
|
6
|
+
# cheatsheet
|
7
|
+
|
8
|
+
- with rake
|
9
|
+
|
10
|
+
- build and install for testing
|
11
|
+
```
|
12
|
+
$ rake install
|
13
|
+
```
|
14
|
+
|
15
|
+
- release to the wider world
|
16
|
+
|
17
|
+
```
|
18
|
+
$ rake release
|
19
|
+
```
|
20
|
+
|
21
|
+
- check if gem is published
|
22
|
+
|
23
|
+
```
|
24
|
+
$ gem list -r motherducker
|
25
|
+
```
|
26
|
+
|
27
|
+
- if version tag is not updated
|
28
|
+
|
29
|
+
```
|
30
|
+
$ gem yank motherducker -v VERSION
|
31
|
+
```
|
32
|
+
|
33
|
+
## outdated
|
34
|
+
- manually
|
35
|
+
|
36
|
+
building the gem
|
37
|
+
```
|
38
|
+
$ gem build mother_ducker.gemspec
|
39
|
+
```
|
40
|
+
|
41
|
+
pushing the gem
|
42
|
+
```
|
43
|
+
$ gem push {file_created_from_build}.gem
|
44
|
+
```
|
45
|
+
|
46
|
+
# notes
|
47
|
+
|
48
|
+
- version can be hardcoded into the gemspec, will need to be bumped up as we go
|
49
|
+
|
50
|
+
|
51
|
+
[guide](https://guides.rubygems.org/make-your-own-gem/)
|
52
|
+
[another, better guide](http://robdodson.me/how-to-write-a-command-line-ruby-gem/)
|
data/Gemfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
source 'https://rubygems.org'
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
ast (2.4.0)
|
5
|
+
jaro_winkler (1.5.1)
|
6
|
+
parallel (1.12.1)
|
7
|
+
parser (2.5.1.2)
|
8
|
+
ast (~> 2.4.0)
|
9
|
+
powerpack (0.1.2)
|
10
|
+
rainbow (3.0.0)
|
11
|
+
rubocop (0.58.1)
|
12
|
+
jaro_winkler (~> 1.5.1)
|
13
|
+
parallel (~> 1.10)
|
14
|
+
parser (>= 2.5, != 2.5.1.1)
|
15
|
+
powerpack (~> 0.1)
|
16
|
+
rainbow (>= 2.2.2, < 4.0)
|
17
|
+
ruby-progressbar (~> 1.7)
|
18
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
19
|
+
ruby-progressbar (1.9.0)
|
20
|
+
unicode-display_width (1.4.0)
|
21
|
+
|
22
|
+
PLATFORMS
|
23
|
+
ruby
|
24
|
+
|
25
|
+
DEPENDENCIES
|
26
|
+
rubocop
|
27
|
+
|
28
|
+
BUNDLED WITH
|
29
|
+
1.16.1
|
data/README
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# The motherducker
|
data/Rakefile
ADDED
data/bin/motherducker
CHANGED
data/lib/mother_ducker.rb
CHANGED
@@ -1,6 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
# entrypoint
|
2
|
+
require_relative "mother_ducker/strategy_orchestrator"
|
3
|
+
require_relative "mother_ducker/user"
|
4
|
+
|
5
|
+
# TODO: change name of this class
|
6
|
+
# class in module in charge of running the code
|
7
|
+
module MotherDucker
|
8
|
+
class Starter
|
9
|
+
def self.launch
|
10
|
+
# hackish but who's checking ?
|
11
|
+
# Build a user profile
|
12
|
+
user = User.new
|
13
|
+
# this method call fills out our instance variables
|
14
|
+
user.build_profile
|
15
|
+
# initiate a strategy class, passing it the user instance
|
16
|
+
strategy_orchestrator = StrategyCoordinator.new(user)
|
17
|
+
|
18
|
+
# call Strategy.strategize while user.satisfied == false
|
19
|
+
while user.satisfied == false
|
20
|
+
# this method asks the user if he is happy currently ?
|
21
|
+
user.enquire_satisfaction
|
22
|
+
strategy_orchestrator.strategize
|
23
|
+
end
|
24
|
+
# it will pick and execute a strategy from the set
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
6
28
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module MotherDucker
|
2
|
+
|
3
|
+
class User
|
4
|
+
attr_accessor :satisfied
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
# set our user attributes in here
|
8
|
+
@satisified = false
|
9
|
+
end
|
10
|
+
|
11
|
+
def build_profile
|
12
|
+
# TODO
|
13
|
+
puts "Code me ! User#build_profile! I will build the user profile"
|
14
|
+
end
|
15
|
+
|
16
|
+
def enquire_satisfaction
|
17
|
+
# TODO
|
18
|
+
puts "Code me ! User#enquire_satisfaction! I will check for happiness"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
Gem::Specification.new do |gem|
|
2
|
+
gem.name = 'motherducker'
|
3
|
+
gem.summary = "some random summary for now"
|
4
|
+
|
5
|
+
gem.version = "0.0.2"
|
6
|
+
gem.files = `git ls-files`.split($\)
|
7
|
+
gem.executables = ["motherducker"]
|
8
|
+
|
9
|
+
gem.author = ['Victor Korelsky']
|
10
|
+
gem.licenses = ['MIT']
|
11
|
+
|
12
|
+
gem.add_development_dependency "bundler", "~> 1.16"
|
13
|
+
gem.add_development_dependency "rake", "~> 10.0"
|
14
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motherducker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Korelsky
|
@@ -9,7 +9,35 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2018-07-14 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
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: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
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'
|
13
41
|
description:
|
14
42
|
email:
|
15
43
|
executables:
|
@@ -17,8 +45,18 @@ executables:
|
|
17
45
|
extensions: []
|
18
46
|
extra_rdoc_files: []
|
19
47
|
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- GEM_CHEATSHEET.md
|
50
|
+
- Gemfile
|
51
|
+
- Gemfile.lock
|
52
|
+
- README
|
53
|
+
- Rakefile
|
20
54
|
- bin/motherducker
|
21
55
|
- lib/mother_ducker.rb
|
56
|
+
- lib/mother_ducker/strategy_orchestrator.rb
|
57
|
+
- lib/mother_ducker/user.rb
|
58
|
+
- mother_ducker.gemspec
|
59
|
+
- sketch.txt
|
22
60
|
homepage:
|
23
61
|
licenses:
|
24
62
|
- MIT
|