gamefic-standard 2.3.1 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc492bd7007da79a0370041571eda045f2d56c66987406001adb9609fa2272ff
4
- data.tar.gz: 1f7d3bfaa885983d894b6eada5a752b629ca42183c96abcc22d7cf4f1f0c7a60
3
+ metadata.gz: 6abba8f34782d5cfb4beee5d43dc31f155b535da326b385d7404e939d3920c6e
4
+ data.tar.gz: 938d1bdcdbf488ee44531fcc00df5de29c4979869986c5ddbc3e7e479ae8e6bf
5
5
  SHA512:
6
- metadata.gz: da8171873782d6fdea921d9a19981a581afb0e80913798ec969c2e9bd173ab73268ea3d1aff7e7d32f57dc969fa4d4ef3d386a36cb68a7a88220b7350082ad43
7
- data.tar.gz: 3727672be7777bee08b33a79f3bee5fb2203e1cfe4ca140c6fa837b4b11d9cb4f2fadb35c7fb724bf7cae4a800382af6f240628141bede10bed053db184ae6c3
6
+ metadata.gz: 8b21f6722f5247b3881bc3d056e77838de488f3d907114234a6c3737a9b37f6a7373d62dc1337a83a5c1e46f022e1cc7dd90f5c55c09043010e07ac814d01a97
7
+ data.tar.gz: 3ea46e35b5f526854c8666f1dee03a5d72f77995dc2cdf803ae6f5b26b07bc619e698b9fc14b1f2c8082924d10cbe4a4ca219ac3db8b08210668c46a5b4cf1e9
@@ -0,0 +1,40 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with rspec.
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: RSpec
9
+
10
+ on:
11
+ push:
12
+ branches: [ master ]
13
+ pull_request:
14
+ branches: [ master ]
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ test:
21
+
22
+ runs-on: ubuntu-latest
23
+ strategy:
24
+ matrix:
25
+ ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1']
26
+
27
+ steps:
28
+ - uses: actions/checkout@v3
29
+ - name: Set up Ruby
30
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
31
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
32
+ uses: ruby/setup-ruby@v1
33
+ # uses: ruby/setup-ruby@2b019609e2b0f1ea1a2bc8ca11cb82ab46ada124
34
+ with:
35
+ ruby-version: ${{ matrix.ruby-version }}
36
+ bundler-cache: false
37
+ - name: Install dependencies
38
+ run: bundle install
39
+ - name: Run tests
40
+ run: bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.4.0 - February 11, 2023
2
+ - Change Actor#perform to Actor#execute
3
+ - Update gamefic dependency
4
+
1
5
  ## 2.3.1 - September 25, 2022
2
6
  - Handle leave actions without parents
3
7
 
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
35
35
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
36
36
  spec.require_paths = ["lib"]
37
37
 
38
- spec.add_dependency 'gamefic', '~> 2.2'
38
+ spec.add_dependency 'gamefic', '~> 2.4'
39
39
 
40
40
  spec.add_development_dependency 'bundler', '~> 2.0'
41
41
  spec.add_development_dependency 'rake', '~> 10.0'
@@ -4,7 +4,7 @@ Gamefic.script do
4
4
  end
5
5
 
6
6
  respond :drop, Gamefic::Query::Descendants.new do |actor, thing|
7
- actor.perform :take, thing
7
+ actor.execute :take, thing
8
8
  next unless thing.parent == actor
9
9
  thing.parent = actor.parent
10
10
  actor.tell "You drop #{the thing}."
@@ -7,7 +7,7 @@ Gamefic.script do
7
7
  if !portal.direction.nil?
8
8
  actor.tell "You go #{portal.direction}."
9
9
  end
10
- actor.perform :look
10
+ actor.execute :look
11
11
  end
12
12
  end
13
13
 
@@ -15,7 +15,7 @@ Gamefic.script do
15
15
  if actor.parent == actor.room
16
16
  actor.tell "I don't see any way to go \"#{text} from here."
17
17
  else
18
- actor.perform :leave
18
+ actor.execute :leave
19
19
  if actor.parent == actor.room
20
20
  actor.perform "go #{text}"
21
21
  else
@@ -25,7 +25,7 @@ Gamefic.script do
25
25
  end
26
26
 
27
27
  respond :go, Use.available(Door) do |actor, door|
28
- actor.perform :open, door unless door.open?
28
+ actor.execute :open, door unless door.open?
29
29
  actor.proceed if door.open?
30
30
  end
31
31
 
@@ -4,7 +4,7 @@ Gamefic.script do
4
4
  end
5
5
 
6
6
  respond :insert, Use.available, Use.available(Receptacle) do |actor, thing, receptacle|
7
- actor.perform :take, thing unless thing.parent == actor
7
+ actor.execute :take, thing unless thing.parent == actor
8
8
  next unless thing.parent == actor
9
9
  thing.parent = receptacle
10
10
  actor.tell "You put #{the thing} in #{the receptacle}."
@@ -18,7 +18,7 @@ Gamefic.script do
18
18
  if portals.length == 0
