dynamic_locals 0.1.0 → 0.2.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/.github/workflows/gem_push.yml +28 -0
- data/.github/workflows/version.yml +39 -0
- data/Gemfile.lock +1 -1
- data/lib/dynamic_locals/ast_rewriter.rb +3 -3
- data/lib/dynamic_locals/rewrite_translator.rb +1 -2
- data/lib/dynamic_locals/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9fd078313645331094f1cca0c85abace7264f305b5b8157902d642a9cd31f3dd
|
|
4
|
+
data.tar.gz: 12a7fe30e67b141da6cefbce3d703936796355f2135900eac4b56382dc0eab09
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 40ad316250ff980f1a678cdb83fe7e2fd269217697f74cefcd8671dc4144bcd64311c1d1e36fcf674b75d9d4687a9fdf86d05ecdaa9c57c7d9b7ac881bc84265
|
|
7
|
+
data.tar.gz: f4444dbb1a47cf30d1a1d701099efd4230195d2c7a50c3c0bbee04f9592dbcd7864f0d69e83464a5076c3c0849d07f840520f418211e400dfa1d94eefa3dd029
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Push gem to RubyGems.org
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
push:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
|
|
10
|
+
environment:
|
|
11
|
+
name: rubygems.org
|
|
12
|
+
url: https://rubygems.org/gems/dynamic_locals
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
id-token: write
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
# Set up
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- name: Set up Ruby
|
|
22
|
+
uses: ruby/setup-ruby@v1
|
|
23
|
+
with:
|
|
24
|
+
bundler-cache: true
|
|
25
|
+
ruby-version: ruby
|
|
26
|
+
|
|
27
|
+
# Release
|
|
28
|
+
- uses: rubygems/release-gem@v1
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Bump version
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version:
|
|
7
|
+
description: "What version level of bump?"
|
|
8
|
+
required: true
|
|
9
|
+
default: "patch"
|
|
10
|
+
type: choice
|
|
11
|
+
options:
|
|
12
|
+
- major
|
|
13
|
+
- minor
|
|
14
|
+
- patch
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: write
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
bump:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
env:
|
|
23
|
+
GH_TOKEN: ${{ github.token }}
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- name: Set up Ruby
|
|
27
|
+
uses: ruby/setup-ruby@v1
|
|
28
|
+
with:
|
|
29
|
+
ruby-version: ruby
|
|
30
|
+
- name: Set git config
|
|
31
|
+
run: |
|
|
32
|
+
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
|
|
33
|
+
git config --global user.name "$(gh api /users/${GITHUB_ACTOR} | jq .name -r)"
|
|
34
|
+
git remote set-url origin "https://x-access-token:${{ github.token }}@github.com/$GITHUB_REPOSITORY"
|
|
35
|
+
shell: bash
|
|
36
|
+
- name: Bump version
|
|
37
|
+
run: gem exec bump ${{ github.event.inputs.version }}
|
|
38
|
+
- name: push
|
|
39
|
+
run: git push
|
data/Gemfile.lock
CHANGED
|
@@ -7,9 +7,9 @@ module DynamicLocals
|
|
|
7
7
|
# an implicit begin/rescue (`raise; rescue; ...`). Parsing it as a standalone
|
|
8
8
|
# program rejects those, so we parse it wrapped in a method definition and
|
|
9
9
|
# then map node offsets back onto the original (unwrapped) source.
|
|
10
|
-
WRAPPER_NAME = "__dynamic_locals_parse_wrapper__"
|
|
11
|
-
WRAPPER_PREFIX = "def #{WRAPPER_NAME}\n"
|
|
12
|
-
WRAPPER_SUFFIX = "\nend"
|
|
10
|
+
WRAPPER_NAME = "__dynamic_locals_parse_wrapper__".freeze
|
|
11
|
+
WRAPPER_PREFIX = "def #{WRAPPER_NAME}\n".freeze
|
|
12
|
+
WRAPPER_SUFFIX = "\nend".freeze
|
|
13
13
|
|
|
14
14
|
def initialize(source)
|
|
15
15
|
@original_src = source.dup.freeze
|
|
@@ -449,8 +449,7 @@ module DynamicLocals
|
|
|
449
449
|
end
|
|
450
450
|
|
|
451
451
|
def keyword_unset_flag(name)
|
|
452
|
-
@keyword_unset_flags[name] ||=
|
|
453
|
-
generate_hygienic_name("__dynamic_locals_unset_#{@keyword_unset_flags.length}")
|
|
452
|
+
@keyword_unset_flags[name] ||= generate_hygienic_name("__dynamic_locals_unset_#{name}")
|
|
454
453
|
end
|
|
455
454
|
|
|
456
455
|
def keywords?
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dynamic_locals
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Hawthorn
|
|
@@ -72,7 +72,9 @@ executables: []
|
|
|
72
72
|
extensions: []
|
|
73
73
|
extra_rdoc_files: []
|
|
74
74
|
files:
|
|
75
|
+
- ".github/workflows/gem_push.yml"
|
|
75
76
|
- ".github/workflows/test.yml"
|
|
77
|
+
- ".github/workflows/version.yml"
|
|
76
78
|
- ".gitignore"
|
|
77
79
|
- CODE_OF_CONDUCT.md
|
|
78
80
|
- Gemfile
|
|
@@ -107,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
107
109
|
- !ruby/object:Gem::Version
|
|
108
110
|
version: '0'
|
|
109
111
|
requirements: []
|
|
110
|
-
rubygems_version: 4.0.
|
|
112
|
+
rubygems_version: 4.0.20
|
|
111
113
|
specification_version: 4
|
|
112
114
|
summary: Makes it possible to define locals dynamically
|
|
113
115
|
test_files: []
|