balm 0.2.2 → 1.0.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 +4 -4
- data/README.md +7 -14
- data/lib/balm/version.rb +1 -1
- data/lib/balm.rb +12 -13
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39fe20c9bc8e6065636d0929f3968b4ea0eb9ccabce5e4b1a82f02fa313dad85
|
4
|
+
data.tar.gz: 274c50d2c6bdb3802f9c81748ba42281944beb427913b174db93786b2832ce1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd3c4b4dc605fd898233bacb488b9ff1885aa7bd98c60f5ae25719537e34223e8b8e6d3682df9644f58dfdae32a694cc200bd9d0a4d3145783a1e2c3a9c7cc26
|
7
|
+
data.tar.gz: b3e25baa492b5128befb5461fb68aadcc722b2b06613bf749651f2059032440e870fad3950d2c8c0dbdcc60bd9827217baccb7ff439d192b4d88298caf43d6c1
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Balm
|
2
2
|
|
3
|
-
|
3
|
+
A simple to use gem that will generate random character types, tropes and/or settings. Most useful for writers in a rut if you need to jumpstart inspiration.
|
4
4
|
|
5
|
-
|
5
|
+
Called 'balm' to soothe the headaches of writer's block. Also great to generate random prompts for writing practice.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -21,27 +21,20 @@ Or install it yourself as:
|
|
21
21
|
$ gem install balm
|
22
22
|
|
23
23
|
## Usage
|
24
|
+
|
24
25
|
```ruby
|
25
26
|
require 'balm'
|
26
27
|
|
27
28
|
Balm::Plot.trope #=> "Arranged Marriage"
|
28
|
-
Balm::Plot.archetype(4) #=> "Minor God, Curate, Bard, Ghost"
|
29
|
+
Balm::Plot.archetype(4) #=> "Minor God, Curate, Bard, and Ghost"
|
29
30
|
Balm::Plot.setting #=> "The ruins of a Castle"
|
30
|
-
Balm::Plot.all(3) #=>
|
31
|
-
#=> One is a Celebrity and the other is not
|
32
|
-
#=> The city just before dawn "
|
33
|
-
|
34
|
-
```
|
35
|
-
|
36
|
-
## Development
|
31
|
+
Balm::Plot.all(3) #=> "Once upon a time, a Mage, Princess, and Dandy in The city just before dawn and One is a Celebrity and the other is not."
|
37
32
|
|
38
|
-
|
39
|
-
|
40
|
-
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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
33
|
+
```
|
41
34
|
|
42
35
|
## Contributing
|
43
36
|
|
44
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
37
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/chelsearostonrappazzo/balm. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/balm/blob/master/CODE_OF_CONDUCT.md).
|
45
38
|
|
46
39
|
## License
|
47
40
|
|
data/lib/balm/version.rb
CHANGED
data/lib/balm.rb
CHANGED
@@ -15,7 +15,7 @@ module Balm
|
|
15
15
|
YAML.load_file(trope_data).each do |trope|
|
16
16
|
tropes << trope.strip
|
17
17
|
end
|
18
|
-
|
18
|
+
return tropes.sample
|
19
19
|
end
|
20
20
|
|
21
21
|
def archetype(num)
|
@@ -24,10 +24,14 @@ module Balm
|
|
24
24
|
YAML.load_file(archetype_data).each do |archetype|
|
25
25
|
archetypes << archetype.strip
|
26
26
|
end
|
27
|
-
if
|
28
|
-
|
29
|
-
elsif num
|
30
|
-
|
27
|
+
if num === 1
|
28
|
+
return archetypes.sample(num)
|
29
|
+
elsif num === 2
|
30
|
+
return archetypes.sample(num).join(" and ")
|
31
|
+
elsif num >= 3
|
32
|
+
archetypes_list = archetypes.sample(num)
|
33
|
+
archetypes_list[-1] = "and " + archetypes_list[-1]
|
34
|
+
return archetypes_list.join(", ")
|
31
35
|
end
|
32
36
|
end
|
33
37
|
|
@@ -37,17 +41,12 @@ module Balm
|
|
37
41
|
YAML.load_file(setting_data).each do |setting|
|
38
42
|
settings << setting.strip
|
39
43
|
end
|
40
|
-
|
44
|
+
return settings.sample
|
41
45
|
end
|
42
46
|
|
43
47
|
def all(num)
|
44
|
-
|
45
|
-
archetype(num)
|
46
|
-
puts "~Trope~"
|
47
|
-
trope
|
48
|
-
puts "~Setting~"
|
49
|
-
setting
|
48
|
+
return "Once upon a time, a #{archetype(num)} in a #{setting} and #{trope} happens. Have you found your path?"
|
50
49
|
end
|
51
50
|
end
|
52
51
|
end
|
53
|
-
end
|
52
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: balm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chelsea Roston
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
77
|
-
rubygems_version: 3.2.
|
77
|
+
rubygems_version: 3.2.15
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: '"The purpose of this gem is to generate random plots for those creatively
|