musa-dsl 0.26.8 → 0.26.9

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: a1598e463290a813acd81f7d4c2a380c2b4f904c266505efb1c0c76295a2e891
4
- data.tar.gz: 7b6c53ec4109d923f6aab5a1c250672b87a0c1bcc275c0e3359e769b01dd9371
3
+ metadata.gz: '069648c5744db5c2249aa8f335a2d8bcc9d26f6e27988d62c60afc28e4dfa5eb'
4
+ data.tar.gz: 5e08545d35e6cdec21e4187c77de9d30543b23485049deb8f115de600db9f791
5
5
  SHA512:
6
- metadata.gz: 8178a6d752685d3ae592c1e80374b85cba4f59ffdcc556d358d1f0c9a2787812421a74c6c247b890b80e05bf221ce3b490a60d2201361041419b0ca4e42f93cc
7
- data.tar.gz: bfd208048b17a2e4f5374eedda0bd5dd5b2d6eb7268a867c63523477da6170f2a7a340d2dca8ab719467c58efd9662fed221118301d3d321c8176cb9785f380b
6
+ metadata.gz: 9edd7719bde7db028df77f0d4e2abe6e2a2d29d7a66c46df2ecad238118e6b28e3b7f8a902a42c41b9e554f8746b5e04af59b51d7e4c599345b0b74250bf54a5
7
+ data.tar.gz: 770234fd7c5d90293416558039ddde4ced7130bd8488654aa432b99f2426d2aeafbde436cea81f2c87d58845c96f7ca8f9d8004355f7e9ef3ad39d86430a5a71
data/Gemfile CHANGED
@@ -2,5 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
  gem 'rubocop', group: 'development'
5
- gem 'rubocop', group: 'development'
6
- gem 'rubocop', group: 'development'
@@ -6,7 +6,7 @@ module Musa::Neumas
6
6
  def initialize(scale, base_duration: nil, transcriptor: nil, base: nil)
7
7
  @base_duration = base_duration
8
8
  @base_duration ||= base[:duration] if base
9
- @base_duration ||= Rational(1,4)
9
+ @base_duration ||= Rational(1, 4)
10
10
 
11
11
  base ||= { grade: 0, octave: 0, duration: @base_duration, velocity: 1 }
12
12
 
@@ -123,6 +123,8 @@ module Musa
123
123
  "trying to print a message in MusaLCE but the client is not connected. Ignoring message \'#{message} \'."
124
124
  end
125
125
  end
126
+
127
+ nil
126
128
  end
127
129
 
128
130
  private
@@ -202,8 +202,8 @@ module Musa
202
202
  end
203
203
 
204
204
  def eval_command(block, value_parameters, key_parameters)
205
- _value_parameters = value_parameters ? value_parameters.collect { |e| subcontext.eval_element(e) } : []
206
- _key_parameters = key_parameters ? key_parameters.transform_values { |e| subcontext.eval_element(e) } : {}
205
+ _value_parameters = value_parameters&.collect { |e| subcontext.eval_element(e) } || []
206
+ _key_parameters = key_parameters&.transform_values { |e| subcontext.eval_element(e) } || {}
207
207
 
208
208
  # used instance_exec because the code on block comes from a neumalang source, so the correct
209
209
  # execution context is the neumalang context (no other context has any sense)
@@ -39,7 +39,7 @@ module Musa
39
39
  def eval_condition
40
40
  if @ticks
41
41
  @ticks -= 1
42
- @ticks > 0
42
+ @ticks.positive?
43
43
  else
44
44
  @block.call
45
45
  end
data/lib/musa-dsl.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Musa
2
- VERSION = '0.26.8'.freeze
2
+ VERSION = '0.26.9'.freeze
3
3
  end
4
4
 
5
5
  require_relative 'musa-dsl/core-ext'
data/musa-dsl.gemspec CHANGED
@@ -1,12 +1,12 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'musa-dsl'
3
- s.version = '0.26.8'
4
- s.date = '2023-05-30'
3
+ s.version = '0.26.9'
4
+ s.date = '2023-06-12'
5
5
  s.summary = 'A simple Ruby DSL for making complex music'
6
6
  s.description = 'Musa-DSL: A Ruby framework and DSL for algorithmic sound and musical thinking and composition'
7
7
  s.authors = ['Javier Sánchez Yeste']
8
8
  s.email = 'javier.sy@gmail.com'
9
- s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|samples)/}) }
9
+ s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|samples|\.github)/}) }
10
10
  s.homepage = 'https://github.com/javier-sy/musa-dsl'
11
11
  s.license = 'LGPL-3.0'
12
12
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: musa-dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.8
4
+ version: 0.26.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Sánchez Yeste
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-30 00:00:00.000000000 Z
11
+ date: 2023-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logger
@@ -125,7 +125,6 @@ executables: []
125
125
  extensions: []
126
126
  extra_rdoc_files: []
127
127
  files:
128
- - ".github/workflows/gem-test-and-push.yml"
129
128
  - ".gitignore"
130
129
  - Gemfile
131
130
  - LICENSE.md
@@ -1,48 +0,0 @@
1
- name: Generate gem and push to rubygems repository
2
-
3
- on:
4
- push:
5
- branches: [ master ]
6
- pull_request:
7
- branches: [ master ]
8
-
9
- jobs:
10
- test:
11
- runs-on: ubuntu-latest
12
- strategy:
13
- matrix:
14
- ruby-version: ['2.7.8']
15
-
16
- steps:
17
- - uses: actions/checkout@v2
18
- - name: Set up Ruby
19
- uses: ruby/setup-ruby@v1
20
- with:
21
- ruby-version: ${{ matrix.ruby-version }}
22
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
23
- - name: Run tests
24
- run: bundle exec rspec -t \~slow
25
-
26
- build:
27
- name: Build + Publish
28
- runs-on: ubuntu-latest
29
- needs: test
30
- permissions:
31
- contents: read
32
- packages: write
33
-
34
- steps:
35
- - uses: actions/checkout@v3
36
- - name: Set up Ruby 2.7.8
37
- uses: ruby/setup-ruby@v1
38
- with:
39
- ruby-version: 2.7.8
40
-
41
- - name: Publish to RubyGems
42
- run: |
43
- mkdir -p $HOME/.gem
44
- touch $HOME/.gem/credentials
45
- chmod 0600 $HOME/.gem/credentials
46
- printf -- "---\n:rubygems_api_key: ${{secrets.GEM_HOST_API_KEY}}\n" > $HOME/.gem/credentials
47
- gem build *.gemspec
48
- gem push *.gem