gamefic-sdk 3.2.0 → 3.2.1

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: 4b98f8d00bed8b7baaadddfceade62d8974c805e425e63b174f335bb0baa1874
4
- data.tar.gz: f9b74e8df206e6b648316a06c4a9481873af3acade70a6d15a1cec794d216fcb
3
+ metadata.gz: bfae698c7fc6e90d559be158ad0b86b2a2c5066ff6837465347634849d7804c8
4
+ data.tar.gz: 05fb55ff00ca7f25c43c11676732272a84b048f1add4160a3ac58366f9bd48a7
5
5
  SHA512:
6
- metadata.gz: 36e1db4ce3268b0e86fa3a20f30a91b339d31a092ef8f598a23ea7bfbffd0cbbca6403032cad866d1d7f5a5d04560ed5013331656890346674204e9d7842bfdb
7
- data.tar.gz: fbcd4fe1d2f68fdd64540d725cbee8d107ed9d17817fdc6abc3bd93d3a961951f2dfcb69150b8ecbd42f14e2d30e272f188fd0b23295debb3d99c42981867368
6
+ metadata.gz: '02483f530bf30a9b98acb9fe90b77172b075cc8928cfe1d7e016b35d600bbd49bbbe79f20bdf7487e949808be3242672d07cf7ca105f28a3ad8c97f0cd1ed1a7'
7
+ data.tar.gz: 0bda3d0de120dba333ba0800de784cfe0e2c267427e42203f93ef3ab18feb9ca6f09e4cd03e02d7c87334a59f20c4974966b928132122791f00ffaabcce3b5f1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 3.2.1 - August 6, 2024
2
+ - Set default path for opal-rspec
3
+ - Selectable react-gamefic version (default is @latest)
4
+
1
5
  ## 3.2.0 - July 20, 2024
2
6
  - Optional specs in project scaffold
3
7
  - Reorganize project requirements
@@ -12,13 +12,13 @@ module Gamefic
12
12
 
13
13
  # Generate a web app using NPM.
14
14
  #
15
- def generate
15
+ def generate version = '@latest'
16
16
  puts "Node version #{check_for_npm} detected. Preparing the web app..."
17
17
  web_path = File.join(absolute_path, 'web')
18
18
  FileUtils.mkdir_p web_path
19
19
  Dir.chdir web_path do
20
20
  name = File.basename(absolute_path)
21
- system 'npx', 'react-gamefic', '--name', name, '--class', 'GAMEFIC_PLOT_CLASS', '--path', '../lib'
21
+ system 'npx', '-y', "react-gamefic#{version}", '--name', name, '--class', 'GAMEFIC_PLOT_CLASS', '--path', '../lib'
22
22
  puts 'The web app is ready.'
23
23
  puts 'Run `rake web:run` to start the app in dev mode.'
24
24
  end
@@ -18,9 +18,8 @@ module Gamefic::Sdk::Tasks
18
18
  Ruby.new.build
19
19
  end
20
20
 
21
- define_task 'web:generate', 'Generate a web app' do
22
- Web.new.generate
23
- end
21
+ Rake::Task.define_task('web:generate', [:version]) { |_, args| Web.new.generate(args[:version]) }
22
+ .tap { |task| task.add_description 'Generate a web app' }
24
23
 
25
24
  define_task 'web:run', 'Run a standalone web app' do
26
25
  Web.new.run
@@ -31,7 +30,7 @@ module Gamefic::Sdk::Tasks
31
30
  end
32
31
  end
33
32
 
34
- def define_task name, desc, &block
33
+ def define_task(name, desc, &block)
35
34
  return if Rake::Task.task_defined?(name)
36
35
 
37
36
  # @type [Rake::Task]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gamefic
4
4
  module Sdk
5
- VERSION = '3.2.0'
5
+ VERSION = '3.2.1'
6
6
  end
7
7
  end
@@ -13,9 +13,9 @@ Opal::RSpec::RakeTask.new(:opal) do |_, config|
13
13
  Bundler.definition
14
14
  .dependencies_for([:default])
15
15
  .each { |dep| Opal.use_gem dep.name }
16
- Opal.append_path __dir__
17
16
  Opal.append_path File.join(__dir__, 'lib')
17
+ config.default_path = 'spec'
18
18
  config.pattern = 'spec/**/*_spec.rb'
19
- config.requires = ['spec/opal_helper']
19
+ config.requires = ['opal_helper']
20
20
  end
21
21
  <% end %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gamefic-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-20 00:00:00.000000000 Z
11
+ date: 2024-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gamefic