glimmer 2.7.2 → 2.7.3

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: 3bfbde6699cab50f38cbfce6e98a2b9debf4fd8aa51c61a0e646137525727fb2
4
- data.tar.gz: f772b755f2f923b394cc6c7dce3482380d615b9883e0051d0ee199e94ea71d3c
3
+ metadata.gz: 47db370b7e55a13d57155cb65baefc6176157af4abfb520405b49287c0dd1d53
4
+ data.tar.gz: '082b27860acaa6ccac808aec5190f08f87d28b56c2eadeb8939bdff52a4e0563'
5
5
  SHA512:
6
- metadata.gz: 799f856d849bda5eada558871849b3d93dec03dea086a69ca53d13a4bd7e0413dd7b3cc0033083310523f215ef747c3242748ba55d584e46737c795d2103aa2b
7
- data.tar.gz: 5ede8dcc2835adf772f51bb15200670d7b1710eba02e5d0e8cc5a4a2299beb74aea44bd5ff62afbe7506889035ef09fde99ad9f72f8011a3d1ed3e96a7c41d5d
6
+ metadata.gz: a24bc2dda1ced284c21e5f6e251f92425522e4f173f1adc55db8584cb53d8ab0302967a5441585e0e09bb4dbd34132c944373f06e79e92f78f2b3564ebcd76bb
7
+ data.tar.gz: c9366d6aaca9b26e7632faa12f61c50e50e1ad5d5d5a3a43f37c75a6eb753b16add2045ce018d2fc96f1c935facd5a9919489352f604409bd22323a50523eadb
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  Related Change Logs:
4
4
  - [glimmer-dsl-swt/CHANGELOG.md](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/CHANGELOG.md)
5
5
 
6
+ ### 2.7.3
7
+
8
+ - Support case-insensitive static expressions
9
+
6
10
  ### 2.7.2
7
11
 
8
12
  - Support capitalized static expressions
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 style="position: relative; top: 20px;" />](https://rubygems.org/gems/glimmer) Glimmer 2.7.2
1
+ # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 style="position: relative; top: 20px;" />](https://rubygems.org/gems/glimmer) Glimmer 2.7.3
2
2
  ## DSL Framework for Ruby GUI and More
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer.svg)](http://badge.fury.io/rb/glimmer)
4
4
  [![rspec](https://github.com/AndyObtiva/glimmer/workflows/rspec/badge.svg)](https://github.com/AndyObtiva/glimmer/actions?query=workflow%3Arspec)
@@ -131,7 +131,9 @@ Every `Expression` sublcass must specify two methods at least:
131
131
  `StaticExpression` sublcasses may skip the `can_interpret?` method since they include a default implementation for it that matches the name of the keyword from the class name by convention. For example, a `color` keyword would have a `ColorExpression` class, so `color` is inferred automatically from class name and used in deciding whether the class can handle a `color` keyword or not.
132
132
  `StaticExpression` may declare the following class method options (if any other than `downcased` (default) is set, then `downcased` must be set explicitly if needed):
133
133
  - `downcased true` (default): indicates that the StaticExpression expects downcased keywords (e.g. `COLOR {}`)
134
- - `upcased true`: indicates that the StaticExpression expects upcased keywords (e.g. `COLOR {}`). Note that upcased static expressions always expect either arguments parentheses or block curly braces to be invoked as a static expression method instead of a constant.
134
+ - `upcased true`: indicates that the StaticExpression expects upcased keywords (e.g. `COLOR {}`). Note that upcased static expressions always expect either argument parentheses or block curly braces to be invoked as a static expression method instead of a constant.
135
+ - `capitalized true`: indicates that the StaticExpression expects capitalized keywords (e.g. `Color {}`). Note that capitalized static expressions always expect either argument parentheses or block curly braces to be invoked as a static expression method instead of a constant.
136
+ - `case_insensitive true`: indicates that the StaticExpression supports downcased, upcased, and capitalized keywords (e.g. `color {}`, `COLOR {}`, and `Color {}`). Note that upcased/capitalized static expressions always expect either argument parentheses or block curly braces to be invoked as a static expression method instead of a constant.
135
137
 
136
138
  `ParentExpression` subclasses can optionally override this extra method, which is included by default and simply invokes the parent's passed block to process its children:
137
139
  - `add_content(parent, keyword, *args, &block)`
@@ -246,7 +248,7 @@ end
246
248
  ### Setup
247
249
 
248
250
  Follow these steps to author a [Glimmer](https://rubygems.org/gems/glimmer) DSL:
249
- - Add `gem 'glimmer', '~> 2.7.2'` to `Gemfile` and run `bundle` or run `gem install glimmer -v2.7.2` and add `require 'glimmer'`
251
+ - Add `gem 'glimmer', '~> 2.7.3'` to `Gemfile` and run `bundle` or run `gem install glimmer -v2.7.3` and add `require 'glimmer'`
250
252
  - Create `glimmer/dsl/[dsl_name]/dsl.rb`, which requires and adds all dynamic expressions for the [dsl_name] Glimmer DSL module as per the code shown in the previous section (or [Official DSLs](#official-dsls) as examples)
251
253
  - Create `glimmer/dsl/[dsl_name]/[expresion_name]_expresion.rb` for every [expresion_name] expression needed, whether dynamic or static
252
254
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.7.2
1
+ 2.7.3
data/glimmer.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: glimmer 2.7.2 ruby lib
5
+ # stub: glimmer 2.7.3 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "glimmer".freeze
9
- s.version = "2.7.2"
9
+ s.version = "2.7.3"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["AndyMaleh".freeze]
14
- s.date = "2022-03-24"
14
+ s.date = "2022-03-26"
15
15
  s.description = "Glimmer is a Ruby DSL Framework for Ruby GUI and More, consisting of a DSL Engine and an Observable / Observer / Data-Binding Library (including Observable Model, Observable Array, and Observable Hash). Used in Glimmer DSL for SWT (JRuby Desktop Development GUI Framework), Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps), Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library), Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library), Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library), Glimmer DSL for FX (FOX Toolkit Ruby Desktop Development GUI Library), Glimmer DSL for Swing (JRuby Swing Desktop Development GUI Library), Glimmer DSL for JFX (JRuby JavaFX Desktop Development GUI Library), Glimmer DSL for XML (& HTML), and Glimmer DSL for CSS.".freeze
16
16
  s.email = "andy.am@gmail.com".freeze
17
17
  s.extra_rdoc_files = [
@@ -84,6 +84,22 @@ module Glimmer
84
84
  end
85
85
  alias capitalize? capitalized?
86
86
  alias capital? capitalized?
87
+
88
+ def case_insensitive(value)
89
+ if value
90
+ self.downcased(true)
91
+ self.upcased(true)
92
+ self.capitalized(true)
93
+ else
94
+ self.downcased(true)
95
+ self.upcased(false)
96
+ self.capitalized(false)
97
+ end
98
+ end
99
+
100
+ def case_insensitive?
101
+ downcased? && upcased? && capitalized?
102
+ end
87
103
  end
88
104
 
89
105
  # Subclasses may optionally implement, but by default it only ensures that
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.2
4
+ version: 2.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-24 00:00:00.000000000 Z
11
+ date: 2022-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: array_include_methods