glimmer 2.7.1 → 2.7.2

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: b7e7983379ea9281e26719f66718fb706d475d3dd9904e20cfd51237625d9322
4
- data.tar.gz: '08fa76d4f37a422a8d6b68845f22ce3a8f41f1b53c8a6d9dced1044c55a14aa6'
3
+ metadata.gz: 3bfbde6699cab50f38cbfce6e98a2b9debf4fd8aa51c61a0e646137525727fb2
4
+ data.tar.gz: f772b755f2f923b394cc6c7dce3482380d615b9883e0051d0ee199e94ea71d3c
5
5
  SHA512:
6
- metadata.gz: cc96cb57a317ebce264b45c916dd6f3d66ecafade85d95dcb357a45ee4a33aed8285f07a2168fd3dbf179d379170645ed7c07b9731a53293ad5817ce3056c875
7
- data.tar.gz: 4d48a96a17918d61527e77a771755a7ffd6c08e365a0d128b51c047e33a57e03fbdfc3b92a45bcab32f7b9a6139140f3ad2eec90b987ed029cf6784aa4163414
6
+ metadata.gz: 799f856d849bda5eada558871849b3d93dec03dea086a69ca53d13a4bd7e0413dd7b3cc0033083310523f215ef747c3242748ba55d584e46737c795d2103aa2b
7
+ data.tar.gz: 5ede8dcc2835adf772f51bb15200670d7b1710eba02e5d0e8cc5a4a2299beb74aea44bd5ff62afbe7506889035ef09fde99ad9f72f8011a3d1ed3e96a7c41d5d
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.2
7
+
8
+ - Support capitalized static expressions
9
+
6
10
  ### 2.7.1
7
11
 
8
12
  - Support upcased static expressions (in addition to default downcased ones)
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.1
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
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)
@@ -8,6 +8,8 @@
8
8
 
9
9
  **(The Original Glimmer Library Handling the World’s Ruby GUI Needs Since 2007. Beware of Imitators!)**
10
10
 