19
19
  actor.tell "You don't see any obvious exits."
20
20
  elsif portals.length == 1
21
- actor.perform :go, portals[0]
21
+ actor.execute :go, portals[0]
22
22
  else
23
23
  actor.tell "I don't know which way you want to go: #{portals.join_or}."
24
24
  end
@@ -26,14 +26,14 @@ Gamefic.script do
26
26
 
27
27
  respond :leave do |actor|
28
28
  if actor.parent
29
- actor.perform :leave, actor.parent
29
+ actor.execute :leave, actor.parent
30
30
  else
31
31
  actor.tell "You don't see any obvious exits."
32
32
  end
33
33
  end
34
34
 
35
35
  respond :leave, Use.parent(Container, :enterable?, :closed?) do |actor, container|
36
- actor.perform :open, container
36
+ actor.execute :open, container
37
37
  actor.proceed if container.open?
38
38
  end
39
39
 
@@ -13,7 +13,7 @@ Gamefic.script do
13
13
  end
14
14
 
15
15
  respond :lock, Use.available(Lockable, :has_lock_key?), Use.available do |actor, thing, key|
16
- actor.perform :take, key if key.parent != actor
16
+ actor.execute :take, key if key.parent != actor
17
17
  actor.proceed if key.parent == actor
18
18
  end
19
19
 
@@ -1,11 +1,11 @@
1
1
  Gamefic.script do
2
2
  respond :look, Use.text(/^here$/i) do |actor, _|
3
- actor.perform :look, actor.room
3
+ actor.execute :look, actor.room
4
4
  end
5
5
 
6
6
  respond :look, Use.itself do |actor, _|
7
7
  actor.tell actor.description
8
- actor.perform :inventory
8
+ actor.execute :inventory
9
9
  end
10
10
 
11
11
  respond :look, Use.available(Thing) do |actor, thing|
@@ -21,8 +21,8 @@ Gamefic.script do
21
21
  end
22
22
 
23
23
  respond :open, Use.available(Lockable, :has_lock_key?), Use.available do |actor, thing, key|
24
- actor.perform :unlock, thing, key
25
- actor.perform :open, thing if thing.unlocked?
24
+ actor.execute :unlock, thing, key
25
+ actor.execute :open, thing if thing.unlocked?
26
26
  end
27
27
 
28
28
  interpret 'open :thing with :key', 'open :thing :key'
@@ -4,7 +4,7 @@ Gamefic.script do
4
4
  end
5
5
 
6
6
  respond :place, Use.available, Use.available(Supporter) do |actor, thing, supporter|
7
- actor.perform :take, thing unless thing.parent == actor
7
+ actor.execute :take, thing unless thing.parent == actor
8
8
  next unless thing.parent == actor
9
9
  thing.parent = supporter
10
10
  actor.tell "You put #{the thing} on #{the supporter}."
@@ -1,6 +1,6 @@
1
1
  Gamefic.script do
2
2
  respond :search, Use.available(Thing) do |actor, thing|
3
- actor.perform :look, thing
3
+ actor.execute :look, thing
4
4
  end
5
5
 
6
6
  respond :search, Use.available(Receptacle) do |actor, thing|
@@ -17,7 +17,7 @@ Gamefic.script do
17
17
  end
18
18
 
19
19
  respond :search, Use.available(Container, :closed?) do |actor, container|
20
- actor.perform :open, container
20
+ actor.execute :open, container
21
21
  actor.proceed if container.open?
22
22
  end
23
23
 
@@ -4,7 +4,7 @@ Gamefic.script do
4
4
  end
5
5
 
6
6
  respond :talk, Use.itself do |actor, yourself|
7
- actor.perform :talk
7
+ actor.execute :talk
8
8
  end
9
9
 
10
10
  respond :talk, Use.available do |actor, thing|
@@ -13,7 +13,7 @@ Gamefic.script do
13
13
  end
14
14
 
15
15
  respond :unlock, Use.available(Lockable, :has_lock_key?), Use.available do |actor, _thing, key|
16
- actor.perform :take, key if key.parent != actor
16
+ actor.execute :take, key if key.parent != actor
17
17
  actor.proceed if key.parent == actor
18
18
  end
19
19
 
@@ -9,7 +9,7 @@ Gamefic.script do
9
9
 
10
10
  respond :give, Use.available(Character), Use.available do |actor, _character, gift|
11
11
  if gift.parent != actor
12
- actor.perform :take, gift
12
+ actor.execute :take, gift
13
13
  end
14
14
  if gift.parent == actor
15
15
  actor.proceed
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Gamefic
2
4
  module Standard
3
- VERSION = '2.3.1'
5
+ VERSION = '2.4.0'
4
6
  end
5
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gamefic-standard
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-25 00:00:00.000000000 Z
11
+ date: 2023-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gamefic
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.2'
19
+ version: '2.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.2'
26
+ version: '2.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -88,6 +88,7 @@ executables: []
88
88
  extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
+ - ".github/workflows/rspec.yml"
91
92
  - ".gitignore"
92
93
  - ".rspec"
93
94
  - ".travis.yml"