balm 0.2.2 → 1.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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -14
  3. data/lib/balm/version.rb +1 -1
  4. data/lib/balm.rb +11 -12
  5. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0e9dd7b238c93d703aa75d2c7362e408d5f4906619f8a04c0f927f543aaa5f5
4
- data.tar.gz: 7e2f93ae1c4e672df00d63580e12e18afde5bb1a56fdb748c21d75354a49d106
3
+ metadata.gz: 36f5a02d30a8f29cc167268fa76c94de9bc7dd9714228938e898dd0354e4b887
4
+ data.tar.gz: 71a7ac30ff0efa83b3db5dcb0b9e7faebe11be802b492e0046f7cc12ad1ba7cd
5
5
  SHA512:
6
- metadata.gz: c5a6f814214e56be8688dce1728e6555656f5dcda015bd63ecde3eccf8d79e92f23bb12c49ae1f763063a82436e253bb20582001f6602779691ff9d07d4f5395
7
- data.tar.gz: 7db8c20be4ddff6b7fbb62ddb5d2b4b1aca09a2831fbbd37ce1259d33c31a39c55f33f648b7238732625674593b8ea0ef5759d72de1580d61d37a3c59319ea2a
6
+ metadata.gz: 07bd21bf56e8fd64748fcfd9017dcd70fd66668e3739cbbf3c5baa4576c77d3b81799a79423d461eb53bc30eff0362b5b3dea30bc62df47f750b3732deed3d29
7
+ data.tar.gz: 8179764cd4349a485c538ac31e278de6a0754ad0874d90485af9ddcfb2f9894ecab1832014c7e6453b2d22cf9239fd5b3dfa9be362b146a4d94016d9336b09a2
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Balm
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/balm`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- TODO: Delete this and the text above, and describe your gem
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) #=> "Mage, Princess, Dandy
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
- 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.
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/[USERNAME]/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).
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Balm
4
- VERSION = "0.2.2"
4
+ VERSION = "1.0.2"
5
5
  end
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
- puts tropes.sample
18
+ 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 (1..5).include?(num)
28
- puts archetypes.sample(num).join(", ")
29
- elsif num > 5
30
- puts archetypes.sample(5).join(", ")
27
+ if num === 1
28
+ archetypes.sample(num)
29
+ elsif num === 2
30
+ archetypes.sample(num).join(" and ")
31
+ elsif num >= 3
32
+ archetypes_list = archetypes.sample(num)
33
+ archetypes_list[-1] = "and " + archetypes_list[-1]
34
+ archetypes_list.join(" , ")
31
35
  end
32
36
  end
33
37
 
@@ -37,16 +41,11 @@ module Balm
37
41
  YAML.load_file(setting_data).each do |setting|
38
42
  settings << setting.strip
39
43
  end
40
- puts settings.sample
44
+ settings.sample
41
45
  end
42
46
 
43
47
  def all(num)
44
- puts "~Characters~"
45
- archetype(num)
46
- puts "~Trope~"
47
- trope
48
- puts "~Setting~"
49
- setting
48
+ "Once upon a time, a #{archetype(num)} in #{setting} and #{trope} happens. Have you found your path?"
50
49
  end
51
50
  end
52
51
  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.2.2
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chelsea Roston
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-07 00:00:00.000000000 Z
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.3
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