11
+ [**(Glimmer DSL for LibUI Won a Fukuoka Ruby 2022 Special Award!)**](http://www.digitalfukuoka.jp/topics/187?locale=ja)
12
+
11
13
  [**Glimmer**](https://rubygems.org/gems/glimmer) started out as a [GUI Library](https://github.com/AndyObtiva/glimmer-dsl-swt) and grew into a full-fledged [DSL Framework](#dsl-engine) with support for multiple GUI DSLs. Glimmer's namesake is referring to the Glimmer of Ruby in Graphical User Interfaces (contrary to [popular myth](http://blog.headius.com/2007/11/tab-sweep.html) perpetrated by [Charles Nutter](http://blog.headius.com/2007/11/tab-sweep.html), Glimmer has nothing to do with the ill-fated Whitney Houston movie, which does not in fact share the same name)
12
14
 
13
15
  [<img src="https://covers.oreillystatic.com/images/9780596519650/lrg.jpg" width=105 /><br />
@@ -244,7 +246,7 @@ end
244
246
  ### Setup
245
247
 
246
248
  Follow these steps to author a [Glimmer](https://rubygems.org/gems/glimmer) DSL:
247
- - Add `gem 'glimmer', '~> 2.7.1'` to `Gemfile` and run `bundle` or run `gem install glimmer -v2.7.1` and add `require 'glimmer'`
249
+ - Add `gem 'glimmer', '~> 2.7.2'` to `Gemfile` and run `bundle` or run `gem install glimmer -v2.7.2` and add `require 'glimmer'`
248
250
  - 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)
249
251
  - Create `glimmer/dsl/[dsl_name]/[expresion_name]_expresion.rb` for every [expresion_name] expression needed, whether dynamic or static
250
252
 
@@ -545,7 +547,7 @@ Glimmer GUI code (from [samples/hello/hello_table.rb](https://github.com/AndyObt
545
547
 
546
548
  ##### Production Desktop Apps Built with Glimmer DSL for SWT
547
549
 
548
- [<img alt="Are We There Yet Logo" src="https://raw.githubusercontent.com/AndyObtiva/are-we-there-yet/master/are-we-there-yet-logo.svg" width="40" />Are We There Yet?](https://github.com/AndyObtiva/are-we-there-yet) - Small Project Tracking App
550
+ [<img alt="Are We There Yet Logo" src="https://raw.githubusercontent.com/AndyObtiva/are-we-there-yet/master/are-we-there-yet-logo.svg" width="40" />Are We There Yet?](https://github.com/AndyObtiva/are-we-there-yet) - Small Project Tracking App (leveraging ActiveRecord and SQLite)
549
551
 
550
552
  [![Are We There Yet? App Screenshot](https://raw.githubusercontent.com/AndyObtiva/are-we-there-yet/master/are-we-there-yet-screenshot-windows.png)](https://github.com/AndyObtiva/are-we-there-yet)
551
553
 
@@ -553,7 +555,7 @@ Glimmer GUI code (from [samples/hello/hello_table.rb](https://github.com/AndyObt
553
555
 
554
556
  [![Math Bowling App Screenshot](https://raw.githubusercontent.com/AndyObtiva/MathBowling/master/Math-Bowling-Screenshot.png)](https://github.com/AndyObtiva/MathBowling)
555
557
 
556
- [<img alt="Garderie Rainbow Daily Agenda Logo" src="https://raw.githubusercontent.com/AndyObtiva/garderie_rainbow_daily_agenda/master/images/garderie_rainbow_daily_agenda_logo.png" width="40" />Garderie Rainbow Daily Agenda](https://github.com/AndyObtiva/garderie_rainbow_daily_agenda) - A child nursery daily agenda reporting desktop app
558
+ [<img alt="Garderie Rainbow Daily Agenda Logo" src="https://raw.githubusercontent.com/AndyObtiva/garderie_rainbow_daily_agenda/master/images/garderie_rainbow_daily_agenda_logo.png" width="40" />Garderie Rainbow Daily Agenda](https://github.com/AndyObtiva/garderie_rainbow_daily_agenda) - A child nursery daily agenda reporting desktop app (communicates to a Rails Server and stores data using ActiveRecord/PostgreSQL [in its rails_server branch])
557
559
 
558
560
  [![Garderie Rainbow Daily Agenda App Screenshot](https://raw.githubusercontent.com/AndyObtiva/garderie_rainbow_daily_agenda/master/images/garderie_rainbow_daily_agenda_screenshot.png)](https://github.com/AndyObtiva/garderie_rainbow_daily_agenda)
559
561
 
@@ -561,7 +563,7 @@ Glimmer GUI code (from [samples/hello/hello_table.rb](https://github.com/AndyObt
561
563
 
562
564
  [Glimmer DSL for Opal](https://github.com/AndyObtiva/glimmer-dsl-opal) is an experimental proof-of-concept web GUI adapter for [Glimmer](https://github.com/AndyObtiva/glimmer) desktop apps (i.e. apps built with [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt)). It webifies them via [Rails](https://rubyonrails.org/), allowing Ruby desktop apps to run on the web via [Opal Ruby](https://opalrb.com/) without changing a line of code. Apps may then be custom-styled for the web with standard CSS.
563
565
 
564
- Glimmer DSL for Opal webifier successfully reuses the entire [Glimmer](https://github.com/AndyObtiva/glimmer) core DSL engine in [Opal Ruby](https://opalrb.com/) inside a web browser, and as such inherits the full range of powerful Glimmer desktop [data-binding](https://github.com/AndyObtiva/glimmer#data-binding) capabilities for the web.
566
+ Glimmer DSL for Opal webifier successfully reuses the entire [Glimmer](https://github.com/AndyObtiva/glimmer) core DSL engine in [Opal Ruby](https://opalrb.com/) inside a web browser, and as such inherits the full range of Glimmer desktop [data-binding](https://github.com/AndyObtiva/glimmer#data-binding) capabilities for the web.
565
567
 
566
568
  To get started, visit the [Glimmer DSL for Opal project page](https://github.com/AndyObtiva/glimmer-dsl-opal) for instructions on installing the [glimmer-dsl-opal gem](https://rubygems.org/gems/glimmer-dsl-opal).
567
569
 
@@ -1403,7 +1405,7 @@ If your company would like to invest fulltime in further development of the Glim
1403
1405
 
1404
1406
  [MIT](LICENSE.txt)
1405
1407
 
1406
- Copyright (c) 2007-2021 - Andy Maleh.
1408
+ Copyright (c) 2007-2022 - Andy Maleh.
1407
1409
 
1408
1410
  --
1409
1411
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.7.1
1
+ 2.7.2
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.1 ruby lib
5
+ # stub: glimmer 2.7.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "glimmer".freeze
9
- s.version = "2.7.1"
9
+ s.version = "2.7.2"
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-02-26"
14
+ s.date = "2022-03-24"
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 = [
@@ -179,6 +179,17 @@ module Glimmer
179
179
  Glimmer.send(:define_method, keyword.upcase, &STATIC_EXPRESSION_METHOD_FACTORY.call(keyword.upcase))
180
180
  end
181
181
  end
182
+
183
+ def add_capitalized_static_expression(static_expression)
184
+ if static_expression.class.capitalized?
185
+ Glimmer::Config.logger.info {"Adding capitalized static expression: #{static_expression.class.name}"}
186
+ keyword = static_expression.class.keyword
187
+ static_expression_dsl = static_expression.class.dsl
188
+ static_expressions[keyword.capitalize] ||= Concurrent::Hash.new
189
+ static_expressions[keyword.capitalize][static_expression_dsl] = static_expression
190
+ Glimmer.send(:define_method, keyword.capitalize, &STATIC_EXPRESSION_METHOD_FACTORY.call(keyword.capitalize))
191
+ end
192
+ end
182
193
 
183
194
  def expression_class(dsl_namespace, expression_name)
184
195
  dsl_namespace.const_get(expression_class_name(expression_name).to_sym)
@@ -57,7 +57,7 @@ module Glimmer
57
57
 
58
58
  def downcased?
59
59
  # default is true when no attributes are set
60
- @downcased.nil? && @upcased.nil? ? true : @downcased
60
+ @downcased.nil? && @upcased.nil? && @capitalized.nil? ? true : @downcased
61
61
  end
62
62
  alias downcase? downcased?
63
63
 
@@ -71,6 +71,19 @@ module Glimmer
71
71
  @upcased
72
72
  end
73
73
  alias upcase? upcased?
74
+
75
+ def capitalized(value)
76
+ @capitalized = value
77
+ Glimmer::DSL::Engine.add_capitalized_static_expression(new) if @capitalized
78
+ end
79
+ alias capitalize capitalized
80
+ alias capital capitalized
81
+
82
+ def capitalized?
83
+ @capitalized
84
+ end
85
+ alias capitalize? capitalized?
86
+ alias capital? capitalized?
74
87
  end
75
88
 
76
89
  # Subclasses may optionally implement, but by default it only ensures that
@@ -79,6 +92,7 @@ module Glimmer
79
92
  result = false
80
93
  result ||= keyword.downcase == keyword if self.class.downcased?
81
94
  result ||= keyword.upcase == keyword if self.class.upcased?
95
+ result ||= keyword.capitalize == keyword if self.class.capitalized?
82
96
  result
83
97
  end
84
98
  end
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.1
4
+ version: 2.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-26 00:00:00.000000000 Z
11
+ date: 2022-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: array_include_methods