starbutterfly 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 716222d46a2313b1e73bf2487b20028e39873445
4
+ data.tar.gz: 65b3cf8520bb415f916a30eb07fcfb25e3311410
5
+ SHA512:
6
+ metadata.gz: ca8dcb18f32a822c20a854ed17b8501ff97eca491be5aadbe0a13cbea4358856133766c108a69fd02af3939c07443289e39d38ccea06a3d808016b687d0839ba
7
+ data.tar.gz: 56ec14b64954b126219065badd593208ec2073e0f7e824de11b4cdc66f27160e109c222625383ffa1ca6c0036a306553ab388871d2e4f486c7620f0d6c07072f
@@ -0,0 +1,7 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /doc/
6
+ /pkg/
7
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in starbutterfly.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Effy Elden
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.
@@ -0,0 +1,26 @@
1
+ # StarButterfly
2
+
3
+ Add a little Mewnian magic to your terminal.
4
+
5
+ ## Installation
6
+
7
+ $ gem install starbutterfly
8
+
9
+ ## Usage
10
+
11
+ $ starbutterfly cast
12
+ *Cast a Mewnian spell right into your terminal*
13
+
14
+ $ starbutterfly tweet
15
+ *Cast a Mewnian spell through a portal to the Twitterverse*
16
+
17
+
18
+ ## Contributing
19
+
20
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ineffyble/starbutterfly.
21
+
22
+
23
+ ## License
24
+
25
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
26
+
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'starbutterfly'
4
+
5
+ case ARGV[0]
6
+ when 'cast'
7
+ then StarButterfly.cast!
8
+ when 'tweet'
9
+ then StarButterfly.tweet!
10
+ else
11
+ puts 'Unknown command. Valid commands: cast, tweet.'
12
+ end
@@ -0,0 +1,96 @@
1
+ require 'paint'
2
+ require 'launchy'
3
+ require 'uri'
4
+
5
+ class StarButterfly
6
+ class << self
7
+ @@enhancers = ['Mega','Radical','Shimmering','Shooting','Super','Turbo','Mystic','Radiant','Fantastic','Foaming','Sparkling']
8
+ @@components = ['Bacon','Kitty','Hawaiian','Bunny Rabbit','Cupcake','Dagger','Crystal','Heart','Glowworm','Turtle','Makeup','Starfish','Mushroom','Narhwal','Rainbow','Raspberry','Destructo','Star','Spider With A Top Hat','Stardust','Daisy','Geyser','Dolphin','Syrup','Tsunami','Toothpaste','Tidal','Nuclear','Butterfly','Winter','Storm','Hyper','Beanbag','Monster','Emerald','Snake','Glitter','Dragon','Magnificence','Marshmallow','Man','Magnet','Love','Mending','Room','Suck','Porcupine','Beast','Shadow','Sparkle','Glitter','Bomb','Sunshine','Friendship','Cutie','Kitten','Clutter','Rainbow','Raccoon','Snail','Helpe','Height','Warnicorn','All-Seeing','Bright-Glow','Cotton Candy','Fire','Easy Peasy','Exit','Twinkle','Bubble','Honeybee','Tornado','Jellybean','Hallucination','Lamp','Lightning','Explosive','Crystal','Paper','Fist','Flytrap','Ribbon','Rubber','Sparkle','Bounce','Crystal','Spiral']
9
+ @@outputs = ['Nightmare','Blast','Attack','Rescue','Tsunami','Destruction Blast','Rainbow Blast','Avalanche','Panzerfaust','Cannon','Explosion','Devastation','Windstorm','Slam','Shockwave','Tidal Blast','Hyper Blow','Blow','Metamorphisis','Strike','Escalation','Mush','Storm','Love Storm','Hurricane','Transform','Transformation','Expand','Spell','Cleaners','Rotation','Charm','Slap','Stampede','Eye','Pyro','Extinguish','Freezy','Beam','Ripple','Swarm','Mist','Destroy','Change Back','Laser','Tornado','Bridge','Punch','Lasso','House','Bounce House','Seesaw','Noodle','Annihilation','Tornado','Wave','Tidal Wave']
10
+ @@spell = []
11
+ @@enhancement_level = rand(0..2)
12
+ @@component_level = rand(0..2)
13
+
14
+ def 🌈
15
+ return "%06x" % (rand * 0xffffff)
16
+ end
17
+
18
+ def 🖌
19
+ Paint
20
+ end
21
+
22
+ def spell
23
+ @@spell
24
+ end
25
+
26
+ def enhancers
27
+ @@enhancers
28
+ end
29
+
30
+ def enhancement_level
31
+ @@enhancement_level
32
+ end
33
+
34
+ def components
35
+ @@components
36
+ end
37
+
38
+ def component_level
39
+ @@component_level
40
+ end
41
+
42
+ def outputs
43
+ @@outputs
44
+ end
45
+
46
+ def time_for_some_magic
47
+ enhancement_level.times do
48
+ enhancer = enhancers.sample
49
+ spell << enhancer
50
+ enhancers.delete(enhancer)
51
+ end
52
+ end
53
+
54
+ def dip_down
55
+ component_level.times do
56
+ component = components.sample
57
+ spell << component
58
+ components.delete(component)
59
+ end
60
+ end
61
+
62
+ def scrape_the_sides
63
+ spell << outputs.sample
64
+ end
65
+
66
+ def activate
67
+ incantation = ''
68
+ spell.each do |s|
69
+ incantation << 🖌["#{s} ", 🌈]
70
+ end
71
+ incantation.chomp!
72
+ incantation << '!'
73
+ puts incantation
74
+ end
75
+
76
+ def send_through_portal
77
+ return spell.join(" ") + "!"
78
+ end
79
+
80
+ def cast!
81
+ StarButterfly.time_for_some_magic
82
+ StarButterfly.dip_down
83
+ StarButterfly.scrape_the_sides
84
+ StarButterfly.activate
85
+ end
86
+
87
+ def tweet!
88
+ StarButterfly.time_for_some_magic
89
+ StarButterfly.dip_down
90
+ StarButterfly.scrape_the_sides
91
+ tweet_spell = URI.encode(StarButterfly.send_through_portal)
92
+ url = "https://twitter.com/intent/tweet?text=#{tweet_spell}&hashtags=FromAnotherDimension"
93
+ Launchy.open(url)
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,14 @@
1
+ Gem::Specification.new do |gem|
2
+ gem.name = "starbutterfly"
3
+ gem.version = '0.1.0'
4
+ gem.author = "Effy Elden"
5
+ gem.email = "dev@effy.is"
6
+
7
+ gem.summary = "Add a little Mewnian magic to your terminal"
8
+ gem.description = "Generate spells straight from Star Butterfly's wand"
9
+ gem.homepage = "https://github.com/ineffyble/starbutterfly"
10
+ gem.license = "MIT"
11
+
12
+ gem.files = `git ls-files -z`.split("\x0")
13
+ gem.executables << 'starbutterfly'
14
+ end
metadata ADDED
@@ -0,0 +1,51 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: starbutterfly
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Effy Elden
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-01-23 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Generate spells straight from Star Butterfly's wand
14
+ email: dev@effy.is
15
+ executables:
16
+ - starbutterfly
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".gitignore"
21
+ - Gemfile
22
+ - LICENSE.txt
23
+ - README.md
24
+ - bin/starbutterfly
25
+ - lib/starbutterfly.rb
26
+ - starbutterfly.gemspec
27
+ homepage: https://github.com/ineffyble/starbutterfly
28
+ licenses:
29
+ - MIT
30
+ metadata: {}
31
+ post_install_message:
32
+ rdoc_options: []
33
+ require_paths:
34
+ - lib
35
+ required_ruby_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ required_rubygems_version: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ requirements: []
46
+ rubyforge_project:
47
+ rubygems_version: 2.6.8
48
+ signing_key:
49
+ specification_version: 4
50
+ summary: Add a little Mewnian magic to your terminal
51
+ test_files: []